From 27c6de4dc5143e6d660d4b70cb600ec3cabec3dd Mon Sep 17 00:00:00 2001 From: rpj Date: Sat, 30 Jan 2016 16:22:27 +1100 Subject: [PATCH 001/207] JB's solution to MCS lock race condition --- ptw32_MCS_lock.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ptw32_MCS_lock.c b/ptw32_MCS_lock.c index 434e9b85..2c7afa0c 100644 --- a/ptw32_MCS_lock.c +++ b/ptw32_MCS_lock.c @@ -176,8 +176,8 @@ ptw32_mcs_lock_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node) if (0 != pred) { /* the lock was not free. link behind predecessor. */ - pred->next = node; ptw32_mcs_flag_set(&pred->nextFlag); + pred->next = node; ptw32_mcs_flag_wait(&node->readyFlag); } } @@ -213,13 +213,21 @@ ptw32_mcs_lock_release (ptw32_mcs_local_node_t * node) /* no successor, lock is free now */ return; } - + /* wait for successor */ ptw32_mcs_flag_wait(&node->nextFlag); + /* now wait for successor to link to us */ next = (ptw32_mcs_local_node_t *) - PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE((PTW32_INTERLOCKED_SIZEPTR)&node->next, (PTW32_INTERLOCKED_SIZE)0); /* MBR fence */ + PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE((PTW32_INTERLOCKED_SIZEPTR)&node->next, (PTW32_INTERLOCKED_SIZE)0); /* MBR fence */ + while (next == 0) + { + sched_yield(); + next = (ptw32_mcs_local_node_t *) + PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE((PTW32_INTERLOCKED_SIZEPTR)&node->next, (PTW32_INTERLOCKED_SIZE)0); /* MBR fence */ + } } + /* pass the lock */ ptw32_mcs_flag_set(&next->readyFlag); } From f249b9729b6b9b9581dc26c6f22ac1bbadf725ac Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 11 Feb 2016 20:27:25 +1100 Subject: [PATCH 002/207] Fix sub-millisecond timeouts. --- ChangeLog | 8 +++ NEWS | 5 +- ptw32_MCS_lock.c | 50 +++++++------- ptw32_relmillisecs.c | 38 +++++++---- ptw32_timespec.c | 11 +--- tests/ChangeLog | 5 ++ tests/semaphore4t.c | 153 +++++++++++++++++++++++++++++++------------ 7 files changed, 184 insertions(+), 86 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3f233b5f..7b0b8f0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2015-11-01 Mark Smith + + * ptw32_relnillisecs.c: Fix erroneous 0-time waits, symptomizing as + busy-spinning eating CPU. When the time to wait is specified to be less + than 1 millisecond were erroneously rounded down to 0; Modify WinCE + dependency. + * ptw32_timespec.c: Remove NEED_FTIME conditionality. + 2015-06-31 Dimitry <> * sem_init.c: Remove double free() when NEED_SEM defined (for diff --git a/NEWS b/NEWS index 49934cb1..a1053fb8 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ RELEASE 2.10.0 -------------- -(2014-05-29) +(2016-02-11) General ------- @@ -125,6 +125,9 @@ Fixed a potential memory leak in pthread_mutex_init(). The leak would only occur if the mutex initialisation failed (extremely rare if ever). - Jaeeun Choi +Fixed sub-millisecond timeouts, which caused the library to busy wait. +- Mark Smith + RELEASE 2.9.1 ------------- (2012-05-27) diff --git a/ptw32_MCS_lock.c b/ptw32_MCS_lock.c index 434e9b85..59d06d2e 100644 --- a/ptw32_MCS_lock.c +++ b/ptw32_MCS_lock.c @@ -18,17 +18,17 @@ * code distribution. The list can also be seen at the * following World Wide Web location: * http://sources.redhat.com/pthreads-win32/contributors.html - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., @@ -41,7 +41,7 @@ * MCS locks are queue-based locks, where the queue nodes are local to the * thread. The 'lock' is nothing more than a global pointer that points to * the last node in the queue, or is NULL if the queue is empty. - * + * * Originally designed for use as spin locks requiring no kernel resources * for synchronisation or blocking, the implementation below has adapted * the MCS spin lock for use as a general mutex that will suspend threads @@ -64,7 +64,7 @@ * every lock held concurrently by a thread. * * E.g.: - * + * * ptw32_mcs_lock_t lock1 = 0; * ptw32_mcs_lock_t lock2 = 0; * @@ -100,11 +100,11 @@ /* * ptw32_mcs_flag_set -- notify another thread about an event. - * + * * Set event if an event handle has been stored in the flag, and * set flag to -1 otherwise. Note that -1 cannot be a valid handle value. */ -INLINE void +INLINE void ptw32_mcs_flag_set (HANDLE * flag) { HANDLE e = (HANDLE)(PTW32_INTERLOCKED_SIZE)PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE( @@ -120,11 +120,11 @@ ptw32_mcs_flag_set (HANDLE * flag) /* * ptw32_mcs_flag_wait -- wait for notification from another. - * + * * Store an event handle in the flag and wait on it if the flag has not been * set, and proceed without creating an event otherwise. */ -INLINE void +INLINE void ptw32_mcs_flag_wait (HANDLE * flag) { if ((PTW32_INTERLOCKED_SIZE)0 == @@ -150,25 +150,25 @@ ptw32_mcs_flag_wait (HANDLE * flag) /* * ptw32_mcs_lock_acquire -- acquire an MCS lock. - * - * See: + * + * See: * J. M. Mellor-Crummey and M. L. Scott. * Algorithms for Scalable Synchronization on Shared-Memory Multiprocessors. * ACM Transactions on Computer Systems, 9(1):21-65, Feb. 1991. */ #if defined(PTW32_BUILD_INLINED) -INLINE +INLINE #endif /* PTW32_BUILD_INLINED */ -void +void ptw32_mcs_lock_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node) { ptw32_mcs_local_node_t *pred; - + node->lock = lock; node->nextFlag = 0; node->readyFlag = 0; node->next = 0; /* initially, no successor */ - + /* queue for the lock */ pred = (ptw32_mcs_local_node_t *)PTW32_INTERLOCKED_EXCHANGE_PTR((PTW32_INTERLOCKED_PVOID_PTR)lock, (PTW32_INTERLOCKED_PVOID)node); @@ -184,16 +184,16 @@ ptw32_mcs_lock_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node) /* * ptw32_mcs_lock_release -- release an MCS lock. - * - * See: + * + * See: * J. M. Mellor-Crummey and M. L. Scott. * Algorithms for Scalable Synchronization on Shared-Memory Multiprocessors. * ACM Transactions on Computer Systems, 9(1):21-65, Feb. 1991. */ #if defined(PTW32_BUILD_INLINED) -INLINE +INLINE #endif /* PTW32_BUILD_INLINED */ -void +void ptw32_mcs_lock_release (ptw32_mcs_local_node_t * node) { ptw32_mcs_lock_t *lock = node->lock; @@ -213,7 +213,7 @@ ptw32_mcs_lock_release (ptw32_mcs_local_node_t * node) /* no successor, lock is free now */ return; } - + /* wait for successor */ ptw32_mcs_flag_wait(&node->nextFlag); next = (ptw32_mcs_local_node_t *) @@ -228,9 +228,9 @@ ptw32_mcs_lock_release (ptw32_mcs_local_node_t * node) * ptw32_mcs_lock_try_acquire */ #if defined(PTW32_BUILD_INLINED) -INLINE +INLINE #endif /* PTW32_BUILD_INLINED */ -int +int ptw32_mcs_lock_try_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node) { node->lock = lock; @@ -256,9 +256,9 @@ ptw32_mcs_lock_try_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * no * Should only be called by the thread that has the lock. */ #if defined(PTW32_BUILD_INLINED) -INLINE +INLINE #endif /* PTW32_BUILD_INLINED */ -void +void ptw32_mcs_node_transfer (ptw32_mcs_local_node_t * new_node, ptw32_mcs_local_node_t * old_node) { new_node->lock = old_node->lock; @@ -274,7 +274,7 @@ ptw32_mcs_node_transfer (ptw32_mcs_local_node_t * new_node, ptw32_mcs_local_node /* * A successor has queued after us, so wait for them to link to us */ - while (old_node->next == 0) + while (0 == old_node->next) { sched_yield(); } diff --git a/ptw32_relmillisecs.c b/ptw32_relmillisecs.c index 34a855c1..e9190bdc 100644 --- a/ptw32_relmillisecs.c +++ b/ptw32_relmillisecs.c @@ -18,17 +18,17 @@ * code distribution. The list can also be seen at the * following World Wide Web location: * http://sources.redhat.com/pthreads-win32/contributors.html - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., @@ -47,20 +47,23 @@ #if defined(PTW32_BUILD_INLINED) -INLINE +INLINE #endif /* PTW32_BUILD_INLINED */ DWORD ptw32_relmillisecs (const struct timespec * abstime) { + const int64_t NANOSEC_PER_SEC = 1000000000; const int64_t NANOSEC_PER_MILLISEC = 1000000; const int64_t MILLISEC_PER_SEC = 1000; DWORD milliseconds; int64_t tmpAbsMilliseconds; + int64_t tmpAbsNanoseconds; int64_t tmpCurrMilliseconds; + int64_t tmpCurrNanoseconds; + #if defined(NEED_FTIME) struct timespec currSysTime; FILETIME ft; - SYSTEMTIME st; #else /* ! NEED_FTIME */ #if ( defined(_MSC_VER) && _MSC_VER >= 1300 ) /* MSVC7+ */ || \ ( defined(PTW32_CONFIG_MINGW) && __MSVCRT_VERSION__ >= 0x0601 ) @@ -71,8 +74,8 @@ ptw32_relmillisecs (const struct timespec * abstime) #endif /* NEED_FTIME */ - /* - * Calculate timeout as milliseconds from current system time. + /* + * Calculate timeout as milliseconds from current system time. */ /* @@ -84,23 +87,27 @@ ptw32_relmillisecs (const struct timespec * abstime) */ tmpAbsMilliseconds = (int64_t)abstime->tv_sec * MILLISEC_PER_SEC; tmpAbsMilliseconds += ((int64_t)abstime->tv_nsec + (NANOSEC_PER_MILLISEC/2)) / NANOSEC_PER_MILLISEC; + tmpAbsNanoseconds = (int64_t)abstime->tv_nsec + ((int64_t)abstime->tv_sec * NANOSEC_PER_SEC); /* get current system time */ #if defined(NEED_FTIME) +# if defined(WINCE) + + SYSTEMTIME st; GetSystemTime(&st); SystemTimeToFileTime(&st, &ft); - /* - * GetSystemTimeAsFileTime(&ft); would be faster, - * but it does not exist on WinCE - */ +# else + GetSystemTimeAsFileTime(&ft); +# endif ptw32_filetime_to_timespec(&ft, &currSysTime); tmpCurrMilliseconds = (int64_t)currSysTime.tv_sec * MILLISEC_PER_SEC; tmpCurrMilliseconds += ((int64_t)currSysTime.tv_nsec + (NANOSEC_PER_MILLISEC/2)) / NANOSEC_PER_MILLISEC; + tmpCurrNanoseconds = (int64_t)currSysTime->tv_nsec + ((int64_t)currSysTime->tv_sec * NANOSEC_PER_SEC); #else /* ! NEED_FTIME */ @@ -115,6 +122,7 @@ ptw32_relmillisecs (const struct timespec * abstime) tmpCurrMilliseconds = (int64_t) currSysTime.time * MILLISEC_PER_SEC; tmpCurrMilliseconds += (int64_t) currSysTime.millitm; + tmpCurrNanoseconds = tmpCurrMilliseconds * NANOSEC_PER_MILLISEC; #endif /* NEED_FTIME */ @@ -133,5 +141,13 @@ ptw32_relmillisecs (const struct timespec * abstime) milliseconds = 0; } + if (milliseconds == 0 && tmpAbsNanoseconds > tmpCurrNanoseconds) { + /* + * millisecond granularity was too small to represent the wait time. + * return the minimum time in milliseconds. + */ + milliseconds = 1; + } + return milliseconds; } diff --git a/ptw32_timespec.c b/ptw32_timespec.c index 5d4e38ca..bb6192e8 100644 --- a/ptw32_timespec.c +++ b/ptw32_timespec.c @@ -19,17 +19,17 @@ * code distribution. The list can also be seen at the * following World Wide Web location: * http://sources.redhat.com/pthreads-win32/contributors.html - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., @@ -43,9 +43,6 @@ #include "pthread.h" #include "implement.h" - -#if defined(NEED_FTIME) - /* * time between jan 1, 1601 and jan 1, 1970 in units of 100 nanoseconds */ @@ -84,5 +81,3 @@ ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts) (int) ((*(int64_t *) ft - PTW32_TIMESPEC_TO_FILETIME_OFFSET - ((int64_t) ts->tv_sec * (int64_t) 10000000)) * 100); } - -#endif /* NEED_FTIME */ diff --git a/tests/ChangeLog b/tests/ChangeLog index 80f732c8..0c7d56cb 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2015-11-01 Mark Smith + + * semaphore4t.c: Enhanced and additional testing of sub-millisecond + timeouts. + 2014-07-22 Scott Libert * semaphore3.c: Wait for threads to complete before exiting main(). diff --git a/tests/semaphore4t.c b/tests/semaphore4t.c index 56044eca..bd5a883e 100644 --- a/tests/semaphore4t.c +++ b/tests/semaphore4t.c @@ -16,17 +16,17 @@ * code distribution. The list can also be seen at the * following World Wide Web location: * http://sources.redhat.com/pthreads-win32/contributors.html - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., @@ -36,7 +36,7 @@ * * Test Synopsis: Verify sem_getvalue returns the correct number of waiters * after threads are cancelled. - * - + * - * * Test Method (Validation or Falsification): * - Validation @@ -45,7 +45,7 @@ * - sem_timedwait cancellation. * * Features Tested: - * - + * - * * Cases Tested: * - @@ -74,9 +74,12 @@ */ #include "test.h" +#include "../ptw32_timespec.c" #define MAX_COUNT 100 +const int64_t NANOSEC_PER_SEC = 1000000000; + sem_t s; void * @@ -87,44 +90,112 @@ thr (void * arg) } int -main() +timeoutwithnanos(sem_t sem, int nanoseconds) { - int value = 0; - int i; - pthread_t t[MAX_COUNT+1]; - - assert(sem_init(&s, PTHREAD_PROCESS_PRIVATE, 0) == 0); - assert(sem_getvalue(&s, &value) == 0); - assert(value == 0); - - for (i = 1; i <= MAX_COUNT; i++) - { - assert(pthread_create(&t[i], NULL, thr, NULL) == 0); - do { - sched_yield(); - assert(sem_getvalue(&s, &value) == 0); - } while (value != -i); - assert(-value == i); - } - - assert(sem_getvalue(&s, &value) == 0); - assert(-value == MAX_COUNT); - assert(pthread_cancel(t[50]) == 0); - assert(pthread_join(t[50], NULL) == 0); - assert(sem_getvalue(&s, &value) == 0); - assert(-value == MAX_COUNT - 1); - - for (i = MAX_COUNT - 2; i >= 0; i--) - { - assert(sem_post(&s) == 0); - assert(sem_getvalue(&s, &value) == 0); - assert(-value == i); - } - - for (i = 1; i <= MAX_COUNT; i++) - if (i != 50) - assert(pthread_join(t[i], NULL) == 0); + struct timespec ts; + FILETIME ft_before, ft_after; + int rc; + + GetSystemTimeAsFileTime(&ft_before); + ptw32_filetime_to_timespec(&ft_before, &ts); + ts.tv_nsec += nanoseconds; + if (ts.tv_nsec >= NANOSEC_PER_SEC) + { + ts.tv_sec += 1; + ts.tv_nsec -= NANOSEC_PER_SEC; + } + + rc = sem_timedwait(&sem, &ts); + /* This should have timed out */ + assert(rc != 0); + assert(errno == ETIMEDOUT); + GetSystemTimeAsFileTime(&ft_after); + // We specified a non-zero wait. Time must advance. + if (ft_before.dwLowDateTime == ft_after.dwLowDateTime && ft_before.dwHighDateTime == ft_after.dwHighDateTime) + { + printf("nanoseconds: %d, rc: %d, errno: %d. before filetime: %d, %d; after filetime: %d, %d\n", + nanoseconds, rc, errno, + (int)ft_before.dwLowDateTime, (int)ft_before.dwHighDateTime, + (int)ft_after.dwLowDateTime, (int)ft_after.dwHighDateTime); + assert("time must advance during sem_timedwait." == NULL); + return 1; + } return 0; } +int +testtimeout() +{ + int rc = 0; + sem_t s2; + int value = 0; + assert(sem_init(&s2, PTHREAD_PROCESS_PRIVATE, 0) == 0); + assert(sem_getvalue(&s2, &value) == 0); + assert(value == 0); + + rc += timeoutwithnanos(s2, 1000); // 1 microsecond + rc += timeoutwithnanos(s2, 10 * 1000); // 10 microseconds + rc += timeoutwithnanos(s2, 100 * 1000); // 100 microseconds + rc += timeoutwithnanos(s2, 1000 * 1000); // 1 millisecond + + return rc; +} + +int +testmainstuff() +{ + int value = 0; + int i; + pthread_t t[MAX_COUNT+1]; + + assert(sem_init(&s, PTHREAD_PROCESS_PRIVATE, 0) == 0); + assert(sem_getvalue(&s, &value) == 0); + assert(value == 0); + + for (i = 1; i <= MAX_COUNT; i++) + { + assert(pthread_create(&t[i], NULL, thr, NULL) == 0); + do { + sched_yield(); + assert(sem_getvalue(&s, &value) == 0); + } while (value != -i); + assert(-value == i); + } + + assert(sem_getvalue(&s, &value) == 0); + assert(-value == MAX_COUNT); + assert(pthread_cancel(t[50]) == 0); + assert(pthread_join(t[50], NULL) == 0); + assert(sem_getvalue(&s, &value) == 0); + assert(-value == MAX_COUNT - 1); + + for (i = MAX_COUNT - 2; i >= 0; i--) + { + assert(sem_post(&s) == 0); + assert(sem_getvalue(&s, &value) == 0); + assert(-value == i); + } + + for (i = 1; i <= MAX_COUNT; i++) + { + if (i != 50) + { + assert(pthread_join(t[i], NULL) == 0); + } + } + + return 0; +} + +int +main() +{ + int rc = 0; + + rc += testmainstuff(); + rc += testtimeout(); + + return rc; +} + From 4279234d8bb497c4c156e6944153467cc87e047c Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 11 Feb 2016 20:33:28 +1100 Subject: [PATCH 003/207] Quell compiler warning. --- tests/semaphore4t.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/semaphore4t.c b/tests/semaphore4t.c index bd5a883e..7d468cc3 100644 --- a/tests/semaphore4t.c +++ b/tests/semaphore4t.c @@ -78,7 +78,7 @@ #define MAX_COUNT 100 -const int64_t NANOSEC_PER_SEC = 1000000000; +const long NANOSEC_PER_SEC = 1000000000L; sem_t s; From ccf2a6adf0b3885ef97a6d4967bd3b243fa7c048 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Fri, 12 Feb 2016 00:53:38 +1100 Subject: [PATCH 004/207] Fix MCS lock race condition. --- ChangeLog | 6 ++++++ NEWS | 10 ++++++++-- ptw32_MCS_lock.c | 29 +++++++++++++++++++++++++++-- 3 files changed, 41 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7b0b8f0a..bebbfd5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-11-01 Anurag Sharma + + * ptw32_MCS_lock.c: Fix a race condition causing crashes. + This race condition was also analysed and reported with a slightly + different fix independently by Jonathan Brown at VMware. + 2015-11-01 Mark Smith * ptw32_relnillisecs.c: Fix erroneous 0-time waits, symptomizing as diff --git a/NEWS b/NEWS index a1053fb8..e09c56c2 100644 --- a/NEWS +++ b/NEWS @@ -21,8 +21,8 @@ then please consider how your toolchains might be contributing to the failure. See the README file for more detailed descriptions of the toolchains and test systems that we have used to get the tests to pass successfully. We recommend MinGW64 over MinGW32 for both 64 and 32 bit -builds. MinGW also includes its own independent pthreads implementation, -which you may prefer to use. +GNU CC builds. MinGW also includes its own independent pthreads +implementation, which you may prefer to use. New Features ------------ @@ -128,6 +128,12 @@ only occur if the mutex initialisation failed (extremely rare if ever). Fixed sub-millisecond timeouts, which caused the library to busy wait. - Mark Smith +Fix a race condition and crash in MCS locks. The waiter queue management +code in ptw32_mcs_lock_acquire was racing with the queue management code +in ptw32_mcs_lock_release and causing a segmentation fault. +- Anurag Sharma +- Jonathan Brown (also reported this bug and provided a fix) + RELEASE 2.9.1 ------------- (2012-05-27) diff --git a/ptw32_MCS_lock.c b/ptw32_MCS_lock.c index 59d06d2e..ad89b2b2 100644 --- a/ptw32_MCS_lock.c +++ b/ptw32_MCS_lock.c @@ -36,6 +36,7 @@ */ /* + * About MCS locks: * * MCS locks are queue-based locks, where the queue nodes are local to the @@ -88,6 +89,7 @@ * } * return (void *)0; * } + * */ #ifdef HAVE_CONFIG_H @@ -111,7 +113,17 @@ ptw32_mcs_flag_set (HANDLE * flag) (PTW32_INTERLOCKED_SIZEPTR)flag, (PTW32_INTERLOCKED_SIZE)-1, (PTW32_INTERLOCKED_SIZE)0); - if ((HANDLE)0 != e) + /* + * NOTE: when e == -1 and the MSVC debugger is attached to + * the process, we get an exception that halts the + * program noting that the handle value is invalid; + * although innocuous this behavior is cumbersome when + * debugging. Therefore we avoid calling SetEvent() + * for 'known' invalid HANDLE values that can arise + * when the above interlocked-compare-and-exchange + * is executed. + */ + if (((HANDLE)0 != e) && ((HANDLE)-1 != e)) { /* another thread has already stored an event handle in the flag */ SetEvent(e); @@ -176,7 +188,7 @@ ptw32_mcs_lock_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node) if (0 != pred) { /* the lock was not free. link behind predecessor. */ - pred->next = node; + PTW32_INTERLOCKED_EXCHANGE_PTR((PTW32_INTERLOCKED_PVOID_PTR)&pred->next, (PTW32_INTERLOCKED_PVOID)node); ptw32_mcs_flag_set(&pred->nextFlag); ptw32_mcs_flag_wait(&node->readyFlag); } @@ -219,6 +231,11 @@ ptw32_mcs_lock_release (ptw32_mcs_local_node_t * node) next = (ptw32_mcs_local_node_t *) PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE((PTW32_INTERLOCKED_SIZEPTR)&node->next, (PTW32_INTERLOCKED_SIZE)0); /* MBR fence */ } + else + { + /* Even if the next is non-0, the successor may still be trying to set the next flag on us, therefore we must wait. */ + ptw32_mcs_flag_wait(&node->nextFlag); + } /* pass the lock */ ptw32_mcs_flag_set(&next->readyFlag); @@ -278,6 +295,14 @@ ptw32_mcs_node_transfer (ptw32_mcs_local_node_t * new_node, ptw32_mcs_local_node { sched_yield(); } + + /* we must wait for the next Node to finish inserting itself. */ + ptw32_mcs_flag_wait(&old_node->nextFlag); + /* + * Copy the nextFlag state also so we don't block on it when releasing + * this lock. + */ new_node->next = old_node->next; + new_node->nextFlag = old_node->nextFlag; } } From e523f3a03b56b2d075855d93fb5093913d653cd9 Mon Sep 17 00:00:00 2001 From: rpj Date: Sun, 14 Feb 2016 13:57:40 +1100 Subject: [PATCH 005/207] Remove preprocessor directive not supported by MSC RC --- version.rc | 2 -- 1 file changed, 2 deletions(-) diff --git a/version.rc b/version.rc index 93ed3b75..2326b9dc 100644 --- a/version.rc +++ b/version.rc @@ -58,8 +58,6 @@ # elif defined(__CLEANUP_SEH) # define PTW32_VERSIONINFO_NAME "pthreadVSE2.DLL\0" # define PTW32_VERSIONINFO_DESCRIPTION "MS C SEH " PTW32_ARCH "\0" -# else -# error Resource compiler doesn't know which cleanup style you're using - see version.rc # endif #elif defined(__GNUC__) # if defined(_M_X64) From 889b6f54da4ea367dac6ddbabb93ec6538b3b16b Mon Sep 17 00:00:00 2001 From: rpj Date: Sun, 14 Feb 2016 14:43:51 +1100 Subject: [PATCH 006/207] Add another check for processor architecture for RC. --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c85008a3..44f08a0e 100644 --- a/Makefile +++ b/Makefile @@ -239,9 +239,15 @@ $(SMALL_STATIC_STAMPS): $(STATIC_OBJS) # as provided by the SDK (VS 2010 Express plus SDK 7.1) # PLATFORM is an environment variable that may be set in the VS 2013 Express x64 cross # development environment +# On my HP Compaq PC running VS 10, PLATFORM was defined as "HPD" but PROCESSOR_ARCHITECTURE +# was defined as "x86" .rc.res: !IF DEFINED(PLATFORM) - rc /dPTW32_ARCH$(PLATFORM) /dPTW32_RC_MSC /d$(CLEANUP) $< +! IF DEFINED(PROCESSOR_ARCHITECTURE) + rc /dPTW32_ARCH$(PROCESSOR_ARCHITECTURE) /dPTW32_RC_MSC /d$(CLEANUP) $< +! ELSE + rc /dPTW32_ARCH$(PLATFORM) /dPTW32_RC_MSC /d$(CLEANUP) $< +! ENDIF !ELSE IF DEFINED(TARGET_CPU) rc /dPTW32_ARCH$(TARGET_CPU) /dPTW32_RC_MSC /d$(CLEANUP) $< !ELSE From 6926afdbd10b0a94ad265ae7f4c741be73570260 Mon Sep 17 00:00:00 2001 From: rpj Date: Sun, 14 Feb 2016 15:03:11 +1100 Subject: [PATCH 007/207] Use secure string copy "strncpy_s" --- pthread_getname_np.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pthread_getname_np.c b/pthread_getname_np.c index 923f8f17..ff8c2424 100644 --- a/pthread_getname_np.c +++ b/pthread_getname_np.c @@ -57,11 +57,7 @@ pthread_getname_np(pthread_t thr, char *name, int len) ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); -#if defined(_MSC_VER) -# pragma warning(suppress:4996) -#endif - strncpy(name, tp->name, len - 1); - name[len - 1] = '\0'; + strncpy_s(name, len, tp->name, len - 1); ptw32_mcs_lock_release (&threadLock); From 03c62e1bc76fca1e74173fa65c37a9315d5ed0b1 Mon Sep 17 00:00:00 2001 From: rpj Date: Sun, 14 Feb 2016 15:32:13 +1100 Subject: [PATCH 008/207] Return the result from strncpy_s --- pthread_getname_np.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pthread_getname_np.c b/pthread_getname_np.c index ff8c2424..db97193c 100644 --- a/pthread_getname_np.c +++ b/pthread_getname_np.c @@ -57,9 +57,9 @@ pthread_getname_np(pthread_t thr, char *name, int len) ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); - strncpy_s(name, len, tp->name, len - 1); + result = strncpy_s(name, len, tp->name, len - 1); ptw32_mcs_lock_release (&threadLock); - return 0; + return result; } From 58555c2bf70dc6ea262b26cbbfb33ce3373a9884 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 18 Feb 2016 00:51:42 +1100 Subject: [PATCH 009/207] Recognise upper and lower case "x64", "x86" --- version.rc | 806 ++++++++++++++++++++++++++--------------------------- 1 file changed, 402 insertions(+), 404 deletions(-) diff --git a/version.rc b/version.rc index 93ed3b75..3e65c160 100644 --- a/version.rc +++ b/version.rc @@ -1,404 +1,402 @@ -/* This is an implementation of the threads API of POSIX 1003.1-2001. - * - * -------------------------------------------------------------------------- - * - * 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 - */ - -#include -#include "pthread.h" - -/* - * Note: the correct __CLEANUP_* macro must be defined corresponding to - * the definition used for the object file builds. This is done in the - * relevent makefiles for the command line builds, but users should ensure - * that their resource compiler knows what it is too. - * If using the default (no __CLEANUP_* defined), pthread.h will define it - * as __CLEANUP_C. - */ - -#if defined(PTW32_RC_MSC) -# if defined(PTW32_ARCHx64) -# define PTW32_ARCH "x64" -# elif defined(PTW32_ARCHx86) -# define PTW32_ARCH "x86" -# endif -# if defined(__CLEANUP_C) -# define PTW32_VERSIONINFO_NAME "pthreadVC2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "MS C " PTW32_ARCH "\0" -# elif defined(__CLEANUP_CXX) -# define PTW32_VERSIONINFO_NAME "pthreadVCE2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "MS C++ " PTW32_ARCH "\0" -# elif defined(__CLEANUP_SEH) -# define PTW32_VERSIONINFO_NAME "pthreadVSE2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "MS C SEH " PTW32_ARCH "\0" -# else -# error Resource compiler doesn't know which cleanup style you're using - see version.rc -# endif -#elif defined(__GNUC__) -# if defined(_M_X64) -# define PTW32_ARCH "x64 (mingw64)" -# else -# define PTW32_ARCH "x86 (mingw32)" -# endif -# if defined(__CLEANUP_C) -# define PTW32_VERSIONINFO_NAME "pthreadGC2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "GNU C " PTW32_ARCH "\0" -# elif defined(__CLEANUP_CXX) -# define PTW32_VERSIONINFO_NAME "pthreadGCE2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "GNU C++ " PTW32_ARCH "\0" -# else -# error Resource compiler doesn't know which cleanup style you're using - see version.rc -# endif -#elif defined(__BORLANDC__) -# if defined(_M_X64) -# define PTW32_ARCH "x64 (Borland)" -# else -# define PTW32_ARCH "x86 (Borland)" -# endif -# if defined(__CLEANUP_C) -# define PTW32_VERSIONINFO_NAME "pthreadBC2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "BORLAND C " PTW32_ARCH "\0" -# elif defined(__CLEANUP_CXX) -# define PTW32_VERSIONINFO_NAME "pthreadBCE2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "BORLAND C++ " PTW32_ARCH "\0" -# else -# error Resource compiler doesn't know which cleanup style you're using - see version.rc -# endif -#elif defined(__WATCOMC__) -# if defined(_M_X64) -# define PTW32_ARCH "x64 (Watcom)" -# else -# define PTW32_ARCH "x86 (Watcom)" -# endif -# if defined(__CLEANUP_C) -# define PTW32_VERSIONINFO_NAME "pthreadWC2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "WATCOM C " PTW32_ARCH "\0" -# elif defined(__CLEANUP_CXX) -# define PTW32_VERSIONINFO_NAME "pthreadWCE2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "WATCOM C++ " PTW32_ARCH "\0" -# else -# error Resource compiler doesn't know which cleanup style you're using - see version.rc -# endif -#else -# error Resource compiler doesn't know which compiler you're using - see version.rc -#endif - - -VS_VERSION_INFO VERSIONINFO - FILEVERSION PTW32_VERSION - PRODUCTVERSION PTW32_VERSION - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK - FILEFLAGS 0 - FILEOS VOS__WINDOWS32 - FILETYPE VFT_DLL -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "ProductName", "POSIX Threads for Windows LPGL\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" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -/* -VERSIONINFO Resource - -The VERSIONINFO resource-definition statement creates a version-information -resource. The resource contains such information about the file as its -version number, its intended operating system, and its original filename. -The resource is intended to be used with the Version Information functions. - -versionID VERSIONINFO fixed-info { block-statement...} - -versionID - Version-information resource identifier. This value must be 1. - -fixed-info - Version information, such as the file version and the intended operating - system. This parameter consists of the following statements. - - - Statement Description - -------------------------------------------------------------------------- - FILEVERSION - version Binary version number for the file. The version - consists of two 32-bit integers, defined by four - 16-bit integers. For example, "FILEVERSION 3,10,0,61" - is translated into two doublewords: 0x0003000a and - 0x0000003d, in that order. Therefore, if version is - defined by the DWORD values dw1 and dw2, they need - to appear in the FILEVERSION statement as follows: - HIWORD(dw1), LOWORD(dw1), HIWORD(dw2), LOWORD(dw2). - PRODUCTVERSION - version Binary version number for the product with which the - file is distributed. The version parameter is two - 32-bit integers, defined by four 16-bit integers. - For more information about version, see the - FILEVERSION description. - FILEFLAGSMASK - fileflagsmask Bits in the FILEFLAGS statement are valid. If a bit - is set, the corresponding bit in FILEFLAGS is valid. - FILEFLAGSfileflags Attributes of the file. The fileflags parameter must - be the combination of all the file flags that are - valid at compile time. For 16-bit Windows, this - value is 0x3f. - FILEOSfileos Operating system for which this file was designed. - The fileos parameter can be one of the operating - system values given in the Remarks section. - FILETYPEfiletype General type of file. The filetype parameter can be - one of the file type values listed in the Remarks - section. - FILESUBTYPE - subtype Function of the file. The subtype parameter is zero - unless the type parameter in the FILETYPE statement - is VFT_DRV, VFT_FONT, or VFT_VXD. For a list of file - subtype values, see the Remarks section. - -block-statement - Specifies one or more version-information blocks. A block can contain - string information or variable information. For more information, see - StringFileInfo Block or VarFileInfo Block. - -Remarks - -To use the constants specified with the VERSIONINFO statement, you must -include the Winver.h or Windows.h header file in the resource-definition file. - -The following list describes the parameters used in the VERSIONINFO statement: - -fileflags - A combination of the following values. - - Value Description - - VS_FF_DEBUG File contains debugging information or is compiled - with debugging features enabled. - VS_FF_PATCHED File has been modified and is not identical to the - original shipping file of the same version number. - VS_FF_PRERELEASE File is a development version, not a commercially - released product. - VS_FF_PRIVATEBUILD File was not built using standard release procedures. - If this value is given, the StringFileInfo block must - contain a PrivateBuild string. - VS_FF_SPECIALBUILD File was built by the original company using standard - release procedures but is a variation of the standard - file of the same version number. If this value is - given, the StringFileInfo block must contain a - SpecialBuild string. - -fileos - One of the following values. - - Value Description - - VOS_UNKNOWN The operating system for which the file was designed - is unknown. - VOS_DOS File was designed for MS-DOS. - VOS_NT File was designed for Windows Server 2003 family, - Windows XP, Windows 2000, or Windows NT. - VOS__WINDOWS16 File was designed for 16-bit Windows. - VOS__WINDOWS32 File was designed for 32-bit Windows. - VOS_DOS_WINDOWS16 File was designed for 16-bit Windows running with - MS-DOS. - VOS_DOS_WINDOWS32 File was designed for 32-bit Windows running with - MS-DOS. - VOS_NT_WINDOWS32 File was designed for Windows Server 2003 family, - Windows XP, Windows 2000, or Windows NT. - - The values 0x00002L, 0x00003L, 0x20000L and 0x30000L are reserved. - -filetype - One of the following values. - - Value Description - - VFT_UNKNOWN File type is unknown. - VFT_APP File contains an application. - VFT_DLL File contains a dynamic-link library (DLL). - VFT_DRV File contains a device driver. If filetype is - VFT_DRV, subtype contains a more specific - description of the driver. - VFT_FONT File contains a font. If filetype is VFT_FONT, - subtype contains a more specific description of the - font. - VFT_VXD File contains a virtual device. - VFT_STATIC_LIB File contains a static-link library. - - All other values are reserved for use by Microsoft. - -subtype - Additional information about the file type. - - If filetype specifies VFT_DRV, this parameter can be one of the - following values. - - Value Description - - VFT2_UNKNOWN Driver type is unknown. - VFT2_DRV_COMM File contains a communications driver. - VFT2_DRV_PRINTER File contains a printer driver. - VFT2_DRV_KEYBOARD File contains a keyboard driver. - VFT2_DRV_LANGUAGE File contains a language driver. - VFT2_DRV_DISPLAY File contains a display driver. - VFT2_DRV_MOUSE File contains a mouse driver. - VFT2_DRV_NETWORK File contains a network driver. - VFT2_DRV_SYSTEM File contains a system driver. - VFT2_DRV_INSTALLABLE File contains an installable driver. - VFT2_DRV_SOUND File contains a sound driver. - VFT2_DRV_VERSIONED_PRINTER File contains a versioned printer driver. - - If filetype specifies VFT_FONT, this parameter can be one of the - following values. - - Value Description - - VFT2_UNKNOWN Font type is unknown. - VFT2_FONT_RASTER File contains a raster font. - VFT2_FONT_VECTOR File contains a vector font. - VFT2_FONT_TRUETYPE File contains a TrueType font. - - If filetype specifies VFT_VXD, this parameter must be the virtual-device - identifier included in the virtual-device control block. - - All subtype values not listed here are reserved for use by Microsoft. - -langID - One of the following language codes. - - Code Language Code Language - - 0x0401 Arabic 0x0415 Polish - 0x0402 Bulgarian 0x0416 Portuguese (Brazil) - 0x0403 Catalan 0x0417 Rhaeto-Romanic - 0x0404 Traditional Chinese 0x0418 Romanian - 0x0405 Czech 0x0419 Russian - 0x0406 Danish 0x041A Croato-Serbian (Latin) - 0x0407 German 0x041B Slovak - 0x0408 Greek 0x041C Albanian - 0x0409 U.S. English 0x041D Swedish - 0x040A Castilian Spanish 0x041E Thai - 0x040B Finnish 0x041F Turkish - 0x040C French 0x0420 Urdu - 0x040D Hebrew 0x0421 Bahasa - 0x040E Hungarian 0x0804 Simplified Chinese - 0x040F Icelandic 0x0807 Swiss German - 0x0410 Italian 0x0809 U.K. English - 0x0411 Japanese 0x080A Mexican Spanish - 0x0412 Korean 0x080C Belgian French - 0x0413 Dutch 0x0C0C Canadian French - 0x0414 Norwegian ā€“ Bokmal 0x100C Swiss French - 0x0810 Swiss Italian 0x0816 Portuguese (Portugal) - 0x0813 Belgian Dutch 0x081A Serbo-Croatian (Cyrillic) - 0x0814 Norwegian ā€“ Nynorsk - -charsetID - One of the following character-set identifiers. - - Identifier Character Set - - 0 7-bit ASCII - 932 Japan (Shift %Gā€“%@ JIS X-0208) - 949 Korea (Shift %Gā€“%@ KSC 5601) - 950 Taiwan (Big5) - 1200 Unicode - 1250 Latin-2 (Eastern European) - 1251 Cyrillic - 1252 Multilingual - 1253 Greek - 1254 Turkish - 1255 Hebrew - 1256 Arabic - -string-name - One of the following predefined names. - - Name Description - - Comments Additional information that should be displayed for - diagnostic purposes. - CompanyName Company that produced the file%Gā€”%@for example, - "Microsoft Corporation" or "Standard Microsystems - Corporation, Inc." This string is required. - FileDescription File description to be presented to users. This - string may be displayed in a list box when the user - is choosing files to install%Gā€”%@for example, - "Keyboard Driver for AT-Style Keyboards". This - string is required. - FileVersion Version number of the file%Gā€”%@for example, - "3.10" or "5.00.RC2". This string is required. - InternalName Internal name of the file, if one exists ā€” for - example, a module name if the file is a dynamic-link - library. If the file has no internal name, this - string should be the original filename, without - extension. This string is required. - LegalCopyright Copyright notices that apply to the file. This - should include the full text of all notices, legal - symbols, copyright dates, and so on ā€” for example, - "Copyright (C) Microsoft Corporation 1990ā€“1999". - This string is optional. - LegalTrademarks Trademarks and registered trademarks that apply to - the file. This should include the full text of all - notices, legal symbols, trademark numbers, and so on. - This string is optional. - OriginalFilename Original name of the file, not including a path. - This information enables an application to determine - whether a file has been renamed by a user. The - format of the name depends on the file system for - which the file was created. This string is required. - PrivateBuild Information about a private version of the file ā€” for - example, "Built by TESTER1 on \TESTBED". This string - should be present only if VS_FF_PRIVATEBUILD is - specified in the fileflags parameter of the root - block. - ProductName Name of the product with which the file is - distributed. This string is required. - ProductVersion Version of the product with which the file is - distributed ā€” for example, "3.10" or "5.00.RC2". - This string is required. - SpecialBuild Text that indicates how this version of the file - differs from the standard version ā€” for example, - "Private build for TESTER1 solving mouse problems - on M250 and M250E computers". This string should be - present only if VS_FF_SPECIALBUILD is specified in - the fileflags parameter of the root block. - */ +/* This is an implementation of the threads API of POSIX 1003.1-2001. + * + * -------------------------------------------------------------------------- + * + * 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 + */ + +#include +#include "pthread.h" + +/* + * Note: the correct __CLEANUP_* macro must be defined corresponding to + * the definition used for the object file builds. This is done in the + * relevent makefiles for the command line builds, but users should ensure + * that their resource compiler knows what it is too. + * If using the default (no __CLEANUP_* defined), pthread.h will define it + * as __CLEANUP_C. + */ + +#if defined(PTW32_RC_MSC) +# if defined(PTW32_ARCHx64) || defined(PTW32_ARCHX64) +# define PTW32_ARCH "x64" +# elif defined(PTW32_ARCHx86) || defined(PTW32_ARCHX86) +# define PTW32_ARCH "x86" +# endif +# if defined(__CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadVC2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C " PTW32_ARCH "\0" +# elif defined(__CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadVCE2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C++ " PTW32_ARCH "\0" +# elif defined(__CLEANUP_SEH) +# define PTW32_VERSIONINFO_NAME "pthreadVSE2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C SEH " PTW32_ARCH "\0" +# endif +#elif defined(__GNUC__) +# if defined(_M_X64) +# define PTW32_ARCH "x64 (mingw64)" +# else +# define PTW32_ARCH "x86 (mingw32)" +# endif +# if defined(__CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadGC2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "GNU C " PTW32_ARCH "\0" +# elif defined(__CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadGCE2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "GNU C++ " PTW32_ARCH "\0" +# else +# error Resource compiler doesn't know which cleanup style you're using - see version.rc +# endif +#elif defined(__BORLANDC__) +# if defined(_M_X64) +# define PTW32_ARCH "x64 (Borland)" +# else +# define PTW32_ARCH "x86 (Borland)" +# endif +# if defined(__CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadBC2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "BORLAND C " PTW32_ARCH "\0" +# elif defined(__CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadBCE2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "BORLAND C++ " PTW32_ARCH "\0" +# else +# error Resource compiler doesn't know which cleanup style you're using - see version.rc +# endif +#elif defined(__WATCOMC__) +# if defined(_M_X64) +# define PTW32_ARCH "x64 (Watcom)" +# else +# define PTW32_ARCH "x86 (Watcom)" +# endif +# if defined(__CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadWC2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "WATCOM C " PTW32_ARCH "\0" +# elif defined(__CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadWCE2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "WATCOM C++ " PTW32_ARCH "\0" +# else +# error Resource compiler doesn't know which cleanup style you're using - see version.rc +# endif +#else +# error Resource compiler doesn't know which compiler you're using - see version.rc +#endif + + +VS_VERSION_INFO VERSIONINFO + FILEVERSION PTW32_VERSION + PRODUCTVERSION PTW32_VERSION + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS 0 + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "ProductName", "POSIX Threads for Windows LPGL\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" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +/* +VERSIONINFO Resource + +The VERSIONINFO resource-definition statement creates a version-information +resource. The resource contains such information about the file as its +version number, its intended operating system, and its original filename. +The resource is intended to be used with the Version Information functions. + +versionID VERSIONINFO fixed-info { block-statement...} + +versionID + Version-information resource identifier. This value must be 1. + +fixed-info + Version information, such as the file version and the intended operating + system. This parameter consists of the following statements. + + + Statement Description + -------------------------------------------------------------------------- + FILEVERSION + version Binary version number for the file. The version + consists of two 32-bit integers, defined by four + 16-bit integers. For example, "FILEVERSION 3,10,0,61" + is translated into two doublewords: 0x0003000a and + 0x0000003d, in that order. Therefore, if version is + defined by the DWORD values dw1 and dw2, they need + to appear in the FILEVERSION statement as follows: + HIWORD(dw1), LOWORD(dw1), HIWORD(dw2), LOWORD(dw2). + PRODUCTVERSION + version Binary version number for the product with which the + file is distributed. The version parameter is two + 32-bit integers, defined by four 16-bit integers. + For more information about version, see the + FILEVERSION description. + FILEFLAGSMASK + fileflagsmask Bits in the FILEFLAGS statement are valid. If a bit + is set, the corresponding bit in FILEFLAGS is valid. + FILEFLAGSfileflags Attributes of the file. The fileflags parameter must + be the combination of all the file flags that are + valid at compile time. For 16-bit Windows, this + value is 0x3f. + FILEOSfileos Operating system for which this file was designed. + The fileos parameter can be one of the operating + system values given in the Remarks section. + FILETYPEfiletype General type of file. The filetype parameter can be + one of the file type values listed in the Remarks + section. + FILESUBTYPE + subtype Function of the file. The subtype parameter is zero + unless the type parameter in the FILETYPE statement + is VFT_DRV, VFT_FONT, or VFT_VXD. For a list of file + subtype values, see the Remarks section. + +block-statement + Specifies one or more version-information blocks. A block can contain + string information or variable information. For more information, see + StringFileInfo Block or VarFileInfo Block. + +Remarks + +To use the constants specified with the VERSIONINFO statement, you must +include the Winver.h or Windows.h header file in the resource-definition file. + +The following list describes the parameters used in the VERSIONINFO statement: + +fileflags + A combination of the following values. + + Value Description + + VS_FF_DEBUG File contains debugging information or is compiled + with debugging features enabled. + VS_FF_PATCHED File has been modified and is not identical to the + original shipping file of the same version number. + VS_FF_PRERELEASE File is a development version, not a commercially + released product. + VS_FF_PRIVATEBUILD File was not built using standard release procedures. + If this value is given, the StringFileInfo block must + contain a PrivateBuild string. + VS_FF_SPECIALBUILD File was built by the original company using standard + release procedures but is a variation of the standard + file of the same version number. If this value is + given, the StringFileInfo block must contain a + SpecialBuild string. + +fileos + One of the following values. + + Value Description + + VOS_UNKNOWN The operating system for which the file was designed + is unknown. + VOS_DOS File was designed for MS-DOS. + VOS_NT File was designed for Windows Server 2003 family, + Windows XP, Windows 2000, or Windows NT. + VOS__WINDOWS16 File was designed for 16-bit Windows. + VOS__WINDOWS32 File was designed for 32-bit Windows. + VOS_DOS_WINDOWS16 File was designed for 16-bit Windows running with + MS-DOS. + VOS_DOS_WINDOWS32 File was designed for 32-bit Windows running with + MS-DOS. + VOS_NT_WINDOWS32 File was designed for Windows Server 2003 family, + Windows XP, Windows 2000, or Windows NT. + + The values 0x00002L, 0x00003L, 0x20000L and 0x30000L are reserved. + +filetype + One of the following values. + + Value Description + + VFT_UNKNOWN File type is unknown. + VFT_APP File contains an application. + VFT_DLL File contains a dynamic-link library (DLL). + VFT_DRV File contains a device driver. If filetype is + VFT_DRV, subtype contains a more specific + description of the driver. + VFT_FONT File contains a font. If filetype is VFT_FONT, + subtype contains a more specific description of the + font. + VFT_VXD File contains a virtual device. + VFT_STATIC_LIB File contains a static-link library. + + All other values are reserved for use by Microsoft. + +subtype + Additional information about the file type. + + If filetype specifies VFT_DRV, this parameter can be one of the + following values. + + Value Description + + VFT2_UNKNOWN Driver type is unknown. + VFT2_DRV_COMM File contains a communications driver. + VFT2_DRV_PRINTER File contains a printer driver. + VFT2_DRV_KEYBOARD File contains a keyboard driver. + VFT2_DRV_LANGUAGE File contains a language driver. + VFT2_DRV_DISPLAY File contains a display driver. + VFT2_DRV_MOUSE File contains a mouse driver. + VFT2_DRV_NETWORK File contains a network driver. + VFT2_DRV_SYSTEM File contains a system driver. + VFT2_DRV_INSTALLABLE File contains an installable driver. + VFT2_DRV_SOUND File contains a sound driver. + VFT2_DRV_VERSIONED_PRINTER File contains a versioned printer driver. + + If filetype specifies VFT_FONT, this parameter can be one of the + following values. + + Value Description + + VFT2_UNKNOWN Font type is unknown. + VFT2_FONT_RASTER File contains a raster font. + VFT2_FONT_VECTOR File contains a vector font. + VFT2_FONT_TRUETYPE File contains a TrueType font. + + If filetype specifies VFT_VXD, this parameter must be the virtual-device + identifier included in the virtual-device control block. + + All subtype values not listed here are reserved for use by Microsoft. + +langID + One of the following language codes. + + Code Language Code Language + + 0x0401 Arabic 0x0415 Polish + 0x0402 Bulgarian 0x0416 Portuguese (Brazil) + 0x0403 Catalan 0x0417 Rhaeto-Romanic + 0x0404 Traditional Chinese 0x0418 Romanian + 0x0405 Czech 0x0419 Russian + 0x0406 Danish 0x041A Croato-Serbian (Latin) + 0x0407 German 0x041B Slovak + 0x0408 Greek 0x041C Albanian + 0x0409 U.S. English 0x041D Swedish + 0x040A Castilian Spanish 0x041E Thai + 0x040B Finnish 0x041F Turkish + 0x040C French 0x0420 Urdu + 0x040D Hebrew 0x0421 Bahasa + 0x040E Hungarian 0x0804 Simplified Chinese + 0x040F Icelandic 0x0807 Swiss German + 0x0410 Italian 0x0809 U.K. English + 0x0411 Japanese 0x080A Mexican Spanish + 0x0412 Korean 0x080C Belgian French + 0x0413 Dutch 0x0C0C Canadian French + 0x0414 Norwegian ā€“ Bokmal 0x100C Swiss French + 0x0810 Swiss Italian 0x0816 Portuguese (Portugal) + 0x0813 Belgian Dutch 0x081A Serbo-Croatian (Cyrillic) + 0x0814 Norwegian ā€“ Nynorsk + +charsetID + One of the following character-set identifiers. + + Identifier Character Set + + 0 7-bit ASCII + 932 Japan (Shift %Gā€“%@ JIS X-0208) + 949 Korea (Shift %Gā€“%@ KSC 5601) + 950 Taiwan (Big5) + 1200 Unicode + 1250 Latin-2 (Eastern European) + 1251 Cyrillic + 1252 Multilingual + 1253 Greek + 1254 Turkish + 1255 Hebrew + 1256 Arabic + +string-name + One of the following predefined names. + + Name Description + + Comments Additional information that should be displayed for + diagnostic purposes. + CompanyName Company that produced the file%Gā€”%@for example, + "Microsoft Corporation" or "Standard Microsystems + Corporation, Inc." This string is required. + FileDescription File description to be presented to users. This + string may be displayed in a list box when the user + is choosing files to install%Gā€”%@for example, + "Keyboard Driver for AT-Style Keyboards". This + string is required. + FileVersion Version number of the file%Gā€”%@for example, + "3.10" or "5.00.RC2". This string is required. + InternalName Internal name of the file, if one exists ā€” for + example, a module name if the file is a dynamic-link + library. If the file has no internal name, this + string should be the original filename, without + extension. This string is required. + LegalCopyright Copyright notices that apply to the file. This + should include the full text of all notices, legal + symbols, copyright dates, and so on ā€” for example, + "Copyright (C) Microsoft Corporation 1990ā€“1999". + This string is optional. + LegalTrademarks Trademarks and registered trademarks that apply to + the file. This should include the full text of all + notices, legal symbols, trademark numbers, and so on. + This string is optional. + OriginalFilename Original name of the file, not including a path. + This information enables an application to determine + whether a file has been renamed by a user. The + format of the name depends on the file system for + which the file was created. This string is required. + PrivateBuild Information about a private version of the file ā€” for + example, "Built by TESTER1 on \TESTBED". This string + should be present only if VS_FF_PRIVATEBUILD is + specified in the fileflags parameter of the root + block. + ProductName Name of the product with which the file is + distributed. This string is required. + ProductVersion Version of the product with which the file is + distributed ā€” for example, "3.10" or "5.00.RC2". + This string is required. + SpecialBuild Text that indicates how this version of the file + differs from the standard version ā€” for example, + "Private build for TESTER1 solving mouse problems + on M250 and M250E computers". This string should be + present only if VS_FF_SPECIALBUILD is specified in + the fileflags parameter of the root block. + */ From 50dd9fe2e9794bb8fd6ae55e8998d139264dd534 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 18 Feb 2016 00:57:01 +1100 Subject: [PATCH 010/207] Include top level config.h for definitions --- tests/test.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test.h b/tests/test.h index 4b3cf591..081c91f1 100644 --- a/tests/test.h +++ b/tests/test.h @@ -1,4 +1,4 @@ -/* +/* * test.h * * Useful definitions and declarations for tests. @@ -18,17 +18,17 @@ * code distribution. The list can also be seen at the * following World Wide Web location: * http://sources.redhat.com/pthreads-win32/contributors.html - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., @@ -39,6 +39,7 @@ #ifndef _PTHREAD_TEST_H_ #define _PTHREAD_TEST_H_ +#include "../config.h" #include "pthread.h" #include "sched.h" #include "semaphore.h" From 0bf4cce3bbc7f52bc21b77334f81515bd41c724b Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 18 Feb 2016 01:09:32 +1100 Subject: [PATCH 011/207] Fix array indexing for pthread_join() loop --- tests/semaphore3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/semaphore3.c b/tests/semaphore3.c index ed94dd02..810d6777 100644 --- a/tests/semaphore3.c +++ b/tests/semaphore3.c @@ -118,7 +118,7 @@ main() assert(-value == i); } - for (i = MAX_COUNT - 1; i >= 0; i--) + for (i = MAX_COUNT; i > 0; i--) { pthread_join(t[i], NULL); } From 06051f8a2236080dbe22e4333a41ed96f770f8c2 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 18 Feb 2016 10:09:29 +1100 Subject: [PATCH 012/207] Reverse previous commit and temporarily fix timespec redefinition. --- tests/test.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test.h b/tests/test.h index 081c91f1..1b45b737 100644 --- a/tests/test.h +++ b/tests/test.h @@ -39,7 +39,10 @@ #ifndef _PTHREAD_TEST_H_ #define _PTHREAD_TEST_H_ -#include "../config.h" +#if defined(_MSC_VER) && _MSC_VER >= 1900 +#define HAVE_STRUCT_TIMESPEC +#endif + #include "pthread.h" #include "sched.h" #include "semaphore.h" From 4358e6230751d338ef440c7e1380aa21cee95705 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 18 Feb 2016 10:17:12 +1100 Subject: [PATCH 013/207] Fix duplicate timespec definition for VS2015 --- config.h | 4 ++++ pthread.h | 2 ++ tests/test.h | 4 ---- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config.h b/config.h index f4a3fe14..713f7156 100644 --- a/config.h +++ b/config.h @@ -152,4 +152,8 @@ #define HAVE_C_INLINE #endif +#if defined(_MSC_VER) && _MSC_VER >= 1900 +#define HAVE_STRUCT_TIMESPEC +#endif + #endif /* PTW32_CONFIG_H */ diff --git a/pthread.h b/pthread.h index 8a55988a..bb6faf22 100644 --- a/pthread.h +++ b/pthread.h @@ -227,6 +227,8 @@ enum { # define HAVE_MODE_T # elif defined(__MINGW32__) # define HAVE_MODE_T +# elif defined(_MSC_VER) && _MSC_VER >= 1900 +# define HAVE_STRUCT_TIMESPEC # endif #endif diff --git a/tests/test.h b/tests/test.h index 1b45b737..46454590 100644 --- a/tests/test.h +++ b/tests/test.h @@ -39,10 +39,6 @@ #ifndef _PTHREAD_TEST_H_ #define _PTHREAD_TEST_H_ -#if defined(_MSC_VER) && _MSC_VER >= 1900 -#define HAVE_STRUCT_TIMESPEC -#endif - #include "pthread.h" #include "sched.h" #include "semaphore.h" From 616e1d20ddbcccd7c124f9e4d30fb9497e201538 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 18 Feb 2016 18:48:57 +1100 Subject: [PATCH 014/207] Static linking versions should not define DllMain. --- dll.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dll.c b/dll.c index 96b75452..a19af8a5 100644 --- a/dll.c +++ b/dll.c @@ -64,7 +64,11 @@ extern "C" #endif /* __cplusplus */ BOOL WINAPI +#if defined(PTW32_STATIC_TLSLIB) +StaticLibMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) +#else DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) +#endif { BOOL result = PTW32_TRUE; @@ -116,7 +120,7 @@ typedef int foo; static void WINAPI TlsMain(PVOID h, DWORD r, PVOID u) { - (void)DllMain((HINSTANCE)h, r, u); + (void)StaticLibMain((HINSTANCE)h, r, u); } #ifdef _M_X64 From 715050ae1f56f0d6de2fe4e9f28f279b8f2f768d Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 18 Feb 2016 18:58:54 +1100 Subject: [PATCH 015/207] Don't include ptw32_timespec.c when testing static libs. --- tests/semaphore4t.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/semaphore4t.c b/tests/semaphore4t.c index 7d468cc3..9bc68443 100644 --- a/tests/semaphore4t.c +++ b/tests/semaphore4t.c @@ -74,7 +74,9 @@ */ #include "test.h" +#if !defined(PTW32_STATIC_LIB) && !defined(PTW32_STATIC_TLSLIB) #include "../ptw32_timespec.c" +#endif #define MAX_COUNT 100 From ab557225cf1fdb02c76842cfbc377de63ec87b01 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 18 Feb 2016 19:01:36 +1100 Subject: [PATCH 016/207] Add dll.c changes --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index bebbfd5b..070c4a72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-02-18 Carey Gister <> + + * dll.c (DllMain): Should not be defined for static library builds. + Doing so prevents static linking with a dll library. + 2015-11-01 Anurag Sharma * ptw32_MCS_lock.c: Fix a race condition causing crashes. From 9979b1115fafbbbd2112c2225f87d43d178f70dc Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 18 Feb 2016 22:29:23 +1100 Subject: [PATCH 017/207] Change the way we avoid multiply defining functions in the included .c file --- tests/semaphore4t.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/semaphore4t.c b/tests/semaphore4t.c index 9bc68443..467caa76 100644 --- a/tests/semaphore4t.c +++ b/tests/semaphore4t.c @@ -74,8 +74,20 @@ */ #include "test.h" -#if !defined(PTW32_STATIC_LIB) && !defined(PTW32_STATIC_TLSLIB) +/* + * These before and after #defines are to avoid multiply defining + * the functions in the included .c file, by declaring them as static + * (local to this compilation unit). + */ +#if defined(INLINE) +# define XINLINE INLINE +# undef INLINE +# define INLINE static XINLINE +#endif #include "../ptw32_timespec.c" +#if defined(XINLINE) +# define INLINE XINLINE +# undef XINLINE #endif #define MAX_COUNT 100 From bc2e9ecfe69216c65f28469a312ee72d112485b7 Mon Sep 17 00:00:00 2001 From: rpj Date: Tue, 23 Feb 2016 00:02:22 +1100 Subject: [PATCH 018/207] Fix pthread_join loop indexing --- tests/semaphore3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/semaphore3.c b/tests/semaphore3.c index ed94dd02..810d6777 100644 --- a/tests/semaphore3.c +++ b/tests/semaphore3.c @@ -118,7 +118,7 @@ main() assert(-value == i); } - for (i = MAX_COUNT - 1; i >= 0; i--) + for (i = MAX_COUNT; i > 0; i--) { pthread_join(t[i], NULL); } From ef7d3c2e9e7365073b42ede2c8221eb321be0967 Mon Sep 17 00:00:00 2001 From: rpj Date: Tue, 23 Feb 2016 00:03:13 +1100 Subject: [PATCH 019/207] strncpy_s only for MS VS --- pthread_getname_np.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pthread_getname_np.c b/pthread_getname_np.c index db97193c..4474f8e5 100644 --- a/pthread_getname_np.c +++ b/pthread_getname_np.c @@ -57,8 +57,12 @@ pthread_getname_np(pthread_t thr, char *name, int len) ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); +#if defined(_MSC_VER) result = strncpy_s(name, len, tp->name, len - 1); - +#else + strncpy(name, tp->name, len - 1); + name[len - 1] = '\0'; +#endif ptw32_mcs_lock_release (&threadLock); return result; From 8b015c5e0a6c10b5408e0813a3b027bad31dd154 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Fri, 26 Feb 2016 10:33:07 +1100 Subject: [PATCH 020/207] Specifiy 2011 C and C++ standards when compiling --- GNUmakefile | 16 ++++++++-------- tests/GNUmakefile | 34 +++++++++++++++++----------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index df1ed546..4ccda245 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -64,8 +64,8 @@ CROSS = AR = $(CROSS)ar DLLTOOL = $(CROSS)dlltool -CC = $(CROSS)gcc -CXX = $(CROSS)g++ +CC = $(CROSS)gcc -std=c11 +CXX = $(CROSS)g++ -std=c++11 RANLIB = $(CROSS)ranlib RC = $(CROSS)windres OD_PRIVATE = $(CROSS)objdump -p @@ -222,10 +222,10 @@ GC-debug: $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_DLL) GCE: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL) GCE-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_CXX -g -O0" $(GCED_DLL) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_CXX -g -O0" $(GCED_DLL) GC-static: $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_INLINED_STATIC_STAMP) @@ -240,16 +240,16 @@ GC-small-static-debug: $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) GCE-static: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_INLINED_STATIC_STAMP) GCE-static-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) GCE-small-static: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_SMALL_STATIC_STAMP) GCE-small-static-debug: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) tests: @ cd tests diff --git a/tests/GNUmakefile b/tests/GNUmakefile index 71cfa7ec..28388798 100644 --- a/tests/GNUmakefile +++ b/tests/GNUmakefile @@ -52,8 +52,8 @@ RUN = AR = $(CROSS)ar DLLTOOL = $(CROSS)dlltool -CC = $(CROSS)gcc -CXX = $(CROSS)g++ +CC = $(CROSS)gcc -std=c11 +CXX = $(CROSS)g++ -std=c++11 RANLIB = $(CROSS)ranlib # @@ -137,49 +137,49 @@ help: @ $(ECHO) "$(MAKE) clean GC TESTS="foo bar" (to build individual tests \"foo.c and bar.c\" with C and run using GC dll)" GC: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" allpassed GC-asm: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" all-asm + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" all-asm GC-bench: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" all-bench + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" all-bench GC-bench-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" OPT="${DOPT}" all-bench + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" OPT="${DOPT}" all-bench GC-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed GC-static GC-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" DLL="" allpassed GC-static-debug GC-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" OPT="$(DOPT)" DLL="" allpassed GCE: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__CLEANUP_CXX" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC="$(CXX)" XXCFLAGS="-mthreads -D__CLEANUP_CXX" allpassed GCE-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_CXX" OPT="${DOPT}" allpassed GCE-static GCE-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB" DLL="" allpassed GCE-static-debug GCE-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB" OPT="$(DOPT)" DLL="" allpassed GCX: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__CLEANUP_C" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CXX)" XXCFLAGS="-mthreads -D__CLEANUP_C" allpassed GCX-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed GCX-static GCX-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" DLL="" allpassed GCX-static-debug GCX-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" OPT="$(DOPT)" DLL="" allpassed all-asm: $(ASM) @ $(ECHO) "ALL TESTS PASSED! Congratulations!" From 1598396631597a0ec401337a39d7247c12f6d0c5 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Fri, 26 Feb 2016 10:35:08 +1100 Subject: [PATCH 021/207] Updated --- ANNOUNCE | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index e2453bf9..0f1a3fd6 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,4 +1,4 @@ -PTHREADS4W RELEASE 2.10.0 (2014-05-29) +PTHREADS4W RELEASE 2.10.0 (????-??-??) -------------------------------------- Web Site: http://sourceforge.net/projects/pthreads4w/ http://sourceware.org/pthreads-win32/ @@ -24,7 +24,11 @@ Pthreads4w is free software, distributed under the GNU Lesser General Public License (LGPL). For those who want to try the most recent changes, the SourceForge Git repository -is the one to use. The Sourceware CVS repository is synchronised less often. +is the one to use. The Sourceware CVS repository is synchronised much less often +and may be abandoned altogether. + +Release 2.9.1 was probably the last to provide pre-built libraries. The supported +compilers are now all available free for personal use. Acknowledgements From 3f38171ca41af768cffd881e2a05008557f429c1 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Fri, 26 Feb 2016 10:41:48 +1100 Subject: [PATCH 022/207] Update --- NEWS | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index e09c56c2..73b17da3 100644 --- a/NEWS +++ b/NEWS @@ -21,7 +21,7 @@ then please consider how your toolchains might be contributing to the failure. See the README file for more detailed descriptions of the toolchains and test systems that we have used to get the tests to pass successfully. We recommend MinGW64 over MinGW32 for both 64 and 32 bit -GNU CC builds. MinGW also includes its own independent pthreads +GNU CC builds. MinGW64 also includes its own independent pthreads implementation, which you may prefer to use. New Features @@ -61,6 +61,10 @@ New makefile targets have been added and existing targets modified or removed. For example, targets to build and test all of the possible configurations of both dll and static libs. +GNU compiler builds are now explicitly using ISO C and C++ 2011 standards +compatibility. If your GNU compiler doesn't support this please consider +updating. + Static linking: The autostatic functionality has been moved to dll.c, and extended so that builds using MSVC8 and later no longer require apps to call From 01083a7ffd7e2ad3d90a4c89c1be21d371dfcea9 Mon Sep 17 00:00:00 2001 From: rpj Date: Sat, 27 Feb 2016 16:29:47 +1100 Subject: [PATCH 023/207] Recognise upper case environment values --- version.rc | 402 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 402 insertions(+) create mode 100644 version.rc diff --git a/version.rc b/version.rc new file mode 100644 index 00000000..3e65c160 --- /dev/null +++ b/version.rc @@ -0,0 +1,402 @@ +/* This is an implementation of the threads API of POSIX 1003.1-2001. + * + * -------------------------------------------------------------------------- + * + * 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 + */ + +#include +#include "pthread.h" + +/* + * Note: the correct __CLEANUP_* macro must be defined corresponding to + * the definition used for the object file builds. This is done in the + * relevent makefiles for the command line builds, but users should ensure + * that their resource compiler knows what it is too. + * If using the default (no __CLEANUP_* defined), pthread.h will define it + * as __CLEANUP_C. + */ + +#if defined(PTW32_RC_MSC) +# if defined(PTW32_ARCHx64) || defined(PTW32_ARCHX64) +# define PTW32_ARCH "x64" +# elif defined(PTW32_ARCHx86) || defined(PTW32_ARCHX86) +# define PTW32_ARCH "x86" +# endif +# if defined(__CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadVC2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C " PTW32_ARCH "\0" +# elif defined(__CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadVCE2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C++ " PTW32_ARCH "\0" +# elif defined(__CLEANUP_SEH) +# define PTW32_VERSIONINFO_NAME "pthreadVSE2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C SEH " PTW32_ARCH "\0" +# endif +#elif defined(__GNUC__) +# if defined(_M_X64) +# define PTW32_ARCH "x64 (mingw64)" +# else +# define PTW32_ARCH "x86 (mingw32)" +# endif +# if defined(__CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadGC2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "GNU C " PTW32_ARCH "\0" +# elif defined(__CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadGCE2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "GNU C++ " PTW32_ARCH "\0" +# else +# error Resource compiler doesn't know which cleanup style you're using - see version.rc +# endif +#elif defined(__BORLANDC__) +# if defined(_M_X64) +# define PTW32_ARCH "x64 (Borland)" +# else +# define PTW32_ARCH "x86 (Borland)" +# endif +# if defined(__CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadBC2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "BORLAND C " PTW32_ARCH "\0" +# elif defined(__CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadBCE2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "BORLAND C++ " PTW32_ARCH "\0" +# else +# error Resource compiler doesn't know which cleanup style you're using - see version.rc +# endif +#elif defined(__WATCOMC__) +# if defined(_M_X64) +# define PTW32_ARCH "x64 (Watcom)" +# else +# define PTW32_ARCH "x86 (Watcom)" +# endif +# if defined(__CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadWC2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "WATCOM C " PTW32_ARCH "\0" +# elif defined(__CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadWCE2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "WATCOM C++ " PTW32_ARCH "\0" +# else +# error Resource compiler doesn't know which cleanup style you're using - see version.rc +# endif +#else +# error Resource compiler doesn't know which compiler you're using - see version.rc +#endif + + +VS_VERSION_INFO VERSIONINFO + FILEVERSION PTW32_VERSION + PRODUCTVERSION PTW32_VERSION + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS 0 + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "ProductName", "POSIX Threads for Windows LPGL\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" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +/* +VERSIONINFO Resource + +The VERSIONINFO resource-definition statement creates a version-information +resource. The resource contains such information about the file as its +version number, its intended operating system, and its original filename. +The resource is intended to be used with the Version Information functions. + +versionID VERSIONINFO fixed-info { block-statement...} + +versionID + Version-information resource identifier. This value must be 1. + +fixed-info + Version information, such as the file version and the intended operating + system. This parameter consists of the following statements. + + + Statement Description + -------------------------------------------------------------------------- + FILEVERSION + version Binary version number for the file. The version + consists of two 32-bit integers, defined by four + 16-bit integers. For example, "FILEVERSION 3,10,0,61" + is translated into two doublewords: 0x0003000a and + 0x0000003d, in that order. Therefore, if version is + defined by the DWORD values dw1 and dw2, they need + to appear in the FILEVERSION statement as follows: + HIWORD(dw1), LOWORD(dw1), HIWORD(dw2), LOWORD(dw2). + PRODUCTVERSION + version Binary version number for the product with which the + file is distributed. The version parameter is two + 32-bit integers, defined by four 16-bit integers. + For more information about version, see the + FILEVERSION description. + FILEFLAGSMASK + fileflagsmask Bits in the FILEFLAGS statement are valid. If a bit + is set, the corresponding bit in FILEFLAGS is valid. + FILEFLAGSfileflags Attributes of the file. The fileflags parameter must + be the combination of all the file flags that are + valid at compile time. For 16-bit Windows, this + value is 0x3f. + FILEOSfileos Operating system for which this file was designed. + The fileos parameter can be one of the operating + system values given in the Remarks section. + FILETYPEfiletype General type of file. The filetype parameter can be + one of the file type values listed in the Remarks + section. + FILESUBTYPE + subtype Function of the file. The subtype parameter is zero + unless the type parameter in the FILETYPE statement + is VFT_DRV, VFT_FONT, or VFT_VXD. For a list of file + subtype values, see the Remarks section. + +block-statement + Specifies one or more version-information blocks. A block can contain + string information or variable information. For more information, see + StringFileInfo Block or VarFileInfo Block. + +Remarks + +To use the constants specified with the VERSIONINFO statement, you must +include the Winver.h or Windows.h header file in the resource-definition file. + +The following list describes the parameters used in the VERSIONINFO statement: + +fileflags + A combination of the following values. + + Value Description + + VS_FF_DEBUG File contains debugging information or is compiled + with debugging features enabled. + VS_FF_PATCHED File has been modified and is not identical to the + original shipping file of the same version number. + VS_FF_PRERELEASE File is a development version, not a commercially + released product. + VS_FF_PRIVATEBUILD File was not built using standard release procedures. + If this value is given, the StringFileInfo block must + contain a PrivateBuild string. + VS_FF_SPECIALBUILD File was built by the original company using standard + release procedures but is a variation of the standard + file of the same version number. If this value is + given, the StringFileInfo block must contain a + SpecialBuild string. + +fileos + One of the following values. + + Value Description + + VOS_UNKNOWN The operating system for which the file was designed + is unknown. + VOS_DOS File was designed for MS-DOS. + VOS_NT File was designed for Windows Server 2003 family, + Windows XP, Windows 2000, or Windows NT. + VOS__WINDOWS16 File was designed for 16-bit Windows. + VOS__WINDOWS32 File was designed for 32-bit Windows. + VOS_DOS_WINDOWS16 File was designed for 16-bit Windows running with + MS-DOS. + VOS_DOS_WINDOWS32 File was designed for 32-bit Windows running with + MS-DOS. + VOS_NT_WINDOWS32 File was designed for Windows Server 2003 family, + Windows XP, Windows 2000, or Windows NT. + + The values 0x00002L, 0x00003L, 0x20000L and 0x30000L are reserved. + +filetype + One of the following values. + + Value Description + + VFT_UNKNOWN File type is unknown. + VFT_APP File contains an application. + VFT_DLL File contains a dynamic-link library (DLL). + VFT_DRV File contains a device driver. If filetype is + VFT_DRV, subtype contains a more specific + description of the driver. + VFT_FONT File contains a font. If filetype is VFT_FONT, + subtype contains a more specific description of the + font. + VFT_VXD File contains a virtual device. + VFT_STATIC_LIB File contains a static-link library. + + All other values are reserved for use by Microsoft. + +subtype + Additional information about the file type. + + If filetype specifies VFT_DRV, this parameter can be one of the + following values. + + Value Description + + VFT2_UNKNOWN Driver type is unknown. + VFT2_DRV_COMM File contains a communications driver. + VFT2_DRV_PRINTER File contains a printer driver. + VFT2_DRV_KEYBOARD File contains a keyboard driver. + VFT2_DRV_LANGUAGE File contains a language driver. + VFT2_DRV_DISPLAY File contains a display driver. + VFT2_DRV_MOUSE File contains a mouse driver. + VFT2_DRV_NETWORK File contains a network driver. + VFT2_DRV_SYSTEM File contains a system driver. + VFT2_DRV_INSTALLABLE File contains an installable driver. + VFT2_DRV_SOUND File contains a sound driver. + VFT2_DRV_VERSIONED_PRINTER File contains a versioned printer driver. + + If filetype specifies VFT_FONT, this parameter can be one of the + following values. + + Value Description + + VFT2_UNKNOWN Font type is unknown. + VFT2_FONT_RASTER File contains a raster font. + VFT2_FONT_VECTOR File contains a vector font. + VFT2_FONT_TRUETYPE File contains a TrueType font. + + If filetype specifies VFT_VXD, this parameter must be the virtual-device + identifier included in the virtual-device control block. + + All subtype values not listed here are reserved for use by Microsoft. + +langID + One of the following language codes. + + Code Language Code Language + + 0x0401 Arabic 0x0415 Polish + 0x0402 Bulgarian 0x0416 Portuguese (Brazil) + 0x0403 Catalan 0x0417 Rhaeto-Romanic + 0x0404 Traditional Chinese 0x0418 Romanian + 0x0405 Czech 0x0419 Russian + 0x0406 Danish 0x041A Croato-Serbian (Latin) + 0x0407 German 0x041B Slovak + 0x0408 Greek 0x041C Albanian + 0x0409 U.S. English 0x041D Swedish + 0x040A Castilian Spanish 0x041E Thai + 0x040B Finnish 0x041F Turkish + 0x040C French 0x0420 Urdu + 0x040D Hebrew 0x0421 Bahasa + 0x040E Hungarian 0x0804 Simplified Chinese + 0x040F Icelandic 0x0807 Swiss German + 0x0410 Italian 0x0809 U.K. English + 0x0411 Japanese 0x080A Mexican Spanish + 0x0412 Korean 0x080C Belgian French + 0x0413 Dutch 0x0C0C Canadian French + 0x0414 Norwegian ā€“ Bokmal 0x100C Swiss French + 0x0810 Swiss Italian 0x0816 Portuguese (Portugal) + 0x0813 Belgian Dutch 0x081A Serbo-Croatian (Cyrillic) + 0x0814 Norwegian ā€“ Nynorsk + +charsetID + One of the following character-set identifiers. + + Identifier Character Set + + 0 7-bit ASCII + 932 Japan (Shift %Gā€“%@ JIS X-0208) + 949 Korea (Shift %Gā€“%@ KSC 5601) + 950 Taiwan (Big5) + 1200 Unicode + 1250 Latin-2 (Eastern European) + 1251 Cyrillic + 1252 Multilingual + 1253 Greek + 1254 Turkish + 1255 Hebrew + 1256 Arabic + +string-name + One of the following predefined names. + + Name Description + + Comments Additional information that should be displayed for + diagnostic purposes. + CompanyName Company that produced the file%Gā€”%@for example, + "Microsoft Corporation" or "Standard Microsystems + Corporation, Inc." This string is required. + FileDescription File description to be presented to users. This + string may be displayed in a list box when the user + is choosing files to install%Gā€”%@for example, + "Keyboard Driver for AT-Style Keyboards". This + string is required. + FileVersion Version number of the file%Gā€”%@for example, + "3.10" or "5.00.RC2". This string is required. + InternalName Internal name of the file, if one exists ā€” for + example, a module name if the file is a dynamic-link + library. If the file has no internal name, this + string should be the original filename, without + extension. This string is required. + LegalCopyright Copyright notices that apply to the file. This + should include the full text of all notices, legal + symbols, copyright dates, and so on ā€” for example, + "Copyright (C) Microsoft Corporation 1990ā€“1999". + This string is optional. + LegalTrademarks Trademarks and registered trademarks that apply to + the file. This should include the full text of all + notices, legal symbols, trademark numbers, and so on. + This string is optional. + OriginalFilename Original name of the file, not including a path. + This information enables an application to determine + whether a file has been renamed by a user. The + format of the name depends on the file system for + which the file was created. This string is required. + PrivateBuild Information about a private version of the file ā€” for + example, "Built by TESTER1 on \TESTBED". This string + should be present only if VS_FF_PRIVATEBUILD is + specified in the fileflags parameter of the root + block. + ProductName Name of the product with which the file is + distributed. This string is required. + ProductVersion Version of the product with which the file is + distributed ā€” for example, "3.10" or "5.00.RC2". + This string is required. + SpecialBuild Text that indicates how this version of the file + differs from the standard version ā€” for example, + "Private build for TESTER1 solving mouse problems + on M250 and M250E computers". This string should be + present only if VS_FF_SPECIALBUILD is specified in + the fileflags parameter of the root block. + */ From 2f7cff16e96a3d6f7c5fed1cb803781625946333 Mon Sep 17 00:00:00 2001 From: rpj Date: Sat, 27 Feb 2016 17:03:18 +1100 Subject: [PATCH 024/207] Oops. --- ptw32_MCS_lock.c | 308 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 308 insertions(+) create mode 100644 ptw32_MCS_lock.c diff --git a/ptw32_MCS_lock.c b/ptw32_MCS_lock.c new file mode 100644 index 00000000..ad89b2b2 --- /dev/null +++ b/ptw32_MCS_lock.c @@ -0,0 +1,308 @@ +/* + * ptw32_MCS_lock.c + * + * Description: + * This translation unit implements queue-based locks. + * + * -------------------------------------------------------------------------- + * + * 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 + */ + +/* + + * About MCS locks: + * + * MCS locks are queue-based locks, where the queue nodes are local to the + * thread. The 'lock' is nothing more than a global pointer that points to + * the last node in the queue, or is NULL if the queue is empty. + * + * Originally designed for use as spin locks requiring no kernel resources + * for synchronisation or blocking, the implementation below has adapted + * the MCS spin lock for use as a general mutex that will suspend threads + * when there is lock contention. + * + * Because the queue nodes are thread-local, most of the memory read/write + * operations required to add or remove nodes from the queue do not trigger + * cache-coherence updates. + * + * Like 'named' mutexes, MCS locks consume system resources transiently - + * they are able to acquire and free resources automatically - but MCS + * locks do not require any unique 'name' to identify the lock to all + * threads using it. + * + * Usage of MCS locks: + * + * - you need a global ptw32_mcs_lock_t instance initialised to 0 or NULL. + * - you need a local thread-scope ptw32_mcs_local_node_t instance, which + * may serve several different locks but you need at least one node for + * every lock held concurrently by a thread. + * + * E.g.: + * + * ptw32_mcs_lock_t lock1 = 0; + * ptw32_mcs_lock_t lock2 = 0; + * + * void *mythread(void *arg) + * { + * ptw32_mcs_local_node_t node; + * + * ptw32_mcs_acquire (&lock1, &node); + * ptw32_mcs_lock_release (&node); + * + * ptw32_mcs_lock_acquire (&lock2, &node); + * ptw32_mcs_lock_release (&node); + * { + * ptw32_mcs_local_node_t nodex; + * + * ptw32_mcs_lock_acquire (&lock1, &node); + * ptw32_mcs_lock_acquire (&lock2, &nodex); + * + * ptw32_mcs_lock_release (&nodex); + * ptw32_mcs_lock_release (&node); + * } + * return (void *)0; + * } + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "pthread.h" +#include "sched.h" +#include "implement.h" + +/* + * ptw32_mcs_flag_set -- notify another thread about an event. + * + * Set event if an event handle has been stored in the flag, and + * set flag to -1 otherwise. Note that -1 cannot be a valid handle value. + */ +INLINE void +ptw32_mcs_flag_set (HANDLE * flag) +{ + HANDLE e = (HANDLE)(PTW32_INTERLOCKED_SIZE)PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE( + (PTW32_INTERLOCKED_SIZEPTR)flag, + (PTW32_INTERLOCKED_SIZE)-1, + (PTW32_INTERLOCKED_SIZE)0); + /* + * NOTE: when e == -1 and the MSVC debugger is attached to + * the process, we get an exception that halts the + * program noting that the handle value is invalid; + * although innocuous this behavior is cumbersome when + * debugging. Therefore we avoid calling SetEvent() + * for 'known' invalid HANDLE values that can arise + * when the above interlocked-compare-and-exchange + * is executed. + */ + if (((HANDLE)0 != e) && ((HANDLE)-1 != e)) + { + /* another thread has already stored an event handle in the flag */ + SetEvent(e); + } +} + +/* + * ptw32_mcs_flag_wait -- wait for notification from another. + * + * Store an event handle in the flag and wait on it if the flag has not been + * set, and proceed without creating an event otherwise. + */ +INLINE void +ptw32_mcs_flag_wait (HANDLE * flag) +{ + if ((PTW32_INTERLOCKED_SIZE)0 == + PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE((PTW32_INTERLOCKED_SIZEPTR)flag, + (PTW32_INTERLOCKED_SIZE)0)) /* MBR fence */ + { + /* the flag is not set. create event. */ + + HANDLE e = CreateEvent(NULL, PTW32_FALSE, PTW32_FALSE, NULL); + + if ((PTW32_INTERLOCKED_SIZE)0 == PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE( + (PTW32_INTERLOCKED_SIZEPTR)flag, + (PTW32_INTERLOCKED_SIZE)e, + (PTW32_INTERLOCKED_SIZE)0)) + { + /* stored handle in the flag. wait on it now. */ + WaitForSingleObject(e, INFINITE); + } + + CloseHandle(e); + } +} + +/* + * ptw32_mcs_lock_acquire -- acquire an MCS lock. + * + * See: + * J. M. Mellor-Crummey and M. L. Scott. + * Algorithms for Scalable Synchronization on Shared-Memory Multiprocessors. + * ACM Transactions on Computer Systems, 9(1):21-65, Feb. 1991. + */ +#if defined(PTW32_BUILD_INLINED) +INLINE +#endif /* PTW32_BUILD_INLINED */ +void +ptw32_mcs_lock_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node) +{ + ptw32_mcs_local_node_t *pred; + + node->lock = lock; + node->nextFlag = 0; + node->readyFlag = 0; + node->next = 0; /* initially, no successor */ + + /* queue for the lock */ + pred = (ptw32_mcs_local_node_t *)PTW32_INTERLOCKED_EXCHANGE_PTR((PTW32_INTERLOCKED_PVOID_PTR)lock, + (PTW32_INTERLOCKED_PVOID)node); + + if (0 != pred) + { + /* the lock was not free. link behind predecessor. */ + PTW32_INTERLOCKED_EXCHANGE_PTR((PTW32_INTERLOCKED_PVOID_PTR)&pred->next, (PTW32_INTERLOCKED_PVOID)node); + ptw32_mcs_flag_set(&pred->nextFlag); + ptw32_mcs_flag_wait(&node->readyFlag); + } +} + +/* + * ptw32_mcs_lock_release -- release an MCS lock. + * + * See: + * J. M. Mellor-Crummey and M. L. Scott. + * Algorithms for Scalable Synchronization on Shared-Memory Multiprocessors. + * ACM Transactions on Computer Systems, 9(1):21-65, Feb. 1991. + */ +#if defined(PTW32_BUILD_INLINED) +INLINE +#endif /* PTW32_BUILD_INLINED */ +void +ptw32_mcs_lock_release (ptw32_mcs_local_node_t * node) +{ + ptw32_mcs_lock_t *lock = node->lock; + ptw32_mcs_local_node_t *next = + (ptw32_mcs_local_node_t *) + PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE((PTW32_INTERLOCKED_SIZEPTR)&node->next, (PTW32_INTERLOCKED_SIZE)0); /* MBR fence */ + + if (0 == next) + { + /* no known successor */ + + if (node == (ptw32_mcs_local_node_t *) + PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR((PTW32_INTERLOCKED_PVOID_PTR)lock, + (PTW32_INTERLOCKED_PVOID)0, + (PTW32_INTERLOCKED_PVOID)node)) + { + /* no successor, lock is free now */ + return; + } + + /* wait for successor */ + ptw32_mcs_flag_wait(&node->nextFlag); + next = (ptw32_mcs_local_node_t *) + PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE((PTW32_INTERLOCKED_SIZEPTR)&node->next, (PTW32_INTERLOCKED_SIZE)0); /* MBR fence */ + } + else + { + /* Even if the next is non-0, the successor may still be trying to set the next flag on us, therefore we must wait. */ + ptw32_mcs_flag_wait(&node->nextFlag); + } + + /* pass the lock */ + ptw32_mcs_flag_set(&next->readyFlag); +} + +/* + * ptw32_mcs_lock_try_acquire + */ +#if defined(PTW32_BUILD_INLINED) +INLINE +#endif /* PTW32_BUILD_INLINED */ +int +ptw32_mcs_lock_try_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node) +{ + node->lock = lock; + node->nextFlag = 0; + node->readyFlag = 0; + node->next = 0; /* initially, no successor */ + + return ((PTW32_INTERLOCKED_PVOID)PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR((PTW32_INTERLOCKED_PVOID_PTR)lock, + (PTW32_INTERLOCKED_PVOID)node, + (PTW32_INTERLOCKED_PVOID)0) + == (PTW32_INTERLOCKED_PVOID)0) ? 0 : EBUSY; +} + +/* + * ptw32_mcs_node_transfer -- move an MCS lock local node, usually from thread + * space to, for example, global space so that another thread can release + * the lock on behalf of the current lock owner. + * + * Example: used in pthread_barrier_wait where we want the last thread out of + * the barrier to release the lock owned by the last thread to enter the barrier + * (the one that releases all threads but not necessarily the last to leave). + * + * Should only be called by the thread that has the lock. + */ +#if defined(PTW32_BUILD_INLINED) +INLINE +#endif /* PTW32_BUILD_INLINED */ +void +ptw32_mcs_node_transfer (ptw32_mcs_local_node_t * new_node, ptw32_mcs_local_node_t * old_node) +{ + new_node->lock = old_node->lock; + new_node->nextFlag = 0; /* Not needed - used only in initial Acquire */ + new_node->readyFlag = 0; /* Not needed - we were waiting on this */ + new_node->next = 0; + + if ((ptw32_mcs_local_node_t *)PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR((PTW32_INTERLOCKED_PVOID_PTR)new_node->lock, + (PTW32_INTERLOCKED_PVOID)new_node, + (PTW32_INTERLOCKED_PVOID)old_node) + != old_node) + { + /* + * A successor has queued after us, so wait for them to link to us + */ + while (0 == old_node->next) + { + sched_yield(); + } + + /* we must wait for the next Node to finish inserting itself. */ + ptw32_mcs_flag_wait(&old_node->nextFlag); + /* + * Copy the nextFlag state also so we don't block on it when releasing + * this lock. + */ + new_node->next = old_node->next; + new_node->nextFlag = old_node->nextFlag; + } +} From a6468382fb0a51ecc0fd3cdd6361534d63dd723f Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 29 Feb 2016 19:44:18 +1100 Subject: [PATCH 025/207] Trial fix warnings --- manual/pthread_equal.html | 108 ++++++++++++++++++++++---------------- 1 file changed, 63 insertions(+), 45 deletions(-) diff --git a/manual/pthread_equal.html b/manual/pthread_equal.html index bc2d804a..d2f81b61 100644 --- a/manual/pthread_equal.html +++ b/manual/pthread_equal.html @@ -1,45 +1,63 @@ - - -PTHREAD_EQUAL(3) manual page - - -Table of Contents

- -

-

Name

-pthread_equal - compare two thread identifiers -

-

Synopsis

-#include <pthread.h> - -

int pthread_equal(pthread_t thread1, pthread_t thread2); -

-

Description

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

-

Return Value

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

-

Author

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

-

See Also

-pthread_self(3) -. -

- -


-Table of Contents

-

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

Table of Contents

+

Name

+

pthread_equal - compare two thread identifiers +

+

Synopsis

+

#include <pthread.h> +

+

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

+

Description

+

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

+

Return +Value

+

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

+

Author

+

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

+

See +Also

+

pthread_self(3) +. +

+
+

Table of Contents

+ + + \ No newline at end of file From 65685414e31bab3ea4fb376da36864a6b4302f7e Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 29 Feb 2016 20:10:06 +1100 Subject: [PATCH 026/207] Removing Eclipse warnings --- manual/PortabilityIssues.html | 1441 +++++++++++++------------ manual/pthreadCancelableWait.html | 174 +-- manual/pthread_attr_init.html | 662 ++++++------ manual/pthread_attr_setstackaddr.html | 324 +++--- manual/pthread_cancel.html | 9 +- manual/pthread_cond_init.html | 24 +- manual/pthread_condattr_init.html | 6 +- manual/pthread_create.html | 221 ++-- manual/pthread_exit.html | 127 ++- 9 files changed, 1508 insertions(+), 1480 deletions(-) diff --git a/manual/PortabilityIssues.html b/manual/PortabilityIssues.html index 05fe7359..8741641b 100644 --- a/manual/PortabilityIssues.html +++ b/manual/PortabilityIssues.html @@ -1,715 +1,726 @@ - - - - - PORTABILITY ISSUES manual page - - -

POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

-

Reference Index

-

Table of Contents

-

Name

-

Portability issues

-

Synopsis

-

Thread priority

-

Description

-

Thread priority

-

POSIX defines a single contiguous range -of numbers that determine a thread's priority. Win32 defines priority -classes - and priority levels relative to these classes. Classes are -simply priority base levels that the defined priority levels are -relative to such that, changing a process's priority class will -change the priority of all of it's threads, while the threads retain -the same relativity to each other.

-

A Win32 system defines a single -contiguous monotonic range of values that define system priority -levels, just like POSIX. However, Win32 restricts individual threads -to a subset of this range on a per-process basis.

-

The following table shows the base -priority levels for combinations of priority class and priority value -in Win32.

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-


-

-
-

Process Priority Class

-
-

Thread Priority Level

-
-

1

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_IDLE

-
-

1

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_IDLE

-
-

1

-
-

NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_IDLE

-
-

1

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_IDLE

-
-

1

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_IDLE

-
-

2

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

3

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

4

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

4

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

5

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

5

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

5

-
-

Background NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

6

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

6

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

6

-
-

Background NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

7

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

7

-
-

Background NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

7

-
-

Foreground NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

8

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

8

-
-

NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

8

-
-

Foreground NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

8

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

9

-
-

NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

9

-
-

Foreground NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

9

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

10

-
-

Foreground NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

10

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

11

-
-

Foreground NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

11

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

11

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

12

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

12

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

13

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

14

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

15

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

15

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_TIME_CRITICAL

-
-

15

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_TIME_CRITICAL

-
-

15

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_TIME_CRITICAL

-
-

15

-
-

NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_TIME_CRITICAL

-
-

15

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_TIME_CRITICAL

-
-

16

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_IDLE

-
-

17

-
-

REALTIME_PRIORITY_CLASS

-
-

-7

-
-

18

-
-

REALTIME_PRIORITY_CLASS

-
-

-6

-
-

19

-
-

REALTIME_PRIORITY_CLASS

-
-

-5

-
-

20

-
-

REALTIME_PRIORITY_CLASS

-
-

-4

-
-

21

-
-

REALTIME_PRIORITY_CLASS

-
-

-3

-
-

22

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

23

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

24

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

25

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

26

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

27

-
-

REALTIME_PRIORITY_CLASS

-
-

3

-
-

28

-
-

REALTIME_PRIORITY_CLASS

-
-

4

-
-

29

-
-

REALTIME_PRIORITY_CLASS

-
-

5

-
-

30

-
-

REALTIME_PRIORITY_CLASS

-
-

6

-
-

31

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_TIME_CRITICAL

-
-
-
-

Windows NT: Values -7, -6, -5, -4, -3, 3, -4, 5, and 6 are not supported.

-

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

-

An application using Pthreads-w32 should -not make assumptions about the numbers used to represent thread -priority levels, except that they are monotonic between the values -returned by sched_get_priority_min() and sched_get_priority_max(). -E.g. Windows 95, 98, NT, 2000, XP make available a non-contiguous -range of numbers between -15 and 15, while at least one version of -WinCE (3.0) defines the minimum priority (THREAD_PRIORITY_LOWEST) as -5, and the maximum priority (THREAD_PRIORITY_HIGHEST) as 1.

-

Internally, pthreads-win32 maps any -priority levels between THREAD_PRIORITY_IDLE and -THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, or between -THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to -THREAD_PRIORITY_HIGHEST. Currently, this also applies to -REALTIME_PRIORITY_CLASS even if levels -7, -6, -5, -4, -3, 3, 4, 5, -and 6 are supported.

-

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

-

Author

-

Ross Johnson for use with Pthreads-w32.

-

See also

-



-

-
-

Table of Contents

- - - + + + + + PORTABILITY ISSUES manual page + + + + + + + +

POSIX Threads for Windows – REFERENCE – +Pthreads-w32

+

Reference Index

+

Table of Contents

+

Name

+

Portability issues

+

Synopsis

+

Thread priority

+

Description

+

Thread priority

+

POSIX defines a single contiguous range +of numbers that determine a thread's priority. Win32 defines priority +classes - and priority levels relative to these classes. Classes are +simply priority base levels that the defined priority levels are +relative to such that, changing a process's priority class will +change the priority of all of it's threads, while the threads retain +the same relativity to each other.

+

A Win32 system defines a single +contiguous monotonic range of values that define system priority +levels, just like POSIX. However, Win32 restricts individual threads +to a subset of this range on a per-process basis.

+

The following table shows the base +priority levels for combinations of priority class and priority value +in Win32.

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+


+

+
+

Process Priority Class

+
+

Thread Priority Level

+
+

1

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_IDLE

+
+

1

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_IDLE

+
+

1

+
+

NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_IDLE

+
+

1

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_IDLE

+
+

1

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_IDLE

+
+

2

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

3

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

4

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

4

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

5

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

5

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

5

+
+

Background NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

6

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

6

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

6

+
+

Background NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

7

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

7

+
+

Background NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

7

+
+

Foreground NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

8

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

8

+
+

NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

8

+
+

Foreground NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

8

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

9

+
+

NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

9

+
+

Foreground NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

9

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

10

+
+

Foreground NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

10

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

11

+
+

Foreground NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

11

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

11

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

12

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

12

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

13

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

14

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

15

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

15

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_TIME_CRITICAL

+
+

15

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_TIME_CRITICAL

+
+

15

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_TIME_CRITICAL

+
+

15

+
+

NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_TIME_CRITICAL

+
+

15

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_TIME_CRITICAL

+
+

16

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_IDLE

+
+

17

+
+

REALTIME_PRIORITY_CLASS

+
+

-7

+
+

18

+
+

REALTIME_PRIORITY_CLASS

+
+

-6

+
+

19

+
+

REALTIME_PRIORITY_CLASS

+
+

-5

+
+

20

+
+

REALTIME_PRIORITY_CLASS

+
+

-4

+
+

21

+
+

REALTIME_PRIORITY_CLASS

+
+

-3

+
+

22

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

23

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

24

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

25

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

26

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

27

+
+

REALTIME_PRIORITY_CLASS

+
+

3

+
+

28

+
+

REALTIME_PRIORITY_CLASS

+
+

4

+
+

29

+
+

REALTIME_PRIORITY_CLASS

+
+

5

+
+

30

+
+

REALTIME_PRIORITY_CLASS

+
+

6

+
+

31

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_TIME_CRITICAL

+
+
+

Windows NT: Values -7, -6, -5, -4, -3, 3, +4, 5, and 6 are not supported.

+

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

+

An application using Pthreads-w32 should +not make assumptions about the numbers used to represent thread +priority levels, except that they are monotonic between the values +returned by sched_get_priority_min() and sched_get_priority_max(). +E.g. Windows 95, 98, NT, 2000, XP make available a non-contiguous +range of numbers between -15 and 15, while at least one version of +WinCE (3.0) defines the minimum priority (THREAD_PRIORITY_LOWEST) as +5, and the maximum priority (THREAD_PRIORITY_HIGHEST) as 1.

+

Internally, pthreads-win32 maps any +priority levels between THREAD_PRIORITY_IDLE and +THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, or between +THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to +THREAD_PRIORITY_HIGHEST. Currently, this also applies to +REALTIME_PRIORITY_CLASS even if levels -7, -6, -5, -4, -3, 3, 4, 5, +and 6 are supported.

+

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

+

Author

+

Ross Johnson for use with Pthreads-w32.

+

See also

+



+

+
+

Table of Contents

+ + + \ No newline at end of file diff --git a/manual/pthreadCancelableWait.html b/manual/pthreadCancelableWait.html index 167b2229..fbfc249f 100644 --- a/manual/pthreadCancelableWait.html +++ b/manual/pthreadCancelableWait.html @@ -1,81 +1,93 @@ - - - - - PTHREADCANCELLABLEWAIT(3) manual page - - -

POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

-

Reference Index

-

Table of Contents

-

Name

-

pthreadCancelableTimedWait, -pthreadCancelableWait ā€“ provide cancellation hooks for user Win32 -routines

-

Synopsis

-

#include <pthread.h> -

-

int pthreadCancelableTimedWait (HANDLE waitHandle, -DWORD timeout);

-

int pthreadCancelableWait (HANDLE waitHandle);

-

Description

-

These two functions provide hooks into the pthread_cancel() -mechanism that will allow you to wait on a Windows handle and make it -a cancellation point. Both functions block until either the given -Win32 HANDLE is signalled, or pthread_cancel() -has been called. They are implemented using WaitForMultipleObjects -on waitHandle and the manually reset Win32 event handle that -is the target of pthread_cancel(). -These routines may be called from Win32 native threads but -pthread_cancel() will -require that thread's POSIX thread ID that the thread must retrieve -using pthread_self().

-

pthreadCancelableTimedWait is the timed version that will -return with the code ETIMEDOUT if the interval timeout -milliseconds elapses before waitHandle is signalled.

-

Cancellation

-

These routines allow routines that block on Win32 HANDLEs to be -cancellable via pthread_cancel().

-

Return Value

-



-

-

Errors

-

The pthreadCancelableTimedWait function returns the -following error code on error: -

-
-
-
ETIMEDOUT -
-
-

-The interval timeout milliseconds elapsed before waitHandle -was signalled.

-

Author

-

Ross Johnson for use with Pthreads-w32.

-

See also

-

pthread_cancel(), -pthread_self()

-
-

Table of Contents

- - - + + + + + PTHREADCANCELLABLEWAIT(3) manual page + + + + + + + +

POSIX Threads for Windows – REFERENCE – +Pthreads-w32

+

Reference Index

+

Table of Contents

+

Name

+

pthreadCancelableTimedWait, +pthreadCancelableWait – provide cancellation hooks for user +Win32 routines

+

Synopsis

+

#include <pthread.h> +

+

int pthreadCancelableTimedWait (HANDLE waitHandle, +DWORD timeout);

+

int pthreadCancelableWait (HANDLE waitHandle);

+

Description

+

These two functions provide hooks into the pthread_cancel() +mechanism that will allow you to wait on a Windows handle and make it +a cancellation point. Both functions block until either the given +Win32 HANDLE is signalled, or pthread_cancel() +has been called. They are implemented using WaitForMultipleObjects +on waitHandle and the manually reset Win32 event handle that +is the target of pthread_cancel(). +These routines may be called from Win32 native threads but +pthread_cancel() will +require that thread's POSIX thread ID that the thread must retrieve +using pthread_self().

+

pthreadCancelableTimedWait is the timed version that will +return with the code ETIMEDOUT if the interval timeout +milliseconds elapses before waitHandle is signalled.

+

Cancellation

+

These routines allow routines that block on Win32 HANDLEs to be +cancellable via pthread_cancel().

+

Return Value

+



+

+

Errors

+

The pthreadCancelableTimedWait function returns the +following error code on error: +

+
+
ETIMEDOUT +
+
+

+The interval timeout milliseconds elapsed before waitHandle +was signalled.

+

Author

+

Ross Johnson for use with Pthreads-w32.

+

See also

+

pthread_cancel(), +pthread_self()

+
+

Table of Contents

+ + + \ No newline at end of file diff --git a/manual/pthread_attr_init.html b/manual/pthread_attr_init.html index 55ebbfc8..099a53bc 100644 --- a/manual/pthread_attr_init.html +++ b/manual/pthread_attr_init.html @@ -1,334 +1,330 @@ - - - - - PTHREAD_ATTR_INIT(3) manual page - - - -

POSIX Threads for Windows – REFERENCE - -Pthreads-w32

-

Reference Index

-

Table of Contents

-

Name

-

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

-

Synopsis

-

#include <pthread.h> -

-

int pthread_attr_init(pthread_attr_t *attr); -

-

int pthread_attr_destroy(pthread_attr_t *attr); -

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

Description

-

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

-

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

-

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

-

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

-

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

-

The following thread attributes are supported: -

-

affinity

-

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

-

detachstate

-

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

-

Default value: PTHREAD_CREATE_JOINABLE. -

-

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

-

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

-

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

-

name

-

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

-

schedpolicy

-

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

-

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

-

Default value: SCHED_OTHER. -

-

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

-

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

-

schedparam

-

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

-

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

-

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

-

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

-

inheritsched

-

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

-

Default value: PTHREAD_EXPLICIT_SCHED. -

-

scope

-

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

-

Pthreads-w32 only supports PTHREAD_SCOPE_SYSTEM.

-

Default value: PTHREAD_SCOPE_SYSTEM. -

-

Return Value

-

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

-

Errors

-

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

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

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

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

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

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

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

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

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

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

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

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

-Author

-

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

-

Modified by Ross Johnson for use with Pthreads-w32.

-

See Also

-

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

-
-

Table of Contents

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

POSIX Threads for Windows – REFERENCE – +Pthreads-w32

+

Reference Index

+

Table of Contents

+

Name

+

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

+

Synopsis

+

#include <pthread.h> +

+

int pthread_attr_init(pthread_attr_t *attr); +

+

int pthread_attr_destroy(pthread_attr_t *attr); +

+

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

+

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

+

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

+

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

+

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

+

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

+

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

+

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

+

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

+

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

+

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

+

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

+

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

+

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

+

Description

+

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

+

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

+

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

+

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

+

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

+

The following thread attributes are supported: +

+

affinity

+

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

+

detachstate

+

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

+

Default value: PTHREAD_CREATE_JOINABLE. +

+

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

+

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

+

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

+

name

+

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

+

schedpolicy

+

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

+

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

+

Default value: SCHED_OTHER. +

+

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

+

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

+

schedparam

+

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

+

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

+

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

+

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

+

inheritsched

+

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

+

Default value: PTHREAD_EXPLICIT_SCHED. +

+

scope

+

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

+

Pthreads-w32 only supports PTHREAD_SCOPE_SYSTEM.

+

Default value: PTHREAD_SCOPE_SYSTEM. +

+

Return Value

+

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

+

Errors

+

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

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

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

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

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

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

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

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

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

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

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

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

+Author

+

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

+

Modified by Ross Johnson for use with Pthreads-w32.

+

See Also

+

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

+
+

Table of Contents

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

POSIX Threads for Windows – REFERENCE - -Pthreads-w32

-

Reference Index

-

Table of Contents

-

Name

-

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

-

Synopsis

-

#include <pthread.h> -

-

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

-

Description

-

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

-

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

-

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

-

Return Value

-

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

-

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

-

Errors

-

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

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

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

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

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

-

The following sections are informative. -

-

Examples

-

None. -

-

Application Usage

-

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

-

Rationale

-

None. -

-

Future Directions

-

None. -

-

See Also

-

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

-

Copyright

-

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

-

Modified by Ross Johnson for use with Pthreads-w32.

-
-

Table of Contents

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

POSIX Threads for Windows – REFERENCE – +Pthreads-w32

+

Reference Index

+

Table of Contents

+

Name

+

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

+

Synopsis

+

#include <pthread.h> +

+

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

+

Description

+

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

+

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

+

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

+

Return Value

+

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

+

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

+

Errors

+

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

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

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

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

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

+

The following sections are informative. +

+

Examples

+

None. +

+

Application Usage

+

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

+

Rationale

+

None. +

+

Future Directions

+

None. +

+

See Also

+

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

+

Copyright

+

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

+

Modified by Ross Johnson for use with Pthreads-w32.

+
+

Table of Contents

+ + \ No newline at end of file diff --git a/manual/pthread_cancel.html b/manual/pthread_cancel.html index 92da62cf..44074486 100644 --- a/manual/pthread_cancel.html +++ b/manual/pthread_cancel.html @@ -110,23 +110,21 @@

Errors

pthread_cancel returns the following error code on error:

-
ESRCH
no thread could be found corresponding to that specified by the thread ID. -
+

pthread_setcancelstate returns the following error code on error:

-
EINVAL
the state argument is not -
+
PTHREAD_CANCEL_ENABLE nor PTHREAD_CANCEL_DISABLE @@ -135,11 +133,10 @@

Errors

error:

-
EINVAL
the type argument is not -
+
PTHREAD_CANCEL_DEFERRED nor PTHREAD_CANCEL_ASYNCHRONOUS diff --git a/manual/pthread_cond_init.html b/manual/pthread_cond_init.html index 5417b0ed..b03ac759 100644 --- a/manual/pthread_cond_init.html +++ b/manual/pthread_cond_init.html @@ -122,13 +122,12 @@

Errors

codes on error:

-
EINVAL
The cond argument is invalid.
ENOMEM -
+
There was not enough memory to allocate the condition variable. @@ -137,35 +136,32 @@

Errors

error codes on error:

-
EINVAL
The cond argument is invalid. -
+

The pthread_cond_broadcast function returns the following error codes on error:

-
EINVAL
The cond argument is invalid. -
+

The pthread_cond_wait function returns the following error codes on error:

-
EINVAL
The cond argument is invalid.
ENOMEM -
+
There was not enough memory to allocate the statically initialised @@ -175,22 +171,20 @@

Errors

error codes on error:

-
EINVAL -
+

The cond argument is invalid.

-
ETIMEDOUT
The condition variable was not signalled before the timeout specified by abstime
ENOMEM -
+
There was not enough memory to allocate the statically initialised @@ -201,19 +195,17 @@

Errors

error code on error:

-
EINVAL -
+

The cond argument is invalid.

-
EBUSY
Some threads are currently waiting on cond. -
+

Author

diff --git a/manual/pthread_condattr_init.html b/manual/pthread_condattr_init.html index da700da0..e61e6851 100644 --- a/manual/pthread_condattr_init.html +++ b/manual/pthread_condattr_init.html @@ -43,24 +43,22 @@

Errors

error code on error:

-
ENOMEM
The was insufficient memory to create the attribute. -
+

The pthread_condattr_destroy function returns the following error code on error:

-
EINVAL
The attr argument is not valid. -
+

Author

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

POSIX Threads for Windows – REFERENCE - -Pthreads-w32

-

Reference Index

-

Table of Contents

-

Name

-

pthread_create - create a new thread -

-

Synopsis

-

#include <pthread.h> -

-

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

-

Description

-

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

-

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

-

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

-

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

-

Return Value

-

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

-

Errors

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

-Author

-

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

-

Modified by Ross Johnson for use with Pthreads-w32.

-

See Also

-

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

-
-

Table of Contents

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

POSIX Threads for Windows – REFERENCE - +Pthreads-w32

+

Reference Index

+

Table of Contents

+

Name

+

pthread_create - create a new thread +

+

Synopsis

+

#include <pthread.h> +

+

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

+

Description

+

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

+

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

+

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

+

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

+

Return Value

+

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

+

Errors

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

+Author

+

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

+

Modified by Ross Johnson for use with Pthreads-w32.

+

See Also

+

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

+
+

Table of Contents

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

- -

-

Name

-pthread_exit - terminate the calling thread -

-

Synopsis

-#include <pthread.h> - -

void pthread_exit(void *retval); -

-

Description

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

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

-

Return Value

-The pthread_exit function never returns. - -

-

Author

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

-

See Also

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

- -


-Table of Contents

-

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

Table of Contents

+

Name

+

pthread_exit - terminate the calling thread +

+

Synopsis

+

#include <pthread.h> +

+

void pthread_exit(void *retval); +

+

Description

+

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

+

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

+

Return +Value

+

The pthread_exit function never returns. +

+

Author

+

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

+

See +Also

+

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

+
+

Table of Contents

+ + + \ No newline at end of file From 4a88b67bd205637dc4812b37d0869582f3ae2241 Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 29 Feb 2016 21:37:57 +1100 Subject: [PATCH 027/207] Various - see ChangeLog --- ChangeLog | 10 ++++++++++ GNUmakefile | 10 +++++----- config.h | 4 ++++ implement.h | 4 +++- ptw32_timespec.c | 10 +++++----- tests/GNUmakefile | 8 ++++++-- 6 files changed, 33 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 070c4a72..4b79e1d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2016-02-29 Ross Johnson + + * GNUmakefile (MINGW_HAVE_SECURE_API): Moved to config.h. Undefined + for __MINGW32__; remove (make optional) forcing a specific C std. + * implement.h (uint64_t): Define for Visual Studio. + +2016-02-29 Keith Marshall + + * ptw32_timespec.c: Fix C90 warnings from GCC; int64_t -> uint64_t + 2016-02-18 Carey Gister <> * dll.c (DllMain): Should not be defined for static library builds. diff --git a/GNUmakefile b/GNUmakefile index 56b667ea..855bc429 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -63,13 +63,13 @@ AND = && CROSS = # Override the builtin default C and C++ standards -CSTD = c11 -CXXSTD = c++11 +#CSTD = -std=c90 +#CXXSTD = -std=c++90 AR = $(CROSS)ar DLLTOOL = $(CROSS)dlltool -CC = $(CROSS)gcc -std=$(CSTD) -CXX = $(CROSS)g++ -std=$(CXXSTD) +CC = $(CROSS)gcc $(CSTD) +CXX = $(CROSS)g++ $(CXXSTD) RANLIB = $(CROSS)ranlib RC = $(CROSS)windres OD_PRIVATE = $(CROSS)objdump -p @@ -144,7 +144,7 @@ GCE_CFLAGS = $(PTW32_FLAGS) -mthreads ## Mingw #MAKE ?= make -CFLAGS = $(OPT) $(XOPT) $(ARCH) -I. -DHAVE_CONFIG_H -DMINGW_HAS_SECURE_API -Wall +CFLAGS = $(OPT) $(XOPT) $(ARCH) -I. -DHAVE_CONFIG_H -Wall OBJEXT = o RESEXT = o diff --git a/config.h b/config.h index 713f7156..91a83f93 100644 --- a/config.h +++ b/config.h @@ -10,6 +10,9 @@ /* We're building the pthreads-win32 library */ #define PTW32_BUILD +/* MinGW: Have strcpy_s etc */ +#define MINGW_HAS_SECURE_API + /* CPU affinity */ #define HAVE_CPU_AFFINITY @@ -139,6 +142,7 @@ #define HAVE_STRUCT_TIMESPEC #elif defined(__MINGW32__) #define HAVE_MODE_T +#undef MINGW_HAS_SECURE_API #endif #if defined(__BORLANDC__) diff --git a/implement.h b/implement.h index cc2e0b1a..2d8057e4 100644 --- a/implement.h +++ b/implement.h @@ -147,9 +147,11 @@ static void ptw32_set_errno(int err) { errno = err; SetLastError(err); } #if defined(PTW32_CONFIG_MINGW) # include #elif defined(__BORLANDC__) -# define int64_t ULONGLONG +# define int64_t LONGLONG +# define uint64_t ULONGLONG #else # define int64_t _int64 +# define uint64_t unsigned _int64 # if defined(PTW32_CONFIG_MSVC6) typedef long intptr_t; # endif diff --git a/ptw32_timespec.c b/ptw32_timespec.c index bb6192e8..078399f2 100644 --- a/ptw32_timespec.c +++ b/ptw32_timespec.c @@ -47,7 +47,7 @@ * time between jan 1, 1601 and jan 1, 1970 in units of 100 nanoseconds */ #define PTW32_TIMESPEC_TO_FILETIME_OFFSET \ - ( ((int64_t) 27111902 << 32) + (int64_t) 3577643008 ) + ( ((uint64_t) 27111902UL << 32) + (uint64_t) 3577643008UL ) INLINE void ptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft) @@ -60,7 +60,7 @@ ptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft) * ------------------------------------------------------------------- */ { - *(int64_t *) ft = ts->tv_sec * 10000000 + *(uint64_t *) ft = ts->tv_sec * 10000000UL + (ts->tv_nsec + 50) / 100 + PTW32_TIMESPEC_TO_FILETIME_OFFSET; } @@ -76,8 +76,8 @@ ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts) */ { ts->tv_sec = - (int) ((*(int64_t *) ft - PTW32_TIMESPEC_TO_FILETIME_OFFSET) / 10000000); + (int) ((*(uint64_t *) ft - PTW32_TIMESPEC_TO_FILETIME_OFFSET) / 10000000UL); ts->tv_nsec = - (int) ((*(int64_t *) ft - PTW32_TIMESPEC_TO_FILETIME_OFFSET - - ((int64_t) ts->tv_sec * (int64_t) 10000000)) * 100); + (int) ((*(uint64_t *) ft - PTW32_TIMESPEC_TO_FILETIME_OFFSET - + ((uint64_t) ts->tv_sec * (uint64_t) 10000000UL)) * 100); } diff --git a/tests/GNUmakefile b/tests/GNUmakefile index 28388798..c5ec83fa 100644 --- a/tests/GNUmakefile +++ b/tests/GNUmakefile @@ -46,14 +46,18 @@ AND = && # # make CROSS=i386-mingw32msvc- clean GC CROSS = +# Override the builtin default C and C++ standards +#CSTD = -std=c90 +#CXXSTD = -std=c++90 + # For cross testing use e.g. # # make RUN=wine CROSS=i386-mingw32msvc- clean GC RUN = AR = $(CROSS)ar DLLTOOL = $(CROSS)dlltool -CC = $(CROSS)gcc -std=c11 -CXX = $(CROSS)g++ -std=c++11 +CC = $(CROSS)gcc $(CSTD) +CXX = $(CROSS)g++ $(CXXSTD) RANLIB = $(CROSS)ranlib # From dcc161ab36d1e15e21eb536cafe7ae403bfad1e5 Mon Sep 17 00:00:00 2001 From: rpj Date: Fri, 25 Mar 2016 20:54:14 +1100 Subject: [PATCH 028/207] Avoid potential segfault --- ChangeLog | 5 +++++ pthread_mutex_init.c | 50 ++++++++++++++++++++++++++++---------------- 2 files changed, 37 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4b79e1d1..8fe952ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-03-25 Bill Parker + + * pthread_mutex_init.c: Memory allocation of robust mutex element + was not being checked. + 2016-02-29 Ross Johnson * GNUmakefile (MINGW_HAVE_SECURE_API): Moved to config.h. Undefined diff --git a/pthread_mutex_init.c b/pthread_mutex_init.c index b76baefd..401b5673 100644 --- a/pthread_mutex_init.c +++ b/pthread_mutex_init.c @@ -108,29 +108,43 @@ pthread_mutex_init (pthread_mutex_t * mutex, const pthread_mutexattr_t * attr) mx->kind = -mx->kind - 1; mx->robustNode = (ptw32_robust_node_t*) malloc(sizeof(ptw32_robust_node_t)); - mx->robustNode->stateInconsistent = PTW32_ROBUST_CONSISTENT; - mx->robustNode->mx = mx; - mx->robustNode->next = NULL; - mx->robustNode->prev = NULL; + if (NULL == mx->robustNode) + { + result = ENOMEM; + } + else + { + mx->robustNode->stateInconsistent = PTW32_ROBUST_CONSISTENT; + mx->robustNode->mx = mx; + mx->robustNode->next = NULL; + mx->robustNode->prev = NULL; + } } } - mx->ownerThread.p = NULL; + if (0 == result) + { + mx->ownerThread.p = NULL; - mx->event = CreateEvent (NULL, PTW32_FALSE, /* manual reset = No */ - PTW32_FALSE, /* initial state = not signaled */ - NULL); /* event name */ + mx->event = CreateEvent (NULL, PTW32_FALSE, /* manual reset = No */ + PTW32_FALSE, /* initial state = not signalled */ + NULL); /* event name */ - if (0 == mx->event) - { - result = ENOSPC; - if (mx->robustNode != NULL) - { - free (mx->robustNode); - } - free (mx); - mx = NULL; - } + if (0 == mx->event) + { + result = ENOSPC; + } + } + } + + if (0 != result) + { + if (NULL != mx->robustNode) + { + free (mx->robustNode); + } + free (mx); + mx = NULL; } *mutex = mx; From c663fe8e03c9cfa568d88031d136f027ad43e414 Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 28 Mar 2016 09:45:39 +1100 Subject: [PATCH 029/207] Comment edits. --- w32_CancelableWait.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/w32_CancelableWait.c b/w32_CancelableWait.c index b30d65e3..dcf28e20 100644 --- a/w32_CancelableWait.c +++ b/w32_CancelableWait.c @@ -50,7 +50,7 @@ ptw32_cancelable_wait (HANDLE waitHandle, DWORD timeout) * This provides an extra hook into the pthread_cancel * mechanism that will allow you to wait on a Windows handle and make it a * cancellation point. This function blocks until the given WIN32 handle is - * signaled or pthread_cancel has been called. It is implemented using + * signalled or pthread_cancel has been called. It is implemented using * WaitForMultipleObjects on 'waitHandle' and a manually reset WIN32 * event used to implement pthread_cancel. * @@ -108,7 +108,7 @@ ptw32_cancelable_wait (HANDLE waitHandle, DWORD timeout) case 1: /* * Got cancel request. - * In the event that both handles are signaled, the cancel will + * In the event that both handles are signalled, the cancel will * be ignored (see case 0 comment). */ ResetEvent (handles[1]); @@ -117,8 +117,8 @@ ptw32_cancelable_wait (HANDLE waitHandle, DWORD timeout) { ptw32_mcs_local_node_t stateLock; /* - * Should handle POSIX and implicit POSIX threads.. - * Make sure we haven't been async-canceled in the meantime. + * Should handle POSIX and implicit POSIX threads. + * Make sure we haven't been async-cancelled in the meantime. */ ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); if (sp->state < PThreadStateCanceling) From 13cbb405a9ab82e2f79f8d50e121313b03377556 Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 28 Mar 2016 09:47:10 +1100 Subject: [PATCH 030/207] Reformat comment. --- implement.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/implement.h b/implement.h index 2d8057e4..7c0330c9 100644 --- a/implement.h +++ b/implement.h @@ -179,7 +179,7 @@ typedef enum PThreadStateRunning, /* Thread alive & kicking */ PThreadStateSuspended, /* Thread alive but suspended */ PThreadStateCancelPending, /* Thread alive but */ - /* has cancellation pending. */ + /* has cancellation pending. */ PThreadStateCanceling, /* Thread alive but is */ /* in the process of terminating */ /* due to a cancellation request */ From 2cf54347cf82d54c36b46119654be82fcd41b193 Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 28 Mar 2016 13:56:41 +1100 Subject: [PATCH 031/207] New exported function: pthread_win32_getabstime_np --- pthread.h | 101 ++++++++++++++++++++++++++----------------- ptw32_relmillisecs.c | 81 ++++++++++++++++++++++++++++++++-- 2 files changed, 140 insertions(+), 42 deletions(-) diff --git a/pthread.h b/pthread.h index bb6faf22..f5eaf79f 100644 --- a/pthread.h +++ b/pthread.h @@ -107,15 +107,51 @@ #define PTW32_LEVEL PTW32_LEVEL_MAX /* Include everything */ #endif -#if defined(__MINGW32__) || defined(__MINGW64__) -# define PTW32_CONFIG_MINGW -#endif -#if defined(_MSC_VER) -# if _MSC_VER < 1300 -# define PTW32_CONFIG_MSVC6 -# endif -# if _MSC_VER < 1400 -# define PTW32_CONFIG_MSVC7 +/* + * This is more or less a duplicate of what is in the autoconf config.h, + * which is only used when building the pthread-win32 libraries. + */ + +#if !defined(PTW32_CONFIG_H) +# if defined(WINCE) +# undef HAVE_CPU_AFFINITY +# define NEED_DUPLICATEHANDLE +# define NEED_CREATETHREAD +# define NEED_ERRNO +# define NEED_CALLOC +# define NEED_FTIME +/* # define NEED_SEM */ +# define NEED_UNICODE_CONSTS +# define NEED_PROCESS_AFFINITY_MASK +/* This may not be needed */ +# define RETAIN_WSALASTERROR +# elif defined(_MSC_VER) +# if _MSC_VER >= 1900 +# define HAVE_STRUCT_TIMESPEC +# elif _MSC_VER < 1300 +# define PTW32_CONFIG_MSVC6 +# elif _MSC_VER < 1400 +# define PTW32_CONFIG_MSVC7 +# endif +# elif !defined(PTW32_CONFIG_MINGW) && (defined(__MINGW32__) || defined(__MINGW64__)) +# include <_mingw.h> +# if defined(__MINGW64_VERSION_MAJOR) +# define PTW32_CONFIG_MINGW 64 +# elif defined(__MINGW_MAJOR_VERSION) || defined(__MINGW32_MAJOR_VERSION) +# define PTW32_CONFIG_MINGW 32 +# else +# define PTW32_CONFIG_MINGW 1 +# endif +# define HAVE_MODE_T +# if PTW32_CONFIG_MINGW == 64 +# define HAVE_STRUCT_TIMESPEC +# else +# undef MINGW_HAS_SECURE_API +# endif +# elif defined(_UWIN) +# define HAVE_MODE_T +# define HAVE_STRUCT_TIMESPEC +# define HAVE_SIGNAL_H # endif #endif @@ -209,29 +245,6 @@ enum { PTW32_TRUE = (! PTW32_FALSE) }; -/* - * This is a duplicate of what is in the autoconf config.h, - * which is only used when building the pthread-win32 libraries. - */ - -#if !defined(PTW32_CONFIG_H) -# if defined(WINCE) -# define NEED_ERRNO -# define NEED_SEM -# elif defined(_UWIN) -# define HAVE_MODE_T -# define HAVE_STRUCT_TIMESPEC -# define HAVE_SIGNAL_H -# elif defined(__MINGW64__) -# define HAVE_STRUCT_TIMESPEC -# define HAVE_MODE_T -# elif defined(__MINGW32__) -# define HAVE_MODE_T -# elif defined(_MSC_VER) && _MSC_VER >= 1900 -# define HAVE_STRUCT_TIMESPEC -# endif -#endif - #if !defined(NEED_FTIME) #include #else /* NEED_FTIME */ @@ -1168,11 +1181,11 @@ PTW32_DLLPORT int PTW32_CDECL pthread_timedjoin_np(pthread_t thread, PTW32_DLLPORT int PTW32_CDECL pthread_tryjoin_np(pthread_t thread, void **value_ptr); PTW32_DLLPORT int PTW32_CDECL pthread_setaffinity_np(pthread_t thread, - size_t cpusetsize, - const cpu_set_t *cpuset); + size_t cpusetsize, + const cpu_set_t *cpuset); PTW32_DLLPORT int PTW32_CDECL pthread_getaffinity_np(pthread_t thread, - size_t cpusetsize, - cpu_set_t *cpuset); + size_t cpusetsize, + cpu_set_t *cpuset); /* * Possibly supported by other POSIX threads implementations @@ -1182,14 +1195,24 @@ PTW32_DLLPORT int PTW32_CDECL pthread_num_processors_np(void); PTW32_DLLPORT unsigned __int64 PTW32_CDECL pthread_getunique_np(pthread_t thread); /* - * Useful if an application wants to statically link - * the lib rather than load the DLL at run-time. + * May be useful if an application wants to statically link + * the lib rather than load the DLL at run-time. These are + * now called automagically for MSVC and GCC builds. */ PTW32_DLLPORT int PTW32_CDECL pthread_win32_process_attach_np(void); PTW32_DLLPORT int PTW32_CDECL pthread_win32_process_detach_np(void); PTW32_DLLPORT int PTW32_CDECL pthread_win32_thread_attach_np(void); PTW32_DLLPORT int PTW32_CDECL pthread_win32_thread_detach_np(void); +/* + * Returns the first parameter "abstime" modified to represent the current system time. + * If "relative" is not NULL it represents an interval to add to "abstime". + */ + +PTW32_DLLPORT struct timespec * PTW32_CDECL pthread_win32_getabstime_np( + struct timespec * abstime, + const struct timespec * relative); + /* * Features that are auto-detected at load/run time. */ @@ -1243,7 +1266,7 @@ PTW32_DLLPORT int PTW32_CDECL pthread_attr_getname_np (pthread_attr_t * attr, ch * Protected Methods * * This function blocks until the given WIN32 handle - * is signaled or pthread_cancel had been called. + * is signalled or pthread_cancel had been called. * This function allows the caller to hook into the * PThreads cancel mechanism. It is implemented using * diff --git a/ptw32_relmillisecs.c b/ptw32_relmillisecs.c index e9190bdc..b7372061 100644 --- a/ptw32_relmillisecs.c +++ b/ptw32_relmillisecs.c @@ -45,6 +45,9 @@ #include #endif +static const int64_t NANOSEC_PER_SEC = 1000000000; +static const int64_t NANOSEC_PER_MILLISEC = 1000000; +static const int64_t MILLISEC_PER_SEC = 1000; #if defined(PTW32_BUILD_INLINED) INLINE @@ -52,9 +55,6 @@ INLINE DWORD ptw32_relmillisecs (const struct timespec * abstime) { - const int64_t NANOSEC_PER_SEC = 1000000000; - const int64_t NANOSEC_PER_MILLISEC = 1000000; - const int64_t MILLISEC_PER_SEC = 1000; DWORD milliseconds; int64_t tmpAbsMilliseconds; int64_t tmpAbsNanoseconds; @@ -151,3 +151,78 @@ ptw32_relmillisecs (const struct timespec * abstime) return milliseconds; } + + +/* + * Return the first parameter "abstime" modified to represent the current system time. + * If "relative" is not NULL it represents an interval to add to "abstime". + */ + +struct timespec * +pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * relative) +{ + int64_t sec; + int64_t nsec; + +#if defined(NEED_FTIME) + struct timespec currSysTime; + FILETIME ft; +#else /* ! NEED_FTIME */ +#if ( defined(_MSC_VER) && _MSC_VER >= 1300 ) /* MSVC7+ */ || \ + ( defined(PTW32_CONFIG_MINGW) && __MSVCRT_VERSION__ >= 0x0601 ) + struct __timeb64 currSysTime; +#else + struct _timeb currSysTime; +#endif +#endif /* NEED_FTIME */ + + /* get current system time */ + +#if defined(NEED_FTIME) + +# if defined(WINCE) + + SYSTEMTIME st; + GetSystemTime(&st); + SystemTimeToFileTime(&st, &ft); +# else + GetSystemTimeAsFileTime(&ft); +# endif + + ptw32_filetime_to_timespec(&ft, &currSysTime); + + sec = currSysTime.tv_sec; + nsec = currSysTime.tv_nsec; + +#else /* ! NEED_FTIME */ + +#if defined(_MSC_VER) && _MSC_VER >= 1400 /* MSVC8+ */ + _ftime64_s(&currSysTime); +#elif ( defined(_MSC_VER) && _MSC_VER >= 1300 ) /* MSVC7+ */ || \ + ( defined(PTW32_CONFIG_MINGW) && __MSVCRT_VERSION__ >= 0x0601 ) + _ftime64(&currSysTime); +#else + _ftime(&currSysTime); +#endif + + sec = currSysTime.time; + nsec = currSysTime.millitm * NANOSEC_PER_MILLISEC; + +#endif /* NEED_FTIME */ + + if (NULL != relative) + { + nsec += relative->tv_nsec; + if (nsec >= NANOSEC_PER_SEC) + { + sec++; + nsec -= NANOSEC_PER_SEC; + } + sec += relative->tv_sec; + } + + abstime->tv_sec = (time_t) sec; + abstime->tv_nsec = (long) nsec; + + return abstime; +} From 475ce23c797e7f3ba562c0a02780078447be5fc9 Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 28 Mar 2016 13:57:54 +1100 Subject: [PATCH 032/207] Converted to use new pthread_win32_getabstime_np function. --- tests/condvar2.c | 12 ++---------- tests/condvar2_1.c | 12 ++---------- tests/condvar3.c | 12 ++---------- tests/condvar3_1.c | 12 ++---------- tests/condvar3_2.c | 15 +++++---------- tests/condvar3_3.c | 24 ++++++------------------ tests/condvar4.c | 19 +++---------------- tests/condvar5.c | 19 +++---------------- tests/condvar6.c | 12 ++---------- tests/condvar7.c | 12 ++---------- tests/condvar8.c | 12 ++---------- tests/condvar9.c | 12 ++---------- tests/join4.c | 10 ++-------- tests/mutex8.c | 11 ++--------- tests/mutex8e.c | 11 ++--------- tests/mutex8n.c | 11 ++--------- tests/mutex8r.c | 11 ++--------- tests/reinit1.c | 7 ------- tests/rwlock2_t.c | 11 ++--------- tests/rwlock3_t.c | 11 ++--------- tests/rwlock4_t.c | 12 ++---------- tests/rwlock5_t.c | 11 ++--------- tests/rwlock6_t.c | 12 ++---------- tests/rwlock6_t2.c | 11 ++--------- tests/semaphore4t.c | 15 +++++---------- tests/stress1.c | 44 +++++++------------------------------------- 26 files changed, 67 insertions(+), 294 deletions(-) diff --git a/tests/condvar2.c b/tests/condvar2.c index 452b22be..be12e2d4 100644 --- a/tests/condvar2.c +++ b/tests/condvar2.c @@ -87,9 +87,7 @@ pthread_mutex_t mutex; int main() { - struct timespec abstime = { 0, 0 }; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; + struct timespec abstime = { 0, 0 }, reltime = { 1, 0 }; assert(pthread_cond_init(&cv, NULL) == 0); @@ -97,13 +95,7 @@ main() assert(pthread_mutex_lock(&mutex) == 0); - /* get current system time */ - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - abstime.tv_sec += 1; + (void) pthread_win32_getabstime_np(&abstime, &reltime); assert(pthread_cond_timedwait(&cv, &mutex, &abstime) == ETIMEDOUT); diff --git a/tests/condvar2_1.c b/tests/condvar2_1.c index dc367556..09a51fae 100644 --- a/tests/condvar2_1.c +++ b/tests/condvar2_1.c @@ -81,7 +81,7 @@ static pthread_cond_t cv; static pthread_mutex_t mutex; -static struct timespec abstime = { 0, 0 }; +static struct timespec abstime = { 0, 0 }, reltime = { 5, 0 }; enum { NUMTHREADS = 30 @@ -107,20 +107,12 @@ main() int i; pthread_t t[NUMTHREADS + 1]; void* result = (void*)0; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; assert(pthread_cond_init(&cv, NULL) == 0); assert(pthread_mutex_init(&mutex, NULL) == 0); - /* get current system time */ - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - abstime.tv_sec += 5; + pthread_win32_getabstime_np(&abstime, &reltime); assert(pthread_mutex_lock(&mutex) == 0); diff --git a/tests/condvar3.c b/tests/condvar3.c index 2fed0414..c9943ff8 100644 --- a/tests/condvar3.c +++ b/tests/condvar3.c @@ -112,9 +112,7 @@ int main() { pthread_t t[NUMTHREADS]; - struct timespec abstime = { 0, 0 }; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; + struct timespec abstime, reltime = { 5, 0 }; assert((t[0] = pthread_self()).p != NULL); @@ -124,15 +122,9 @@ main() assert(pthread_mutex_lock(&mutex) == 0); - /* get current system time */ - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - assert(pthread_create(&t[1], NULL, mythread, (void *) 1) == 0); - abstime.tv_sec += 5; + (void) pthread_win32_getabstime_np(&abstime, &reltime); while (! (shared > 0)) assert(pthread_cond_timedwait(&cv, &mutex, &abstime) == 0); diff --git a/tests/condvar3_1.c b/tests/condvar3_1.c index 79638fa7..84b1e276 100644 --- a/tests/condvar3_1.c +++ b/tests/condvar3_1.c @@ -85,7 +85,7 @@ static pthread_cond_t cv; static pthread_cond_t cv1; static pthread_mutex_t mutex; static pthread_mutex_t mutex1; -static struct timespec abstime = { 0, 0 }; +static struct timespec abstime = { 0, 0 }, reltime = { 5, 0 }; static int timedout = 0; static int signaled = 0; static int awoken = 0; @@ -128,8 +128,6 @@ main() int i; pthread_t t[NUMTHREADS + 1]; void* result = (void*)0; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; assert(pthread_cond_init(&cv, NULL) == 0); assert(pthread_cond_init(&cv1, NULL) == 0); @@ -137,13 +135,7 @@ main() assert(pthread_mutex_init(&mutex, NULL) == 0); assert(pthread_mutex_init(&mutex1, NULL) == 0); - /* get current system time */ - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - abstime.tv_sec += 5; + (void) pthread_win32_getabstime_np(&abstime, &reltime); assert(pthread_mutex_lock(&mutex1) == 0); diff --git a/tests/condvar3_2.c b/tests/condvar3_2.c index 0cb332ce..6c51b902 100644 --- a/tests/condvar3_2.c +++ b/tests/condvar3_2.c @@ -83,8 +83,8 @@ static pthread_cond_t cv; static pthread_mutex_t mutex; -static struct timespec abstime = { 0, 0 }; -static struct timespec abstime2 = { 0, 0 }; +static struct timespec abstime, abstime2; +static struct timespec reltime = { 5, 0 }; static int timedout = 0; static int awoken = 0; @@ -117,7 +117,6 @@ mythread(void * arg) InterlockedIncrement((LPLONG)&awoken); } - return arg; } @@ -129,18 +128,14 @@ main() int i; pthread_t t[NUMTHREADS + 1]; void* result = (void*)0; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; assert(pthread_cond_init(&cv, NULL) == 0); assert(pthread_mutex_init(&mutex, NULL) == 0); - /* get current system time */ - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = abstime2.tv_sec = (long)currSysTime.time + 5; - abstime.tv_nsec = abstime2.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; + (void) pthread_win32_getabstime_np(&abstime, &reltime); + abstime2.tv_sec = abstime.tv_sec; + abstime2.tv_nsec = abstime.tv_nsec; assert(pthread_mutex_lock(&mutex) == 0); diff --git a/tests/condvar3_3.c b/tests/condvar3_3.c index 7a5fc651..13bade43 100644 --- a/tests/condvar3_3.c +++ b/tests/condvar3_3.c @@ -83,23 +83,17 @@ pthread_cond_t cnd; pthread_mutex_t mtx; +static const int64_t NANOSEC_PER_SEC = 1000000000; + int main() { int rc; - - struct timespec abstime = { 0, 0 }; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; + struct timespec abstime, reltime = { 0, NANOSEC_PER_SEC/2 }; assert(pthread_cond_init(&cnd, 0) == 0); assert(pthread_mutex_init(&mtx, 0) == 0); - /* get current system time */ - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - abstime.tv_sec += 1; + (void) pthread_win32_getabstime_np(&abstime, &reltime); /* Here pthread_cond_timedwait should time out after one second. */ @@ -109,21 +103,15 @@ int main() assert(pthread_mutex_unlock(&mtx) == 0); - /* Here, the condition variable is signaled, but there are no + /* Here, the condition variable is signalled, but there are no threads waiting on it. The signal should be lost and the next pthread_cond_timedwait should time out too. */ -// assert(pthread_mutex_lock(&mtx) == 0); - assert((rc = pthread_cond_signal(&cnd)) == 0); -// assert(pthread_mutex_unlock(&mtx) == 0); - assert(pthread_mutex_lock(&mtx) == 0); - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - abstime.tv_sec += 1; + (void) pthread_win32_getabstime_np(&abstime, &reltime); assert((rc = pthread_cond_timedwait(&cnd, &mtx, &abstime)) == ETIMEDOUT); diff --git a/tests/condvar4.c b/tests/condvar4.c index f69e0a97..a63104fd 100644 --- a/tests/condvar4.c +++ b/tests/condvar4.c @@ -112,9 +112,7 @@ int main() { pthread_t t[NUMTHREADS]; - struct timespec abstime = { 0, 0 }; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; + struct timespec abstime, reltime = { 5, 0 }; cvthing.shared = 0; @@ -128,13 +126,7 @@ main() assert(cvthing.lock != PTHREAD_MUTEX_INITIALIZER); - /* get current system time */ - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - abstime.tv_sec += 5; + (void) pthread_win32_getabstime_np(&abstime, &reltime); assert(pthread_cond_timedwait(&cvthing.notbusy, &cvthing.lock, &abstime) == ETIMEDOUT); @@ -142,12 +134,7 @@ main() assert(pthread_create(&t[1], NULL, mythread, (void *) 1) == 0); - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - abstime.tv_sec += 5; + (void) pthread_win32_getabstime_np(&abstime, &reltime); while (! (cvthing.shared > 0)) assert(pthread_cond_timedwait(&cvthing.notbusy, &cvthing.lock, &abstime) == 0); diff --git a/tests/condvar5.c b/tests/condvar5.c index 8d678d3a..feeefbcd 100644 --- a/tests/condvar5.c +++ b/tests/condvar5.c @@ -111,9 +111,7 @@ int main() { pthread_t t[NUMTHREADS]; - struct timespec abstime = { 0, 0 }; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; + struct timespec abstime, reltime = { 5, 0 }; cvthing.shared = 0; @@ -127,13 +125,7 @@ main() assert(cvthing.lock != PTHREAD_MUTEX_INITIALIZER); - /* get current system time */ - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - abstime.tv_sec += 5; + (void) pthread_win32_getabstime_np(&abstime, &reltime); assert(pthread_cond_timedwait(&cvthing.notbusy, &cvthing.lock, &abstime) == ETIMEDOUT); @@ -141,12 +133,7 @@ main() assert(pthread_create(&t[1], NULL, mythread, (void *) 1) == 0); - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - abstime.tv_sec += 5; + (void) pthread_win32_getabstime_np(&abstime, &reltime); while (! (cvthing.shared > 0)) assert(pthread_cond_timedwait(&cvthing.notbusy, &cvthing.lock, &abstime) == 0); diff --git a/tests/condvar6.c b/tests/condvar6.c index fbf0c871..1e4baf2c 100644 --- a/tests/condvar6.c +++ b/tests/condvar6.c @@ -107,7 +107,7 @@ static cvthing_t cvthing = { static pthread_mutex_t start_flag = PTHREAD_MUTEX_INITIALIZER; -static struct timespec abstime = { 0, 0 }; +static struct timespec abstime, reltime = { 5, 0 }; static int awoken; @@ -145,9 +145,6 @@ main() int i; pthread_t t[NUMTHREADS + 1]; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; - cvthing.shared = 0; assert((t[0] = pthread_self()).p != NULL); @@ -158,12 +155,7 @@ main() assert(pthread_mutex_lock(&start_flag) == 0); - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - abstime.tv_sec += 5; + (void) pthread_win32_getabstime_np(&abstime, &reltime); assert((t[0] = pthread_self()).p != NULL); diff --git a/tests/condvar7.c b/tests/condvar7.c index d0a1e951..f1fc30ee 100644 --- a/tests/condvar7.c +++ b/tests/condvar7.c @@ -107,7 +107,7 @@ static cvthing_t cvthing = { static pthread_mutex_t start_flag = PTHREAD_MUTEX_INITIALIZER; -static struct timespec abstime = { 0, 0 }; +static struct timespec abstime, reltime = { 10, 0 }; static int awoken; @@ -155,9 +155,6 @@ main() int i; pthread_t t[NUMTHREADS + 1]; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; - cvthing.shared = 0; assert((t[0] = pthread_self()).p != NULL); @@ -168,12 +165,7 @@ main() assert(pthread_mutex_lock(&start_flag) == 0); - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (time_t)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - abstime.tv_sec += 10; + (void) pthread_win32_getabstime_np(&abstime, &reltime); assert((t[0] = pthread_self()).p != NULL); diff --git a/tests/condvar8.c b/tests/condvar8.c index a05ccb59..a2e0931a 100644 --- a/tests/condvar8.c +++ b/tests/condvar8.c @@ -107,7 +107,7 @@ static cvthing_t cvthing = { static pthread_mutex_t start_flag = PTHREAD_MUTEX_INITIALIZER; -static struct timespec abstime = { 0, 0 }; +static struct timespec abstime, reltime = { 10, 0 }; static int awoken; @@ -156,21 +156,13 @@ main() int first, last; pthread_t t[NUMTHREADS + 1]; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; - assert((t[0] = pthread_self()).p != NULL); assert(cvthing.notbusy == PTHREAD_COND_INITIALIZER); assert(cvthing.lock == PTHREAD_MUTEX_INITIALIZER); - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - abstime.tv_sec += 10; + (void) pthread_win32_getabstime_np(&abstime, &reltime); assert((t[0] = pthread_self()).p != NULL); diff --git a/tests/condvar9.c b/tests/condvar9.c index 910d37b2..d928fc1e 100644 --- a/tests/condvar9.c +++ b/tests/condvar9.c @@ -109,7 +109,7 @@ static cvthing_t cvthing = { static pthread_mutex_t start_flag = PTHREAD_MUTEX_INITIALIZER; -static struct timespec abstime = { 0, 0 }; +static struct timespec abstime, reltime = { 5, 0 }; static int awoken; @@ -164,21 +164,13 @@ main() int canceledThreads = 0; pthread_t t[NUMTHREADS + 1]; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; - assert((t[0] = pthread_self()).p != NULL); assert(cvthing.notbusy == PTHREAD_COND_INITIALIZER); assert(cvthing.lock == PTHREAD_MUTEX_INITIALIZER); - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - abstime.tv_sec += 5; + (void) pthread_win32_getabstime_np(&abstime, &reltime); assert((t[0] = pthread_self()).p != NULL); diff --git a/tests/join4.c b/tests/join4.c index cbe96d29..3961dfeb 100644 --- a/tests/join4.c +++ b/tests/join4.c @@ -50,10 +50,8 @@ int main(int argc, char * argv[]) { pthread_t id; - struct timespec abstime; + struct timespec abstime, reltime = { 1, 0 }; void* result = (void*)-1; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; assert(pthread_create(&id, NULL, func, (void *)(size_t)999) == 0); @@ -62,13 +60,9 @@ main(int argc, char * argv[]) */ Sleep(100); - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; + (void) pthread_win32_getabstime_np(&abstime, &reltime); /* Test for pthread_timedjoin_np timeout */ - abstime.tv_sec += 1; assert(pthread_timedjoin_np(id, &result, &abstime) == ETIMEDOUT); assert((int)(size_t)result == -1); diff --git a/tests/mutex8.c b/tests/mutex8.c index 35ce5629..ffe0afaa 100644 --- a/tests/mutex8.c +++ b/tests/mutex8.c @@ -42,16 +42,9 @@ static pthread_mutex_t mutex; void * locker(void * arg) { - struct timespec abstime = { 0, 0 }; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; + struct timespec abstime, reltime = { 1, 0 }; - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - abstime.tv_sec += 1; + (void) pthread_win32_getabstime_np(&abstime, &reltime); assert(pthread_mutex_timedlock(&mutex, &abstime) == ETIMEDOUT); diff --git a/tests/mutex8e.c b/tests/mutex8e.c index ec2838f7..5cf2de68 100644 --- a/tests/mutex8e.c +++ b/tests/mutex8e.c @@ -50,16 +50,9 @@ static pthread_mutexattr_t mxAttr; void * locker(void * arg) { - struct timespec abstime = { 0, 0 }; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; + struct timespec abstime, reltime = { 1, 0 }; - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - abstime.tv_sec += 1; + (void) pthread_win32_getabstime_np(&abstime, &reltime); assert(pthread_mutex_timedlock(&mutex, &abstime) == ETIMEDOUT); diff --git a/tests/mutex8n.c b/tests/mutex8n.c index 0fa290ce..6be97dc1 100644 --- a/tests/mutex8n.c +++ b/tests/mutex8n.c @@ -50,16 +50,9 @@ static pthread_mutexattr_t mxAttr; void * locker(void * arg) { - struct timespec abstime = { 0, 0 }; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; + struct timespec abstime, reltime = { 1, 0 }; - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - abstime.tv_sec += 1; + (void) pthread_win32_getabstime_np(&abstime, &reltime); assert(pthread_mutex_timedlock(&mutex, &abstime) == ETIMEDOUT); diff --git a/tests/mutex8r.c b/tests/mutex8r.c index 1b9f00f0..83673c1c 100644 --- a/tests/mutex8r.c +++ b/tests/mutex8r.c @@ -50,16 +50,9 @@ static pthread_mutexattr_t mxAttr; void * locker(void * arg) { - struct timespec abstime = { 0, 0 }; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; + struct timespec abstime, reltime = { 1, 0 }; - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - abstime.tv_sec += 1; + (void) pthread_win32_getabstime_np(&abstime, &reltime); assert(pthread_mutex_timedlock(&mutex, &abstime) == ETIMEDOUT); diff --git a/tests/reinit1.c b/tests/reinit1.c index 47be0c08..3b2ce3cf 100644 --- a/tests/reinit1.c +++ b/tests/reinit1.c @@ -108,13 +108,8 @@ main (int argc, char *argv[]) int count; int data_count; int reinit_count; - int thread_updates = 0; - int data_updates = 0; int seed = 1; - PTW32_STRUCT_TIMEB currSysTime1; - PTW32_STRUCT_TIMEB currSysTime2; - for (reinit_count = 0; reinit_count < LOOPS; reinit_count++) { /* @@ -128,8 +123,6 @@ main (int argc, char *argv[]) assert(pthread_rwlock_init (&data[data_count].lock, NULL) == 0); } - PTW32_FTIME(&currSysTime1); - /* * Create THREADS threads to access shared data. */ diff --git a/tests/rwlock2_t.c b/tests/rwlock2_t.c index b4767c7f..d6a96713 100644 --- a/tests/rwlock2_t.c +++ b/tests/rwlock2_t.c @@ -50,16 +50,9 @@ pthread_rwlock_t rwlock = PTHREAD_RWLOCK_INITIALIZER; int main() { - struct timespec abstime = { 0, 0 }; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; + struct timespec abstime, reltime = { 1, 0 }; - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - abstime.tv_sec += 1; + (void) pthread_win32_getabstime_np(&abstime, &reltime); assert(rwlock == PTHREAD_RWLOCK_INITIALIZER); diff --git a/tests/rwlock3_t.c b/tests/rwlock3_t.c index bedcedac..9076496e 100644 --- a/tests/rwlock3_t.c +++ b/tests/rwlock3_t.c @@ -63,16 +63,9 @@ int main() { pthread_t t; - struct timespec abstime = { 0, 0 }; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; + struct timespec abstime, reltime = { 1, 0 }; - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - abstime.tv_sec += 1; + (void) pthread_win32_getabstime_np(&abstime, &reltime); assert(pthread_rwlock_timedwrlock(&rwlock1, &abstime) == 0); diff --git a/tests/rwlock4_t.c b/tests/rwlock4_t.c index 770dffbc..bc871b83 100644 --- a/tests/rwlock4_t.c +++ b/tests/rwlock4_t.c @@ -64,17 +64,9 @@ main() { pthread_t t; struct timespec abstime = { 0, 0 }; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; + struct timespec reltime = { 1, 0 }; - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - abstime.tv_sec += 1; - - assert(pthread_rwlock_timedrdlock(&rwlock1, &abstime) == 0); + assert(pthread_rwlock_timedrdlock(&rwlock1, pthread_win32_getabstime_np(&abstime, &reltime)) == 0); assert(pthread_create(&t, NULL, func, NULL) == 0); diff --git a/tests/rwlock5_t.c b/tests/rwlock5_t.c index 8bba06b8..03e6c295 100644 --- a/tests/rwlock5_t.c +++ b/tests/rwlock5_t.c @@ -65,16 +65,9 @@ int main() { pthread_t t; - struct timespec abstime = { 0, 0 }; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; + struct timespec abstime, reltime = { 1, 0 }; - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - abstime.tv_sec += 1; + (void) pthread_win32_getabstime_np(&abstime, &reltime); assert(pthread_rwlock_timedrdlock(&rwlock1, &abstime) == 0); diff --git a/tests/rwlock6_t.c b/tests/rwlock6_t.c index 0616d721..b33cd480 100644 --- a/tests/rwlock6_t.c +++ b/tests/rwlock6_t.c @@ -62,15 +62,9 @@ void * wrfunc(void * arg) void * rdfunc(void * arg) { int ba = -1; - struct timespec abstime = { 0, 0 }; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; - - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; + struct timespec abstime; + (void) pthread_win32_getabstime_np(&abstime, NULL); if ((int) (size_t)arg == 1) { @@ -123,5 +117,3 @@ main() return 0; } - - diff --git a/tests/rwlock6_t2.c b/tests/rwlock6_t2.c index c37b8663..279ca770 100644 --- a/tests/rwlock6_t2.c +++ b/tests/rwlock6_t2.c @@ -48,7 +48,7 @@ static pthread_rwlock_t rwlock1 = PTHREAD_RWLOCK_INITIALIZER; static int bankAccount = 0; -struct timespec abstime = { 0, 0 }; +struct timespec abstime, reltime = { 1, 0 }; void * wrfunc(void * arg) { @@ -90,15 +90,8 @@ main() void* wr1Result = (void*)0; void* wr2Result = (void*)0; void* rdResult = (void*)0; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - abstime.tv_sec += 1; + (void) pthread_win32_getabstime_np(&abstime, &reltime); bankAccount = 0; diff --git a/tests/semaphore4t.c b/tests/semaphore4t.c index 467caa76..3fdc86a5 100644 --- a/tests/semaphore4t.c +++ b/tests/semaphore4t.c @@ -106,20 +106,15 @@ thr (void * arg) int timeoutwithnanos(sem_t sem, int nanoseconds) { - struct timespec ts; + struct timespec ts, rel; FILETIME ft_before, ft_after; int rc; - GetSystemTimeAsFileTime(&ft_before); - ptw32_filetime_to_timespec(&ft_before, &ts); - ts.tv_nsec += nanoseconds; - if (ts.tv_nsec >= NANOSEC_PER_SEC) - { - ts.tv_sec += 1; - ts.tv_nsec -= NANOSEC_PER_SEC; - } + rel.tv_sec = 0; + rel.tv_nsec = nanoseconds; - rc = sem_timedwait(&sem, &ts); + GetSystemTimeAsFileTime(&ft_before); + rc = sem_timedwait(&sem, pthread_win32_getabstime_np(&ts, &rel)); /* This should have timed out */ assert(rc != 0); diff --git a/tests/stress1.c b/tests/stress1.c index 3b55a660..333b5d7f 100644 --- a/tests/stress1.c +++ b/tests/stress1.c @@ -99,46 +99,12 @@ static int signalsTakenCount = 0; static int signalsSent = 0; static int bias = 0; static int timeout = 10; // Must be > 0 +static const long NANOSEC_PER_MILLISEC = 1000000; enum { CTL_STOP = -1 }; -/* - * Returns abstime 'milliseconds' from 'now'. - * - * Works for: -INT_MAX <= millisecs <= INT_MAX - */ -struct timespec * -millisecondsFromNow (struct timespec * time, int millisecs) -{ - PTW32_STRUCT_TIMEB currSysTime; - int64_t nanosecs, secs; - const int64_t NANOSEC_PER_MILLISEC = 1000000; - const int64_t NANOSEC_PER_SEC = 1000000000; - - /* get current system time and add millisecs */ - PTW32_FTIME(&currSysTime); - - secs = (int64_t)(currSysTime.time) + (millisecs / 1000); - nanosecs = ((int64_t) (millisecs%1000 + currSysTime.millitm)) * NANOSEC_PER_MILLISEC; - if (nanosecs >= NANOSEC_PER_SEC) - { - secs++; - nanosecs -= NANOSEC_PER_SEC; - } - else if (nanosecs < 0) - { - secs--; - nanosecs += NANOSEC_PER_SEC; - } - - time->tv_nsec = (long)nanosecs; - time->tv_sec = (long)secs; - - return time; -} - void * masterThread (void * arg) { @@ -204,16 +170,20 @@ masterThread (void * arg) void * slaveThread (void * arg) { - struct timespec time; + struct timespec abstime, reltime; pthread_barrier_wait(&startBarrier); do { assert(pthread_mutex_lock(&control.mx) == 0); + + reltime.tv_sec = (control.value / 1000); + reltime.tv_nsec = (control.value % 1000) * NANOSEC_PER_MILLISEC; + if (pthread_cond_timedwait(&control.cv, &control.mx, - millisecondsFromNow(&time, control.value)) == ETIMEDOUT) + pthread_win32_getabstime_np(&abstime, &reltime)) == ETIMEDOUT) { timeoutCount++; } From 7b1ef45ff95ba6113d9c0dd8034e70372e3404bd Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 28 Mar 2016 13:59:30 +1100 Subject: [PATCH 033/207] Updates to platform-dependency defines. --- config.h | 47 ++++++++++++++++++++++++++++------------------- sched.h | 42 ++++++++++++++++++++++++++++++++++++------ semaphore.h | 42 ++++++++++++++++++++++++++++++++++++------ 3 files changed, 100 insertions(+), 31 deletions(-) diff --git a/config.h b/config.h index 91a83f93..409edec6 100644 --- a/config.h +++ b/config.h @@ -115,34 +115,43 @@ * to the pthreads-win32 maintainer. Thanks. *********************************************************************/ #if defined(WINCE) -#undef HAVE_CPU_AFFINITY -#define NEED_DUPLICATEHANDLE -#define NEED_CREATETHREAD -#define NEED_ERRNO -#define NEED_CALLOC -#define NEED_FTIME -/* #define NEED_SEM */ -#define NEED_UNICODE_CONSTS -#define NEED_PROCESS_AFFINITY_MASK +# undef HAVE_CPU_AFFINITY +# define NEED_DUPLICATEHANDLE +# define NEED_CREATETHREAD +# define NEED_ERRNO +# define NEED_CALLOC +# define NEED_FTIME +/* # define NEED_SEM */ +# define NEED_UNICODE_CONSTS +# define NEED_PROCESS_AFFINITY_MASK /* This may not be needed */ -#define RETAIN_WSALASTERROR +# define RETAIN_WSALASTERROR #endif #if defined(_UWIN) -#define HAVE_MODE_T -#define HAVE_STRUCT_TIMESPEC +# define HAVE_MODE_T +# define HAVE_STRUCT_TIMESPEC +# define HAVE_SIGNAL_H #endif #if defined(__GNUC__) -#define HAVE_C_INLINE +# define HAVE_C_INLINE #endif -#if defined(__MINGW64__) -#define HAVE_MODE_T -#define HAVE_STRUCT_TIMESPEC -#elif defined(__MINGW32__) -#define HAVE_MODE_T -#undef MINGW_HAS_SECURE_API +#if defined(__MINGW32__) || defined(__MINGW64__) +# include <_mingw.h> +# if defined(__MINGW64_VERSION_MAJOR) +# define PTW32_CONFIG_MINGW 64 +# elif defined(__MINGW_MAJOR_VERSION) || defined(__MINGW32_MAJOR_VERSION) +# define PTW32_CONFIG_MINGW 32 +# endif +# if PTW32_CONFIG_MINGW == 64 +# define HAVE_STRUCT_TIMESPEC +# define HAVE_MODE_T +# else +# define HAVE_MODE_T +# undef MINGW_HAS_SECURE_API +# endif #endif #if defined(__BORLANDC__) diff --git a/sched.h b/sched.h index d8a71140..42e8c449 100644 --- a/sched.h +++ b/sched.h @@ -115,20 +115,50 @@ #endif /* - * This is a duplicate of what is in the autoconf config.h, + * This is more or less a duplicate of what is in the autoconf config.h, * which is only used when building the pthread-win32 libraries. */ #if !defined(PTW32_CONFIG_H) # if defined(WINCE) +# undef HAVE_CPU_AFFINITY +# define NEED_DUPLICATEHANDLE +# define NEED_CREATETHREAD # define NEED_ERRNO -# define NEED_SEM -# endif -# if defined(__MINGW64__) -# define HAVE_STRUCT_TIMESPEC +# define NEED_CALLOC +# define NEED_FTIME +/* # define NEED_SEM */ +# define NEED_UNICODE_CONSTS +# define NEED_PROCESS_AFFINITY_MASK +/* This may not be needed */ +# define RETAIN_WSALASTERROR +# elif defined(_MSC_VER) +# if _MSC_VER >= 1900 +# define HAVE_STRUCT_TIMESPEC +# elif _MSC_VER < 1300 +# define PTW32_CONFIG_MSVC6 +# elif _MSC_VER < 1400 +# define PTW32_CONFIG_MSVC7 +# endif +# elif !defined(PTW32_CONFIG_MINGW) && (defined(__MINGW32__) || defined(__MINGW64__)) +# include <_mingw.h> +# if defined(__MINGW64_VERSION_MAJOR) +# define PTW32_CONFIG_MINGW 64 +# elif defined(__MINGW_MAJOR_VERSION) || defined(__MINGW32_MAJOR_VERSION) +# define PTW32_CONFIG_MINGW 32 +# else +# define PTW32_CONFIG_MINGW 1 +# endif # define HAVE_MODE_T -# elif defined(_UWIN) || defined(__MINGW32__) +# if PTW32_CONFIG_MINGW == 64 +# define HAVE_STRUCT_TIMESPEC +# else +# undef MINGW_HAS_SECURE_API +# endif +# elif defined(_UWIN) # define HAVE_MODE_T +# define HAVE_STRUCT_TIMESPEC +# define HAVE_SIGNAL_H # endif #endif diff --git a/semaphore.h b/semaphore.h index b67845db..f9d2556d 100644 --- a/semaphore.h +++ b/semaphore.h @@ -94,20 +94,50 @@ #endif /* - * This is a duplicate of what is in the autoconf config.h, + * This is more or less a duplicate of what is in the autoconf config.h, * which is only used when building the pthread-win32 libraries. */ #if !defined(PTW32_CONFIG_H) # if defined(WINCE) +# undef HAVE_CPU_AFFINITY +# define NEED_DUPLICATEHANDLE +# define NEED_CREATETHREAD # define NEED_ERRNO -# define NEED_SEM -# endif -# if defined(__MINGW64__) -# define HAVE_STRUCT_TIMESPEC +# define NEED_CALLOC +# define NEED_FTIME +/* # define NEED_SEM */ +# define NEED_UNICODE_CONSTS +# define NEED_PROCESS_AFFINITY_MASK +/* This may not be needed */ +# define RETAIN_WSALASTERROR +# elif defined(_MSC_VER) +# if _MSC_VER >= 1900 +# define HAVE_STRUCT_TIMESPEC +# elif _MSC_VER < 1300 +# define PTW32_CONFIG_MSVC6 +# elif _MSC_VER < 1400 +# define PTW32_CONFIG_MSVC7 +# endif +# elif !defined(PTW32_CONFIG_MINGW) && (defined(__MINGW32__) || defined(__MINGW64__)) +# include <_mingw.h> +# if defined(__MINGW64_VERSION_MAJOR) +# define PTW32_CONFIG_MINGW 64 +# elif defined(__MINGW_MAJOR_VERSION) || defined(__MINGW32_MAJOR_VERSION) +# define PTW32_CONFIG_MINGW 32 +# else +# define PTW32_CONFIG_MINGW 1 +# endif # define HAVE_MODE_T -# elif defined(_UWIN) || defined(__MINGW32__) +# if PTW32_CONFIG_MINGW == 64 +# define HAVE_STRUCT_TIMESPEC +# else +# undef MINGW_HAS_SECURE_API +# endif +# elif defined(_UWIN) # define HAVE_MODE_T +# define HAVE_STRUCT_TIMESPEC +# define HAVE_SIGNAL_H # endif #endif From 8ddeaf15bc5bea6d665cceee231947bf390a726d Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 28 Mar 2016 14:02:18 +1100 Subject: [PATCH 034/207] Whole of content dependent on NEED_FTIME config switch. --- ptw32_timespec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ptw32_timespec.c b/ptw32_timespec.c index 078399f2..c9098ec8 100644 --- a/ptw32_timespec.c +++ b/ptw32_timespec.c @@ -40,6 +40,8 @@ # include #endif +#if defined(NEED_FTIME) + #include "pthread.h" #include "implement.h" @@ -81,3 +83,5 @@ ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts) (int) ((*(uint64_t *) ft - PTW32_TIMESPEC_TO_FILETIME_OFFSET - ((uint64_t) ts->tv_sec * (uint64_t) 10000000UL)) * 100); } + +#endif From cdfb5da14ed0ee73880a85a2c8bc91a5d327b2f3 Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 28 Mar 2016 14:22:46 +1100 Subject: [PATCH 035/207] Updates. --- ChangeLog | 12 ++++++++++++ tests/ChangeLog | 30 ++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8fe952ff..56d29ae6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2016-03-28 Ross Johnson + + * ptw32_relmillisecs.c (pthread_win32_getabstime_np): New + platform-aware function to return the current time plus optional + offset. + * pthread.h (pthread_win32_getabstime_np): New exported function. + * ptw32_timespec.c: COnditionally compile only if NEED_FTIME config + flagged. + * sched.h: Update platform config flags for applications. + * semaphore.h: Likewise. + * pthread.h: Likewise. + 2016-03-25 Bill Parker * pthread_mutex_init.c: Memory allocation of robust mutex element diff --git a/tests/ChangeLog b/tests/ChangeLog index 0c7d56cb..7f6210cf 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,33 @@ +2016-03-28 Ross Johnson + + * condvar2.c: Use platform-aware pthread_win32_getabstime_np. + * condvar2_1.c: Likewise. + * condvar3.c: Likewise. + * condvar3_1.c: Likewise. + * condvar3_2.c: Likewise. + * condvar3_3.c: Likewise. + * condvar4.c: Likewise. + * condvar5.c: Likewise. + * condvar6.c: Likewise. + * condvar7.c: Likewise. + * condvar8.c: Likewise. + * condvar9.c: Likewise. + * join4.c: Likewise. + * mutex8.c: Likewise. + * mutex8e.c: Likewise. + * mutex8n.c: Likewise. + * mutex8r.c: Likewise. + * reinit1.c: Likewise. + * rwlock2_t.c: Likewise. + * rwlock3_t.c: Likewise. + * rwlock4_t.c: Likewise. + * rwlock5_t.c: Likewise. + * rwlock6_t.c: Likewise. + * rwlock6_t2.c: Likewise. + * semaphore4t.c: Likewise. + * stress1.c: Likewise. + * reinit1.c: Remove unused variable declarations. + 2015-11-01 Mark Smith * semaphore4t.c: Enhanced and additional testing of sub-millisecond From 490c9a233ca8eb65d304232b04c94e3ffbad7221 Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 28 Mar 2016 14:37:20 +1100 Subject: [PATCH 036/207] Updated --- ANNOUNCE | 7 ++++--- NEWS | 7 ++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 0f1a3fd6..37fefbf8 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -164,9 +164,9 @@ The following functions are implemented: pthread_mutexattr_setpshared pthread_mutexattr_gettype pthread_mutexattr_settype (types: PTHREAD_MUTEX_DEFAULT - PTHREAD_MUTEX_NORMAL - PTHREAD_MUTEX_ERRORCHECK - PTHREAD_MUTEX_RECURSIVE ) + PTHREAD_MUTEX_NORMAL + PTHREAD_MUTEX_ERRORCHECK + PTHREAD_MUTEX_RECURSIVE ) pthread_mutexattr_getrobust pthread_mutexattr_setrobust (values: PTHREAD_MUTEX_STALLED PTHREAD_MUTEX_ROBUST) @@ -300,6 +300,7 @@ The following functions are implemented: PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_MUTEX_TIMED_NP) pthread_num_processors_np + pthread_win32_getabstime_np (The following four routines may be required when linking statically. The process_* routines should not be needed for MSVC or GCC.) pthread_win32_process_attach_np diff --git a/NEWS b/NEWS index 73b17da3..b11695e3 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ RELEASE 2.10.0 -------------- -(2016-02-11) +(2016-03-28) General ------- @@ -55,6 +55,11 @@ pthread_attr_setname_np() For MSVC builds, the thread name if set is made available for use by the MSVS debugger, i.e. it should be displayed within the debugger to identify the thread in place of/as well as a threadID. +pthread_win32_getabstime_np() + - Return the current time plus an optional offset in a platform-aware way + that is compatible with POSIX timed calls (returns the struct timespec + address which is the first argument). Intended primarily to make it + easier to write tests but may be useful for applications generally. Builds: New makefile targets have been added and existing targets modified or From c2ba6e3eb61263cd1e2ee793120941f596fc14a7 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 30 Mar 2016 08:19:24 +1100 Subject: [PATCH 037/207] Avoid calling strcpy/strcpy_s et.al. Expand comment. --- pthread_getname_np.c | 142 ++++++++++++++++++++++--------------------- 1 file changed, 73 insertions(+), 69 deletions(-) diff --git a/pthread_getname_np.c b/pthread_getname_np.c index 2341c8a3..e4577113 100644 --- a/pthread_getname_np.c +++ b/pthread_getname_np.c @@ -1,69 +1,73 @@ -/* - * pthread_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 "pthread.h" -#include "implement.h" - -int -pthread_getname_np(pthread_t thr, char *name, int len) -{ - ptw32_mcs_local_node_t threadLock; - ptw32_thread_t * tp; - int result; - - /* Validate the thread id. */ - result = pthread_kill (thr, 0); - if (0 != result) - { - return result; - } - - tp = (ptw32_thread_t *) thr.p; - - ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); - -#if defined(_MSC_VER) || ( defined(PTW32_CONFIG_MINGW) && defined(MINGW_HAS_SECURE_API) ) - result = strncpy_s(name, len, tp->name, len - 1); -#else - strncpy(name, tp->name, len - 1); - name[len - 1] = '\0'; -#endif - ptw32_mcs_lock_release (&threadLock); - - return result; -} +/* + * pthread_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 "pthread.h" +#include "implement.h" + +int +pthread_getname_np(pthread_t thr, char *name, int len) +{ + ptw32_mcs_local_node_t threadLock; + ptw32_thread_t * tp; + char * s, * d; + int result; + + /* + * Validate the thread id. This method works for pthreads-win32 because + * pthread_kill and pthread_t are designed to accommodate it, but the + * method is not portable. + */ + result = pthread_kill (thr, 0); + if (0 != result) + { + return result; + } + + tp = (ptw32_thread_t *) thr.p; + + ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); + + for (s = tp->name, d = name; s && d <= &name[len - 1]; *d++ = *s++) + {} + + *d = '\0'; + + ptw32_mcs_lock_release (&threadLock); + + return result; +} From 6df9b650d17ec4fb0ea6fd420ecbf0917a43f1ae Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 30 Mar 2016 08:19:57 +1100 Subject: [PATCH 038/207] Expand comment --- pthread_getschedparam.c | 14 +- pthread_setname_np.c | 378 ++++++++++++++++++++-------------------- pthread_setschedparam.c | 14 +- tests/exit6.c | 114 ++++++------ version.rc | 34 ++-- 5 files changed, 289 insertions(+), 265 deletions(-) diff --git a/pthread_getschedparam.c b/pthread_getschedparam.c index 04458118..25c7659e 100644 --- a/pthread_getschedparam.c +++ b/pthread_getschedparam.c @@ -1,6 +1,6 @@ /* * sched_getschedparam.c - * + * * Description: * POSIX thread functions that deal with thread scheduling. * @@ -18,17 +18,17 @@ * code distribution. The list can also be seen at the * following World Wide Web location: * http://sources.redhat.com/pthreads-win32/contributors.html - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., @@ -49,7 +49,11 @@ pthread_getschedparam (pthread_t thread, int *policy, { int result; - /* Validate the thread id. */ + /* + * Validate the thread id. This method works for pthreads-win32 because + * pthread_kill and pthread_t are designed to accommodate it, but the + * method is not portable. + */ result = pthread_kill (thread, 0); if (0 != result) { diff --git a/pthread_setname_np.c b/pthread_setname_np.c index 45d6a586..6fb8197d 100644 --- a/pthread_setname_np.c +++ b/pthread_setname_np.c @@ -1,185 +1,193 @@ -/* - * pthread_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(_MSC_VER) -#define MS_VC_EXCEPTION 0x406D1388 - -#pragma pack(push,8) -typedef struct tagTHREADNAME_INFO -{ - DWORD dwType; // Must be 0x1000. - LPCSTR szName; // Pointer to name (in user addr space). - DWORD dwThreadID; // Thread ID (-1=caller thread). - DWORD dwFlags; // Reserved for future use, must be zero. -} THREADNAME_INFO; -#pragma pack(pop) - -void -SetThreadName( DWORD dwThreadID, char* threadName) -{ - THREADNAME_INFO info; - info.dwType = 0x1000; - info.szName = threadName; - info.dwThreadID = dwThreadID; - info.dwFlags = 0; - - __try - { - RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR*)&info ); - } - __except(EXCEPTION_EXECUTE_HANDLER) - { - } -} -#endif - -#if defined(PTW32_COMPATIBILITY_BSD) || defined(PTW32_COMPATIBILITY_TRU64) -int -pthread_setname_np(pthread_t thr, const char *name, void *arg) -{ - ptw32_mcs_local_node_t threadLock; - int len; - int result; - char tmpbuf[PTHREAD_MAX_NAMELEN_NP]; - char * newname; - char * oldname; - ptw32_thread_t * tp; -#if defined(_MSC_VER) - DWORD Win32ThreadID; -#endif - - /* Validate the thread id. */ - result = pthread_kill (thr, 0); - if (0 != result) - { - return result; - } - - /* - * 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); - -#if defined(_MSC_VER) - Win32ThreadID = pthread_getw32threadid_np (thr); - if (Win32ThreadID) - { - SetThreadName(Win32ThreadID, newname); - } -#endif - - tp = (ptw32_thread_t *) thr.p; - - ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); - - oldname = tp->name; - tp->name = newname; - if (oldname) - { - free(oldname); - } - - ptw32_mcs_lock_release (&threadLock); - - return 0; -} -#else -int -pthread_setname_np(pthread_t thr, const char *name) -{ - ptw32_mcs_local_node_t threadLock; - int result; - char * newname; - char * oldname; - ptw32_thread_t * tp; -#if defined(_MSC_VER) - DWORD Win32ThreadID; -#endif - - /* Validate the thread id. */ - result = pthread_kill (thr, 0); - if (0 != result) - { - return result; - } - - newname = _strdup(name); - -#if defined(_MSC_VER) - Win32ThreadID = pthread_getw32threadid_np (thr); - - if (Win32ThreadID) - { - SetThreadName(Win32ThreadID, newname); - } -#endif - - tp = (ptw32_thread_t *) thr.p; - - ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); - - oldname = tp->name; - tp->name = newname; - if (oldname) - { - free(oldname); - } - - ptw32_mcs_lock_release (&threadLock); - - return 0; -} -#endif +/* + * pthread_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(_MSC_VER) +#define MS_VC_EXCEPTION 0x406D1388 + +#pragma pack(push,8) +typedef struct tagTHREADNAME_INFO +{ + DWORD dwType; // Must be 0x1000. + LPCSTR szName; // Pointer to name (in user addr space). + DWORD dwThreadID; // Thread ID (-1=caller thread). + DWORD dwFlags; // Reserved for future use, must be zero. +} THREADNAME_INFO; +#pragma pack(pop) + +void +SetThreadName( DWORD dwThreadID, char* threadName) +{ + THREADNAME_INFO info; + info.dwType = 0x1000; + info.szName = threadName; + info.dwThreadID = dwThreadID; + info.dwFlags = 0; + + __try + { + RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR*)&info ); + } + __except(EXCEPTION_EXECUTE_HANDLER) + { + } +} +#endif + +#if defined(PTW32_COMPATIBILITY_BSD) || defined(PTW32_COMPATIBILITY_TRU64) +int +pthread_setname_np(pthread_t thr, const char *name, void *arg) +{ + ptw32_mcs_local_node_t threadLock; + int len; + int result; + char tmpbuf[PTHREAD_MAX_NAMELEN_NP]; + char * newname; + char * oldname; + ptw32_thread_t * tp; +#if defined(_MSC_VER) + DWORD Win32ThreadID; +#endif + + /* + * Validate the thread id. This method works for pthreads-win32 because + * pthread_kill and pthread_t are designed to accommodate it, but the + * method is not portable. + */ + result = pthread_kill (thr, 0); + if (0 != result) + { + return result; + } + + /* + * 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); + +#if defined(_MSC_VER) + Win32ThreadID = pthread_getw32threadid_np (thr); + if (Win32ThreadID) + { + SetThreadName(Win32ThreadID, newname); + } +#endif + + tp = (ptw32_thread_t *) thr.p; + + ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); + + oldname = tp->name; + tp->name = newname; + if (oldname) + { + free(oldname); + } + + ptw32_mcs_lock_release (&threadLock); + + return 0; +} +#else +int +pthread_setname_np(pthread_t thr, const char *name) +{ + ptw32_mcs_local_node_t threadLock; + int result; + char * newname; + char * oldname; + ptw32_thread_t * tp; +#if defined(_MSC_VER) + DWORD Win32ThreadID; +#endif + + /* + * Validate the thread id. This method works for pthreads-win32 because + * pthread_kill and pthread_t are designed to accommodate it, but the + * method is not portable. + */ + result = pthread_kill (thr, 0); + if (0 != result) + { + return result; + } + + newname = _strdup(name); + +#if defined(_MSC_VER) + Win32ThreadID = pthread_getw32threadid_np (thr); + + if (Win32ThreadID) + { + SetThreadName(Win32ThreadID, newname); + } +#endif + + tp = (ptw32_thread_t *) thr.p; + + ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); + + oldname = tp->name; + tp->name = newname; + if (oldname) + { + free(oldname); + } + + ptw32_mcs_lock_release (&threadLock); + + return 0; +} +#endif diff --git a/pthread_setschedparam.c b/pthread_setschedparam.c index f0576d4f..4e8a0d94 100644 --- a/pthread_setschedparam.c +++ b/pthread_setschedparam.c @@ -1,6 +1,6 @@ /* * sched_setschedparam.c - * + * * Description: * POSIX thread functions that deal with thread scheduling. * @@ -18,17 +18,17 @@ * code distribution. The list can also be seen at the * following World Wide Web location: * http://sources.redhat.com/pthreads-win32/contributors.html - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., @@ -49,7 +49,11 @@ pthread_setschedparam (pthread_t thread, int policy, { int result; - /* Validate the thread id. */ + /* + * Validate the thread id. This method works for pthreads-win32 because + * pthread_kill and pthread_t are designed to accommodate it, but the + * method is not portable. + */ result = pthread_kill (thread, 0); if (0 != result) { diff --git a/tests/exit6.c b/tests/exit6.c index 969f63df..8a38463f 100644 --- a/tests/exit6.c +++ b/tests/exit6.c @@ -1,57 +1,57 @@ -/* - * exit6.c - * - * Created on: 14/05/2013 - * Author: ross - */ - -#include "test.h" -#ifndef _UWIN -#include -#endif - -#include -//#include - -static pthread_key_t key; -static int where; - -static unsigned __stdcall -start_routine(void * arg) -{ - int *val = (int *) malloc(4); - - where = 2; - //printf("start_routine: native thread\n"); - - *val = 48; - pthread_setspecific(key, val); - return 0; -} - -static void -key_dtor(void *arg) -{ - //printf("key_dtor: %d\n", *(int*)arg); - if (where == 2) - printf("Library has thread exit POSIX cleanup for native threads.\n"); - else - printf("Library has process exit POSIX cleanup for native threads.\n"); - free(arg); -} - -int main(int argc, char **argv) -{ - HANDLE hthread; - - where = 1; - pthread_key_create(&key, key_dtor); - hthread = (HANDLE)_beginthreadex(NULL, 0, start_routine, NULL, 0, NULL); - WaitForSingleObject(hthread, INFINITE); - CloseHandle(hthread); - where = 3; - pthread_key_delete(key); - - //printf("main: exiting\n"); - return 0; -} +/* + * exit6.c + * + * Created on: 14/05/2013 + * Author: ross + */ + +#include "test.h" +#ifndef _UWIN +#include +#endif + +#include +//#include + +static pthread_key_t key; +static int where; + +static unsigned __stdcall +start_routine(void * arg) +{ + int *val = (int *) malloc(4); + + where = 2; + //printf("start_routine: native thread\n"); + + *val = 48; + pthread_setspecific(key, val); + return 0; +} + +static void +key_dtor(void *arg) +{ + //printf("key_dtor: %d\n", *(int*)arg); + if (where == 2) + printf("Library has thread exit POSIX cleanup for native threads.\n"); + else + printf("Library has process exit POSIX cleanup for native threads.\n"); + free(arg); +} + +int main(int argc, char **argv) +{ + HANDLE hthread; + + where = 1; + pthread_key_create(&key, key_dtor); + hthread = (HANDLE)_beginthreadex(NULL, 0, start_routine, NULL, 0, NULL); + WaitForSingleObject(hthread, INFINITE); + CloseHandle(hthread); + where = 3; + pthread_key_delete(key); + + //printf("main: exiting\n"); + return 0; +} diff --git a/version.rc b/version.rc index 3e65c160..23d265d3 100644 --- a/version.rc +++ b/version.rc @@ -44,20 +44,28 @@ */ #if defined(PTW32_RC_MSC) -# if defined(PTW32_ARCHx64) || defined(PTW32_ARCHX64) -# define PTW32_ARCH "x64" +# if defined(PTW32_ARCHx64) || defined(PTW32_ARCHX64) || defined(PTW32_ARCHAMD64) +# if defined(__CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadVC2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C x64\0" +# elif defined(__CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadVCE2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C++ x64\0" +# elif defined(__CLEANUP_SEH) +# define PTW32_VERSIONINFO_NAME "pthreadVSE2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C SEH x64\0" +# endif # elif defined(PTW32_ARCHx86) || defined(PTW32_ARCHX86) -# define PTW32_ARCH "x86" -# endif -# if defined(__CLEANUP_C) -# define PTW32_VERSIONINFO_NAME "pthreadVC2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "MS C " PTW32_ARCH "\0" -# elif defined(__CLEANUP_CXX) -# define PTW32_VERSIONINFO_NAME "pthreadVCE2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "MS C++ " PTW32_ARCH "\0" -# elif defined(__CLEANUP_SEH) -# define PTW32_VERSIONINFO_NAME "pthreadVSE2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "MS C SEH " PTW32_ARCH "\0" +# if defined(__CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadVC2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C x86\0" +# elif defined(__CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadVCE2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C++ x86\0" +# elif defined(__CLEANUP_SEH) +# define PTW32_VERSIONINFO_NAME "pthreadVSE2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C SEH x86\0" +# endif # endif #elif defined(__GNUC__) # if defined(_M_X64) From 8dacdf625dd787a0a443d823ccd59b5ad478411b Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 30 Mar 2016 08:23:55 +1100 Subject: [PATCH 039/207] Fix bound check --- pthread_getname_np.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pthread_getname_np.c b/pthread_getname_np.c index e4577113..0fa764e6 100644 --- a/pthread_getname_np.c +++ b/pthread_getname_np.c @@ -62,7 +62,7 @@ pthread_getname_np(pthread_t thr, char *name, int len) ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); - for (s = tp->name, d = name; s && d <= &name[len - 1]; *d++ = *s++) + for (s = tp->name, d = name; s && d < &name[len - 1]; *d++ = *s++) {} *d = '\0'; From 21933c4a1591e80a0804f48631fe1367ecadbd0f Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 30 Mar 2016 17:31:14 +1100 Subject: [PATCH 040/207] Argh! Test the char for null, not the pointer. --- pthread_getname_np.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pthread_getname_np.c b/pthread_getname_np.c index 0fa764e6..e0197bfa 100644 --- a/pthread_getname_np.c +++ b/pthread_getname_np.c @@ -62,7 +62,7 @@ pthread_getname_np(pthread_t thr, char *name, int len) ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); - for (s = tp->name, d = name; s && d < &name[len - 1]; *d++ = *s++) + for (s = tp->name, d = name; *s && d < &name[len - 1]; *d++ = *s++) {} *d = '\0'; From 718ebac47385b9802af0996c6067d49bab294379 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 30 Mar 2016 17:31:49 +1100 Subject: [PATCH 041/207] Expand comment. --- pthread_cancel.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pthread_cancel.c b/pthread_cancel.c index bda3ab01..3c453c49 100644 --- a/pthread_cancel.c +++ b/pthread_cancel.c @@ -18,17 +18,17 @@ * code distribution. The list can also be seen at the * following World Wide Web location: * http://sources.redhat.com/pthreads-win32/contributors.html - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., @@ -106,8 +106,12 @@ pthread_cancel (pthread_t thread) ptw32_thread_t * tp; ptw32_mcs_local_node_t stateLock; + /* + * Validate the thread id. This method works for pthreads-win32 because + * pthread_kill and pthread_t are designed to accommodate it, but the + * method is not portable. + */ result = pthread_kill (thread, 0); - if (0 != result) { return result; From d934aaa91975198b56320abbe65747503461dffc Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 30 Mar 2016 17:34:27 +1100 Subject: [PATCH 042/207] Formatting? --- manual/PortabilityIssues.html | 1450 ++++++++++++++++----------------- 1 file changed, 725 insertions(+), 725 deletions(-) diff --git a/manual/PortabilityIssues.html b/manual/PortabilityIssues.html index 8741641b..9c1b0d07 100644 --- a/manual/PortabilityIssues.html +++ b/manual/PortabilityIssues.html @@ -1,726 +1,726 @@ - - - - - PORTABILITY ISSUES manual page - - - - - - - -

POSIX Threads for Windows – REFERENCE – -Pthreads-w32

-

Reference Index

-

Table of Contents

-

Name

-

Portability issues

-

Synopsis

-

Thread priority

-

Description

-

Thread priority

-

POSIX defines a single contiguous range -of numbers that determine a thread's priority. Win32 defines priority -classes - and priority levels relative to these classes. Classes are -simply priority base levels that the defined priority levels are -relative to such that, changing a process's priority class will -change the priority of all of it's threads, while the threads retain -the same relativity to each other.

-

A Win32 system defines a single -contiguous monotonic range of values that define system priority -levels, just like POSIX. However, Win32 restricts individual threads -to a subset of this range on a per-process basis.

-

The following table shows the base -priority levels for combinations of priority class and priority value -in Win32.

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-


-

-
-

Process Priority Class

-
-

Thread Priority Level

-
-

1

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_IDLE

-
-

1

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_IDLE

-
-

1

-
-

NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_IDLE

-
-

1

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_IDLE

-
-

1

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_IDLE

-
-

2

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

3

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

4

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

4

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

5

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

5

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

5

-
-

Background NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

6

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

6

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

6

-
-

Background NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

7

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

7

-
-

Background NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

7

-
-

Foreground NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

8

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

8

-
-

NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

8

-
-

Foreground NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

8

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

9

-
-

NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

9

-
-

Foreground NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

9

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

10

-
-

Foreground NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

10

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

11

-
-

Foreground NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

11

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

11

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

12

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

12

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

13

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

14

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

15

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

15

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_TIME_CRITICAL

-
-

15

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_TIME_CRITICAL

-
-

15

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_TIME_CRITICAL

-
-

15

-
-

NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_TIME_CRITICAL

-
-

15

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_TIME_CRITICAL

-
-

16

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_IDLE

-
-

17

-
-

REALTIME_PRIORITY_CLASS

-
-

-7

-
-

18

-
-

REALTIME_PRIORITY_CLASS

-
-

-6

-
-

19

-
-

REALTIME_PRIORITY_CLASS

-
-

-5

-
-

20

-
-

REALTIME_PRIORITY_CLASS

-
-

-4

-
-

21

-
-

REALTIME_PRIORITY_CLASS

-
-

-3

-
-

22

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

23

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

24

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

25

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

26

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

27

-
-

REALTIME_PRIORITY_CLASS

-
-

3

-
-

28

-
-

REALTIME_PRIORITY_CLASS

-
-

4

-
-

29

-
-

REALTIME_PRIORITY_CLASS

-
-

5

-
-

30

-
-

REALTIME_PRIORITY_CLASS

-
-

6

-
-

31

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_TIME_CRITICAL

-
-
-

Windows NT: Values -7, -6, -5, -4, -3, 3, -4, 5, and 6 are not supported.

-

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

-

An application using Pthreads-w32 should -not make assumptions about the numbers used to represent thread -priority levels, except that they are monotonic between the values -returned by sched_get_priority_min() and sched_get_priority_max(). -E.g. Windows 95, 98, NT, 2000, XP make available a non-contiguous -range of numbers between -15 and 15, while at least one version of -WinCE (3.0) defines the minimum priority (THREAD_PRIORITY_LOWEST) as -5, and the maximum priority (THREAD_PRIORITY_HIGHEST) as 1.

-

Internally, pthreads-win32 maps any -priority levels between THREAD_PRIORITY_IDLE and -THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, or between -THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to -THREAD_PRIORITY_HIGHEST. Currently, this also applies to -REALTIME_PRIORITY_CLASS even if levels -7, -6, -5, -4, -3, 3, 4, 5, -and 6 are supported.

-

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

-

Author

-

Ross Johnson for use with Pthreads-w32.

-

See also

-



-

-
-

Table of Contents

- - + + + + + PORTABILITY ISSUES manual page + + + + + + + +

POSIX Threads for Windows – REFERENCE – +Pthreads-w32

+

Reference Index

+

Table of Contents

+

Name

+

Portability issues

+

Synopsis

+

Thread priority

+

Description

+

Thread priority

+

POSIX defines a single contiguous range +of numbers that determine a thread's priority. Win32 defines priority +classes - and priority levels relative to these classes. Classes are +simply priority base levels that the defined priority levels are +relative to such that, changing a process's priority class will +change the priority of all of it's threads, while the threads retain +the same relativity to each other.

+

A Win32 system defines a single +contiguous monotonic range of values that define system priority +levels, just like POSIX. However, Win32 restricts individual threads +to a subset of this range on a per-process basis.

+

The following table shows the base +priority levels for combinations of priority class and priority value +in Win32.

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+


+

+
+

Process Priority Class

+
+

Thread Priority Level

+
+

1

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_IDLE

+
+

1

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_IDLE

+
+

1

+
+

NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_IDLE

+
+

1

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_IDLE

+
+

1

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_IDLE

+
+

2

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

3

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

4

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

4

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

5

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

5

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

5

+
+

Background NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

6

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

6

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

6

+
+

Background NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

7

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

7

+
+

Background NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

7

+
+

Foreground NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

8

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

8

+
+

NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

8

+
+

Foreground NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

8

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

9

+
+

NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

9

+
+

Foreground NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

9

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

10

+
+

Foreground NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

10

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

11

+
+

Foreground NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

11

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

11

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

12

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

12

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

13

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

14

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

15

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

15

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_TIME_CRITICAL

+
+

15

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_TIME_CRITICAL

+
+

15

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_TIME_CRITICAL

+
+

15

+
+

NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_TIME_CRITICAL

+
+

15

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_TIME_CRITICAL

+
+

16

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_IDLE

+
+

17

+
+

REALTIME_PRIORITY_CLASS

+
+

-7

+
+

18

+
+

REALTIME_PRIORITY_CLASS

+
+

-6

+
+

19

+
+

REALTIME_PRIORITY_CLASS

+
+

-5

+
+

20

+
+

REALTIME_PRIORITY_CLASS

+
+

-4

+
+

21

+
+

REALTIME_PRIORITY_CLASS

+
+

-3

+
+

22

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

23

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

24

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

25

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

26

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

27

+
+

REALTIME_PRIORITY_CLASS

+
+

3

+
+

28

+
+

REALTIME_PRIORITY_CLASS

+
+

4

+
+

29

+
+

REALTIME_PRIORITY_CLASS

+
+

5

+
+

30

+
+

REALTIME_PRIORITY_CLASS

+
+

6

+
+

31

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_TIME_CRITICAL

+
+
+

Windows NT: Values -7, -6, -5, -4, -3, 3, +4, 5, and 6 are not supported.

+

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

+

An application using Pthreads-w32 should +not make assumptions about the numbers used to represent thread +priority levels, except that they are monotonic between the values +returned by sched_get_priority_min() and sched_get_priority_max(). +E.g. Windows 95, 98, NT, 2000, XP make available a non-contiguous +range of numbers between -15 and 15, while at least one version of +WinCE (3.0) defines the minimum priority (THREAD_PRIORITY_LOWEST) as +5, and the maximum priority (THREAD_PRIORITY_HIGHEST) as 1.

+

Internally, pthreads-win32 maps any +priority levels between THREAD_PRIORITY_IDLE and +THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, or between +THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to +THREAD_PRIORITY_HIGHEST. Currently, this also applies to +REALTIME_PRIORITY_CLASS even if levels -7, -6, -5, -4, -3, 3, 4, 5, +and 6 are supported.

+

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

+

Author

+

Ross Johnson for use with Pthreads-w32.

+

See also

+



+

+
+

Table of Contents

+ + \ No newline at end of file From 8497d0b1f3fbb60d61cd8a53a216e1c302c6cbe8 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 30 Mar 2016 17:36:19 +1100 Subject: [PATCH 043/207] Meta data changed. --- manual/pthreadCancelableWait.html | 184 +++++++++++++++--------------- 1 file changed, 92 insertions(+), 92 deletions(-) diff --git a/manual/pthreadCancelableWait.html b/manual/pthreadCancelableWait.html index fbfc249f..61a1f6a5 100644 --- a/manual/pthreadCancelableWait.html +++ b/manual/pthreadCancelableWait.html @@ -1,93 +1,93 @@ - - - - - PTHREADCANCELLABLEWAIT(3) manual page - - - - - - - -

POSIX Threads for Windows – REFERENCE – -Pthreads-w32

-

Reference Index

-

Table of Contents

-

Name

-

pthreadCancelableTimedWait, -pthreadCancelableWait – provide cancellation hooks for user -Win32 routines

-

Synopsis

-

#include <pthread.h> -

-

int pthreadCancelableTimedWait (HANDLE waitHandle, -DWORD timeout);

-

int pthreadCancelableWait (HANDLE waitHandle);

-

Description

-

These two functions provide hooks into the pthread_cancel() -mechanism that will allow you to wait on a Windows handle and make it -a cancellation point. Both functions block until either the given -Win32 HANDLE is signalled, or pthread_cancel() -has been called. They are implemented using WaitForMultipleObjects -on waitHandle and the manually reset Win32 event handle that -is the target of pthread_cancel(). -These routines may be called from Win32 native threads but -pthread_cancel() will -require that thread's POSIX thread ID that the thread must retrieve -using pthread_self().

-

pthreadCancelableTimedWait is the timed version that will -return with the code ETIMEDOUT if the interval timeout -milliseconds elapses before waitHandle is signalled.

-

Cancellation

-

These routines allow routines that block on Win32 HANDLEs to be -cancellable via pthread_cancel().

-

Return Value

-



-

-

Errors

-

The pthreadCancelableTimedWait function returns the -following error code on error: -

-
-
ETIMEDOUT -
-
-

-The interval timeout milliseconds elapsed before waitHandle -was signalled.

-

Author

-

Ross Johnson for use with Pthreads-w32.

-

See also

-

pthread_cancel(), -pthread_self()

-
-

Table of Contents

- - + + + + + PTHREADCANCELLABLEWAIT(3) manual page + + + + + + + +

POSIX Threads for Windows – REFERENCE – +Pthreads-w32

+

Reference Index

+

Table of Contents

+

Name

+

pthreadCancelableTimedWait, +pthreadCancelableWait – provide cancellation hooks for user +Win32 routines

+

Synopsis

+

#include <pthread.h> +

+

int pthreadCancelableTimedWait (HANDLE waitHandle, +DWORD timeout);

+

int pthreadCancelableWait (HANDLE waitHandle);

+

Description

+

These two functions provide hooks into the pthread_cancel() +mechanism that will allow you to wait on a Windows handle and make it +a cancellation point. Both functions block until either the given +Win32 HANDLE is signalled, or pthread_cancel() +has been called. They are implemented using WaitForMultipleObjects +on waitHandle and the manually reset Win32 event handle that +is the target of pthread_cancel(). +These routines may be called from Win32 native threads but +pthread_cancel() will +require that thread's POSIX thread ID that the thread must retrieve +using pthread_self().

+

pthreadCancelableTimedWait is the timed version that will +return with the code ETIMEDOUT if the interval timeout +milliseconds elapses before waitHandle is signalled.

+

Cancellation

+

These routines allow routines that block on Win32 HANDLEs to be +cancellable via pthread_cancel().

+

Return Value

+



+

+

Errors

+

The pthreadCancelableTimedWait function returns the +following error code on error: +

+
+
ETIMEDOUT +
+
+

+The interval timeout milliseconds elapsed before waitHandle +was signalled.

+

Author

+

Ross Johnson for use with Pthreads-w32.

+

See also

+

pthread_cancel(), +pthread_self()

+
+

Table of Contents

+ + \ No newline at end of file From cf06cf797b610dc4b8dbcaefb0c7b48e9624a6c8 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 30 Mar 2016 18:10:46 +1100 Subject: [PATCH 044/207] Document new exported function --- README.NONPORTABLE | 1674 ++++++++++++----------- manual/index.html | 6 +- manual/pthread_win32_getabstime_np.html | 71 + 3 files changed, 925 insertions(+), 826 deletions(-) create mode 100644 manual/pthread_win32_getabstime_np.html diff --git a/README.NONPORTABLE b/README.NONPORTABLE index 7c39a566..d07a9986 100644 --- a/README.NONPORTABLE +++ b/README.NONPORTABLE @@ -1,824 +1,850 @@ -This file documents non-portable functions and other issues. - -Non-portable functions included in pthreads-win32 -------------------------------------------------- - -BOOL -pthread_win32_test_features_np(int mask) - - This routine allows an application to check which - run-time auto-detected features are available within - the library. - - The possible features are: - - PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE - Return TRUE if the native version of - InterlockedCompareExchange() is being used. - This feature is not meaningful in recent - library versions as MSVC builds only support - system implemented ICE. Note that all Mingw - builds use inlined asm versions of all the - Interlocked routines. - PTW32_ALERTABLE_ASYNC_CANCEL - Return TRUE is the QueueUserAPCEx package - QUSEREX.DLL is available and the AlertDrv.sys - driver is loaded into Windows, providing - alertable (pre-emptive) asyncronous threads - cancellation. If this feature returns FALSE - then the default async cancel scheme is in - use, which cannot cancel blocked threads. - - Features may be Or'ed into the mask parameter, in which case - the routine returns TRUE if any of the Or'ed features would - return TRUE. At this stage it doesn't make sense to Or features - but it may some day. - - -void * -pthread_timechange_handler_np(void *) - - To improve tolerance against operator or time service - initiated system clock changes. - - This routine can be called by an application when it - receives a WM_TIMECHANGE message from the system. At - present it broadcasts all condition variables so that - waiting threads can wake up and re-evaluate their - conditions and restart their timed waits if required. - - It has the same return type and argument type as a - thread routine so that it may be called directly - through pthread_create(), i.e. as a separate thread. - - Parameters - - Although a parameter must be supplied, it is ignored. - The value NULL can be used. - - Return values - - It can return an error EAGAIN to indicate that not - all condition variables were broadcast for some reason. - Otherwise, 0 is returned. - - If run as a thread, the return value is returned - through pthread_join(). - - The return value should be cast to an integer. - - -HANDLE -pthread_getw32threadhandle_np(pthread_t thread); - - Returns the win32 thread handle that the POSIX - thread "thread" is running as. - - Applications can use the win32 handle to set - win32 specific attributes of the thread. - -DWORD -pthread_getw32threadid_np (pthread_t thread) - - Returns the Windows native thread ID that the POSIX - thread "thread" is running as. - - Only valid when the library is built where - ! (defined(__MINGW64__) || defined(__MINGW32__)) || defined (__MSVCRT__) || defined (__DMC__) - and otherwise returns 0. - - -int -pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, int kind) - -int -pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, int *kind) - - These two routines are included for Linux compatibility - and are direct equivalents to the standard routines - pthread_mutexattr_settype - pthread_mutexattr_gettype - - pthread_mutexattr_setkind_np accepts the following - mutex kinds: - PTHREAD_MUTEX_FAST_NP - PTHREAD_MUTEX_ERRORCHECK_NP - PTHREAD_MUTEX_RECURSIVE_NP - - These are really just equivalent to (respectively): - PTHREAD_MUTEX_NORMAL - PTHREAD_MUTEX_ERRORCHECK - PTHREAD_MUTEX_RECURSIVE - - -int -pthread_delay_np (const struct timespec *interval) - - This routine causes a thread to delay execution for a specific period of time. - This period ends at the current time plus the specified interval. The routine - will not return before the end of the period is reached, but may return an - arbitrary amount of time after the period has gone by. This can be due to - system load, thread priorities, and system timer granularity. - - Specifying an interval of zero (0) seconds and zero (0) nanoseconds is - allowed and can be used to force the thread to give up the processor or to - deliver a pending cancellation request. - - This routine is a cancellation point. - - The timespec structure contains the following two fields: - - tv_sec is an integer number of seconds. - tv_nsec is an integer number of nanoseconds. - - Return Values - - If an error condition occurs, this routine returns an integer value - indicating the type of error. Possible return values are as follows: - - 0 Successful completion. - [EINVAL] The value specified by interval is invalid. - - -__int64 -pthread_getunique_np (pthread_t thr) - - Returns the unique number associated with thread thr. - The unique numbers are a simple way of positively identifying a thread when - pthread_t cannot be relied upon to identify the true thread instance. I.e. a - pthread_t value may be assigned to different threads throughout the life of a - process. - - Because pthreads4w (pthreads-win32) threads can be uniquely identified by their - pthread_t values this routine is provided only for source code compatibility. - - NOTE: if the library is re-initialised, i.e. by calling pthread_win32_process_detach_np() - followed by pthread_win32_process_attach_np(), then the unique number is reset along with - several other library global values. Library reinitialisation should not be required, - however, some older applications may still call these routines as they were once required to - do when statically linking the library. - -int -pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec *abstime) - -int -pthread_tryjoin_np (pthread_t thread, void **value_ptr) - - These function is added for compatibility with Linux. - - -int -pthread_num_processors_np (void) - - This routine (found on HPUX systems) returns the number of processors - in the system. This implementation actually returns the number of - processors available to the process, which can be a lower number - than the system's number, depending on the process's affinity mask. - - -BOOL -pthread_win32_process_attach_np (void); - -BOOL -pthread_win32_process_detach_np (void); - -BOOL -pthread_win32_thread_attach_np (void); - -BOOL -pthread_win32_thread_detach_np (void); - - These functions contain the code normally run via DllMain - when the library is used as a dll. As of version 2.9.0 of the - library, static builds using either MSC or GCC will call - pthread_win32_process_* automatically at application startup and - exit respectively. - - pthread_win32_thread_attach_np() is currently a no-op. - - pthread_win32_thread_detach_np() is not a no-op. It cleans up the - implicit pthread handle that is allocated to any thread not started - via pthread_create(). Such non-posix threads should call this routine - when they exit, or call pthread_exit() to both cleanup and exit. - - These functions invariably return TRUE except for - pthread_win32_process_attach_np() which will return FALSE - if pthreads-win32 initialisation fails. - - -int -pthread_attr_getaffinity_np (pthread_attr_t * attr, size_t cpusetsize, cpu_set_t * cpuset); - -int -pthread_attr_setaffinity_np (pthread_attr_t * attr, size_t cpusetsize, const cpu_set_t * cpuset); - -int -pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t * cpuset); - -int -pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, const cpu_set_t * cpuset); - - Manipulate the CPU affinity of threads. Compatibility with libgcc-based pthreads - implementations. - - -int -pthreadCancelableWait (HANDLE waitHandle); - -int -pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout); - - These two functions provide hooks into the pthread_cancel - mechanism that will allow you to wait on a Windows handle - and make it a cancellation point. Both functions block - until either the given w32 handle is signaled, or - pthread_cancel has been called. It is implemented using - WaitForMultipleObjects on 'waitHandle' and a manually - reset w32 event used to implement pthread_cancel. - - -Non-portable issues -------------------- - -Thread priority - - POSIX defines a single contiguous range of numbers that determine a - thread's priority. Win32 defines priority classes and priority - levels relative to these classes. Classes are simply priority base - levels that the defined priority levels are relative to such that, - changing a process's priority class will change the priority of all - of it's threads, while the threads retain the same relativity to each - other. - - A Win32 system defines a single contiguous monotonic range of values - that define system priority levels, just like POSIX. However, Win32 - restricts individual threads to a subset of this range on a - per-process basis. - - The following table shows the base priority levels for combinations - of priority class and priority value in Win32. - - Process Priority Class Thread Priority Level - ----------------------------------------------------------------- - 1 IDLE_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 HIGH_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 2 IDLE_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 3 IDLE_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 4 IDLE_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 4 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 5 IDLE_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 5 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 5 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 6 IDLE_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 6 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 6 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 7 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 7 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 7 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 8 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 8 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 8 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 8 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 9 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 9 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 9 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 10 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 10 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 11 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 11 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 11 HIGH_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 12 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 12 HIGH_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 13 HIGH_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 14 HIGH_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 IDLE_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 16 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 17 REALTIME_PRIORITY_CLASS -7 - 18 REALTIME_PRIORITY_CLASS -6 - 19 REALTIME_PRIORITY_CLASS -5 - 20 REALTIME_PRIORITY_CLASS -4 - 21 REALTIME_PRIORITY_CLASS -3 - 22 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 23 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 24 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 25 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 26 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 27 REALTIME_PRIORITY_CLASS 3 - 28 REALTIME_PRIORITY_CLASS 4 - 29 REALTIME_PRIORITY_CLASS 5 - 30 REALTIME_PRIORITY_CLASS 6 - 31 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - - Windows NT: Values -7, -6, -5, -4, -3, 3, 4, 5, and 6 are not supported. - - - As you can see, the real priority levels available to any individual - Win32 thread are non-contiguous. - - An application using pthreads-win32 should not make assumptions about - the numbers used to represent thread priority levels, except that they - are monotonic between the values returned by sched_get_priority_min() - and sched_get_priority_max(). E.g. Windows 95, 98, NT, 2000, XP make - available a non-contiguous range of numbers between -15 and 15, while - at least one version of WinCE (3.0) defines the minimum priority - (THREAD_PRIORITY_LOWEST) as 5, and the maximum priority - (THREAD_PRIORITY_HIGHEST) as 1. - - Internally, pthreads-win32 maps any priority levels between - THREAD_PRIORITY_IDLE and THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, - or between THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to - THREAD_PRIORITY_HIGHEST. Currently, this also applies to - REALTIME_PRIORITY_CLASSi even if levels -7, -6, -5, -4, -3, 3, 4, 5, and 6 - are supported. - - If it wishes, a Win32 application using pthreads-win32 can use the Win32 - defined priority macros THREAD_PRIORITY_IDLE through - THREAD_PRIORITY_TIME_CRITICAL. - - -The opacity of the pthread_t datatype -------------------------------------- -and possible solutions for portable null/compare/hash, etc ----------------------------------------------------------- - -Because pthread_t is an opague datatype an implementation is permitted to define -pthread_t in any way it wishes. That includes defining some bits, if it is -scalar, or members, if it is an aggregate, to store information that may be -extra to the unique identifying value of the ID. As a result, pthread_t values -may not be directly comparable. - -If you want your code to be portable you must adhere to the following contraints: - -1) Don't assume it is a scalar data type, e.g. an integer or pointer value. There -are several other implementations where pthread_t is also a struct. See our FAQ -Question 11 for our reasons for defining pthread_t as a struct. - -2) You must not compare them using relational or equality operators. You must use -the API function pthread_equal() to test for equality. - -3) Never attempt to reference individual members. - - -The problem - -Certain applications would like to be able to access only the 'pure' pthread_t -id values, primarily to use as keys into data structures to manage threads or -thread-related data, but this is not possible in a maximally portable and -standards compliant way for current POSIX threads implementations. - -For implementations that define pthread_t as a scalar, programmers often employ -direct relational and equality operators on pthread_t. This code will break when -ported to an implementation that defines pthread_t as an aggregate type. - -For implementations that define pthread_t as an aggregate, e.g. a struct, -programmers can use memcmp etc., but then face the prospect that the struct may -include alignment padding bytes or bits as well as extra implementation-specific -members that are not part of the unique identifying value. - -[While this is not currently the case for pthreads-win32, opacity also -means that an implementation is free to change the definition, which should -generally only require that applications be recompiled and relinked, not -rewritten.] - - -Doesn't the compiler take care of padding? - -The C89 and later standards only effectively guarantee element-by-element -equivalence following an assignment or pass by value of a struct or union, -therefore undefined areas of any two otherwise equivalent pthread_t instances -can still compare differently, e.g. attempting to compare two such pthread_t -variables byte-by-byte, e.g. memcmp(&t1, &t2, sizeof(pthread_t) may give an -incorrect result. In practice I'm reasonably confident that compilers routinely -also copy the padding bytes, mainly because assignment of unions would be far -too complicated otherwise. But it just isn't guarranteed by the standard. - -Illustration: - -We have two thread IDs t1 and t2 - -pthread_t t1, t2; - -In an application we create the threads and intend to store the thread IDs in an -ordered data structure (linked list, tree, etc) so we need to be able to compare -them in order to insert them initially and also to traverse. - -Suppose pthread_t contains undefined padding bits and our compiler copies our -pthread_t [struct] element-by-element, then for the assignment: - -pthread_t temp = t1; - -temp and t1 will be equivalent and correct but a byte-for-byte comparison such as -memcmp(&temp, &t1, sizeof(pthread_t)) == 0 may not return true as we expect because -the undefined bits may not have the same values in the two variable instances. - -Similarly if passing by value under the same conditions. - -If, on the other hand, the undefined bits are at least constant through every -assignment and pass-by-value then the byte-for-byte comparison -memcmp(&temp, &t1, sizeof(pthread_t)) == 0 will always return the expected result. -How can we force the behaviour we need? - - -Solutions - -Adding new functions to the standard API or as non-portable extentions is -the only reliable and portable way to provide the necessary operations. -Remember also that POSIX is not tied to the C language. The most common -functions that have been suggested are: - -pthread_null() -pthread_compare() -pthread_hash() - -A single more general purpose function could also be defined as a -basis for at least the last two of the above functions. - -First we need to list the freedoms and constraints with respect -to pthread_t so that we can be sure our solution is compatible with the -standard. - -What is known or may be deduced from the standard: -1) pthread_t must be able to be passed by value, so it must be a single object. -2) from (1) it must be copyable so cannot embed thread-state information, locks -or other volatile objects required to manage the thread it associates with. -3) pthread_t may carry additional information, e.g. for debugging or to manage -itself. -4) there is an implicit requirement that the size of pthread_t is determinable -at compile-time and size-invariant, because it must be able to copy the object -(i.e. through assignment and pass-by-value). Such copies must be genuine -duplicates, not merely a copy of a pointer to a common instance such as -would be the case if pthread_t were defined as an array. - - -Suppose we define the following function: - -/* This function shall return it's argument */ -pthread_t* pthread_normalize(pthread_t* thread); - -For scalar or aggregate pthread_t types this function would simply zero any bits -within the pthread_t that don't uniquely identify the thread, including padding, -such that client code can return consistent results from operations done on the -result. If the additional bits are a pointer to an associate structure then -this function would ensure that the memory used to store that associate -structure does not leak. After normalization the following compare would be -valid and repeatable: - -memcmp(pthread_normalize(&t1),pthread_normalize(&t2),sizeof(pthread_t)) - -Note 1: such comparisons are intended merely to order and sort pthread_t values -and allow them to index various data structures. They are not intended to reveal -anything about the relationships between threads, like startup order. - -Note 2: the normalized pthread_t is also a valid pthread_t that uniquely -identifies the same thread. - -Advantages: -1) In most existing implementations this function would reduce to a no-op that -emits no additional instructions, i.e after in-lining or optimisation, or if -defined as a macro: -#define pthread_normalise(tptr) (tptr) - -2) This single function allows an application to portably derive -application-level versions of any of the other required functions. - -3) It is a generic function that could enable unanticipated uses. - -Disadvantages: -1) Less efficient than dedicated compare or hash functions for implementations -that include significant extra non-id elements in pthread_t. - -2) Still need to be concerned about padding if copying normalized pthread_t. -See the later section on defining pthread_t to neutralise padding issues. - -Generally a pthread_t may need to be normalized every time it is used, -which could have a significant impact. However, this is a design decision -for the implementor in a competitive environment. An implementation is free -to define a pthread_t in a way that minimises or eliminates padding or -renders this function a no-op. - -Hazards: -1) Pass-by-reference directly modifies 'thread' so the application must -synchronise access or ensure that the pointer refers to a copy. The alternative -of pass-by-value/return-by-value was considered but then this requires two copy -operations, disadvantaging implementations where this function is not a no-op -in terms of speed of execution. This function is intended to be used in high -frequency situations and needs to be efficient, or at least not unnecessarily -inefficient. The alternative also sits awkwardly with functions like memcmp. - -2) [Non-compliant] code that uses relational and equality operators on -arithmetic or pointer style pthread_t types would need to be rewritten, but it -should be rewritten anyway. - - -C implementation of null/compare/hash functions using pthread_normalize(): - -/* In pthread.h */ -pthread_t* pthread_normalize(pthread_t* thread); - -/* In user code */ -/* User-level bitclear function - clear bits in loc corresponding to mask */ -void* bitclear (void* loc, void* mask, size_t count); - -typedef unsigned int hash_t; - -/* User-level hash function */ -hash_t hash(void* ptr, size_t count); - -/* - * User-level pthr_null function - modifies the origin thread handle. - * The concept of a null pthread_t is highly implementation dependent - * and this design may be far from the mark. For example, in an - * implementation "null" may mean setting a special value inside one - * element of pthread_t to mean "INVALID". However, if that value was zero and - * formed part of the id component then we may get away with this design. - */ -pthread_t* pthr_null(pthread_t* tp) -{ - /* - * This should have the same effect as memset(tp, 0, sizeof(pthread_t)) - * We're just showing that we can do it. - */ - void* p = (void*) pthread_normalize(tp); - return (pthread_t*) bitclear(p, p, sizeof(pthread_t)); -} - -/* - * Safe user-level pthr_compare function - modifies temporary thread handle copies - */ -int pthr_compare_safe(pthread_t thread1, pthread_t thread2) -{ - return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); -} - -/* - * Fast user-level pthr_compare function - modifies origin thread handles - */ -int pthr_compare_fast(pthread_t* thread1, pthread_t* thread2) -{ - return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); -} - -/* - * Safe user-level pthr_hash function - modifies temporary thread handle copy - */ -hash_t pthr_hash_safe(pthread_t thread) -{ - return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); -} - -/* - * Fast user-level pthr_hash function - modifies origin thread handle - */ -hash_t pthr_hash_fast(pthread_t thread) -{ - return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); -} - -/* User-level bitclear function - modifies the origin array */ -void* bitclear(void* loc, void* mask, size_t count) -{ - int i; - for (i=0; i < count; i++) { - (unsigned char) *loc++ &= ~((unsigned char) *mask++); - } -} - -/* Donald Knuth hash */ -hash_t hash(void* str, size_t count) -{ - hash_t hash = (hash_t) count; - unsigned int i = 0; - - for(i = 0; i < len; str++, i++) - { - hash = ((hash << 5) ^ (hash >> 27)) ^ (*str); - } - return hash; -} - -/* Example of advantage point (3) - split a thread handle into its id and non-id values */ -pthread_t id = thread, non-id = thread; -bitclear((void*) &non-id, (void*) pthread_normalize(&id), sizeof(pthread_t)); - - -A pthread_t type change proposal to neutralise the effects of padding - -Even if pthread_normalize() is available, padding is still a problem because -the standard only garrantees element-by-element equivalence through -copy operations (assignment and pass-by-value). So padding bit values can -still change randomly after calls to pthread_normalize(). - -[I suspect that most compilers take the easy path and always byte-copy anyway, -partly because it becomes too complex to do (e.g. unions that contain sub-aggregates) -but also because programmers can easily design their aggregates to minimise and -often eliminate padding]. - -How can we eliminate the problem of padding bytes in structs? Could -defining pthread_t as a union rather than a struct provide a solution? - -In fact, the Linux pthread.h defines most of it's pthread_*_t objects (but not -pthread_t itself) as unions, possibly for this and/or other reasons. We'll -borrow some element naming from there but the ideas themselves are well known -- the __align element used to force alignment of the union comes from K&R's -storage allocator example. - -/* Essentially our current pthread_t renamed */ -typedef struct { - struct thread_state_t * __p; - long __x; /* sequence counter */ -} thread_id_t; - -Ensuring that the last element in the above struct is a long ensures that the -overall struct size is a multiple of sizeof(long), so there should be no trailing -padding in this struct or the union we define below. -(Later we'll see that we can handle internal but not trailing padding.) - -/* New pthread_t */ -typedef union { - char __size[sizeof(thread_id_t)]; /* array as the first element */ - thread_id_t __tid; - long __align; /* Ensure that the union starts on long boundary */ -} pthread_t; - -This guarrantees that, during an assignment or pass-by-value, the compiler copies -every byte in our thread_id_t because the compiler guarrantees that the __size -array, which we have ensured is the equal-largest element in the union, retains -equivalence. - -This means that pthread_t values stored, assigned and passed by value will at least -carry the value of any undefined padding bytes along and therefore ensure that -those values remain consistent. Our comparisons will return consistent results and -our hashes of [zero initialised] pthread_t values will also return consistent -results. - -We have also removed the need for a pthread_null() function; we can initialise -at declaration time or easily create our own const pthread_t to use in assignments -later: - -const pthread_t null_tid = {0}; /* braces are required */ - -pthread_t t; -... -t = null_tid; - - -Note that we don't have to explicitly make use of the __size array at all. It's -there just to force the compiler behaviour we want. - - -Partial solutions without a pthread_normalize function - - -An application-level pthread_null and pthread_compare proposal -(and pthread_hash proposal by extention) - -In order to deal with the problem of scalar/aggregate pthread_t type disparity in -portable code I suggest using an old-fashioned union, e.g.: - -Contraints: -- there is no padding, or padding values are preserved through assignment and - pass-by-value (see above); -- there are no extra non-id values in the pthread_t. - - -Example 1: A null initialiser for pthread_t variables... - -typedef union { - unsigned char b[sizeof(pthread_t)]; - pthread_t t; -} init_t; - -const init_t initial = {0}; - -pthread_t tid = initial.t; /* init tid to all zeroes */ - - -Example 2: A comparison function for pthread_t values - -typedef union { - unsigned char b[sizeof(pthread_t)]; - pthread_t t; -} pthcmp_t; - -int pthcmp(pthread_t left, pthread_t right) -{ - /* - * Compare two pthread handles in a way that imposes a repeatable but arbitrary - * ordering on them. - * I.e. given the same set of pthread_t handles the ordering should be the same - * each time but the order has no particular meaning other than that. E.g. - * the ordering does not imply the thread start sequence, or any other - * relationship between threads. - * - * Return values are: - * 1 : left is greater than right - * 0 : left is equal to right - * -1 : left is less than right - */ - int i; - pthcmp_t L, R; - L.t = left; - R.t = right; - for (i = 0; i < sizeof(pthread_t); i++) - { - if (L.b[i] > R.b[i]) - return 1; - else if (L.b[i] < R.b[i]) - return -1; - } - return 0; -} - -It has been pointed out that the C99 standard allows for the possibility that -integer types also may include padding bits, which could invalidate the above -method. This addition to C99 was specifically included after it was pointed -out that there was one, presumably not particularly well known, architecture -that included a padding bit in it's 32 bit integer type. See section 6.2.6.2 -of both the standard and the rationale, specifically the paragraph starting at -line 16 on page 43 of the rationale. - - -An aside - -Certain compilers, e.g. gcc and one of the IBM compilers, include a feature -extention: provided the union contains a member of the same type as the -object then the object may be cast to the union itself. - -We could use this feature to speed up the pthrcmp() function from example 2 -above by casting rather than assigning the pthread_t arguments to the union, e.g.: - -int pthcmp(pthread_t left, pthread_t right) -{ - /* - * Compare two pthread handles in a way that imposes a repeatable but arbitrary - * ordering on them. - * I.e. given the same set of pthread_t handles the ordering should be the same - * each time but the order has no particular meaning other than that. E.g. - * the ordering does not imply the thread start sequence, or any other - * relationship between threads. - * - * Return values are: - * 1 : left is greater than right - * 0 : left is equal to right - * -1 : left is less than right - */ - int i; - for (i = 0; i < sizeof(pthread_t); i++) - { - if (((pthcmp_t)left).b[i] > ((pthcmp_t)right).b[i]) - return 1; - else if (((pthcmp_t)left).b[i] < ((pthcmp_t)right).b[i]) - return -1; - } - return 0; -} - - -Result thus far - -We can't remove undefined bits if they are there in pthread_t already, but we have -attempted to render them inert for comparison and hashing functions by making them -consistent through assignment, copy and pass-by-value. - -Note: Hashing pthread_t values requires that all pthread_t variables be initialised -to the same value (usually all zeros) before being assigned a proper thread ID, i.e. -to ensure that any padding bits are zero, or at least the same value for all -pthread_t. Since all pthread_t values are generated by the library in the first -instance this need not be an application-level operation. - - -Conclusion - -I've attempted to resolve the multiple issues of type opacity and the possible -presence of undefined bits and bytes in pthread_t values, which prevent -applications from comparing or hashing pthread handles. - -Two complimentary partial solutions have been proposed, one an application-level -scheme to handle both scalar and aggregate pthread_t types equally, plus a -definition of pthread_t itself that neutralises padding bits and bytes by -coercing semantics out of the compiler to eliminate variations in the values of -padding bits. - -I have not provided any solution to the problem of handling extra values embedded -in pthread_t, e.g. debugging or trap information that an implementation is entitled -to include. Therefore none of this replaces the portability and flexibility of API -functions but what functions are needed? The threads standard is unlikely to -include new functions that can be implemented by a combination of existing features -and more generic functions (several references in the threads rationale suggest this). -Therefore I propose that the following function could replace the several functions -that have been suggested in conversations: - -pthread_t * pthread_normalize(pthread_t * handle); - -For most existing pthreads implementations this function, or macro, would reduce to -a no-op with zero call overhead. Most of the other desired operations on pthread_t -values (null, compare, hash, etc.) can be trivially derived from this and other -standard functions. +This file documents non-portable functions and other issues. + +Non-portable functions included in pthreads-win32 +------------------------------------------------- + +BOOL +pthread_win32_test_features_np(int mask) + + This routine allows an application to check which + run-time auto-detected features are available within + the library. + + The possible features are: + + PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE + Return TRUE if the native version of + InterlockedCompareExchange() is being used. + This feature is not meaningful in recent + library versions as MSVC builds only support + system implemented ICE. Note that all Mingw + builds use inlined asm versions of all the + Interlocked routines. + PTW32_ALERTABLE_ASYNC_CANCEL + Return TRUE is the QueueUserAPCEx package + QUSEREX.DLL is available and the AlertDrv.sys + driver is loaded into Windows, providing + alertable (pre-emptive) asyncronous threads + cancellation. If this feature returns FALSE + then the default async cancel scheme is in + use, which cannot cancel blocked threads. + + Features may be Or'ed into the mask parameter, in which case + the routine returns TRUE if any of the Or'ed features would + return TRUE. At this stage it doesn't make sense to Or features + but it may some day. + + +void * +pthread_timechange_handler_np(void *) + + To improve tolerance against operator or time service + initiated system clock changes. + + This routine can be called by an application when it + receives a WM_TIMECHANGE message from the system. At + present it broadcasts all condition variables so that + waiting threads can wake up and re-evaluate their + conditions and restart their timed waits if required. + + It has the same return type and argument type as a + thread routine so that it may be called directly + through pthread_create(), i.e. as a separate thread. + + Parameters + + Although a parameter must be supplied, it is ignored. + The value NULL can be used. + + Return values + + It can return an error EAGAIN to indicate that not + all condition variables were broadcast for some reason. + Otherwise, 0 is returned. + + If run as a thread, the return value is returned + through pthread_join(). + + The return value should be cast to an integer. + + +HANDLE +pthread_getw32threadhandle_np(pthread_t thread); + + Returns the win32 thread handle that the POSIX + thread "thread" is running as. + + Applications can use the win32 handle to set + win32 specific attributes of the thread. + +DWORD +pthread_getw32threadid_np (pthread_t thread) + + Returns the Windows native thread ID that the POSIX + thread "thread" is running as. + + Only valid when the library is built where + ! (defined(__MINGW64__) || defined(__MINGW32__)) || defined (__MSVCRT__) || defined (__DMC__) + and otherwise returns 0. + + +int +pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, int kind) + +int +pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, int *kind) + + These two routines are included for Linux compatibility + and are direct equivalents to the standard routines + pthread_mutexattr_settype + pthread_mutexattr_gettype + + pthread_mutexattr_setkind_np accepts the following + mutex kinds: + PTHREAD_MUTEX_FAST_NP + PTHREAD_MUTEX_ERRORCHECK_NP + PTHREAD_MUTEX_RECURSIVE_NP + + These are really just equivalent to (respectively): + PTHREAD_MUTEX_NORMAL + PTHREAD_MUTEX_ERRORCHECK + PTHREAD_MUTEX_RECURSIVE + + +int +pthread_delay_np (const struct timespec *interval) + + This routine causes a thread to delay execution for a specific period of time. + This period ends at the current time plus the specified interval. The routine + will not return before the end of the period is reached, but may return an + arbitrary amount of time after the period has gone by. This can be due to + system load, thread priorities, and system timer granularity. + + Specifying an interval of zero (0) seconds and zero (0) nanoseconds is + allowed and can be used to force the thread to give up the processor or to + deliver a pending cancellation request. + + This routine is a cancellation point. + + The timespec structure contains the following two fields: + + tv_sec is an integer number of seconds. + tv_nsec is an integer number of nanoseconds. + + Return Values + + If an error condition occurs, this routine returns an integer value + indicating the type of error. Possible return values are as follows: + + 0 Successful completion. + [EINVAL] The value specified by interval is invalid. + + +__int64 +pthread_getunique_np (pthread_t thr) + + Returns the unique number associated with thread thr. + The unique numbers are a simple way of positively identifying a thread when + pthread_t cannot be relied upon to identify the true thread instance. I.e. a + pthread_t value may be assigned to different threads throughout the life of a + process. + + Because pthreads4w (pthreads-win32) threads can be uniquely identified by their + pthread_t values this routine is provided only for source code compatibility. + + NOTE: if the library is re-initialised, i.e. by calling pthread_win32_process_detach_np() + followed by pthread_win32_process_attach_np(), then the unique number is reset along with + several other library global values. Library reinitialisation should not be required, + however, some older applications may still call these routines as they were once required to + do when statically linking the library. + +int +pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec *abstime) + +int +pthread_tryjoin_np (pthread_t thread, void **value_ptr) + + These function is added for compatibility with Linux. + + +int +pthread_num_processors_np (void) + + This routine (found on HPUX systems) returns the number of processors + in the system. This implementation actually returns the number of + processors available to the process, which can be a lower number + than the system's number, depending on the process's affinity mask. + + +BOOL +pthread_win32_process_attach_np (void); + +BOOL +pthread_win32_process_detach_np (void); + +BOOL +pthread_win32_thread_attach_np (void); + +BOOL +pthread_win32_thread_detach_np (void); + + These functions contain the code normally run via DllMain + when the library is used as a dll. As of version 2.9.0 of the + library, static builds using either MSC or GCC will call + pthread_win32_process_* automatically at application startup and + exit respectively. + + pthread_win32_thread_attach_np() is currently a no-op. + + pthread_win32_thread_detach_np() is not a no-op. It cleans up the + implicit pthread handle that is allocated to any thread not started + via pthread_create(). Such non-posix threads should call this routine + when they exit, or call pthread_exit() to both cleanup and exit. + + These functions invariably return TRUE except for + pthread_win32_process_attach_np() which will return FALSE + if pthreads-win32 initialisation fails. + + +int +pthread_attr_getaffinity_np (pthread_attr_t * attr, size_t cpusetsize, cpu_set_t * cpuset); + +int +pthread_attr_setaffinity_np (pthread_attr_t * attr, size_t cpusetsize, const cpu_set_t * cpuset); + +int +pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t * cpuset); + +int +pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, const cpu_set_t * cpuset); + + Manipulate the CPU affinity of threads. Compatibility with libgcc-based pthreads + implementations. + + +int +pthreadCancelableWait (HANDLE waitHandle); + +int +pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout); + + These two functions provide hooks into the pthread_cancel + mechanism that will allow you to wait on a Windows handle + and make it a cancellation point. Both functions block + until either the given w32 handle is signaled, or + pthread_cancel has been called. It is implemented using + WaitForMultipleObjects on 'waitHandle' and a manually + reset w32 event used to implement pthread_cancel. + +int +pthread_getname_np(pthread_t thr, char *name, int len); + +If PTW32_COMPATIBILITY_BSD or PTW32_COMPATIBILITY_TRU64 defined +int +pthread_setname_np(pthread_t thr, const char *name, void *arg); + +Otherwise: +int +pthread_setname_np(pthread_t thr, const char *name); + + Set and get thread names. Compatibility. + + +struct timespec * +pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * relative); + + Primarily to facilitate writing unit tests but exported for convenience. + The struct timespec pointed to by the first parameter is modified to represent the + time 'now' plus an optional offset value timespec in a platform optimal way. + Returns the first parameter so is compatible as the struct timespec * parameter in + POSIX timed function calls, e.g. + + struct timespec abstime, reltime = { 0, 5000000 } /* 5 ms */; + pthread_mutex_timedwait(&mtx, pthread_win32_getabstime_np(&abstime, &reltime)); + + +Non-portable issues +------------------- + +Thread priority + + POSIX defines a single contiguous range of numbers that determine a + thread's priority. Win32 defines priority classes and priority + levels relative to these classes. Classes are simply priority base + levels that the defined priority levels are relative to such that, + changing a process's priority class will change the priority of all + of it's threads, while the threads retain the same relativity to each + other. + + A Win32 system defines a single contiguous monotonic range of values + that define system priority levels, just like POSIX. However, Win32 + restricts individual threads to a subset of this range on a + per-process basis. + + The following table shows the base priority levels for combinations + of priority class and priority value in Win32. + + Process Priority Class Thread Priority Level + ----------------------------------------------------------------- + 1 IDLE_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 HIGH_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 2 IDLE_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 3 IDLE_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 4 IDLE_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 4 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 5 IDLE_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 5 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 5 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 6 IDLE_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 6 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 6 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 7 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 7 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 7 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 8 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 8 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 8 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 8 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 9 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 9 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 9 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 10 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 10 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 11 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 11 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 11 HIGH_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 12 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 12 HIGH_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 13 HIGH_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 14 HIGH_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 IDLE_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 16 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 17 REALTIME_PRIORITY_CLASS -7 + 18 REALTIME_PRIORITY_CLASS -6 + 19 REALTIME_PRIORITY_CLASS -5 + 20 REALTIME_PRIORITY_CLASS -4 + 21 REALTIME_PRIORITY_CLASS -3 + 22 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 23 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 24 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 25 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 26 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 27 REALTIME_PRIORITY_CLASS 3 + 28 REALTIME_PRIORITY_CLASS 4 + 29 REALTIME_PRIORITY_CLASS 5 + 30 REALTIME_PRIORITY_CLASS 6 + 31 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + + Windows NT: Values -7, -6, -5, -4, -3, 3, 4, 5, and 6 are not supported. + + + As you can see, the real priority levels available to any individual + Win32 thread are non-contiguous. + + An application using pthreads-win32 should not make assumptions about + the numbers used to represent thread priority levels, except that they + are monotonic between the values returned by sched_get_priority_min() + and sched_get_priority_max(). E.g. Windows 95, 98, NT, 2000, XP make + available a non-contiguous range of numbers between -15 and 15, while + at least one version of WinCE (3.0) defines the minimum priority + (THREAD_PRIORITY_LOWEST) as 5, and the maximum priority + (THREAD_PRIORITY_HIGHEST) as 1. + + Internally, pthreads-win32 maps any priority levels between + THREAD_PRIORITY_IDLE and THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, + or between THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to + THREAD_PRIORITY_HIGHEST. Currently, this also applies to + REALTIME_PRIORITY_CLASSi even if levels -7, -6, -5, -4, -3, 3, 4, 5, and 6 + are supported. + + If it wishes, a Win32 application using pthreads-win32 can use the Win32 + defined priority macros THREAD_PRIORITY_IDLE through + THREAD_PRIORITY_TIME_CRITICAL. + + +The opacity of the pthread_t datatype +------------------------------------- +and possible solutions for portable null/compare/hash, etc +---------------------------------------------------------- + +Because pthread_t is an opague datatype an implementation is permitted to define +pthread_t in any way it wishes. That includes defining some bits, if it is +scalar, or members, if it is an aggregate, to store information that may be +extra to the unique identifying value of the ID. As a result, pthread_t values +may not be directly comparable. + +If you want your code to be portable you must adhere to the following contraints: + +1) Don't assume it is a scalar data type, e.g. an integer or pointer value. There +are several other implementations where pthread_t is also a struct. See our FAQ +Question 11 for our reasons for defining pthread_t as a struct. + +2) You must not compare them using relational or equality operators. You must use +the API function pthread_equal() to test for equality. + +3) Never attempt to reference individual members. + + +The problem + +Certain applications would like to be able to access only the 'pure' pthread_t +id values, primarily to use as keys into data structures to manage threads or +thread-related data, but this is not possible in a maximally portable and +standards compliant way for current POSIX threads implementations. + +For implementations that define pthread_t as a scalar, programmers often employ +direct relational and equality operators on pthread_t. This code will break when +ported to an implementation that defines pthread_t as an aggregate type. + +For implementations that define pthread_t as an aggregate, e.g. a struct, +programmers can use memcmp etc., but then face the prospect that the struct may +include alignment padding bytes or bits as well as extra implementation-specific +members that are not part of the unique identifying value. + +[While this is not currently the case for pthreads-win32, opacity also +means that an implementation is free to change the definition, which should +generally only require that applications be recompiled and relinked, not +rewritten.] + + +Doesn't the compiler take care of padding? + +The C89 and later standards only effectively guarantee element-by-element +equivalence following an assignment or pass by value of a struct or union, +therefore undefined areas of any two otherwise equivalent pthread_t instances +can still compare differently, e.g. attempting to compare two such pthread_t +variables byte-by-byte, e.g. memcmp(&t1, &t2, sizeof(pthread_t) may give an +incorrect result. In practice I'm reasonably confident that compilers routinely +also copy the padding bytes, mainly because assignment of unions would be far +too complicated otherwise. But it just isn't guarranteed by the standard. + +Illustration: + +We have two thread IDs t1 and t2 + +pthread_t t1, t2; + +In an application we create the threads and intend to store the thread IDs in an +ordered data structure (linked list, tree, etc) so we need to be able to compare +them in order to insert them initially and also to traverse. + +Suppose pthread_t contains undefined padding bits and our compiler copies our +pthread_t [struct] element-by-element, then for the assignment: + +pthread_t temp = t1; + +temp and t1 will be equivalent and correct but a byte-for-byte comparison such as +memcmp(&temp, &t1, sizeof(pthread_t)) == 0 may not return true as we expect because +the undefined bits may not have the same values in the two variable instances. + +Similarly if passing by value under the same conditions. + +If, on the other hand, the undefined bits are at least constant through every +assignment and pass-by-value then the byte-for-byte comparison +memcmp(&temp, &t1, sizeof(pthread_t)) == 0 will always return the expected result. +How can we force the behaviour we need? + + +Solutions + +Adding new functions to the standard API or as non-portable extentions is +the only reliable and portable way to provide the necessary operations. +Remember also that POSIX is not tied to the C language. The most common +functions that have been suggested are: + +pthread_null() +pthread_compare() +pthread_hash() + +A single more general purpose function could also be defined as a +basis for at least the last two of the above functions. + +First we need to list the freedoms and constraints with respect +to pthread_t so that we can be sure our solution is compatible with the +standard. + +What is known or may be deduced from the standard: +1) pthread_t must be able to be passed by value, so it must be a single object. +2) from (1) it must be copyable so cannot embed thread-state information, locks +or other volatile objects required to manage the thread it associates with. +3) pthread_t may carry additional information, e.g. for debugging or to manage +itself. +4) there is an implicit requirement that the size of pthread_t is determinable +at compile-time and size-invariant, because it must be able to copy the object +(i.e. through assignment and pass-by-value). Such copies must be genuine +duplicates, not merely a copy of a pointer to a common instance such as +would be the case if pthread_t were defined as an array. + + +Suppose we define the following function: + +/* This function shall return it's argument */ +pthread_t* pthread_normalize(pthread_t* thread); + +For scalar or aggregate pthread_t types this function would simply zero any bits +within the pthread_t that don't uniquely identify the thread, including padding, +such that client code can return consistent results from operations done on the +result. If the additional bits are a pointer to an associate structure then +this function would ensure that the memory used to store that associate +structure does not leak. After normalization the following compare would be +valid and repeatable: + +memcmp(pthread_normalize(&t1),pthread_normalize(&t2),sizeof(pthread_t)) + +Note 1: such comparisons are intended merely to order and sort pthread_t values +and allow them to index various data structures. They are not intended to reveal +anything about the relationships between threads, like startup order. + +Note 2: the normalized pthread_t is also a valid pthread_t that uniquely +identifies the same thread. + +Advantages: +1) In most existing implementations this function would reduce to a no-op that +emits no additional instructions, i.e after in-lining or optimisation, or if +defined as a macro: +#define pthread_normalise(tptr) (tptr) + +2) This single function allows an application to portably derive +application-level versions of any of the other required functions. + +3) It is a generic function that could enable unanticipated uses. + +Disadvantages: +1) Less efficient than dedicated compare or hash functions for implementations +that include significant extra non-id elements in pthread_t. + +2) Still need to be concerned about padding if copying normalized pthread_t. +See the later section on defining pthread_t to neutralise padding issues. + +Generally a pthread_t may need to be normalized every time it is used, +which could have a significant impact. However, this is a design decision +for the implementor in a competitive environment. An implementation is free +to define a pthread_t in a way that minimises or eliminates padding or +renders this function a no-op. + +Hazards: +1) Pass-by-reference directly modifies 'thread' so the application must +synchronise access or ensure that the pointer refers to a copy. The alternative +of pass-by-value/return-by-value was considered but then this requires two copy +operations, disadvantaging implementations where this function is not a no-op +in terms of speed of execution. This function is intended to be used in high +frequency situations and needs to be efficient, or at least not unnecessarily +inefficient. The alternative also sits awkwardly with functions like memcmp. + +2) [Non-compliant] code that uses relational and equality operators on +arithmetic or pointer style pthread_t types would need to be rewritten, but it +should be rewritten anyway. + + +C implementation of null/compare/hash functions using pthread_normalize(): + +/* In pthread.h */ +pthread_t* pthread_normalize(pthread_t* thread); + +/* In user code */ +/* User-level bitclear function - clear bits in loc corresponding to mask */ +void* bitclear (void* loc, void* mask, size_t count); + +typedef unsigned int hash_t; + +/* User-level hash function */ +hash_t hash(void* ptr, size_t count); + +/* + * User-level pthr_null function - modifies the origin thread handle. + * The concept of a null pthread_t is highly implementation dependent + * and this design may be far from the mark. For example, in an + * implementation "null" may mean setting a special value inside one + * element of pthread_t to mean "INVALID". However, if that value was zero and + * formed part of the id component then we may get away with this design. + */ +pthread_t* pthr_null(pthread_t* tp) +{ + /* + * This should have the same effect as memset(tp, 0, sizeof(pthread_t)) + * We're just showing that we can do it. + */ + void* p = (void*) pthread_normalize(tp); + return (pthread_t*) bitclear(p, p, sizeof(pthread_t)); +} + +/* + * Safe user-level pthr_compare function - modifies temporary thread handle copies + */ +int pthr_compare_safe(pthread_t thread1, pthread_t thread2) +{ + return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); +} + +/* + * Fast user-level pthr_compare function - modifies origin thread handles + */ +int pthr_compare_fast(pthread_t* thread1, pthread_t* thread2) +{ + return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); +} + +/* + * Safe user-level pthr_hash function - modifies temporary thread handle copy + */ +hash_t pthr_hash_safe(pthread_t thread) +{ + return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); +} + +/* + * Fast user-level pthr_hash function - modifies origin thread handle + */ +hash_t pthr_hash_fast(pthread_t thread) +{ + return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); +} + +/* User-level bitclear function - modifies the origin array */ +void* bitclear(void* loc, void* mask, size_t count) +{ + int i; + for (i=0; i < count; i++) { + (unsigned char) *loc++ &= ~((unsigned char) *mask++); + } +} + +/* Donald Knuth hash */ +hash_t hash(void* str, size_t count) +{ + hash_t hash = (hash_t) count; + unsigned int i = 0; + + for(i = 0; i < len; str++, i++) + { + hash = ((hash << 5) ^ (hash >> 27)) ^ (*str); + } + return hash; +} + +/* Example of advantage point (3) - split a thread handle into its id and non-id values */ +pthread_t id = thread, non-id = thread; +bitclear((void*) &non-id, (void*) pthread_normalize(&id), sizeof(pthread_t)); + + +A pthread_t type change proposal to neutralise the effects of padding + +Even if pthread_normalize() is available, padding is still a problem because +the standard only garrantees element-by-element equivalence through +copy operations (assignment and pass-by-value). So padding bit values can +still change randomly after calls to pthread_normalize(). + +[I suspect that most compilers take the easy path and always byte-copy anyway, +partly because it becomes too complex to do (e.g. unions that contain sub-aggregates) +but also because programmers can easily design their aggregates to minimise and +often eliminate padding]. + +How can we eliminate the problem of padding bytes in structs? Could +defining pthread_t as a union rather than a struct provide a solution? + +In fact, the Linux pthread.h defines most of it's pthread_*_t objects (but not +pthread_t itself) as unions, possibly for this and/or other reasons. We'll +borrow some element naming from there but the ideas themselves are well known +- the __align element used to force alignment of the union comes from K&R's +storage allocator example. + +/* Essentially our current pthread_t renamed */ +typedef struct { + struct thread_state_t * __p; + long __x; /* sequence counter */ +} thread_id_t; + +Ensuring that the last element in the above struct is a long ensures that the +overall struct size is a multiple of sizeof(long), so there should be no trailing +padding in this struct or the union we define below. +(Later we'll see that we can handle internal but not trailing padding.) + +/* New pthread_t */ +typedef union { + char __size[sizeof(thread_id_t)]; /* array as the first element */ + thread_id_t __tid; + long __align; /* Ensure that the union starts on long boundary */ +} pthread_t; + +This guarrantees that, during an assignment or pass-by-value, the compiler copies +every byte in our thread_id_t because the compiler guarrantees that the __size +array, which we have ensured is the equal-largest element in the union, retains +equivalence. + +This means that pthread_t values stored, assigned and passed by value will at least +carry the value of any undefined padding bytes along and therefore ensure that +those values remain consistent. Our comparisons will return consistent results and +our hashes of [zero initialised] pthread_t values will also return consistent +results. + +We have also removed the need for a pthread_null() function; we can initialise +at declaration time or easily create our own const pthread_t to use in assignments +later: + +const pthread_t null_tid = {0}; /* braces are required */ + +pthread_t t; +... +t = null_tid; + + +Note that we don't have to explicitly make use of the __size array at all. It's +there just to force the compiler behaviour we want. + + +Partial solutions without a pthread_normalize function + + +An application-level pthread_null and pthread_compare proposal +(and pthread_hash proposal by extention) + +In order to deal with the problem of scalar/aggregate pthread_t type disparity in +portable code I suggest using an old-fashioned union, e.g.: + +Contraints: +- there is no padding, or padding values are preserved through assignment and + pass-by-value (see above); +- there are no extra non-id values in the pthread_t. + + +Example 1: A null initialiser for pthread_t variables... + +typedef union { + unsigned char b[sizeof(pthread_t)]; + pthread_t t; +} init_t; + +const init_t initial = {0}; + +pthread_t tid = initial.t; /* init tid to all zeroes */ + + +Example 2: A comparison function for pthread_t values + +typedef union { + unsigned char b[sizeof(pthread_t)]; + pthread_t t; +} pthcmp_t; + +int pthcmp(pthread_t left, pthread_t right) +{ + /* + * Compare two pthread handles in a way that imposes a repeatable but arbitrary + * ordering on them. + * I.e. given the same set of pthread_t handles the ordering should be the same + * each time but the order has no particular meaning other than that. E.g. + * the ordering does not imply the thread start sequence, or any other + * relationship between threads. + * + * Return values are: + * 1 : left is greater than right + * 0 : left is equal to right + * -1 : left is less than right + */ + int i; + pthcmp_t L, R; + L.t = left; + R.t = right; + for (i = 0; i < sizeof(pthread_t); i++) + { + if (L.b[i] > R.b[i]) + return 1; + else if (L.b[i] < R.b[i]) + return -1; + } + return 0; +} + +It has been pointed out that the C99 standard allows for the possibility that +integer types also may include padding bits, which could invalidate the above +method. This addition to C99 was specifically included after it was pointed +out that there was one, presumably not particularly well known, architecture +that included a padding bit in it's 32 bit integer type. See section 6.2.6.2 +of both the standard and the rationale, specifically the paragraph starting at +line 16 on page 43 of the rationale. + + +An aside + +Certain compilers, e.g. gcc and one of the IBM compilers, include a feature +extention: provided the union contains a member of the same type as the +object then the object may be cast to the union itself. + +We could use this feature to speed up the pthrcmp() function from example 2 +above by casting rather than assigning the pthread_t arguments to the union, e.g.: + +int pthcmp(pthread_t left, pthread_t right) +{ + /* + * Compare two pthread handles in a way that imposes a repeatable but arbitrary + * ordering on them. + * I.e. given the same set of pthread_t handles the ordering should be the same + * each time but the order has no particular meaning other than that. E.g. + * the ordering does not imply the thread start sequence, or any other + * relationship between threads. + * + * Return values are: + * 1 : left is greater than right + * 0 : left is equal to right + * -1 : left is less than right + */ + int i; + for (i = 0; i < sizeof(pthread_t); i++) + { + if (((pthcmp_t)left).b[i] > ((pthcmp_t)right).b[i]) + return 1; + else if (((pthcmp_t)left).b[i] < ((pthcmp_t)right).b[i]) + return -1; + } + return 0; +} + + +Result thus far + +We can't remove undefined bits if they are there in pthread_t already, but we have +attempted to render them inert for comparison and hashing functions by making them +consistent through assignment, copy and pass-by-value. + +Note: Hashing pthread_t values requires that all pthread_t variables be initialised +to the same value (usually all zeros) before being assigned a proper thread ID, i.e. +to ensure that any padding bits are zero, or at least the same value for all +pthread_t. Since all pthread_t values are generated by the library in the first +instance this need not be an application-level operation. + + +Conclusion + +I've attempted to resolve the multiple issues of type opacity and the possible +presence of undefined bits and bytes in pthread_t values, which prevent +applications from comparing or hashing pthread handles. + +Two complimentary partial solutions have been proposed, one an application-level +scheme to handle both scalar and aggregate pthread_t types equally, plus a +definition of pthread_t itself that neutralises padding bits and bytes by +coercing semantics out of the compiler to eliminate variations in the values of +padding bits. + +I have not provided any solution to the problem of handling extra values embedded +in pthread_t, e.g. debugging or trap information that an implementation is entitled +to include. Therefore none of this replaces the portability and flexibility of API +functions but what functions are needed? The threads standard is unlikely to +include new functions that can be implemented by a combination of existing features +and more generic functions (several references in the threads rationale suggest this). +Therefore I propose that the following function could replace the several functions +that have been suggested in conversations: + +pthread_t * pthread_normalize(pthread_t * handle); + +For most existing pthreads implementations this function, or macro, would reduce to +a no-op with zero call overhead. Most of the other desired operations on pthread_t +values (null, compare, hash, etc.) can be trivially derived from this and other +standard functions. diff --git a/manual/index.html b/manual/index.html index 1a7226c2..5029da24 100644 --- a/manual/index.html +++ b/manual/index.html @@ -3,9 +3,10 @@ - + - + + + + +

POSIX Threads for Windows – REFERENCE - +Pthreads-w32

+

Reference Index

+

Table of Contents

+

Name

+

pthread_win32_getabstime_np

+

Synopsis

+

#include <pthread.h> +

+

struct timespec * pthread_win32_getabstime_np (struct timespec +* abstime, struct timespec * reltime);

+

Description

+

Primarily to facilitate writing unit tests but exported for +convenience. The struct +timespec pointed to by +the first parameter is modified to represent the current time plus an +optional offset value struct timespec +in a platform optimal way.

+

Returns the first parameter so is compatible as the struct +timespec * +parameter in POSIX timed function calls.

+

Cancellation

+

None.

+

Return +Value

+

This routine returns the first parameter (non-zero) on success, or +NULL (0) if it fails.

+

Errors

+

None.

+

Author

+

Ross Johnson for use with Pthreads-w32.

+
+

Table of Contents

+ + + \ No newline at end of file From 4fdbeb6466ef7101fecda24ce0422568a6addf1d Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 31 Mar 2016 08:47:58 +1100 Subject: [PATCH 045/207] Applied Keith Marshall mingw32 patches --- README.NONPORTABLE | 1648 ++++++++++++++--------------- _ptw32.h | 107 ++ aclocal.m4 | 119 +++ common.mk | 1 - configure.ac | 86 ++ implement.h | 60 +- install-sh | 251 +++++ manual/PortabilityIssues.html | 1450 ++++++++++++------------- manual/pthreadCancelableWait.html | 184 ++-- pthread.h | 406 ++----- pthread_getname_np.c | 138 +-- pthread_self.c | 2 +- pthread_setname_np.c | 370 +++---- sched.h | 281 ++--- sem_open.c | 11 +- semaphore.h | 143 +-- tests/exit6.c | 114 +- tests/join4.c | 174 +-- 18 files changed, 2931 insertions(+), 2614 deletions(-) create mode 100644 _ptw32.h create mode 100644 aclocal.m4 create mode 100644 configure.ac create mode 100644 install-sh diff --git a/README.NONPORTABLE b/README.NONPORTABLE index 7c39a566..eea4507a 100644 --- a/README.NONPORTABLE +++ b/README.NONPORTABLE @@ -1,824 +1,824 @@ -This file documents non-portable functions and other issues. - -Non-portable functions included in pthreads-win32 -------------------------------------------------- - -BOOL -pthread_win32_test_features_np(int mask) - - This routine allows an application to check which - run-time auto-detected features are available within - the library. - - The possible features are: - - PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE - Return TRUE if the native version of - InterlockedCompareExchange() is being used. - This feature is not meaningful in recent - library versions as MSVC builds only support - system implemented ICE. Note that all Mingw - builds use inlined asm versions of all the - Interlocked routines. - PTW32_ALERTABLE_ASYNC_CANCEL - Return TRUE is the QueueUserAPCEx package - QUSEREX.DLL is available and the AlertDrv.sys - driver is loaded into Windows, providing - alertable (pre-emptive) asyncronous threads - cancellation. If this feature returns FALSE - then the default async cancel scheme is in - use, which cannot cancel blocked threads. - - Features may be Or'ed into the mask parameter, in which case - the routine returns TRUE if any of the Or'ed features would - return TRUE. At this stage it doesn't make sense to Or features - but it may some day. - - -void * -pthread_timechange_handler_np(void *) - - To improve tolerance against operator or time service - initiated system clock changes. - - This routine can be called by an application when it - receives a WM_TIMECHANGE message from the system. At - present it broadcasts all condition variables so that - waiting threads can wake up and re-evaluate their - conditions and restart their timed waits if required. - - It has the same return type and argument type as a - thread routine so that it may be called directly - through pthread_create(), i.e. as a separate thread. - - Parameters - - Although a parameter must be supplied, it is ignored. - The value NULL can be used. - - Return values - - It can return an error EAGAIN to indicate that not - all condition variables were broadcast for some reason. - Otherwise, 0 is returned. - - If run as a thread, the return value is returned - through pthread_join(). - - The return value should be cast to an integer. - - -HANDLE -pthread_getw32threadhandle_np(pthread_t thread); - - Returns the win32 thread handle that the POSIX - thread "thread" is running as. - - Applications can use the win32 handle to set - win32 specific attributes of the thread. - -DWORD -pthread_getw32threadid_np (pthread_t thread) - - Returns the Windows native thread ID that the POSIX - thread "thread" is running as. - - Only valid when the library is built where - ! (defined(__MINGW64__) || defined(__MINGW32__)) || defined (__MSVCRT__) || defined (__DMC__) - and otherwise returns 0. - - -int -pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, int kind) - -int -pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, int *kind) - - These two routines are included for Linux compatibility - and are direct equivalents to the standard routines - pthread_mutexattr_settype - pthread_mutexattr_gettype - - pthread_mutexattr_setkind_np accepts the following - mutex kinds: - PTHREAD_MUTEX_FAST_NP - PTHREAD_MUTEX_ERRORCHECK_NP - PTHREAD_MUTEX_RECURSIVE_NP - - These are really just equivalent to (respectively): - PTHREAD_MUTEX_NORMAL - PTHREAD_MUTEX_ERRORCHECK - PTHREAD_MUTEX_RECURSIVE - - -int -pthread_delay_np (const struct timespec *interval) - - This routine causes a thread to delay execution for a specific period of time. - This period ends at the current time plus the specified interval. The routine - will not return before the end of the period is reached, but may return an - arbitrary amount of time after the period has gone by. This can be due to - system load, thread priorities, and system timer granularity. - - Specifying an interval of zero (0) seconds and zero (0) nanoseconds is - allowed and can be used to force the thread to give up the processor or to - deliver a pending cancellation request. - - This routine is a cancellation point. - - The timespec structure contains the following two fields: - - tv_sec is an integer number of seconds. - tv_nsec is an integer number of nanoseconds. - - Return Values - - If an error condition occurs, this routine returns an integer value - indicating the type of error. Possible return values are as follows: - - 0 Successful completion. - [EINVAL] The value specified by interval is invalid. - - -__int64 -pthread_getunique_np (pthread_t thr) - - Returns the unique number associated with thread thr. - The unique numbers are a simple way of positively identifying a thread when - pthread_t cannot be relied upon to identify the true thread instance. I.e. a - pthread_t value may be assigned to different threads throughout the life of a - process. - - Because pthreads4w (pthreads-win32) threads can be uniquely identified by their - pthread_t values this routine is provided only for source code compatibility. - - NOTE: if the library is re-initialised, i.e. by calling pthread_win32_process_detach_np() - followed by pthread_win32_process_attach_np(), then the unique number is reset along with - several other library global values. Library reinitialisation should not be required, - however, some older applications may still call these routines as they were once required to - do when statically linking the library. - -int -pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec *abstime) - -int -pthread_tryjoin_np (pthread_t thread, void **value_ptr) - - These function is added for compatibility with Linux. - - -int -pthread_num_processors_np (void) - - This routine (found on HPUX systems) returns the number of processors - in the system. This implementation actually returns the number of - processors available to the process, which can be a lower number - than the system's number, depending on the process's affinity mask. - - -BOOL -pthread_win32_process_attach_np (void); - -BOOL -pthread_win32_process_detach_np (void); - -BOOL -pthread_win32_thread_attach_np (void); - -BOOL -pthread_win32_thread_detach_np (void); - - These functions contain the code normally run via DllMain - when the library is used as a dll. As of version 2.9.0 of the - library, static builds using either MSC or GCC will call - pthread_win32_process_* automatically at application startup and - exit respectively. - - pthread_win32_thread_attach_np() is currently a no-op. - - pthread_win32_thread_detach_np() is not a no-op. It cleans up the - implicit pthread handle that is allocated to any thread not started - via pthread_create(). Such non-posix threads should call this routine - when they exit, or call pthread_exit() to both cleanup and exit. - - These functions invariably return TRUE except for - pthread_win32_process_attach_np() which will return FALSE - if pthreads-win32 initialisation fails. - - -int -pthread_attr_getaffinity_np (pthread_attr_t * attr, size_t cpusetsize, cpu_set_t * cpuset); - -int -pthread_attr_setaffinity_np (pthread_attr_t * attr, size_t cpusetsize, const cpu_set_t * cpuset); - -int -pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t * cpuset); - -int -pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, const cpu_set_t * cpuset); - - Manipulate the CPU affinity of threads. Compatibility with libgcc-based pthreads - implementations. - - -int -pthreadCancelableWait (HANDLE waitHandle); - -int -pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout); - - These two functions provide hooks into the pthread_cancel - mechanism that will allow you to wait on a Windows handle - and make it a cancellation point. Both functions block - until either the given w32 handle is signaled, or - pthread_cancel has been called. It is implemented using - WaitForMultipleObjects on 'waitHandle' and a manually - reset w32 event used to implement pthread_cancel. - - -Non-portable issues -------------------- - -Thread priority - - POSIX defines a single contiguous range of numbers that determine a - thread's priority. Win32 defines priority classes and priority - levels relative to these classes. Classes are simply priority base - levels that the defined priority levels are relative to such that, - changing a process's priority class will change the priority of all - of it's threads, while the threads retain the same relativity to each - other. - - A Win32 system defines a single contiguous monotonic range of values - that define system priority levels, just like POSIX. However, Win32 - restricts individual threads to a subset of this range on a - per-process basis. - - The following table shows the base priority levels for combinations - of priority class and priority value in Win32. - - Process Priority Class Thread Priority Level - ----------------------------------------------------------------- - 1 IDLE_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 HIGH_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 2 IDLE_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 3 IDLE_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 4 IDLE_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 4 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 5 IDLE_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 5 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 5 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 6 IDLE_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 6 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 6 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 7 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 7 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 7 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 8 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 8 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 8 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 8 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 9 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 9 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 9 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 10 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 10 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 11 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 11 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 11 HIGH_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 12 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 12 HIGH_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 13 HIGH_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 14 HIGH_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 IDLE_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 16 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 17 REALTIME_PRIORITY_CLASS -7 - 18 REALTIME_PRIORITY_CLASS -6 - 19 REALTIME_PRIORITY_CLASS -5 - 20 REALTIME_PRIORITY_CLASS -4 - 21 REALTIME_PRIORITY_CLASS -3 - 22 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 23 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 24 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 25 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 26 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 27 REALTIME_PRIORITY_CLASS 3 - 28 REALTIME_PRIORITY_CLASS 4 - 29 REALTIME_PRIORITY_CLASS 5 - 30 REALTIME_PRIORITY_CLASS 6 - 31 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - - Windows NT: Values -7, -6, -5, -4, -3, 3, 4, 5, and 6 are not supported. - - - As you can see, the real priority levels available to any individual - Win32 thread are non-contiguous. - - An application using pthreads-win32 should not make assumptions about - the numbers used to represent thread priority levels, except that they - are monotonic between the values returned by sched_get_priority_min() - and sched_get_priority_max(). E.g. Windows 95, 98, NT, 2000, XP make - available a non-contiguous range of numbers between -15 and 15, while - at least one version of WinCE (3.0) defines the minimum priority - (THREAD_PRIORITY_LOWEST) as 5, and the maximum priority - (THREAD_PRIORITY_HIGHEST) as 1. - - Internally, pthreads-win32 maps any priority levels between - THREAD_PRIORITY_IDLE and THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, - or between THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to - THREAD_PRIORITY_HIGHEST. Currently, this also applies to - REALTIME_PRIORITY_CLASSi even if levels -7, -6, -5, -4, -3, 3, 4, 5, and 6 - are supported. - - If it wishes, a Win32 application using pthreads-win32 can use the Win32 - defined priority macros THREAD_PRIORITY_IDLE through - THREAD_PRIORITY_TIME_CRITICAL. - - -The opacity of the pthread_t datatype -------------------------------------- -and possible solutions for portable null/compare/hash, etc ----------------------------------------------------------- - -Because pthread_t is an opague datatype an implementation is permitted to define -pthread_t in any way it wishes. That includes defining some bits, if it is -scalar, or members, if it is an aggregate, to store information that may be -extra to the unique identifying value of the ID. As a result, pthread_t values -may not be directly comparable. - -If you want your code to be portable you must adhere to the following contraints: - -1) Don't assume it is a scalar data type, e.g. an integer or pointer value. There -are several other implementations where pthread_t is also a struct. See our FAQ -Question 11 for our reasons for defining pthread_t as a struct. - -2) You must not compare them using relational or equality operators. You must use -the API function pthread_equal() to test for equality. - -3) Never attempt to reference individual members. - - -The problem - -Certain applications would like to be able to access only the 'pure' pthread_t -id values, primarily to use as keys into data structures to manage threads or -thread-related data, but this is not possible in a maximally portable and -standards compliant way for current POSIX threads implementations. - -For implementations that define pthread_t as a scalar, programmers often employ -direct relational and equality operators on pthread_t. This code will break when -ported to an implementation that defines pthread_t as an aggregate type. - -For implementations that define pthread_t as an aggregate, e.g. a struct, -programmers can use memcmp etc., but then face the prospect that the struct may -include alignment padding bytes or bits as well as extra implementation-specific -members that are not part of the unique identifying value. - -[While this is not currently the case for pthreads-win32, opacity also -means that an implementation is free to change the definition, which should -generally only require that applications be recompiled and relinked, not -rewritten.] - - -Doesn't the compiler take care of padding? - -The C89 and later standards only effectively guarantee element-by-element -equivalence following an assignment or pass by value of a struct or union, -therefore undefined areas of any two otherwise equivalent pthread_t instances -can still compare differently, e.g. attempting to compare two such pthread_t -variables byte-by-byte, e.g. memcmp(&t1, &t2, sizeof(pthread_t) may give an -incorrect result. In practice I'm reasonably confident that compilers routinely -also copy the padding bytes, mainly because assignment of unions would be far -too complicated otherwise. But it just isn't guarranteed by the standard. - -Illustration: - -We have two thread IDs t1 and t2 - -pthread_t t1, t2; - -In an application we create the threads and intend to store the thread IDs in an -ordered data structure (linked list, tree, etc) so we need to be able to compare -them in order to insert them initially and also to traverse. - -Suppose pthread_t contains undefined padding bits and our compiler copies our -pthread_t [struct] element-by-element, then for the assignment: - -pthread_t temp = t1; - -temp and t1 will be equivalent and correct but a byte-for-byte comparison such as -memcmp(&temp, &t1, sizeof(pthread_t)) == 0 may not return true as we expect because -the undefined bits may not have the same values in the two variable instances. - -Similarly if passing by value under the same conditions. - -If, on the other hand, the undefined bits are at least constant through every -assignment and pass-by-value then the byte-for-byte comparison -memcmp(&temp, &t1, sizeof(pthread_t)) == 0 will always return the expected result. -How can we force the behaviour we need? - - -Solutions - -Adding new functions to the standard API or as non-portable extentions is -the only reliable and portable way to provide the necessary operations. -Remember also that POSIX is not tied to the C language. The most common -functions that have been suggested are: - -pthread_null() -pthread_compare() -pthread_hash() - -A single more general purpose function could also be defined as a -basis for at least the last two of the above functions. - -First we need to list the freedoms and constraints with respect -to pthread_t so that we can be sure our solution is compatible with the -standard. - -What is known or may be deduced from the standard: -1) pthread_t must be able to be passed by value, so it must be a single object. -2) from (1) it must be copyable so cannot embed thread-state information, locks -or other volatile objects required to manage the thread it associates with. -3) pthread_t may carry additional information, e.g. for debugging or to manage -itself. -4) there is an implicit requirement that the size of pthread_t is determinable -at compile-time and size-invariant, because it must be able to copy the object -(i.e. through assignment and pass-by-value). Such copies must be genuine -duplicates, not merely a copy of a pointer to a common instance such as -would be the case if pthread_t were defined as an array. - - -Suppose we define the following function: - -/* This function shall return it's argument */ -pthread_t* pthread_normalize(pthread_t* thread); - -For scalar or aggregate pthread_t types this function would simply zero any bits -within the pthread_t that don't uniquely identify the thread, including padding, -such that client code can return consistent results from operations done on the -result. If the additional bits are a pointer to an associate structure then -this function would ensure that the memory used to store that associate -structure does not leak. After normalization the following compare would be -valid and repeatable: - -memcmp(pthread_normalize(&t1),pthread_normalize(&t2),sizeof(pthread_t)) - -Note 1: such comparisons are intended merely to order and sort pthread_t values -and allow them to index various data structures. They are not intended to reveal -anything about the relationships between threads, like startup order. - -Note 2: the normalized pthread_t is also a valid pthread_t that uniquely -identifies the same thread. - -Advantages: -1) In most existing implementations this function would reduce to a no-op that -emits no additional instructions, i.e after in-lining or optimisation, or if -defined as a macro: -#define pthread_normalise(tptr) (tptr) - -2) This single function allows an application to portably derive -application-level versions of any of the other required functions. - -3) It is a generic function that could enable unanticipated uses. - -Disadvantages: -1) Less efficient than dedicated compare or hash functions for implementations -that include significant extra non-id elements in pthread_t. - -2) Still need to be concerned about padding if copying normalized pthread_t. -See the later section on defining pthread_t to neutralise padding issues. - -Generally a pthread_t may need to be normalized every time it is used, -which could have a significant impact. However, this is a design decision -for the implementor in a competitive environment. An implementation is free -to define a pthread_t in a way that minimises or eliminates padding or -renders this function a no-op. - -Hazards: -1) Pass-by-reference directly modifies 'thread' so the application must -synchronise access or ensure that the pointer refers to a copy. The alternative -of pass-by-value/return-by-value was considered but then this requires two copy -operations, disadvantaging implementations where this function is not a no-op -in terms of speed of execution. This function is intended to be used in high -frequency situations and needs to be efficient, or at least not unnecessarily -inefficient. The alternative also sits awkwardly with functions like memcmp. - -2) [Non-compliant] code that uses relational and equality operators on -arithmetic or pointer style pthread_t types would need to be rewritten, but it -should be rewritten anyway. - - -C implementation of null/compare/hash functions using pthread_normalize(): - -/* In pthread.h */ -pthread_t* pthread_normalize(pthread_t* thread); - -/* In user code */ -/* User-level bitclear function - clear bits in loc corresponding to mask */ -void* bitclear (void* loc, void* mask, size_t count); - -typedef unsigned int hash_t; - -/* User-level hash function */ -hash_t hash(void* ptr, size_t count); - -/* - * User-level pthr_null function - modifies the origin thread handle. - * The concept of a null pthread_t is highly implementation dependent - * and this design may be far from the mark. For example, in an - * implementation "null" may mean setting a special value inside one - * element of pthread_t to mean "INVALID". However, if that value was zero and - * formed part of the id component then we may get away with this design. - */ -pthread_t* pthr_null(pthread_t* tp) -{ - /* - * This should have the same effect as memset(tp, 0, sizeof(pthread_t)) - * We're just showing that we can do it. - */ - void* p = (void*) pthread_normalize(tp); - return (pthread_t*) bitclear(p, p, sizeof(pthread_t)); -} - -/* - * Safe user-level pthr_compare function - modifies temporary thread handle copies - */ -int pthr_compare_safe(pthread_t thread1, pthread_t thread2) -{ - return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); -} - -/* - * Fast user-level pthr_compare function - modifies origin thread handles - */ -int pthr_compare_fast(pthread_t* thread1, pthread_t* thread2) -{ - return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); -} - -/* - * Safe user-level pthr_hash function - modifies temporary thread handle copy - */ -hash_t pthr_hash_safe(pthread_t thread) -{ - return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); -} - -/* - * Fast user-level pthr_hash function - modifies origin thread handle - */ -hash_t pthr_hash_fast(pthread_t thread) -{ - return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); -} - -/* User-level bitclear function - modifies the origin array */ -void* bitclear(void* loc, void* mask, size_t count) -{ - int i; - for (i=0; i < count; i++) { - (unsigned char) *loc++ &= ~((unsigned char) *mask++); - } -} - -/* Donald Knuth hash */ -hash_t hash(void* str, size_t count) -{ - hash_t hash = (hash_t) count; - unsigned int i = 0; - - for(i = 0; i < len; str++, i++) - { - hash = ((hash << 5) ^ (hash >> 27)) ^ (*str); - } - return hash; -} - -/* Example of advantage point (3) - split a thread handle into its id and non-id values */ -pthread_t id = thread, non-id = thread; -bitclear((void*) &non-id, (void*) pthread_normalize(&id), sizeof(pthread_t)); - - -A pthread_t type change proposal to neutralise the effects of padding - -Even if pthread_normalize() is available, padding is still a problem because -the standard only garrantees element-by-element equivalence through -copy operations (assignment and pass-by-value). So padding bit values can -still change randomly after calls to pthread_normalize(). - -[I suspect that most compilers take the easy path and always byte-copy anyway, -partly because it becomes too complex to do (e.g. unions that contain sub-aggregates) -but also because programmers can easily design their aggregates to minimise and -often eliminate padding]. - -How can we eliminate the problem of padding bytes in structs? Could -defining pthread_t as a union rather than a struct provide a solution? - -In fact, the Linux pthread.h defines most of it's pthread_*_t objects (but not -pthread_t itself) as unions, possibly for this and/or other reasons. We'll -borrow some element naming from there but the ideas themselves are well known -- the __align element used to force alignment of the union comes from K&R's -storage allocator example. - -/* Essentially our current pthread_t renamed */ -typedef struct { - struct thread_state_t * __p; - long __x; /* sequence counter */ -} thread_id_t; - -Ensuring that the last element in the above struct is a long ensures that the -overall struct size is a multiple of sizeof(long), so there should be no trailing -padding in this struct or the union we define below. -(Later we'll see that we can handle internal but not trailing padding.) - -/* New pthread_t */ -typedef union { - char __size[sizeof(thread_id_t)]; /* array as the first element */ - thread_id_t __tid; - long __align; /* Ensure that the union starts on long boundary */ -} pthread_t; - -This guarrantees that, during an assignment or pass-by-value, the compiler copies -every byte in our thread_id_t because the compiler guarrantees that the __size -array, which we have ensured is the equal-largest element in the union, retains -equivalence. - -This means that pthread_t values stored, assigned and passed by value will at least -carry the value of any undefined padding bytes along and therefore ensure that -those values remain consistent. Our comparisons will return consistent results and -our hashes of [zero initialised] pthread_t values will also return consistent -results. - -We have also removed the need for a pthread_null() function; we can initialise -at declaration time or easily create our own const pthread_t to use in assignments -later: - -const pthread_t null_tid = {0}; /* braces are required */ - -pthread_t t; -... -t = null_tid; - - -Note that we don't have to explicitly make use of the __size array at all. It's -there just to force the compiler behaviour we want. - - -Partial solutions without a pthread_normalize function - - -An application-level pthread_null and pthread_compare proposal -(and pthread_hash proposal by extention) - -In order to deal with the problem of scalar/aggregate pthread_t type disparity in -portable code I suggest using an old-fashioned union, e.g.: - -Contraints: -- there is no padding, or padding values are preserved through assignment and - pass-by-value (see above); -- there are no extra non-id values in the pthread_t. - - -Example 1: A null initialiser for pthread_t variables... - -typedef union { - unsigned char b[sizeof(pthread_t)]; - pthread_t t; -} init_t; - -const init_t initial = {0}; - -pthread_t tid = initial.t; /* init tid to all zeroes */ - - -Example 2: A comparison function for pthread_t values - -typedef union { - unsigned char b[sizeof(pthread_t)]; - pthread_t t; -} pthcmp_t; - -int pthcmp(pthread_t left, pthread_t right) -{ - /* - * Compare two pthread handles in a way that imposes a repeatable but arbitrary - * ordering on them. - * I.e. given the same set of pthread_t handles the ordering should be the same - * each time but the order has no particular meaning other than that. E.g. - * the ordering does not imply the thread start sequence, or any other - * relationship between threads. - * - * Return values are: - * 1 : left is greater than right - * 0 : left is equal to right - * -1 : left is less than right - */ - int i; - pthcmp_t L, R; - L.t = left; - R.t = right; - for (i = 0; i < sizeof(pthread_t); i++) - { - if (L.b[i] > R.b[i]) - return 1; - else if (L.b[i] < R.b[i]) - return -1; - } - return 0; -} - -It has been pointed out that the C99 standard allows for the possibility that -integer types also may include padding bits, which could invalidate the above -method. This addition to C99 was specifically included after it was pointed -out that there was one, presumably not particularly well known, architecture -that included a padding bit in it's 32 bit integer type. See section 6.2.6.2 -of both the standard and the rationale, specifically the paragraph starting at -line 16 on page 43 of the rationale. - - -An aside - -Certain compilers, e.g. gcc and one of the IBM compilers, include a feature -extention: provided the union contains a member of the same type as the -object then the object may be cast to the union itself. - -We could use this feature to speed up the pthrcmp() function from example 2 -above by casting rather than assigning the pthread_t arguments to the union, e.g.: - -int pthcmp(pthread_t left, pthread_t right) -{ - /* - * Compare two pthread handles in a way that imposes a repeatable but arbitrary - * ordering on them. - * I.e. given the same set of pthread_t handles the ordering should be the same - * each time but the order has no particular meaning other than that. E.g. - * the ordering does not imply the thread start sequence, or any other - * relationship between threads. - * - * Return values are: - * 1 : left is greater than right - * 0 : left is equal to right - * -1 : left is less than right - */ - int i; - for (i = 0; i < sizeof(pthread_t); i++) - { - if (((pthcmp_t)left).b[i] > ((pthcmp_t)right).b[i]) - return 1; - else if (((pthcmp_t)left).b[i] < ((pthcmp_t)right).b[i]) - return -1; - } - return 0; -} - - -Result thus far - -We can't remove undefined bits if they are there in pthread_t already, but we have -attempted to render them inert for comparison and hashing functions by making them -consistent through assignment, copy and pass-by-value. - -Note: Hashing pthread_t values requires that all pthread_t variables be initialised -to the same value (usually all zeros) before being assigned a proper thread ID, i.e. -to ensure that any padding bits are zero, or at least the same value for all -pthread_t. Since all pthread_t values are generated by the library in the first -instance this need not be an application-level operation. - - -Conclusion - -I've attempted to resolve the multiple issues of type opacity and the possible -presence of undefined bits and bytes in pthread_t values, which prevent -applications from comparing or hashing pthread handles. - -Two complimentary partial solutions have been proposed, one an application-level -scheme to handle both scalar and aggregate pthread_t types equally, plus a -definition of pthread_t itself that neutralises padding bits and bytes by -coercing semantics out of the compiler to eliminate variations in the values of -padding bits. - -I have not provided any solution to the problem of handling extra values embedded -in pthread_t, e.g. debugging or trap information that an implementation is entitled -to include. Therefore none of this replaces the portability and flexibility of API -functions but what functions are needed? The threads standard is unlikely to -include new functions that can be implemented by a combination of existing features -and more generic functions (several references in the threads rationale suggest this). -Therefore I propose that the following function could replace the several functions -that have been suggested in conversations: - -pthread_t * pthread_normalize(pthread_t * handle); - -For most existing pthreads implementations this function, or macro, would reduce to -a no-op with zero call overhead. Most of the other desired operations on pthread_t -values (null, compare, hash, etc.) can be trivially derived from this and other -standard functions. +This file documents non-portable functions and other issues. + +Non-portable functions included in pthreads-win32 +------------------------------------------------- + +BOOL +pthread_win32_test_features_np(int mask) + + This routine allows an application to check which + run-time auto-detected features are available within + the library. + + The possible features are: + + PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE + Return TRUE if the native version of + InterlockedCompareExchange() is being used. + This feature is not meaningful in recent + library versions as MSVC builds only support + system implemented ICE. Note that all Mingw + builds use inlined asm versions of all the + Interlocked routines. + PTW32_ALERTABLE_ASYNC_CANCEL + Return TRUE is the QueueUserAPCEx package + QUSEREX.DLL is available and the AlertDrv.sys + driver is loaded into Windows, providing + alertable (pre-emptive) asyncronous threads + cancellation. If this feature returns FALSE + then the default async cancel scheme is in + use, which cannot cancel blocked threads. + + Features may be Or'ed into the mask parameter, in which case + the routine returns TRUE if any of the Or'ed features would + return TRUE. At this stage it doesn't make sense to Or features + but it may some day. + + +void * +pthread_timechange_handler_np(void *) + + To improve tolerance against operator or time service + initiated system clock changes. + + This routine can be called by an application when it + receives a WM_TIMECHANGE message from the system. At + present it broadcasts all condition variables so that + waiting threads can wake up and re-evaluate their + conditions and restart their timed waits if required. + + It has the same return type and argument type as a + thread routine so that it may be called directly + through pthread_create(), i.e. as a separate thread. + + Parameters + + Although a parameter must be supplied, it is ignored. + The value NULL can be used. + + Return values + + It can return an error EAGAIN to indicate that not + all condition variables were broadcast for some reason. + Otherwise, 0 is returned. + + If run as a thread, the return value is returned + through pthread_join(). + + The return value should be cast to an integer. + + +HANDLE +pthread_getw32threadhandle_np(pthread_t thread); + + Returns the win32 thread handle that the POSIX + thread "thread" is running as. + + Applications can use the win32 handle to set + win32 specific attributes of the thread. + +DWORD +pthread_getw32threadid_np (pthread_t thread) + + Returns the Windows native thread ID that the POSIX + thread "thread" is running as. + + Only valid when the library is built where + ! (defined(__MINGW64__) || defined(__MINGW32__)) || defined (__MSVCRT__) || defined (__DMC__) + and otherwise returns 0. + + +int +pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, int kind) + +int +pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, int *kind) + + These two routines are included for Linux compatibility + and are direct equivalents to the standard routines + pthread_mutexattr_settype + pthread_mutexattr_gettype + + pthread_mutexattr_setkind_np accepts the following + mutex kinds: + PTHREAD_MUTEX_FAST_NP + PTHREAD_MUTEX_ERRORCHECK_NP + PTHREAD_MUTEX_RECURSIVE_NP + + These are really just equivalent to (respectively): + PTHREAD_MUTEX_NORMAL + PTHREAD_MUTEX_ERRORCHECK + PTHREAD_MUTEX_RECURSIVE + + +int +pthread_delay_np (const struct timespec *interval) + + This routine causes a thread to delay execution for a specific period of time. + This period ends at the current time plus the specified interval. The routine + will not return before the end of the period is reached, but may return an + arbitrary amount of time after the period has gone by. This can be due to + system load, thread priorities, and system timer granularity. + + Specifying an interval of zero (0) seconds and zero (0) nanoseconds is + allowed and can be used to force the thread to give up the processor or to + deliver a pending cancellation request. + + This routine is a cancellation point. + + The timespec structure contains the following two fields: + + tv_sec is an integer number of seconds. + tv_nsec is an integer number of nanoseconds. + + Return Values + + If an error condition occurs, this routine returns an integer value + indicating the type of error. Possible return values are as follows: + + 0 Successful completion. + [EINVAL] The value specified by interval is invalid. + + +__int64 +pthread_getunique_np (pthread_t thr) + + Returns the unique number associated with thread thr. + The unique numbers are a simple way of positively identifying a thread when + pthread_t cannot be relied upon to identify the true thread instance. I.e. a + pthread_t value may be assigned to different threads throughout the life of a + process. + + Because pthreads4w (pthreads-win32) threads can be uniquely identified by their + pthread_t values this routine is provided only for source code compatibility. + + NOTE: if the library is re-initialised, i.e. by calling pthread_win32_process_detach_np() + followed by pthread_win32_process_attach_np(), then the unique number is reset along with + several other library global values. Library reinitialisation should not be required, + however, some older applications may still call these routines as they were once required to + do when statically linking the library. + +int +pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec *abstime) + +int +pthread_tryjoin_np (pthread_t thread, void **value_ptr) + + These function is added for compatibility with Linux. + + +int +pthread_num_processors_np (void) + + This routine (found on HPUX systems) returns the number of processors + in the system. This implementation actually returns the number of + processors available to the process, which can be a lower number + than the system's number, depending on the process's affinity mask. + + +BOOL +pthread_win32_process_attach_np (void); + +BOOL +pthread_win32_process_detach_np (void); + +BOOL +pthread_win32_thread_attach_np (void); + +BOOL +pthread_win32_thread_detach_np (void); + + These functions contain the code normally run via DllMain + when the library is used as a dll. As of version 2.9.0 of the + library, static builds using either MSC or GCC will call + pthread_win32_process_* automatically at application startup and + exit respectively. + + pthread_win32_thread_attach_np() is currently a no-op. + + pthread_win32_thread_detach_np() is not a no-op. It cleans up the + implicit pthread handle that is allocated to any thread not started + via pthread_create(). Such non-posix threads should call this routine + when they exit, or call pthread_exit() to both cleanup and exit. + + These functions invariably return TRUE except for + pthread_win32_process_attach_np() which will return FALSE + if pthreads-win32 initialisation fails. + + +int +pthread_attr_getaffinity_np (pthread_attr_t * attr, size_t cpusetsize, cpu_set_t * cpuset); + +int +pthread_attr_setaffinity_np (pthread_attr_t * attr, size_t cpusetsize, const cpu_set_t * cpuset); + +int +pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t * cpuset); + +int +pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, const cpu_set_t * cpuset); + + Manipulate the CPU affinity of threads. Compatibility with libgcc-based pthreads + implementations. + + +int +pthreadCancelableWait (HANDLE waitHandle); + +int +pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout); + + These two functions provide hooks into the pthread_cancel + mechanism that will allow you to wait on a Windows handle + and make it a cancellation point. Both functions block + until either the given w32 handle is signaled, or + pthread_cancel has been called. It is implemented using + WaitForMultipleObjects on 'waitHandle' and a manually + reset w32 event used to implement pthread_cancel. + + +Non-portable issues +------------------- + +Thread priority + + POSIX defines a single contiguous range of numbers that determine a + thread's priority. Win32 defines priority classes and priority + levels relative to these classes. Classes are simply priority base + levels that the defined priority levels are relative to such that, + changing a process's priority class will change the priority of all + of it's threads, while the threads retain the same relativity to each + other. + + A Win32 system defines a single contiguous monotonic range of values + that define system priority levels, just like POSIX. However, Win32 + restricts individual threads to a subset of this range on a + per-process basis. + + The following table shows the base priority levels for combinations + of priority class and priority value in Win32. + + Process Priority Class Thread Priority Level + ----------------------------------------------------------------- + 1 IDLE_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 HIGH_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 2 IDLE_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 3 IDLE_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 4 IDLE_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 4 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 5 IDLE_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 5 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 5 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 6 IDLE_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 6 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 6 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 7 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 7 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 7 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 8 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 8 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 8 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 8 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 9 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 9 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 9 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 10 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 10 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 11 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 11 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 11 HIGH_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 12 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 12 HIGH_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 13 HIGH_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 14 HIGH_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 IDLE_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 16 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 17 REALTIME_PRIORITY_CLASS -7 + 18 REALTIME_PRIORITY_CLASS -6 + 19 REALTIME_PRIORITY_CLASS -5 + 20 REALTIME_PRIORITY_CLASS -4 + 21 REALTIME_PRIORITY_CLASS -3 + 22 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 23 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 24 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 25 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 26 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 27 REALTIME_PRIORITY_CLASS 3 + 28 REALTIME_PRIORITY_CLASS 4 + 29 REALTIME_PRIORITY_CLASS 5 + 30 REALTIME_PRIORITY_CLASS 6 + 31 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + + Windows NT: Values -7, -6, -5, -4, -3, 3, 4, 5, and 6 are not supported. + + + As you can see, the real priority levels available to any individual + Win32 thread are non-contiguous. + + An application using pthreads-win32 should not make assumptions about + the numbers used to represent thread priority levels, except that they + are monotonic between the values returned by sched_get_priority_min() + and sched_get_priority_max(). E.g. Windows 95, 98, NT, 2000, XP make + available a non-contiguous range of numbers between -15 and 15, while + at least one version of WinCE (3.0) defines the minimum priority + (THREAD_PRIORITY_LOWEST) as 5, and the maximum priority + (THREAD_PRIORITY_HIGHEST) as 1. + + Internally, pthreads-win32 maps any priority levels between + THREAD_PRIORITY_IDLE and THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, + or between THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to + THREAD_PRIORITY_HIGHEST. Currently, this also applies to + REALTIME_PRIORITY_CLASSi even if levels -7, -6, -5, -4, -3, 3, 4, 5, and 6 + are supported. + + If it wishes, a Win32 application using pthreads-win32 can use the Win32 + defined priority macros THREAD_PRIORITY_IDLE through + THREAD_PRIORITY_TIME_CRITICAL. + + +The opacity of the pthread_t datatype +------------------------------------- +and possible solutions for portable null/compare/hash, etc +---------------------------------------------------------- + +Because pthread_t is an opague datatype an implementation is permitted to define +pthread_t in any way it wishes. That includes defining some bits, if it is +scalar, or members, if it is an aggregate, to store information that may be +extra to the unique identifying value of the ID. As a result, pthread_t values +may not be directly comparable. + +If you want your code to be portable you must adhere to the following contraints: + +1) Don't assume it is a scalar data type, e.g. an integer or pointer value. There +are several other implementations where pthread_t is also a struct. See our FAQ +Question 11 for our reasons for defining pthread_t as a struct. + +2) You must not compare them using relational or equality operators. You must use +the API function pthread_equal() to test for equality. + +3) Never attempt to reference individual members. + + +The problem + +Certain applications would like to be able to access only the 'pure' pthread_t +id values, primarily to use as keys into data structures to manage threads or +thread-related data, but this is not possible in a maximally portable and +standards compliant way for current POSIX threads implementations. + +For implementations that define pthread_t as a scalar, programmers often employ +direct relational and equality operators on pthread_t. This code will break when +ported to an implementation that defines pthread_t as an aggregate type. + +For implementations that define pthread_t as an aggregate, e.g. a struct, +programmers can use memcmp etc., but then face the prospect that the struct may +include alignment padding bytes or bits as well as extra implementation-specific +members that are not part of the unique identifying value. + +[While this is not currently the case for pthreads-win32, opacity also +means that an implementation is free to change the definition, which should +generally only require that applications be recompiled and relinked, not +rewritten.] + + +Doesn't the compiler take care of padding? + +The C89 and later standards only effectively guarantee element-by-element +equivalence following an assignment or pass by value of a struct or union, +therefore undefined areas of any two otherwise equivalent pthread_t instances +can still compare differently, e.g. attempting to compare two such pthread_t +variables byte-by-byte, e.g. memcmp(&t1, &t2, sizeof(pthread_t) may give an +incorrect result. In practice I'm reasonably confident that compilers routinely +also copy the padding bytes, mainly because assignment of unions would be far +too complicated otherwise. But it just isn't guarranteed by the standard. + +Illustration: + +We have two thread IDs t1 and t2 + +pthread_t t1, t2; + +In an application we create the threads and intend to store the thread IDs in an +ordered data structure (linked list, tree, etc) so we need to be able to compare +them in order to insert them initially and also to traverse. + +Suppose pthread_t contains undefined padding bits and our compiler copies our +pthread_t [struct] element-by-element, then for the assignment: + +pthread_t temp = t1; + +temp and t1 will be equivalent and correct but a byte-for-byte comparison such as +memcmp(&temp, &t1, sizeof(pthread_t)) == 0 may not return true as we expect because +the undefined bits may not have the same values in the two variable instances. + +Similarly if passing by value under the same conditions. + +If, on the other hand, the undefined bits are at least constant through every +assignment and pass-by-value then the byte-for-byte comparison +memcmp(&temp, &t1, sizeof(pthread_t)) == 0 will always return the expected result. +How can we force the behaviour we need? + + +Solutions + +Adding new functions to the standard API or as non-portable extentions is +the only reliable and portable way to provide the necessary operations. +Remember also that POSIX is not tied to the C language. The most common +functions that have been suggested are: + +pthread_null() +pthread_compare() +pthread_hash() + +A single more general purpose function could also be defined as a +basis for at least the last two of the above functions. + +First we need to list the freedoms and constraints with respect +to pthread_t so that we can be sure our solution is compatible with the +standard. + +What is known or may be deduced from the standard: +1) pthread_t must be able to be passed by value, so it must be a single object. +2) from (1) it must be copyable so cannot embed thread-state information, locks +or other volatile objects required to manage the thread it associates with. +3) pthread_t may carry additional information, e.g. for debugging or to manage +itself. +4) there is an implicit requirement that the size of pthread_t is determinable +at compile-time and size-invariant, because it must be able to copy the object +(i.e. through assignment and pass-by-value). Such copies must be genuine +duplicates, not merely a copy of a pointer to a common instance such as +would be the case if pthread_t were defined as an array. + + +Suppose we define the following function: + +/* This function shall return it's argument */ +pthread_t* pthread_normalize(pthread_t* thread); + +For scalar or aggregate pthread_t types this function would simply zero any bits +within the pthread_t that don't uniquely identify the thread, including padding, +such that client code can return consistent results from operations done on the +result. If the additional bits are a pointer to an associate structure then +this function would ensure that the memory used to store that associate +structure does not leak. After normalization the following compare would be +valid and repeatable: + +memcmp(pthread_normalize(&t1),pthread_normalize(&t2),sizeof(pthread_t)) + +Note 1: such comparisons are intended merely to order and sort pthread_t values +and allow them to index various data structures. They are not intended to reveal +anything about the relationships between threads, like startup order. + +Note 2: the normalized pthread_t is also a valid pthread_t that uniquely +identifies the same thread. + +Advantages: +1) In most existing implementations this function would reduce to a no-op that +emits no additional instructions, i.e after in-lining or optimisation, or if +defined as a macro: +#define pthread_normalise(tptr) (tptr) + +2) This single function allows an application to portably derive +application-level versions of any of the other required functions. + +3) It is a generic function that could enable unanticipated uses. + +Disadvantages: +1) Less efficient than dedicated compare or hash functions for implementations +that include significant extra non-id elements in pthread_t. + +2) Still need to be concerned about padding if copying normalized pthread_t. +See the later section on defining pthread_t to neutralise padding issues. + +Generally a pthread_t may need to be normalized every time it is used, +which could have a significant impact. However, this is a design decision +for the implementor in a competitive environment. An implementation is free +to define a pthread_t in a way that minimises or eliminates padding or +renders this function a no-op. + +Hazards: +1) Pass-by-reference directly modifies 'thread' so the application must +synchronise access or ensure that the pointer refers to a copy. The alternative +of pass-by-value/return-by-value was considered but then this requires two copy +operations, disadvantaging implementations where this function is not a no-op +in terms of speed of execution. This function is intended to be used in high +frequency situations and needs to be efficient, or at least not unnecessarily +inefficient. The alternative also sits awkwardly with functions like memcmp. + +2) [Non-compliant] code that uses relational and equality operators on +arithmetic or pointer style pthread_t types would need to be rewritten, but it +should be rewritten anyway. + + +C implementation of null/compare/hash functions using pthread_normalize(): + +/* In pthread.h */ +pthread_t* pthread_normalize(pthread_t* thread); + +/* In user code */ +/* User-level bitclear function - clear bits in loc corresponding to mask */ +void* bitclear (void* loc, void* mask, size_t count); + +typedef unsigned int hash_t; + +/* User-level hash function */ +hash_t hash(void* ptr, size_t count); + +/* + * User-level pthr_null function - modifies the origin thread handle. + * The concept of a null pthread_t is highly implementation dependent + * and this design may be far from the mark. For example, in an + * implementation "null" may mean setting a special value inside one + * element of pthread_t to mean "INVALID". However, if that value was zero and + * formed part of the id component then we may get away with this design. + */ +pthread_t* pthr_null(pthread_t* tp) +{ + /* + * This should have the same effect as memset(tp, 0, sizeof(pthread_t)) + * We're just showing that we can do it. + */ + void* p = (void*) pthread_normalize(tp); + return (pthread_t*) bitclear(p, p, sizeof(pthread_t)); +} + +/* + * Safe user-level pthr_compare function - modifies temporary thread handle copies + */ +int pthr_compare_safe(pthread_t thread1, pthread_t thread2) +{ + return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); +} + +/* + * Fast user-level pthr_compare function - modifies origin thread handles + */ +int pthr_compare_fast(pthread_t* thread1, pthread_t* thread2) +{ + return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); +} + +/* + * Safe user-level pthr_hash function - modifies temporary thread handle copy + */ +hash_t pthr_hash_safe(pthread_t thread) +{ + return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); +} + +/* + * Fast user-level pthr_hash function - modifies origin thread handle + */ +hash_t pthr_hash_fast(pthread_t thread) +{ + return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); +} + +/* User-level bitclear function - modifies the origin array */ +void* bitclear(void* loc, void* mask, size_t count) +{ + int i; + for (i=0; i < count; i++) { + (unsigned char) *loc++ &= ~((unsigned char) *mask++); + } +} + +/* Donald Knuth hash */ +hash_t hash(void* str, size_t count) +{ + hash_t hash = (hash_t) count; + unsigned int i = 0; + + for(i = 0; i < len; str++, i++) + { + hash = ((hash << 5) ^ (hash >> 27)) ^ (*str); + } + return hash; +} + +/* Example of advantage point (3) - split a thread handle into its id and non-id values */ +pthread_t id = thread, non-id = thread; +bitclear((void*) &non-id, (void*) pthread_normalize(&id), sizeof(pthread_t)); + + +A pthread_t type change proposal to neutralise the effects of padding + +Even if pthread_normalize() is available, padding is still a problem because +the standard only garrantees element-by-element equivalence through +copy operations (assignment and pass-by-value). So padding bit values can +still change randomly after calls to pthread_normalize(). + +[I suspect that most compilers take the easy path and always byte-copy anyway, +partly because it becomes too complex to do (e.g. unions that contain sub-aggregates) +but also because programmers can easily design their aggregates to minimise and +often eliminate padding]. + +How can we eliminate the problem of padding bytes in structs? Could +defining pthread_t as a union rather than a struct provide a solution? + +In fact, the Linux pthread.h defines most of it's pthread_*_t objects (but not +pthread_t itself) as unions, possibly for this and/or other reasons. We'll +borrow some element naming from there but the ideas themselves are well known +- the __align element used to force alignment of the union comes from K&R's +storage allocator example. + +/* Essentially our current pthread_t renamed */ +typedef struct { + struct thread_state_t * __p; + long __x; /* sequence counter */ +} thread_id_t; + +Ensuring that the last element in the above struct is a long ensures that the +overall struct size is a multiple of sizeof(long), so there should be no trailing +padding in this struct or the union we define below. +(Later we'll see that we can handle internal but not trailing padding.) + +/* New pthread_t */ +typedef union { + char __size[sizeof(thread_id_t)]; /* array as the first element */ + thread_id_t __tid; + long __align; /* Ensure that the union starts on long boundary */ +} pthread_t; + +This guarrantees that, during an assignment or pass-by-value, the compiler copies +every byte in our thread_id_t because the compiler guarrantees that the __size +array, which we have ensured is the equal-largest element in the union, retains +equivalence. + +This means that pthread_t values stored, assigned and passed by value will at least +carry the value of any undefined padding bytes along and therefore ensure that +those values remain consistent. Our comparisons will return consistent results and +our hashes of [zero initialised] pthread_t values will also return consistent +results. + +We have also removed the need for a pthread_null() function; we can initialise +at declaration time or easily create our own const pthread_t to use in assignments +later: + +const pthread_t null_tid = {0}; /* braces are required */ + +pthread_t t; +... +t = null_tid; + + +Note that we don't have to explicitly make use of the __size array at all. It's +there just to force the compiler behaviour we want. + + +Partial solutions without a pthread_normalize function + + +An application-level pthread_null and pthread_compare proposal +(and pthread_hash proposal by extention) + +In order to deal with the problem of scalar/aggregate pthread_t type disparity in +portable code I suggest using an old-fashioned union, e.g.: + +Contraints: +- there is no padding, or padding values are preserved through assignment and + pass-by-value (see above); +- there are no extra non-id values in the pthread_t. + + +Example 1: A null initialiser for pthread_t variables... + +typedef union { + unsigned char b[sizeof(pthread_t)]; + pthread_t t; +} init_t; + +const init_t initial = {0}; + +pthread_t tid = initial.t; /* init tid to all zeroes */ + + +Example 2: A comparison function for pthread_t values + +typedef union { + unsigned char b[sizeof(pthread_t)]; + pthread_t t; +} pthcmp_t; + +int pthcmp(pthread_t left, pthread_t right) +{ + /* + * Compare two pthread handles in a way that imposes a repeatable but arbitrary + * ordering on them. + * I.e. given the same set of pthread_t handles the ordering should be the same + * each time but the order has no particular meaning other than that. E.g. + * the ordering does not imply the thread start sequence, or any other + * relationship between threads. + * + * Return values are: + * 1 : left is greater than right + * 0 : left is equal to right + * -1 : left is less than right + */ + int i; + pthcmp_t L, R; + L.t = left; + R.t = right; + for (i = 0; i < sizeof(pthread_t); i++) + { + if (L.b[i] > R.b[i]) + return 1; + else if (L.b[i] < R.b[i]) + return -1; + } + return 0; +} + +It has been pointed out that the C99 standard allows for the possibility that +integer types also may include padding bits, which could invalidate the above +method. This addition to C99 was specifically included after it was pointed +out that there was one, presumably not particularly well known, architecture +that included a padding bit in it's 32 bit integer type. See section 6.2.6.2 +of both the standard and the rationale, specifically the paragraph starting at +line 16 on page 43 of the rationale. + + +An aside + +Certain compilers, e.g. gcc and one of the IBM compilers, include a feature +extention: provided the union contains a member of the same type as the +object then the object may be cast to the union itself. + +We could use this feature to speed up the pthrcmp() function from example 2 +above by casting rather than assigning the pthread_t arguments to the union, e.g.: + +int pthcmp(pthread_t left, pthread_t right) +{ + /* + * Compare two pthread handles in a way that imposes a repeatable but arbitrary + * ordering on them. + * I.e. given the same set of pthread_t handles the ordering should be the same + * each time but the order has no particular meaning other than that. E.g. + * the ordering does not imply the thread start sequence, or any other + * relationship between threads. + * + * Return values are: + * 1 : left is greater than right + * 0 : left is equal to right + * -1 : left is less than right + */ + int i; + for (i = 0; i < sizeof(pthread_t); i++) + { + if (((pthcmp_t)left).b[i] > ((pthcmp_t)right).b[i]) + return 1; + else if (((pthcmp_t)left).b[i] < ((pthcmp_t)right).b[i]) + return -1; + } + return 0; +} + + +Result thus far + +We can't remove undefined bits if they are there in pthread_t already, but we have +attempted to render them inert for comparison and hashing functions by making them +consistent through assignment, copy and pass-by-value. + +Note: Hashing pthread_t values requires that all pthread_t variables be initialised +to the same value (usually all zeros) before being assigned a proper thread ID, i.e. +to ensure that any padding bits are zero, or at least the same value for all +pthread_t. Since all pthread_t values are generated by the library in the first +instance this need not be an application-level operation. + + +Conclusion + +I've attempted to resolve the multiple issues of type opacity and the possible +presence of undefined bits and bytes in pthread_t values, which prevent +applications from comparing or hashing pthread handles. + +Two complimentary partial solutions have been proposed, one an application-level +scheme to handle both scalar and aggregate pthread_t types equally, plus a +definition of pthread_t itself that neutralises padding bits and bytes by +coercing semantics out of the compiler to eliminate variations in the values of +padding bits. + +I have not provided any solution to the problem of handling extra values embedded +in pthread_t, e.g. debugging or trap information that an implementation is entitled +to include. Therefore none of this replaces the portability and flexibility of API +functions but what functions are needed? The threads standard is unlikely to +include new functions that can be implemented by a combination of existing features +and more generic functions (several references in the threads rationale suggest this). +Therefore I propose that the following function could replace the several functions +that have been suggested in conversations: + +pthread_t * pthread_normalize(pthread_t * handle); + +For most existing pthreads implementations this function, or macro, would reduce to +a no-op with zero call overhead. Most of the other desired operations on pthread_t +values (null, compare, hash, etc.) can be trivially derived from this and other +standard functions. diff --git a/_ptw32.h b/_ptw32.h new file mode 100644 index 00000000..70ae1122 --- /dev/null +++ b/_ptw32.h @@ -0,0 +1,107 @@ +/* + * Module: _ptw32.h + * + * Purpose: + * Pthreads-win32 internal macros, to be shared by other headers + * comprising the pthreads-win32 package. + * + * -------------------------------------------------------------------------- + * + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2012, 2016, 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 + * + */ +#ifndef __PTW32_H +#define __PTW32_H + +#if defined __GNUC__ +# pragma GCC system_header +# if ! defined __declspec +# error "Please upgrade your GNU compiler to one that supports __declspec." +# endif +#endif + +#if defined (__cplusplus) +# define __PTW32_BEGIN_C_DECLS extern "C" { +# define __PTW32_END_C_DECLS } +#else +# define __PTW32_BEGIN_C_DECLS +# define __PTW32_END_C_DECLS +#endif + +#if defined (PTW32_STATIC_LIB) && _MSC_VER >= 1400 +# undef PTW32_STATIC_LIB +# define PTW32_STATIC_TLSLIB +#endif + +/* When building the library, you should define PTW32_BUILD so that + * the variables/functions are exported correctly. When using the library, + * do NOT define PTW32_BUILD, and then the variables/functions will + * be imported correctly. + * + * FIXME: Used defined feature test macros, such as PTW32_STATIC_LIB, (and + * maybe even PTW32_BUILD), should be renamed with one initial underscore; + * internally defined macros, such as PTW32_DLLPORT, should be renamed with + * two initial underscores ... perhaps __PTW32_DECLSPEC is nicer anyway? + */ +#if defined PTW32_STATIC_LIB || defined PTW32_STATIC_TLSLIB +# define PTW32_DLLPORT + +#elif defined PTW32_BUILD +# define PTW32_DLLPORT __declspec (dllexport) +#else +# define PTW32_DLLPORT /*__declspec (dllimport)*/ +#endif + +#ifndef PTW32_CDECL +/* FIXME: another internal macro; should have two initial underscores; + * Nominally, we prefer to use __cdecl calling convention for all our + * functions, but we map it through this macro alias to facilitate the + * possible choice of alternatives; for example: + */ +# ifdef _OPEN_WATCOM_SOURCE + /* The Open Watcom C/C++ compiler uses a non-standard default calling + * convention, (similar to __fastcall), which passes function arguments + * in registers, unless the __cdecl convention is explicitly specified + * in exposed function prototypes. + * + * Our preference is to specify the __cdecl convention for all calls, + * even though this could slow Watcom code down slightly. If you know + * that the Watcom compiler will be used to build both the DLL and your + * application, then you may #define _OPEN_WATCOM_SOURCE, so disabling + * the forced specification of __cdecl for all function declarations; + * remember that this must be defined consistently, for both the DLL + * build, and the application build. + */ +# define PTW32_CDECL +# else +# define PTW32_CDECL __cdecl +# endif +#endif + +#endif /* !__PTW32_H */ diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 00000000..8561e862 --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,119 @@ +## aclocal.m4 +## -------------------------------------------------------------------------- +## +## Pthreads-win32 - POSIX Threads Library for Win32 +## Copyright(C) 1998 John E. Bossom +## Copyright(C) 1999-2012, 2016, Pthreads-win32 contributors +## +## The current list of contributors is contained +## in the file CONTRIBUTORS included with the source +## code distribution. The list can also be seen at the +## following World Wide Web location: +## http://sources.redhat.com/pthreads-win32/contributors.html +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 2 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library in the file COPYING.LIB; +## if not, write to the Free Software Foundation, Inc., +## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +## +# +# PTW32_AC_CHECK_TYPEDEF( TYPENAME, [HEADER] ) +# -------------------------------------------- +# Set HAVE_TYPENAME in config.h, if either HEADER, or any default +# header which autoconf checks automatically, defines TYPENAME. +# +AC_DEFUN([PTW32_AC_CHECK_TYPEDEF],dnl +[m4_ifnblank([$2],[AC_CHECK_HEADERS_ONCE([$2])]) + AC_CHECK_TYPE([$1],dnl + [AC_DEFINE(AS_TR_CPP([HAVE_$1]),[1],[Define if your compiler knows about $1])],,dnl + [AC_INCLUDES_DEFAULT + m4_ifnblank([$2],[[ +#ifdef ]AS_TR_CPP([HAVE_$2])[ +# include <$2> +#endif +]])])dnl +]) + +# PTW32_AC_NEED_FUNC( WITNESS, FUNCNAME ) +# --------------------------------------- +# Add a WITNESS definition in config.h, if FUNCNAME is not provided +# by the standard library, and a replacement must be provided. +# +AC_DEFUN([PTW32_AC_NEED_FUNC],dnl +[AC_CHECK_FUNCS([$2],,[AC_DEFINE([$1],[1],[Define if you do not have $2])])dnl +]) + +# PTW32_AC_NEED_ERRNO +# ------------------- +# Check if the host provides the header, and supports the +# errno global symbol, otherwise, add a NEED_ERRNO request in config.h +# +AC_DEFUN([PTW32_AC_NEED_ERRNO],[dnl +AC_CHECK_HEADERS_ONCE([errno.h]) +AC_MSG_CHECKING([for errno]) +AC_LINK_IFELSE([AC_LANG_SOURCE([[ +#ifdef HAVE_ERRNO_H +# include +#endif +int main(){ return errno; } +]])],dnl +[AC_MSG_RESULT([yes])],dnl +[AC_DEFINE([NEED_ERRNO],[1],[Define if you do not have errno]) + AC_MSG_RESULT([no])dnl +]) +]) + +# PTW32_AC_CHECK_WINAPI_FUNC( FUNCNAME, ARGUMENTS, ... ) +# ------------------------------------------------------ +# Check if the WinAPI function FUNCNAME is available on the host; +# unlike __cdecl functions, which can be detected by AC_CHECK_FUNCS, +# WinAPI functions need a full argument list specification in the +# function call. (Additional 3rd and 4th arguments provide for +# qualification of the yes/no messages, respectively; they may +# be exploited, for example, to add config.h annotations). +# +AC_DEFUN([PTW32_AC_CHECK_WINAPI_FUNC], +[AC_MSG_CHECKING([for $1]) + AC_LINK_IFELSE([AC_LANG_SOURCE([[ +#include +int APIENTRY WinMain(HINSTANCE curr, HINSTANCE prev, LPSTR argv, int mode) +{ (void)($1($2)); return 0; } + ]])],dnl + [AC_MSG_RESULT([yes])$3], + [AC_MSG_RESULT([no])$4 + ]) +]) + +# PTW32_AC_NEED_WINAPI_FUNC( FUNCNAME, ARGUMENTS ) +# ------------------------------------------------ +# Check if WinAPI function FUNCNAME is available on the host; add a +# NEED_FUNCNAME annotation in config.h, if it is not. +# +AC_DEFUN([PTW32_AC_NEED_WINAPI_FUNC], +[PTW32_AC_CHECK_WINAPI_FUNC([$1],[$2],,dnl + [AC_DEFINE(AS_TR_CPP([NEED_$1]),[1],[Define if $1 is unsupported])dnl + ]) +]) + +# PTW32_AC_CHECK_CPU_AFFINITY +# --------------------------- +# Check if the host supports the GetProcessAffinityMask() WinAPI +# function; (all Windows versions since Win95 should, but WinCE may +# not). Add the HAVE_CPU_AFFINITY annotation in config.h, for hosts +# which do have this support. +# +AC_DEFUN([PTW32_AC_CHECK_CPU_AFFINITY], +[PTW32_AC_CHECK_WINAPI_FUNC([GetProcessAffinityMask],[NULL,NULL,NULL],dnl + [AC_DEFINE([HAVE_CPU_AFFINITY],[1],[Define if CPU_AFFINITY is supported])dnl + ]) +]) diff --git a/common.mk b/common.mk index c8752939..b564accb 100644 --- a/common.mk +++ b/common.mk @@ -153,7 +153,6 @@ STATIC_OBJS = \ sem_trywait.$(OBJEXT) \ sem_unlink.$(OBJEXT) \ sem_wait.$(OBJEXT) \ - signal.$(OBJEXT) \ w32_CancelableWait.$(OBJEXT) PTHREAD_SRCS = \ diff --git a/configure.ac b/configure.ac new file mode 100644 index 00000000..3c201b2d --- /dev/null +++ b/configure.ac @@ -0,0 +1,86 @@ +# configure.ac +# -------------------------------------------------------------------------- +# +# Pthreads-win32 - POSIX Threads Library for Win32 +# Copyright(C) 1998 John E. Bossom +# Copyright(C) 1999-2012, 2016, Pthreads-win32 contributors +# +# The current list of contributors is contained +# in the file CONTRIBUTORS included with the source +# code distribution. The list can also be seen at the +# following World Wide Web location: +# http://sources.redhat.com/pthreads-win32/contributors.html +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library in the file COPYING.LIB; +# if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +AC_INIT([pthreads-win32],[git]) +AC_CONFIG_HEADERS([config.h]) + +# Checks for build tools. +# +AC_PROG_CC +AC_PROG_CXX +AC_CHECK_TOOLS([AR],[ar],[ar]) +AC_CHECK_TOOLS([DLLTOOL],[dlltool],[dlltool]) +AC_CHECK_TOOLS([OBJDUMP],[objdump],[objdump]) +AC_CHECK_TOOLS([RC],[windres],[windres]) +AC_PROG_RANLIB + +# Autoconf doesn't normally guard config.h, but we prefer it so; +# this is also a convenient place to force HAVE_C_INLINE, because +# AC_C_INLINE makes it available, even if the build compiler does +# not normally support it. +# +AH_TOP(dnl +[#ifndef PTW32_CONFIG_H] +[#define PTW32_CONFIG_H]dnl +) +# FIXME: AC_C_INLINE defines 'inline' to work with any C compiler, +# whether or not it supports inline code expansion, but it does NOT +# define HAVE_C_INLINE; can we use this standard autoconf feature, +# without also needing to define HAVE_C_INLINE? +# +AC_C_INLINE +AH_BOTTOM([#define HAVE_C_INLINE]) +AH_BOTTOM([#endif]) + +# Checks for data types and structures. +# +PTW32_AC_CHECK_TYPEDEF([mode_t]) +PTW32_AC_CHECK_TYPEDEF([sigset_t],[signal.h]) +PTW32_AC_CHECK_TYPEDEF([struct timespec],[time.h]) + +# Checks for __cdecl functions. +# +PTW32_AC_NEED_ERRNO +PTW32_AC_NEED_FUNC([NEED_CALLOC],[calloc]) +PTW32_AC_NEED_FUNC([NEED_FTIME],[ftime]) +PTW32_AC_NEED_FUNC([NEED_CREATETHREAD],[_beginthreadex]) +PTW32_AC_CHECK_CPU_AFFINITY + +# WinAPI functions need a full argument list for detection. +# +PTW32_AC_NEED_WINAPI_FUNC([DuplicateHandle],[NULL,NULL,NULL,NULL,0,0,0]) + +# Checks for installation tools. +# +AC_PROG_MKDIR_P +AC_PROG_INSTALL + +# Build system generation, as configured. +# +AC_CONFIG_FILES([GNUmakefile tests/GNUmakefile]) +AC_OUTPUT diff --git a/implement.h b/implement.h index 2d8057e4..37312a4c 100644 --- a/implement.h +++ b/implement.h @@ -46,8 +46,10 @@ # define _WIN32_WINNT 0x0400 #endif -#include +#define WIN32_LEAN_AND_MEAN +#include +#include /* * In case windows.h doesn't define it (e.g. WinCE perhaps) */ @@ -55,6 +57,22 @@ typedef VOID (APIENTRY *PAPCFUNC)(DWORD dwParam); #endif +#ifdef __PTW32_H +/* FIXME: Previously specified in , this doesn't belong in + * a system header; relocated from there, to here. + */ +#if defined(__MINGW32__) || defined(__MINGW64__) +# define PTW32_CONFIG_MINGW +#endif +#if defined(_MSC_VER) +# if _MSC_VER < 1300 +# define PTW32_CONFIG_MSVC6 +# endif +# if _MSC_VER < 1400 +# define PTW32_CONFIG_MSVC7 +# endif +#endif +#endif /* * Designed to allow error values to be set and retrieved in builds where * MSCRT libraries are statically linked to DLLs. @@ -89,17 +107,55 @@ static void ptw32_set_errno(int err) { errno = err; SetLastError(err); } # endif #endif +#ifdef HAVE_ERRNO_H +#include +#else +#include "need_errno.h" +#endif /* * note: ETIMEDOUT is correctly defined in winsock.h */ #include - /* * In case ETIMEDOUT hasn't been defined above somehow. */ #if !defined(ETIMEDOUT) # define ETIMEDOUT 10060 /* This is the value in winsock.h. */ #endif +#if 1 +/* FIXME: Several systems may not define some error numbers; + * defining those which are likely to be missing here will let + * us complete the library builds, but we really need some way + * to deliver these to client applications. + */ +#if !defined(ENOTSUP) +# define ENOTSUP 48 /* This is the value in Solaris. */ +#endif + +#if !defined(ETIMEDOUT) +# define ETIMEDOUT 10060 /* Same as WSAETIMEDOUT */ +#endif + +#if !defined(ENOSYS) +# define ENOSYS 140 /* Semi-arbitrary value */ +#endif + +#if !defined(EDEADLK) +# if defined(EDEADLOCK) +# define EDEADLK EDEADLOCK +# else +# define EDEADLK 36 /* This is the value in MSVC. */ +# endif +#endif + +/* POSIX 2008 - related to robust mutexes */ +#if !defined(EOWNERDEAD) +# define EOWNERDEAD 43 +#endif +#if !defined(ENOTRECOVERABLE) +# define ENOTRECOVERABLE 44 +#endif +#endif #if !defined(malloc) # include diff --git a/install-sh b/install-sh new file mode 100644 index 00000000..e9de2384 --- /dev/null +++ b/install-sh @@ -0,0 +1,251 @@ +#!/bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + chmodcmd="" + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff --git a/manual/PortabilityIssues.html b/manual/PortabilityIssues.html index 8741641b..9c1b0d07 100644 --- a/manual/PortabilityIssues.html +++ b/manual/PortabilityIssues.html @@ -1,726 +1,726 @@ - - - - - PORTABILITY ISSUES manual page - - - - - - - -

POSIX Threads for Windows – REFERENCE – -Pthreads-w32

-

Reference Index

-

Table of Contents

-

Name

-

Portability issues

-

Synopsis

-

Thread priority

-

Description

-

Thread priority

-

POSIX defines a single contiguous range -of numbers that determine a thread's priority. Win32 defines priority -classes - and priority levels relative to these classes. Classes are -simply priority base levels that the defined priority levels are -relative to such that, changing a process's priority class will -change the priority of all of it's threads, while the threads retain -the same relativity to each other.

-

A Win32 system defines a single -contiguous monotonic range of values that define system priority -levels, just like POSIX. However, Win32 restricts individual threads -to a subset of this range on a per-process basis.

-

The following table shows the base -priority levels for combinations of priority class and priority value -in Win32.

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-


-

-
-

Process Priority Class

-
-

Thread Priority Level

-
-

1

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_IDLE

-
-

1

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_IDLE

-
-

1

-
-

NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_IDLE

-
-

1

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_IDLE

-
-

1

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_IDLE

-
-

2

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

3

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

4

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

4

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

5

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

5

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

5

-
-

Background NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

6

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

6

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

6

-
-

Background NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

7

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

7

-
-

Background NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

7

-
-

Foreground NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

8

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

8

-
-

NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

8

-
-

Foreground NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

8

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

9

-
-

NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

9

-
-

Foreground NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

9

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

10

-
-

Foreground NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

10

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

11

-
-

Foreground NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

11

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

11

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

12

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

12

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

13

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

14

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

15

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

15

-
-

HIGH_PRIORITY_CLASS

-
-

THREAD_PRIORITY_TIME_CRITICAL

-
-

15

-
-

IDLE_PRIORITY_CLASS

-
-

THREAD_PRIORITY_TIME_CRITICAL

-
-

15

-
-

BELOW_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_TIME_CRITICAL

-
-

15

-
-

NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_TIME_CRITICAL

-
-

15

-
-

ABOVE_NORMAL_PRIORITY_CLASS

-
-

THREAD_PRIORITY_TIME_CRITICAL

-
-

16

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_IDLE

-
-

17

-
-

REALTIME_PRIORITY_CLASS

-
-

-7

-
-

18

-
-

REALTIME_PRIORITY_CLASS

-
-

-6

-
-

19

-
-

REALTIME_PRIORITY_CLASS

-
-

-5

-
-

20

-
-

REALTIME_PRIORITY_CLASS

-
-

-4

-
-

21

-
-

REALTIME_PRIORITY_CLASS

-
-

-3

-
-

22

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_LOWEST

-
-

23

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_BELOW_NORMAL

-
-

24

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_NORMAL

-
-

25

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_ABOVE_NORMAL

-
-

26

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_HIGHEST

-
-

27

-
-

REALTIME_PRIORITY_CLASS

-
-

3

-
-

28

-
-

REALTIME_PRIORITY_CLASS

-
-

4

-
-

29

-
-

REALTIME_PRIORITY_CLASS

-
-

5

-
-

30

-
-

REALTIME_PRIORITY_CLASS

-
-

6

-
-

31

-
-

REALTIME_PRIORITY_CLASS

-
-

THREAD_PRIORITY_TIME_CRITICAL

-
-
-

Windows NT: Values -7, -6, -5, -4, -3, 3, -4, 5, and 6 are not supported.

-

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

-

An application using Pthreads-w32 should -not make assumptions about the numbers used to represent thread -priority levels, except that they are monotonic between the values -returned by sched_get_priority_min() and sched_get_priority_max(). -E.g. Windows 95, 98, NT, 2000, XP make available a non-contiguous -range of numbers between -15 and 15, while at least one version of -WinCE (3.0) defines the minimum priority (THREAD_PRIORITY_LOWEST) as -5, and the maximum priority (THREAD_PRIORITY_HIGHEST) as 1.

-

Internally, pthreads-win32 maps any -priority levels between THREAD_PRIORITY_IDLE and -THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, or between -THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to -THREAD_PRIORITY_HIGHEST. Currently, this also applies to -REALTIME_PRIORITY_CLASS even if levels -7, -6, -5, -4, -3, 3, 4, 5, -and 6 are supported.

-

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

-

Author

-

Ross Johnson for use with Pthreads-w32.

-

See also

-



-

-
-

Table of Contents

- - + + + + + PORTABILITY ISSUES manual page + + + + + + + +

POSIX Threads for Windows – REFERENCE – +Pthreads-w32

+

Reference Index

+

Table of Contents

+

Name

+

Portability issues

+

Synopsis

+

Thread priority

+

Description

+

Thread priority

+

POSIX defines a single contiguous range +of numbers that determine a thread's priority. Win32 defines priority +classes - and priority levels relative to these classes. Classes are +simply priority base levels that the defined priority levels are +relative to such that, changing a process's priority class will +change the priority of all of it's threads, while the threads retain +the same relativity to each other.

+

A Win32 system defines a single +contiguous monotonic range of values that define system priority +levels, just like POSIX. However, Win32 restricts individual threads +to a subset of this range on a per-process basis.

+

The following table shows the base +priority levels for combinations of priority class and priority value +in Win32.

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+


+

+
+

Process Priority Class

+
+

Thread Priority Level

+
+

1

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_IDLE

+
+

1

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_IDLE

+
+

1

+
+

NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_IDLE

+
+

1

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_IDLE

+
+

1

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_IDLE

+
+

2

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

3

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

4

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

4

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

5

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

5

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

5

+
+

Background NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

6

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

6

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

6

+
+

Background NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

7

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

7

+
+

Background NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

7

+
+

Foreground NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

8

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

8

+
+

NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

8

+
+

Foreground NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

8

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

9

+
+

NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

9

+
+

Foreground NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

9

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

10

+
+

Foreground NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

10

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

11

+
+

Foreground NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

11

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

11

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

12

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

12

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

13

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

14

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

15

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

15

+
+

HIGH_PRIORITY_CLASS

+
+

THREAD_PRIORITY_TIME_CRITICAL

+
+

15

+
+

IDLE_PRIORITY_CLASS

+
+

THREAD_PRIORITY_TIME_CRITICAL

+
+

15

+
+

BELOW_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_TIME_CRITICAL

+
+

15

+
+

NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_TIME_CRITICAL

+
+

15

+
+

ABOVE_NORMAL_PRIORITY_CLASS

+
+

THREAD_PRIORITY_TIME_CRITICAL

+
+

16

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_IDLE

+
+

17

+
+

REALTIME_PRIORITY_CLASS

+
+

-7

+
+

18

+
+

REALTIME_PRIORITY_CLASS

+
+

-6

+
+

19

+
+

REALTIME_PRIORITY_CLASS

+
+

-5

+
+

20

+
+

REALTIME_PRIORITY_CLASS

+
+

-4

+
+

21

+
+

REALTIME_PRIORITY_CLASS

+
+

-3

+
+

22

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_LOWEST

+
+

23

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_BELOW_NORMAL

+
+

24

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_NORMAL

+
+

25

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_ABOVE_NORMAL

+
+

26

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_HIGHEST

+
+

27

+
+

REALTIME_PRIORITY_CLASS

+
+

3

+
+

28

+
+

REALTIME_PRIORITY_CLASS

+
+

4

+
+

29

+
+

REALTIME_PRIORITY_CLASS

+
+

5

+
+

30

+
+

REALTIME_PRIORITY_CLASS

+
+

6

+
+

31

+
+

REALTIME_PRIORITY_CLASS

+
+

THREAD_PRIORITY_TIME_CRITICAL

+
+
+

Windows NT: Values -7, -6, -5, -4, -3, 3, +4, 5, and 6 are not supported.

+

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

+

An application using Pthreads-w32 should +not make assumptions about the numbers used to represent thread +priority levels, except that they are monotonic between the values +returned by sched_get_priority_min() and sched_get_priority_max(). +E.g. Windows 95, 98, NT, 2000, XP make available a non-contiguous +range of numbers between -15 and 15, while at least one version of +WinCE (3.0) defines the minimum priority (THREAD_PRIORITY_LOWEST) as +5, and the maximum priority (THREAD_PRIORITY_HIGHEST) as 1.

+

Internally, pthreads-win32 maps any +priority levels between THREAD_PRIORITY_IDLE and +THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, or between +THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to +THREAD_PRIORITY_HIGHEST. Currently, this also applies to +REALTIME_PRIORITY_CLASS even if levels -7, -6, -5, -4, -3, 3, 4, 5, +and 6 are supported.

+

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

+

Author

+

Ross Johnson for use with Pthreads-w32.

+

See also

+



+

+
+

Table of Contents

+ + \ No newline at end of file diff --git a/manual/pthreadCancelableWait.html b/manual/pthreadCancelableWait.html index fbfc249f..61a1f6a5 100644 --- a/manual/pthreadCancelableWait.html +++ b/manual/pthreadCancelableWait.html @@ -1,93 +1,93 @@ - - - - - PTHREADCANCELLABLEWAIT(3) manual page - - - - - - - -

POSIX Threads for Windows – REFERENCE – -Pthreads-w32

-

Reference Index

-

Table of Contents

-

Name

-

pthreadCancelableTimedWait, -pthreadCancelableWait – provide cancellation hooks for user -Win32 routines

-

Synopsis

-

#include <pthread.h> -

-

int pthreadCancelableTimedWait (HANDLE waitHandle, -DWORD timeout);

-

int pthreadCancelableWait (HANDLE waitHandle);

-

Description

-

These two functions provide hooks into the pthread_cancel() -mechanism that will allow you to wait on a Windows handle and make it -a cancellation point. Both functions block until either the given -Win32 HANDLE is signalled, or pthread_cancel() -has been called. They are implemented using WaitForMultipleObjects -on waitHandle and the manually reset Win32 event handle that -is the target of pthread_cancel(). -These routines may be called from Win32 native threads but -pthread_cancel() will -require that thread's POSIX thread ID that the thread must retrieve -using pthread_self().

-

pthreadCancelableTimedWait is the timed version that will -return with the code ETIMEDOUT if the interval timeout -milliseconds elapses before waitHandle is signalled.

-

Cancellation

-

These routines allow routines that block on Win32 HANDLEs to be -cancellable via pthread_cancel().

-

Return Value

-



-

-

Errors

-

The pthreadCancelableTimedWait function returns the -following error code on error: -

-
-
ETIMEDOUT -
-
-

-The interval timeout milliseconds elapsed before waitHandle -was signalled.

-

Author

-

Ross Johnson for use with Pthreads-w32.

-

See also

-

pthread_cancel(), -pthread_self()

-
-

Table of Contents

- - + + + + + PTHREADCANCELLABLEWAIT(3) manual page + + + + + + + +

POSIX Threads for Windows – REFERENCE – +Pthreads-w32

+

Reference Index

+

Table of Contents

+

Name

+

pthreadCancelableTimedWait, +pthreadCancelableWait – provide cancellation hooks for user +Win32 routines

+

Synopsis

+

#include <pthread.h> +

+

int pthreadCancelableTimedWait (HANDLE waitHandle, +DWORD timeout);

+

int pthreadCancelableWait (HANDLE waitHandle);

+

Description

+

These two functions provide hooks into the pthread_cancel() +mechanism that will allow you to wait on a Windows handle and make it +a cancellation point. Both functions block until either the given +Win32 HANDLE is signalled, or pthread_cancel() +has been called. They are implemented using WaitForMultipleObjects +on waitHandle and the manually reset Win32 event handle that +is the target of pthread_cancel(). +These routines may be called from Win32 native threads but +pthread_cancel() will +require that thread's POSIX thread ID that the thread must retrieve +using pthread_self().

+

pthreadCancelableTimedWait is the timed version that will +return with the code ETIMEDOUT if the interval timeout +milliseconds elapses before waitHandle is signalled.

+

Cancellation

+

These routines allow routines that block on Win32 HANDLEs to be +cancellable via pthread_cancel().

+

Return Value

+



+

+

Errors

+

The pthreadCancelableTimedWait function returns the +following error code on error: +

+
+
ETIMEDOUT +
+
+

+The interval timeout milliseconds elapsed before waitHandle +was signalled.

+

Author

+

Ross Johnson for use with Pthreads-w32.

+

See also

+

pthread_cancel(), +pthread_self()

+
+

Table of Contents

+ + \ No newline at end of file diff --git a/pthread.h b/pthread.h index bb6faf22..3c1b4c46 100644 --- a/pthread.h +++ b/pthread.h @@ -29,14 +29,16 @@ * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * */ - #if !defined( PTHREAD_H ) #define PTHREAD_H -/* - * See the README file for an explanation of the pthreads-win32 version - * numbering scheme and how the DLL is named etc. +/* See the README file for an explanation of the pthreads-win32 + * version numbering scheme and how the DLL is named etc. + * + * FIXME: consider moving this to <_ptw32.h>; maybe also add a + * leading underscore to the macro names. */ #define PTW32_VERSION 2,10,0,0 #define PTW32_VERSION_STRING "2, 10, 0, 0\0" @@ -84,39 +86,26 @@ */ #if !defined(RC_INVOKED) -#undef PTW32_LEVEL +#undef __PTW32_LEVEL +#undef __PTW32_LEVEL_MAX +#define __PTW32_LEVEL_MAX 3 -#if defined(_POSIX_SOURCE) -#define PTW32_LEVEL 0 /* Early POSIX */ -#endif +#include <_ptw32.h> -#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309 -#undef PTW32_LEVEL -#define PTW32_LEVEL 1 /* Include 1b, 1c and 1d */ -#endif +#if _POSIX_C_SOURCE >= 200112L /* POSIX.1-2001 and later */ +# define __PTW32_LEVEL __PTW32_LEVEL_MAX /* include everything */ -#if defined(INCLUDE_NP) -#undef PTW32_LEVEL -#define PTW32_LEVEL 2 /* Include Non-Portable extensions */ -#endif +#elif defined INCLUDE_NP /* earlier than POSIX.1-2001, but... */ +# define __PTW32_LEVEL 2 /* include non-portable extensions */ -#define PTW32_LEVEL_MAX 3 +#elif _POSIX_C_SOURCE >= 199309L /* POSIX.1-1993 */ +# define __PTW32_LEVEL 1 /* include 1b, 1c, and 1d */ -#if ( defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112 ) || !defined(PTW32_LEVEL) -#undef PTW32_LEVEL -#define PTW32_LEVEL PTW32_LEVEL_MAX /* Include everything */ -#endif +#elif defined _POSIX_SOURCE /* early POSIX */ +# define __PTW32_LEVEL 0 /* minimal support */ -#if defined(__MINGW32__) || defined(__MINGW64__) -# define PTW32_CONFIG_MINGW -#endif -#if defined(_MSC_VER) -# if _MSC_VER < 1300 -# define PTW32_CONFIG_MSVC6 -# endif -# if _MSC_VER < 1400 -# define PTW32_CONFIG_MSVC7 -# endif +#else /* unspecified support level */ +# define __PTW32_LEVEL __PTW32_LEVEL_MAX /* include everything anyway */ #endif /* @@ -191,143 +180,16 @@ * * ------------------------------------------------------------- */ - -/* Try to avoid including windows.h */ -#if defined(PTW32_CONFIG_MINGW) && defined(__cplusplus) -#define PTW32_INCLUDE_WINDOWS_H -#endif - -#if defined(PTW32_INCLUDE_WINDOWS_H) -#include -#endif - -/* - * Boolean values to make us independent of system includes. - */ -enum { +enum +{ /* Boolean values to make us independent of system includes. */ PTW32_FALSE = 0, PTW32_TRUE = (! PTW32_FALSE) }; -/* - * This is a duplicate of what is in the autoconf config.h, - * which is only used when building the pthread-win32 libraries. - */ - -#if !defined(PTW32_CONFIG_H) -# if defined(WINCE) -# define NEED_ERRNO -# define NEED_SEM -# elif defined(_UWIN) -# define HAVE_MODE_T -# define HAVE_STRUCT_TIMESPEC -# define HAVE_SIGNAL_H -# elif defined(__MINGW64__) -# define HAVE_STRUCT_TIMESPEC -# define HAVE_MODE_T -# elif defined(__MINGW32__) -# define HAVE_MODE_T -# elif defined(_MSC_VER) && _MSC_VER >= 1900 -# define HAVE_STRUCT_TIMESPEC -# endif -#endif - -#if !defined(NEED_FTIME) #include -#else /* NEED_FTIME */ -/* use native WIN32 time API */ -#endif /* NEED_FTIME */ - -#if defined(HAVE_SIGNAL_H) -#include -#endif - -#include - -#if PTW32_LEVEL >= PTW32_LEVEL_MAX -#if defined(NEED_ERRNO) -#include "need_errno.h" -#else -#include -#endif -#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */ - #include -/* - * Several systems don't define some error numbers. - */ -#if !defined(ENOTSUP) -# define ENOTSUP 48 /* This is the value in Solaris. */ -#endif - -#if !defined(ETIMEDOUT) -# define ETIMEDOUT 10060 /* Same as WSAETIMEDOUT */ -#endif - -#if !defined(ENOSYS) -# define ENOSYS 140 /* Semi-arbitrary value */ -#endif - -#if !defined(EDEADLK) -# if defined(EDEADLOCK) -# define EDEADLK EDEADLOCK -# else -# define EDEADLK 36 /* This is the value in MSVC. */ -# endif -#endif - -/* POSIX 2008 - related to robust mutexes */ -#if !defined(EOWNERDEAD) -# define EOWNERDEAD 43 -#endif -#if !defined(ENOTRECOVERABLE) -# define ENOTRECOVERABLE 44 -#endif - -/* - * To avoid including windows.h we define only those things that we - * actually need from it. - */ -#if !defined(PTW32_INCLUDE_WINDOWS_H) -#if !defined(HANDLE) -# define PTW32__HANDLE_DEF -# define HANDLE void * -#endif -#if !defined(DWORD) -# define PTW32__DWORD_DEF -# define DWORD unsigned long -#endif -#endif - -#if !defined(HAVE_STRUCT_TIMESPEC) -#define HAVE_STRUCT_TIMESPEC -#if !defined(_TIMESPEC_DEFINED) -#define _TIMESPEC_DEFINED -struct timespec { - time_t tv_sec; - long tv_nsec; -}; -#endif /* _TIMESPEC_DEFINED */ -#endif /* HAVE_STRUCT_TIMESPEC */ - -#if !defined(SIG_BLOCK) -#define SIG_BLOCK 0 -#endif /* SIG_BLOCK */ - -#if !defined(SIG_UNBLOCK) -#define SIG_UNBLOCK 1 -#endif /* SIG_UNBLOCK */ - -#if !defined(SIG_SETMASK) -#define SIG_SETMASK 2 -#endif /* SIG_SETMASK */ - -#if defined(__cplusplus) -extern "C" -{ -#endif /* __cplusplus */ - +__PTW32_BEGIN_C_DECLS /* * ------------------------------------------------------------- * @@ -420,45 +282,45 @@ extern "C" /* * POSIX Options */ -#undef _POSIX_THREADS -#define _POSIX_THREADS 200809L +#undef _POSIX_THREADS +#define _POSIX_THREADS 200809L -#undef _POSIX_READER_WRITER_LOCKS -#define _POSIX_READER_WRITER_LOCKS 200809L +#undef _POSIX_READER_WRITER_LOCKS +#define _POSIX_READER_WRITER_LOCKS 200809L -#undef _POSIX_SPIN_LOCKS -#define _POSIX_SPIN_LOCKS 200809L +#undef _POSIX_SPIN_LOCKS +#define _POSIX_SPIN_LOCKS 200809L -#undef _POSIX_BARRIERS -#define _POSIX_BARRIERS 200809L +#undef _POSIX_BARRIERS +#define _POSIX_BARRIERS 200809L -#undef _POSIX_THREAD_SAFE_FUNCTIONS -#define _POSIX_THREAD_SAFE_FUNCTIONS 200809L +#undef _POSIX_THREAD_SAFE_FUNCTIONS +#define _POSIX_THREAD_SAFE_FUNCTIONS 200809L -#undef _POSIX_THREAD_ATTR_STACKSIZE -#define _POSIX_THREAD_ATTR_STACKSIZE 200809L +#undef _POSIX_THREAD_ATTR_STACKSIZE +#define _POSIX_THREAD_ATTR_STACKSIZE 200809L -#undef _POSIX_ROBUST_MUTEXES -#define _POSIX_ROBUST_MUTEXES 200809L +#undef _POSIX_ROBUST_MUTEXES +#define _POSIX_ROBUST_MUTEXES 200809L /* * The following options are not supported */ -#undef _POSIX_THREAD_ATTR_STACKADDR -#define _POSIX_THREAD_ATTR_STACKADDR -1 +#undef _POSIX_THREAD_ATTR_STACKADDR +#define _POSIX_THREAD_ATTR_STACKADDR -1 -#undef _POSIX_THREAD_PRIO_INHERIT -#define _POSIX_THREAD_PRIO_INHERIT -1 +#undef _POSIX_THREAD_PRIO_INHERIT +#define _POSIX_THREAD_PRIO_INHERIT -1 -#undef _POSIX_THREAD_PRIO_PROTECT -#define _POSIX_THREAD_PRIO_PROTECT -1 +#undef _POSIX_THREAD_PRIO_PROTECT +#define _POSIX_THREAD_PRIO_PROTECT -1 /* TPS is not fully supported. */ -#undef _POSIX_THREAD_PRIORITY_SCHEDULING -#define _POSIX_THREAD_PRIORITY_SCHEDULING -1 +#undef _POSIX_THREAD_PRIORITY_SCHEDULING +#define _POSIX_THREAD_PRIORITY_SCHEDULING -1 -#undef _POSIX_THREAD_PROCESS_SHARED -#define _POSIX_THREAD_PROCESS_SHARED -1 +#undef _POSIX_THREAD_PROCESS_SHARED +#define _POSIX_THREAD_PROCESS_SHARED -1 /* @@ -493,76 +355,52 @@ extern "C" * (must be at least 32767) * */ -#undef _POSIX_THREAD_DESTRUCTOR_ITERATIONS +#undef _POSIX_THREAD_DESTRUCTOR_ITERATIONS #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 -#undef PTHREAD_DESTRUCTOR_ITERATIONS +#undef PTHREAD_DESTRUCTOR_ITERATIONS #define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS -#undef _POSIX_THREAD_KEYS_MAX +#undef _POSIX_THREAD_KEYS_MAX #define _POSIX_THREAD_KEYS_MAX 128 -#undef PTHREAD_KEYS_MAX +#undef PTHREAD_KEYS_MAX #define PTHREAD_KEYS_MAX _POSIX_THREAD_KEYS_MAX -#undef PTHREAD_STACK_MIN +#undef PTHREAD_STACK_MIN #define PTHREAD_STACK_MIN 0 -#undef _POSIX_THREAD_THREADS_MAX +#undef _POSIX_THREAD_THREADS_MAX #define _POSIX_THREAD_THREADS_MAX 64 - /* Arbitrary value */ -#undef PTHREAD_THREADS_MAX +/* Arbitrary value */ +#undef PTHREAD_THREADS_MAX #define PTHREAD_THREADS_MAX 2019 -#undef _POSIX_SEM_NSEMS_MAX +#undef _POSIX_SEM_NSEMS_MAX #define _POSIX_SEM_NSEMS_MAX 256 - /* Arbitrary value */ -#undef SEM_NSEMS_MAX +/* Arbitrary value */ +#undef SEM_NSEMS_MAX #define SEM_NSEMS_MAX 1024 -#undef _POSIX_SEM_VALUE_MAX +#undef _POSIX_SEM_VALUE_MAX #define _POSIX_SEM_VALUE_MAX 32767 -#undef SEM_VALUE_MAX +#undef SEM_VALUE_MAX #define SEM_VALUE_MAX INT_MAX -#if defined(__GNUC__) && !defined(__declspec) -# error Please upgrade your GNU compiler to one that supports __declspec. -#endif - -#if defined(PTW32_STATIC_LIB) && defined(_MSC_VER) && _MSC_VER >= 1400 -# undef PTW32_STATIC_LIB -# define PTW32_STATIC_TLSLIB -#endif - -/* - * When building the library, you should define PTW32_BUILD so that - * the variables/functions are exported correctly. When using the library, - * do NOT define PTW32_BUILD, and then the variables/functions will - * be imported correctly. - */ -#if defined(PTW32_STATIC_LIB) || defined(PTW32_STATIC_TLSLIB) -# define PTW32_DLLPORT -#elif defined(PTW32_BUILD) -# define PTW32_DLLPORT __declspec (dllexport) -# else -# define PTW32_DLLPORT __declspec (dllimport) -# endif - -#if defined(_UWIN) && PTW32_LEVEL >= PTW32_LEVEL_MAX +#if defined(_UWIN) && __PTW32_LEVEL >= __PTW32_LEVEL_MAX # include #else -/* - * Generic handle type - intended to extend uniqueness beyond +/* Generic handle type - intended to extend uniqueness beyond * that available with a simple pointer. It should scale for either * IA-32 or IA-64. */ -typedef struct { - void * p; /* Pointer to actual object */ - unsigned int x; /* Extra information - reuse count etc */ +typedef struct +{ void * p; /* Pointer to actual object */ + unsigned int x; /* Extra information - reuse count etc */ } ptw32_handle_t; typedef ptw32_handle_t pthread_t; @@ -589,53 +427,45 @@ typedef struct pthread_barrierattr_t_ * pthread_barrierattr_t; * ==================== */ -enum { -/* - * pthread_attr_{get,set}detachstate - */ +enum +{ /* pthread_attr_{get,set}detachstate + */ PTHREAD_CREATE_JOINABLE = 0, /* Default */ PTHREAD_CREATE_DETACHED = 1, - -/* - * pthread_attr_{get,set}inheritsched - */ + /* + * pthread_attr_{get,set}inheritsched + */ PTHREAD_INHERIT_SCHED = 0, PTHREAD_EXPLICIT_SCHED = 1, /* Default */ - -/* - * pthread_{get,set}scope - */ + /* + * pthread_{get,set}scope + */ PTHREAD_SCOPE_PROCESS = 0, PTHREAD_SCOPE_SYSTEM = 1, /* Default */ - -/* - * pthread_setcancelstate paramters - */ + /* + * pthread_setcancelstate paramters + */ PTHREAD_CANCEL_ENABLE = 0, /* Default */ PTHREAD_CANCEL_DISABLE = 1, - -/* - * pthread_setcanceltype parameters - */ + /* + * pthread_setcanceltype parameters + */ PTHREAD_CANCEL_ASYNCHRONOUS = 0, PTHREAD_CANCEL_DEFERRED = 1, /* Default */ - -/* - * pthread_mutexattr_{get,set}pshared - * pthread_condattr_{get,set}pshared - */ + /* + * pthread_mutexattr_{get,set}pshared + * pthread_condattr_{get,set}pshared + */ PTHREAD_PROCESS_PRIVATE = 0, PTHREAD_PROCESS_SHARED = 1, - -/* - * pthread_mutexattr_{get,set}robust - */ + /* + * pthread_mutexattr_{get,set}robust + */ PTHREAD_MUTEX_STALLED = 0, /* Default */ PTHREAD_MUTEX_ROBUST = 1, - -/* - * pthread_barrier_wait - */ + /* + * pthread_barrier_wait + */ PTHREAD_BARRIER_SERIAL_THREAD = -1 }; @@ -659,8 +489,7 @@ enum { #define PTHREAD_ONCE_INIT { PTW32_FALSE, 0, 0, 0} struct pthread_once_t_ -{ - int done; /* indicates if user function has been executed */ +{ int done; /* indicates if user function has been executed */ void * lock; int reserved1; int reserved2; @@ -695,8 +524,7 @@ struct pthread_once_t_ * Mutex types. */ enum -{ - /* Compatibility with LinuxThreads */ +{ /* Compatibility with LinuxThreads */ PTHREAD_MUTEX_FAST_NP, PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK_NP, @@ -724,8 +552,7 @@ typedef void (* PTW32_CDECL ptw32_cleanup_callback_t)(void *); #endif struct ptw32_cleanup_t -{ - ptw32_cleanup_callback_t routine; +{ ptw32_cleanup_callback_t routine; void *arg; struct ptw32_cleanup_t *prev; }; @@ -959,13 +786,13 @@ PTW32_DLLPORT void PTW32_CDECL pthread_testcancel (void); PTW32_DLLPORT int PTW32_CDECL pthread_once (pthread_once_t * once_control, void (PTW32_CDECL *init_routine) (void)); -#if PTW32_LEVEL >= PTW32_LEVEL_MAX +#if __PTW32_LEVEL >= __PTW32_LEVEL_MAX PTW32_DLLPORT ptw32_cleanup_t * PTW32_CDECL ptw32_pop_cleanup (int execute); PTW32_DLLPORT void PTW32_CDECL ptw32_push_cleanup (ptw32_cleanup_t * cleanup, ptw32_cleanup_callback_t routine, void *arg); -#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */ +#endif /* __PTW32_LEVEL >= __PTW32_LEVEL_MAX */ /* * Thread Specific Data Functions @@ -1143,7 +970,7 @@ PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_getpshared (const pthread_rwloc PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_setpshared (pthread_rwlockattr_t * attr, int pshared); -#if PTW32_LEVEL >= PTW32_LEVEL_MAX - 1 +#if __PTW32_LEVEL >= __PTW32_LEVEL_MAX - 1 /* * Signal Functions. Should be defined in but MSVC and MinGW32 @@ -1194,8 +1021,8 @@ PTW32_DLLPORT int PTW32_CDECL pthread_win32_thread_detach_np(void); * Features that are auto-detected at load/run time. */ PTW32_DLLPORT int PTW32_CDECL pthread_win32_test_features_np(int); -enum ptw32_features { - PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE = 0x0001, /* System provides it. */ +enum ptw32_features +{ PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE = 0x0001, /* System provides it. */ PTW32_ALERTABLE_ASYNC_CANCEL = 0x0002 /* Can cancel blocked threads. */ }; @@ -1209,18 +1036,18 @@ enum ptw32_features { */ PTW32_DLLPORT void * PTW32_CDECL pthread_timechange_handler_np(void *); -#endif /*PTW32_LEVEL >= PTW32_LEVEL_MAX - 1 */ +#endif /* __PTW32_LEVEL >= __PTW32_LEVEL_MAX - 1 */ -#if PTW32_LEVEL >= PTW32_LEVEL_MAX +#if __PTW32_LEVEL >= __PTW32_LEVEL_MAX /* * Returns the Win32 HANDLE for the POSIX thread. */ -PTW32_DLLPORT HANDLE PTW32_CDECL pthread_getw32threadhandle_np(pthread_t thread); +PTW32_DLLPORT void PTW32_CDECL *pthread_getw32threadhandle_np(pthread_t thread); /* * Returns the win32 thread ID for POSIX thread. */ -PTW32_DLLPORT DWORD PTW32_CDECL pthread_getw32threadid_np (pthread_t thread); +PTW32_DLLPORT unsigned long PTW32_CDECL pthread_getw32threadid_np (pthread_t thread); /* * Sets the POSIX thread name. If _MSC_VER is defined the name should be displayed by @@ -1254,11 +1081,11 @@ PTW32_DLLPORT int PTW32_CDECL pthread_attr_getname_np (pthread_attr_t * attr, ch * argument to TimedWait is simply passed to * WaitForMultipleObjects. */ -PTW32_DLLPORT int PTW32_CDECL pthreadCancelableWait (HANDLE waitHandle); -PTW32_DLLPORT int PTW32_CDECL pthreadCancelableTimedWait (HANDLE waitHandle, - DWORD timeout); +PTW32_DLLPORT int PTW32_CDECL pthreadCancelableWait (void *waitHandle); +PTW32_DLLPORT int PTW32_CDECL pthreadCancelableTimedWait (void *waitHandle, + unsigned long timeout); -#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */ +#endif /* __PTW32_LEVEL >= __PTW32_LEVEL_MAX */ /* * Declare a thread-safe errno for Open Watcom @@ -1331,15 +1158,15 @@ class ptw32_exception_exit : public ptw32_exception {}; #endif -#if PTW32_LEVEL >= PTW32_LEVEL_MAX +#if __PTW32_LEVEL >= __PTW32_LEVEL_MAX /* FIXME: This is only required if the library was built using SEH */ /* * Get internal SEH tag */ -PTW32_DLLPORT DWORD PTW32_CDECL ptw32_get_exception_services_code(void); +PTW32_DLLPORT unsigned long PTW32_CDECL ptw32_get_exception_services_code(void); -#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */ +#endif /* __PTW32_LEVEL >= __PTW32_LEVEL_MAX */ #if !defined(PTW32_BUILD) @@ -1404,19 +1231,10 @@ PTW32_DLLPORT DWORD PTW32_CDECL ptw32_get_exception_services_code(void); #endif /* ! PTW32_BUILD */ -#if defined(__cplusplus) -} /* End of extern "C" */ -#endif /* __cplusplus */ - -#if defined(PTW32__HANDLE_DEF) -# undef HANDLE -#endif -#if defined(PTW32__DWORD_DEF) -# undef DWORD -#endif +__PTW32_END_C_DECLS -#undef PTW32_LEVEL -#undef PTW32_LEVEL_MAX +#undef __PTW32_LEVEL +#undef __PTW32_LEVEL_MAX #endif /* ! RC_INVOKED */ diff --git a/pthread_getname_np.c b/pthread_getname_np.c index 2341c8a3..241a44fc 100644 --- a/pthread_getname_np.c +++ b/pthread_getname_np.c @@ -1,69 +1,69 @@ -/* - * pthread_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 "pthread.h" -#include "implement.h" - -int -pthread_getname_np(pthread_t thr, char *name, int len) -{ - ptw32_mcs_local_node_t threadLock; - ptw32_thread_t * tp; - int result; - - /* Validate the thread id. */ - result = pthread_kill (thr, 0); - if (0 != result) - { - return result; - } - - tp = (ptw32_thread_t *) thr.p; - - ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); - -#if defined(_MSC_VER) || ( defined(PTW32_CONFIG_MINGW) && defined(MINGW_HAS_SECURE_API) ) - result = strncpy_s(name, len, tp->name, len - 1); -#else - strncpy(name, tp->name, len - 1); - name[len - 1] = '\0'; -#endif - ptw32_mcs_lock_release (&threadLock); - - return result; -} +/* + * pthread_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 "pthread.h" +#include "implement.h" + +int +pthread_getname_np(pthread_t thr, char *name, int len) +{ + ptw32_mcs_local_node_t threadLock; + ptw32_thread_t * tp; + int result; + + /* Validate the thread id. */ + result = pthread_kill (thr, 0); + if (0 != result) + { + return result; + } + + tp = (ptw32_thread_t *) thr.p; + + ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); + +#if defined(_MSC_VER) || ( defined(PTW32_CONFIG_MINGW) && defined(MINGW_HAS_SECURE_API) ) + result = strncpy_s(name, len, tp->name, len - 1); +#else + strncpy(name, tp->name, len - 1); + name[len - 1] = '\0'; +#endif + ptw32_mcs_lock_release (&threadLock); + + return result; +} diff --git a/pthread_self.c b/pthread_self.c index 51c3e85d..71c4f542 100644 --- a/pthread_self.c +++ b/pthread_self.c @@ -65,7 +65,6 @@ pthread_self (void) */ { pthread_t self; - DWORD_PTR vThreadMask, vProcessMask, vSystemMask; pthread_t nil = {NULL, 0}; ptw32_thread_t * sp; @@ -134,6 +133,7 @@ pthread_self (void) * affinity to that of the process to get the old thread affinity, * then reset to the old affinity. */ + DWORD_PTR vThreadMask, vProcessMask, vSystemMask; if (GetProcessAffinityMask(GetCurrentProcess(), &vProcessMask, &vSystemMask)) { vThreadMask = SetThreadAffinityMask(sp->threadH, vProcessMask); diff --git a/pthread_setname_np.c b/pthread_setname_np.c index 45d6a586..edcced4f 100644 --- a/pthread_setname_np.c +++ b/pthread_setname_np.c @@ -1,185 +1,185 @@ -/* - * pthread_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(_MSC_VER) -#define MS_VC_EXCEPTION 0x406D1388 - -#pragma pack(push,8) -typedef struct tagTHREADNAME_INFO -{ - DWORD dwType; // Must be 0x1000. - LPCSTR szName; // Pointer to name (in user addr space). - DWORD dwThreadID; // Thread ID (-1=caller thread). - DWORD dwFlags; // Reserved for future use, must be zero. -} THREADNAME_INFO; -#pragma pack(pop) - -void -SetThreadName( DWORD dwThreadID, char* threadName) -{ - THREADNAME_INFO info; - info.dwType = 0x1000; - info.szName = threadName; - info.dwThreadID = dwThreadID; - info.dwFlags = 0; - - __try - { - RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR*)&info ); - } - __except(EXCEPTION_EXECUTE_HANDLER) - { - } -} -#endif - -#if defined(PTW32_COMPATIBILITY_BSD) || defined(PTW32_COMPATIBILITY_TRU64) -int -pthread_setname_np(pthread_t thr, const char *name, void *arg) -{ - ptw32_mcs_local_node_t threadLock; - int len; - int result; - char tmpbuf[PTHREAD_MAX_NAMELEN_NP]; - char * newname; - char * oldname; - ptw32_thread_t * tp; -#if defined(_MSC_VER) - DWORD Win32ThreadID; -#endif - - /* Validate the thread id. */ - result = pthread_kill (thr, 0); - if (0 != result) - { - return result; - } - - /* - * 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); - -#if defined(_MSC_VER) - Win32ThreadID = pthread_getw32threadid_np (thr); - if (Win32ThreadID) - { - SetThreadName(Win32ThreadID, newname); - } -#endif - - tp = (ptw32_thread_t *) thr.p; - - ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); - - oldname = tp->name; - tp->name = newname; - if (oldname) - { - free(oldname); - } - - ptw32_mcs_lock_release (&threadLock); - - return 0; -} -#else -int -pthread_setname_np(pthread_t thr, const char *name) -{ - ptw32_mcs_local_node_t threadLock; - int result; - char * newname; - char * oldname; - ptw32_thread_t * tp; -#if defined(_MSC_VER) - DWORD Win32ThreadID; -#endif - - /* Validate the thread id. */ - result = pthread_kill (thr, 0); - if (0 != result) - { - return result; - } - - newname = _strdup(name); - -#if defined(_MSC_VER) - Win32ThreadID = pthread_getw32threadid_np (thr); - - if (Win32ThreadID) - { - SetThreadName(Win32ThreadID, newname); - } -#endif - - tp = (ptw32_thread_t *) thr.p; - - ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); - - oldname = tp->name; - tp->name = newname; - if (oldname) - { - free(oldname); - } - - ptw32_mcs_lock_release (&threadLock); - - return 0; -} -#endif +/* + * pthread_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(_MSC_VER) +#define MS_VC_EXCEPTION 0x406D1388 + +#pragma pack(push,8) +typedef struct tagTHREADNAME_INFO +{ + DWORD dwType; // Must be 0x1000. + LPCSTR szName; // Pointer to name (in user addr space). + DWORD dwThreadID; // Thread ID (-1=caller thread). + DWORD dwFlags; // Reserved for future use, must be zero. +} THREADNAME_INFO; +#pragma pack(pop) + +void +SetThreadName( DWORD dwThreadID, char* threadName) +{ + THREADNAME_INFO info; + info.dwType = 0x1000; + info.szName = threadName; + info.dwThreadID = dwThreadID; + info.dwFlags = 0; + + __try + { + RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR*)&info ); + } + __except(EXCEPTION_EXECUTE_HANDLER) + { + } +} +#endif + +#if defined(PTW32_COMPATIBILITY_BSD) || defined(PTW32_COMPATIBILITY_TRU64) +int +pthread_setname_np(pthread_t thr, const char *name, void *arg) +{ + ptw32_mcs_local_node_t threadLock; + int len; + int result; + char tmpbuf[PTHREAD_MAX_NAMELEN_NP]; + char * newname; + char * oldname; + ptw32_thread_t * tp; +#if defined(_MSC_VER) + DWORD Win32ThreadID; +#endif + + /* Validate the thread id. */ + result = pthread_kill (thr, 0); + if (0 != result) + { + return result; + } + + /* + * 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); + +#if defined(_MSC_VER) + Win32ThreadID = pthread_getw32threadid_np (thr); + if (Win32ThreadID) + { + SetThreadName(Win32ThreadID, newname); + } +#endif + + tp = (ptw32_thread_t *) thr.p; + + ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); + + oldname = tp->name; + tp->name = newname; + if (oldname) + { + free(oldname); + } + + ptw32_mcs_lock_release (&threadLock); + + return 0; +} +#else +int +pthread_setname_np(pthread_t thr, const char *name) +{ + ptw32_mcs_local_node_t threadLock; + int result; + char * newname; + char * oldname; + ptw32_thread_t * tp; +#if defined(_MSC_VER) + DWORD Win32ThreadID; +#endif + + /* Validate the thread id. */ + result = pthread_kill (thr, 0); + if (0 != result) + { + return result; + } + + newname = _strdup(name); + +#if defined(_MSC_VER) + Win32ThreadID = pthread_getw32threadid_np (thr); + + if (Win32ThreadID) + { + SetThreadName(Win32ThreadID, newname); + } +#endif + + tp = (ptw32_thread_t *) thr.p; + + ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); + + oldname = tp->name; + tp->name = newname; + if (oldname) + { + free(oldname); + } + + ptw32_mcs_lock_release (&threadLock); + + return 0; +} +#endif diff --git a/sched.h b/sched.h index d8a71140..224abc06 100644 --- a/sched.h +++ b/sched.h @@ -39,246 +39,177 @@ */ #if !defined(_SCHED_H) #define _SCHED_H +#define __SCHED_H_SOURCED__ -#if defined(_MSC_VER) -# if _MSC_VER < 1300 -# define PTW32_CONFIG_MSVC6 -# endif -# if _MSC_VER < 1400 -# define PTW32_CONFIG_MSVC7 -# endif -#endif - -#undef PTW32_SCHED_LEVEL - -#if defined(_POSIX_SOURCE) -#define PTW32_SCHED_LEVEL 0 -/* Early POSIX */ -#endif - -#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309 -#undef PTW32_SCHED_LEVEL -#define PTW32_SCHED_LEVEL 1 -/* Include 1b, 1c and 1d */ -#endif - -#if defined(INCLUDE_NP) -#undef PTW32_SCHED_LEVEL -#define PTW32_SCHED_LEVEL 2 -/* Include Non-Portable extensions */ -#endif +#include <_ptw32.h> -#define PTW32_SCHED_LEVEL_MAX 3 - -#if ( defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112 ) || !defined(PTW32_SCHED_LEVEL) -#undef PTW32_SCHED_LEVEL -#define PTW32_SCHED_LEVEL PTW32_SCHED_LEVEL_MAX -/* Include everything */ -#endif +/* We need a typedef for pid_t, (and POSIX requires to + * define it, as it is defined in , but it does NOT + * sanction exposure of everything from ); there is + * no pid_t in Windows anyway, (except that MinGW does define it + * in their ), so just provide a suitable typedef, + * but note that we must do so cautiously, to avoid a typedef + * conflict if MinGW's is also #included: + */ +#if ! (defined __MINGW32__ && defined __have_typedef_pid_t) +typedef int pid_t; -#if defined(__GNUC__) && !defined(__declspec) -# error Please upgrade your GNU compiler to one that supports __declspec. +#if __GNUC__ < 4 +/* GCC v4.0 and later, (as used by MinGW), allows us to repeat a + * typedef, provided every duplicate is consistent; only set this + * multiple definition guard when we cannot be certain that it is + * permissable to repeat typedefs. + */ +#define __have_typedef_pid_t 1 #endif - -#if defined(PTW32_STATIC_LIB) && defined(_MSC_VER) && _MSC_VER >= 1400 -# undef PTW32_STATIC_LIB -# define PTW32_STATIC_TLSLIB #endif -/* - * When building the library, you should define PTW32_BUILD so that - * the variables/functions are exported correctly. When using the library, - * do NOT define PTW32_BUILD, and then the variables/functions will - * be imported correctly. - */ -#if defined(PTW32_STATIC_LIB) || defined(PTW32_STATIC_TLSLIB) -# define PTW32_DLLPORT -#elif defined(PTW32_BUILD) -# define PTW32_DLLPORT __declspec (dllexport) -# else -# define PTW32_DLLPORT __declspec (dllimport) -# endif - -/* - * The Open Watcom C/C++ compiler uses a non-standard calling convention - * that passes function args in registers unless __cdecl is explicitly specified - * in exposed function prototypes. - * - * We force all calls to cdecl even though this could slow Watcom code down - * slightly. If you know that the Watcom compiler will be used to build both - * the DLL and application, then you can probably define this as a null string. - * Remember that sched.h (this file) is used for both the DLL and application builds. +/* POSIX.1-1993 says that WILL expose all of */ -#if !defined(PTW32_CDECL) -# define PTW32_CDECL __cdecl -#endif - -/* - * This is a duplicate of what is in the autoconf config.h, - * which is only used when building the pthread-win32 libraries. +#undef __SCHED_H_SOURCED__ +#if _POSIX_C_SOURCE >= 200112L +/* POSIX.1-2001 and later revises this to say only that it MAY do so; + * only struct timespec, and associated time_t are actually required, + * so prefer to be selective; (MinGW.org's offers an option + * for selective #inclusion, when __SCHED_H_SOURCED__ is defined): */ - -#if !defined(PTW32_CONFIG_H) -# if defined(WINCE) -# define NEED_ERRNO -# define NEED_SEM -# endif -# if defined(__MINGW64__) -# define HAVE_STRUCT_TIMESPEC -# define HAVE_MODE_T -# elif defined(_UWIN) || defined(__MINGW32__) -# define HAVE_MODE_T -# endif +#define __SCHED_H_SOURCED__ +#define __need_struct_timespec +#define __need_time_t #endif - -/* - * +#include + +#if defined __MINGW64__ || _MSC_VER >= 1900 +/* These are known to define struct timespec, when has been + * #included, but may not, (probably don't), follow the convention of + * defining __struct_timespec_defined, as adopted by MinGW.org; for + * these cases, we unconditionally assume that struct timespec has + * been defined, otherwise, if MinGW.org's criterion has not been + * satisfied... */ - -#include - -#if PTW32_SCHED_LEVEL >= PTW32_SCHED_LEVEL_MAX -#if defined(NEED_ERRNO) -#include "need_errno.h" -#else -#include -#endif -#endif /* PTW32_SCHED_LEVEL >= PTW32_SCHED_LEVEL_MAX */ - -#if (defined(__MINGW64__) || defined(__MINGW32__)) || defined(_UWIN) -# if PTW32_SCHED_LEVEL >= PTW32_SCHED_LEVEL_MAX -/* For pid_t */ -# include -/* Required by Unix 98 */ -# include -# else - typedef int pid_t; -# endif -#else - typedef int pid_t; -#endif - -/* - * Microsoft VC++6.0 lacks these *_PTR types - */ -#if defined(_MSC_VER) && _MSC_VER < 1300 && !defined(PTW32_HAVE_DWORD_PTR) -typedef unsigned long ULONG_PTR; -typedef ULONG_PTR DWORD_PTR; +#elif ! defined __struct_timespec_defined +struct timespec +{ /* ...we fall back on this explicit definition. + */ + time_t tv_sec; + int tv_nsec; +}; #endif /* Thread scheduling policies */ -enum { - SCHED_OTHER = 0, +enum +{ SCHED_OTHER = 0, SCHED_FIFO, SCHED_RR, SCHED_MIN = SCHED_OTHER, SCHED_MAX = SCHED_RR }; -struct sched_param { - int sched_priority; +struct sched_param +{ int sched_priority; }; -/* - * CPU affinity +/* CPU affinity * * cpu_set_t: - * Considered opaque but cannot be an opaque pointer - * due to the need for compatibility with GNU systems - * and sched_setaffinity() et.al. which include the - * cpusetsize parameter "normally set to sizeof(cpu_set_t)". + * Considered opaque but cannot be an opaque pointer due to the need for + * compatibility with GNU systems and sched_setaffinity() et.al., which + * include the cpusetsize parameter "normally set to sizeof(cpu_set_t)". + * + * FIXME: These are GNU, and NOT specified by POSIX; maybe consider + * occluding them within a _GNU_SOURCE (or similar) feature test. */ - #define CPU_SETSIZE (sizeof(size_t)*8) - #define CPU_COUNT(setptr) (_sched_affinitycpucount(setptr)) - #define CPU_ZERO(setptr) (_sched_affinitycpuzero(setptr)) - #define CPU_SET(cpu, setptr) (_sched_affinitycpuset((cpu),(setptr))) - #define CPU_CLR(cpu, setptr) (_sched_affinitycpuclr((cpu),(setptr))) - #define CPU_ISSET(cpu, setptr) (_sched_affinitycpuisset((cpu),(setptr))) -#define CPU_AND(destsetptr, srcset1ptr, srcset2ptr) (_sched_affinitycpuand((destsetptr),(srcset1ptr),(srcset2ptr))) +#define CPU_AND(destsetptr, srcset1ptr, srcset2ptr) \ + (_sched_affinitycpuand((destsetptr),(srcset1ptr),(srcset2ptr))) -#define CPU_OR(destsetptr, srcset1ptr, srcset2ptr) (_sched_affinitycpuor((destsetptr),(srcset1ptr),(srcset2ptr))) +#define CPU_OR(destsetptr, srcset1ptr, srcset2ptr) \ + (_sched_affinitycpuor((destsetptr),(srcset1ptr),(srcset2ptr))) -#define CPU_XOR(destsetptr, srcset1ptr, srcset2ptr) (_sched_affinitycpuxor((destsetptr),(srcset1ptr),(srcset2ptr))) +#define CPU_XOR(destsetptr, srcset1ptr, srcset2ptr) \ + (_sched_affinitycpuxor((destsetptr),(srcset1ptr),(srcset2ptr))) #define CPU_EQUAL(set1ptr, set2ptr) (_sched_affinitycpuequal((set1ptr),(set2ptr))) typedef union -{ - char cpuset[CPU_SETSIZE/8]; - size_t _align; +{ char cpuset[CPU_SETSIZE/8]; + size_t _align; } cpu_set_t; -#if defined(__cplusplus) -extern "C" -{ -#endif /* __cplusplus */ +__PTW32_BEGIN_C_DECLS PTW32_DLLPORT int PTW32_CDECL sched_yield (void); - PTW32_DLLPORT int PTW32_CDECL sched_get_priority_min (int policy); - PTW32_DLLPORT int PTW32_CDECL sched_get_priority_max (int policy); +PTW32_DLLPORT int PTW32_CDECL sched_getscheduler (pid_t pid); +/* FIXME: this declaration of sched_setscheduler() is NOT as prescribed + * by POSIX; it lacks const struct sched_param * as third argument. + */ PTW32_DLLPORT int PTW32_CDECL sched_setscheduler (pid_t pid, int policy); -PTW32_DLLPORT int PTW32_CDECL sched_getscheduler (pid_t pid); - -/* Compatibility with Linux - not standard */ +/* FIXME: In addition to the above five functions, POSIX also requires: + * + * int sched_getparam (pid_t, struct sched_param *); + * int sched_setparam (pid_t, const struct sched_param *); + * + * both of which are conspicuous by their absence here! + */ +/* Compatibility with Linux - not standard in POSIX + * FIXME: consider occluding within a _GNU_SOURCE (or similar) feature test. + */ PTW32_DLLPORT int PTW32_CDECL sched_setaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *mask); - PTW32_DLLPORT int PTW32_CDECL sched_getaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *mask); -/* - * Support routines and macros for cpu_set_t +/* Support routines and macros for cpu_set_t */ PTW32_DLLPORT int PTW32_CDECL _sched_affinitycpucount (const cpu_set_t *set); - PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuzero (cpu_set_t *pset); - PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuset (int cpu, cpu_set_t *pset); - PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuclr (int cpu, cpu_set_t *pset); - PTW32_DLLPORT int PTW32_CDECL _sched_affinitycpuisset (int cpu, const cpu_set_t *pset); -PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuand(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2); +PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuand +(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2); -PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuor(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2); +PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuor +(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2); -PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuxor(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2); +PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuxor +(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2); -PTW32_DLLPORT int PTW32_CDECL _sched_affinitycpuequal (const cpu_set_t *pset1, const cpu_set_t *pset2); +PTW32_DLLPORT int PTW32_CDECL _sched_affinitycpuequal +(const cpu_set_t *pset1, const cpu_set_t *pset2); -/* - * Note that this macro returns ENOTSUP rather than - * ENOSYS as might be expected. However, returning ENOSYS - * should mean that sched_get_priority_{min,max} are - * not implemented as well as sched_rr_get_interval. - * This is not the case, since we just don't support - * round-robin scheduling. Therefore I have chosen to - * return the same value as sched_setscheduler when - * SCHED_RR is passed to it. +/* Note that this macro returns ENOTSUP rather than ENOSYS, as + * might be expected. However, returning ENOSYS should mean that + * sched_get_priority_{min,max} are not implemented as well as + * sched_rr_get_interval. This is not the case, since we just + * don't support round-robin scheduling. Therefore I have chosen + * to return the same value as sched_setscheduler when SCHED_RR + * is passed to it. + * + * FIXME: POSIX requires this to be defined as a function; this + * macro implementation is permitted IN ADDITION to the function, + * but the macro alone is not POSIX compliant! Worse still, it + * imposes a requirement on the caller, to ensure that both the + * declaration of errno, and the definition of ENOTSUP, are in + * scope at point of call, (which it may wish to do anyway, but + * POSIX imposes no such constraint)! */ #define sched_rr_get_interval(_pid, _interval) \ ( errno = ENOTSUP, (int) -1 ) +__PTW32_END_C_DECLS -#if defined(__cplusplus) -} /* End of extern "C" */ -#endif /* __cplusplus */ - -#undef PTW32_SCHED_LEVEL -#undef PTW32_SCHED_LEVEL_MAX - -#endif /* !_SCHED_H */ - +#undef __SCHED_H_SOURCED__ +#endif /* !_SCHED_H */ diff --git a/sem_open.c b/sem_open.c index 60316e66..54c34eb1 100644 --- a/sem_open.c +++ b/sem_open.c @@ -55,9 +55,14 @@ #pragma warning( disable : 4100 ) #endif -int -sem_open (const char *name, int oflag, mode_t mode, unsigned int value) +sem_t +*sem_open (const char *name, int oflag, ...) { + /* Note: this is a POSIX.1b-1993 conforming stub; POSIX.1-2001 removed + * the requirement to provide this stub, and also removed the validity + * of ENOSYS as a resultant errno state; nevertheless, it makes sense + * to retain the POSIX.1b-1993 conforming behaviour here. + */ PTW32_SET_ERRNO(ENOSYS); - return -1; + return SEM_FAILED; } /* sem_open */ diff --git a/semaphore.h b/semaphore.h index b67845db..9c27de1f 100644 --- a/semaphore.h +++ b/semaphore.h @@ -11,7 +11,7 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2012, 2016, Pthreads-win32 contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -36,107 +36,60 @@ * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * */ #if !defined( SEMAPHORE_H ) #define SEMAPHORE_H -#undef PTW32_SEMAPHORE_LEVEL - -#if defined(_POSIX_SOURCE) -#define PTW32_SEMAPHORE_LEVEL 0 -/* Early POSIX */ -#endif - -#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309 -#undef PTW32_SEMAPHORE_LEVEL -#define PTW32_SEMAPHORE_LEVEL 1 -/* Include 1b, 1c and 1d */ -#endif - -#if defined(INCLUDE_NP) -#undef PTW32_SEMAPHORE_LEVEL -#define PTW32_SEMAPHORE_LEVEL 2 -/* Include Non-Portable extensions */ -#endif - -#define PTW32_SEMAPHORE_LEVEL_MAX 3 - -#if !defined(PTW32_SEMAPHORE_LEVEL) -#define PTW32_SEMAPHORE_LEVEL PTW32_SEMAPHORE_LEVEL_MAX -/* Include everything */ -#endif - -#if defined(__GNUC__) && ! defined (__declspec) -# error Please upgrade your GNU compiler to one that supports __declspec. -#endif - -#if defined(PTW32_STATIC_LIB) && defined(_MSC_VER) && _MSC_VER >= 1400 -# undef PTW32_STATIC_LIB -# define PTW32_STATIC_TLSLIB -#endif - -/* - * When building the library, you should define PTW32_BUILD so that - * the variables/functions are exported correctly. When using the library, - * do NOT define PTW32_BUILD, and then the variables/functions will - * be imported correctly. +/* FIXME: POSIX.1 says that _POSIX_SEMAPHORES should be defined + * in , not here; for later POSIX.1 versions, its value + * should match the corresponding _POSIX_VERSION number, but in + * the case of POSIX.1b-1993, the value is unspecified. + * + * Notwithstanding the above, since POSIX semaphores, (and indeed + * having any to #include), are not a standard feature + * on MS-Windows, it is convenient to retain this definition here; + * we may consider adding a hook, to make it selectively available + * for inclusion by , in those cases (e.g. MinGW) where + * is provided. */ -#if defined(PTW32_STATIC_LIB) || defined(PTW32_STATIC_TLSLIB) -# define PTW32_DLLPORT -#elif defined(PTW32_BUILD) -# define PTW32_DLLPORT __declspec (dllexport) -# else -# define PTW32_DLLPORT __declspec (dllimport) -# endif - -#if !defined(PTW32_CDECL) -# define PTW32_CDECL __cdecl -#endif +#define _POSIX_SEMAPHORES -/* - * This is a duplicate of what is in the autoconf config.h, - * which is only used when building the pthread-win32 libraries. +/* Internal macros, common to the public interfaces for various + * pthreads-win32 components, are defined in <_ptw32.h>; we must + * include them here. */ +#include <_ptw32.h> -#if !defined(PTW32_CONFIG_H) -# if defined(WINCE) -# define NEED_ERRNO -# define NEED_SEM -# endif -# if defined(__MINGW64__) -# define HAVE_STRUCT_TIMESPEC -# define HAVE_MODE_T -# elif defined(_UWIN) || defined(__MINGW32__) -# define HAVE_MODE_T -# endif -#endif - -/* - * +/* The sem_timedwait() function was added in POSIX.1-2001; it + * requires struct timespec to be defined, at least as a partial + * (a.k.a. incomplete) data type. Forward declare it as such, + * then include selectively, to acquire a complete + * definition, (if available). */ +struct timespec; +#define __need_struct_timespec +#include -#if PTW32_SEMAPHORE_LEVEL >= PTW32_SEMAPHORE_LEVEL_MAX -#if defined(NEED_ERRNO) -#include "need_errno.h" -#else -#include -#endif -#endif /* PTW32_SEMAPHORE_LEVEL >= PTW32_SEMAPHORE_LEVEL_MAX */ - -#define _POSIX_SEMAPHORES - -#if defined(__cplusplus) -extern "C" -{ -#endif /* __cplusplus */ - -#if !defined(HAVE_MODE_T) -typedef unsigned int mode_t; -#endif +/* The data type used to represent our semaphore implementation, + * as required by POSIX.1; FIXME: consider renaming the underlying + * structure tag, to avoid possible pollution of user namespace. + */ +typedef struct sem_t_ * sem_t; +/* POSIX.1b (and later) mandates SEM_FAILED as the value to be + * returned on failure of sem_open(); (our implementation is a + * stub, which will always return this). + */ +#define SEM_FAILED (sem_t *)(-1) -typedef struct sem_t_ * sem_t; +__PTW32_BEGIN_C_DECLS +/* Function prototypes: some are implemented as stubs, which + * always fail; (FIXME: identify them; also note that symbols + * PTW32_DLLPORT and PTW32_CDECL pollute user namespace; they + * should be renamed or eliminated, as noted in <_ptw32.h>). + */ PTW32_DLLPORT int PTW32_CDECL sem_init (sem_t * sem, int pshared, unsigned int value); @@ -155,10 +108,7 @@ PTW32_DLLPORT int PTW32_CDECL sem_post (sem_t * sem); PTW32_DLLPORT int PTW32_CDECL sem_post_multiple (sem_t * sem, int count); -PTW32_DLLPORT int PTW32_CDECL sem_open (const char * name, - int oflag, - mode_t mode, - unsigned int value); +PTW32_DLLPORT sem_t PTW32_CDECL *sem_open (const char *, int, ...); PTW32_DLLPORT int PTW32_CDECL sem_close (sem_t * sem); @@ -167,11 +117,6 @@ PTW32_DLLPORT int PTW32_CDECL sem_unlink (const char * name); PTW32_DLLPORT int PTW32_CDECL sem_getvalue (sem_t * sem, int * sval); -#if defined(__cplusplus) -} /* End of extern "C" */ -#endif /* __cplusplus */ - -#undef PTW32_SEMAPHORE_LEVEL -#undef PTW32_SEMAPHORE_LEVEL_MAX +__PTW32_END_C_DECLS #endif /* !SEMAPHORE_H */ diff --git a/tests/exit6.c b/tests/exit6.c index 969f63df..8a38463f 100644 --- a/tests/exit6.c +++ b/tests/exit6.c @@ -1,57 +1,57 @@ -/* - * exit6.c - * - * Created on: 14/05/2013 - * Author: ross - */ - -#include "test.h" -#ifndef _UWIN -#include -#endif - -#include -//#include - -static pthread_key_t key; -static int where; - -static unsigned __stdcall -start_routine(void * arg) -{ - int *val = (int *) malloc(4); - - where = 2; - //printf("start_routine: native thread\n"); - - *val = 48; - pthread_setspecific(key, val); - return 0; -} - -static void -key_dtor(void *arg) -{ - //printf("key_dtor: %d\n", *(int*)arg); - if (where == 2) - printf("Library has thread exit POSIX cleanup for native threads.\n"); - else - printf("Library has process exit POSIX cleanup for native threads.\n"); - free(arg); -} - -int main(int argc, char **argv) -{ - HANDLE hthread; - - where = 1; - pthread_key_create(&key, key_dtor); - hthread = (HANDLE)_beginthreadex(NULL, 0, start_routine, NULL, 0, NULL); - WaitForSingleObject(hthread, INFINITE); - CloseHandle(hthread); - where = 3; - pthread_key_delete(key); - - //printf("main: exiting\n"); - return 0; -} +/* + * exit6.c + * + * Created on: 14/05/2013 + * Author: ross + */ + +#include "test.h" +#ifndef _UWIN +#include +#endif + +#include +//#include + +static pthread_key_t key; +static int where; + +static unsigned __stdcall +start_routine(void * arg) +{ + int *val = (int *) malloc(4); + + where = 2; + //printf("start_routine: native thread\n"); + + *val = 48; + pthread_setspecific(key, val); + return 0; +} + +static void +key_dtor(void *arg) +{ + //printf("key_dtor: %d\n", *(int*)arg); + if (where == 2) + printf("Library has thread exit POSIX cleanup for native threads.\n"); + else + printf("Library has process exit POSIX cleanup for native threads.\n"); + free(arg); +} + +int main(int argc, char **argv) +{ + HANDLE hthread; + + where = 1; + pthread_key_create(&key, key_dtor); + hthread = (HANDLE)_beginthreadex(NULL, 0, start_routine, NULL, 0, NULL); + WaitForSingleObject(hthread, INFINITE); + CloseHandle(hthread); + where = 3; + pthread_key_delete(key); + + //printf("main: exiting\n"); + return 0; +} diff --git a/tests/join4.c b/tests/join4.c index cbe96d29..7ab23911 100644 --- a/tests/join4.c +++ b/tests/join4.c @@ -1,87 +1,87 @@ -/* - * 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; - void* result = (void*)-1; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; - - assert(pthread_create(&id, NULL, func, (void *)(size_t)999) == 0); - - /* - * Let thread start before we attempt to join it. - */ - Sleep(100); - - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - /* Test for pthread_timedjoin_np timeout */ - abstime.tv_sec += 1; - 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. + * + * + * -------------------------------------------------------------------------- + * + * 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; + void* result = (void*)-1; + PTW32_STRUCT_TIMEB currSysTime; + const DWORD NANOSEC_PER_MILLISEC = 1000000; + + assert(pthread_create(&id, NULL, func, (void *)(size_t)999) == 0); + + /* + * Let thread start before we attempt to join it. + */ + Sleep(100); + + PTW32_FTIME(&currSysTime); + + abstime.tv_sec = (long)currSysTime.time; + abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; + + /* Test for pthread_timedjoin_np timeout */ + abstime.tv_sec += 1; + 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; +} From b35e9f20ad4aca8c37e981e2225be416427ef4e3 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 31 Mar 2016 12:46:44 +1100 Subject: [PATCH 046/207] Conditionally define _TIMESPEC_DEFINED for MinGW32 --- sched.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sched.h b/sched.h index 224abc06..1637cd7e 100644 --- a/sched.h +++ b/sched.h @@ -89,6 +89,8 @@ typedef int pid_t; * satisfied... */ #elif ! defined __struct_timespec_defined +#ifndef _TIMESPEC_DEFINED +#define _TIMESPEC_DEFINED struct timespec { /* ...we fall back on this explicit definition. */ @@ -96,6 +98,7 @@ struct timespec int tv_nsec; }; #endif +#endif /* Thread scheduling policies */ @@ -118,7 +121,7 @@ struct sched_param * compatibility with GNU systems and sched_setaffinity() et.al., which * include the cpusetsize parameter "normally set to sizeof(cpu_set_t)". * - * FIXME: These are GNU, and NOT specified by POSIX; maybe consider + * FIXME: These are GNU, and NOT specified by POSIX; maybe consider * occluding them within a _GNU_SOURCE (or similar) feature test. */ #define CPU_SETSIZE (sizeof(size_t)*8) From 885326ac3376ae79b2c369389327b43ee96fe801 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 31 Mar 2016 12:56:07 +1100 Subject: [PATCH 047/207] Include errno.h but needs more work. --- tests/test.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test.h b/tests/test.h index 46454590..44ddddff 100644 --- a/tests/test.h +++ b/tests/test.h @@ -46,6 +46,10 @@ #include #include #include +/* + * FIXME: May not be available on all platforms. + */ +#include #define PTW32_THREAD_NULL_ID {NULL,0} From 514c1db8d1b2b0244c41802b130e621d4962301b Mon Sep 17 00:00:00 2001 From: rpj Date: Fri, 1 Apr 2016 18:56:14 +1100 Subject: [PATCH 048/207] Second attempt to push them to branch --- GNUmakefile.in | 400 +++++++++++++++++++++++++++++++++++++++++++ tests/GNUmakefile.in | 255 +++++++++++++++++++++++++++ 2 files changed, 655 insertions(+) create mode 100644 GNUmakefile.in create mode 100644 tests/GNUmakefile.in diff --git a/GNUmakefile.in b/GNUmakefile.in new file mode 100644 index 00000000..c5ece2bf --- /dev/null +++ b/GNUmakefile.in @@ -0,0 +1,400 @@ +# @configure_input@ +# -------------------------------------------------------------------------- +# +# Pthreads-win32 - POSIX Threads Library for Win32 +# Copyright(C) 1998 John E. Bossom +# Copyright(C) 1999,2012 Pthreads-win32 contributors +# +# The current list of contributors is contained +# in the file CONTRIBUTORS included with the source +# code distribution. The list can also be seen at the +# following World Wide Web location: +# http://sources.redhat.com/pthreads-win32/contributors.html +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library in the file COPYING.LIB; +# if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +PACKAGE = @PACKAGE_TARNAME@ +VERSION = @PACKAGE_VERSION@ + +DLL_VER = 2$(EXTRAVERSION) + +# See pthread.h and README for the description of version numbering. +DLL_VERD = $(DLL_VER)d + +srcdir = @srcdir@ +builddir = @builddir@ +VPATH = @srcdir@ + +# FIXME: Replace these path name references with autoconf standards. +DESTROOT = ../PTHREADS-BUILT +DLLDEST = $(DESTROOT)/bin +LIBDEST = $(DESTROOT)/lib +HDRDEST = $(DESTROOT)/include +# i.e. +# +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = ${DESTDIR}@bindir@ +includedir = ${DESTDIR}@includedir@ +libdir = ${DESTDIR}@libdir@ + +# FIXME: This is correct for a static library; a DLL import library +# should be called libpthread.dll.a, or some such. +DEST_LIB_NAME = libpthread + +# If Running MsysDTK +RM = rm -f +MV = mv -f +CP = cp -f +MKDIR = mkdir -p +ECHO = echo +TESTNDIR = test ! -d +TESTFILE = test -f +AND = && + +# If not. +#RM = erase +#MV = rename +#CP = copy +#MKDIR = mkdir +#ECHO = echo +#TESTNDIR = if exist +#TESTFILE = if exist +# AND = + +# For cross compiling use e.g. +# make CROSS=x86_64-w64-mingw32- clean GC-inlined +# FIXME: To be removed; autoconf handles this transparently; +# DO NOT use this non-standard feature. +#CROSS = + +CC = @CC@ +CXX = @CXX@ + +AR = @AR@ +DLLTOOL = @DLLTOOL@ +RANLIB = @RANLIB@ +RC = @RC@ +OD_PRIVATE = @OBJDUMP@ -p + +# Build for non-native architecture. E.g. "-m64" "-m32" etc. +# Not tested fully, needs gcc built with "--enable-multilib" +# Check your "gcc -v" output for the options used to build your gcc. +# You can set this as a shell variable or on the make comand line. +# You don't need to uncomment it here unless you want to hardwire +# a value. +#ARCH = + +# +# Look for targets that $(RC) (usually windres) supports then look at any object +# file just built to see which target the compiler used and set the $(RC) target +# to match it. +# +KNOWN_TARGETS := pe-% pei-% elf32-% elf64-% srec symbolsrec verilog tekhex binary ihex +SUPPORTED_TARGETS := $(filter $(KNOWN_TARGETS),$(shell $(RC) --help)) +RC_TARGET = --target $(firstword $(filter $(SUPPORTED_TARGETS),$(shell $(OD_PRIVATE) *.$(OBJEXT)))) + +OPT = $(CLEANUP) -O3 # -finline-functions -findirect-inlining +XOPT = + +RCFLAGS = --include-dir=${srcdir} +LFLAGS = $(ARCH) +# Uncomment this if config.h defines RETAIN_WSALASTERROR +# FIXME: autoconf (or GNU make) convention dictates that this should be +# LIBS (or LDLIBS); ideally, it should be set by configure. +#LFLAGS += -lws2_32 +# +# Uncomment this next to link the GCC/C++ runtime libraries statically +# (Be sure to read about these options and their associated caveats +# at http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html) +# +# NOTE 1: Doing this appears to break GCE:pthread_cleanup_*(), which +# relies on C++ class destructors being called when leaving scope. +# +# NOTE 2: If you do this DO NOT distribute your pthreads DLLs with +# the official filenaming, i.e. pthreadVC2.dll, etc. Instead, change DLL_VER +# above to "2slgcc" for example, to build "pthreadGC2slgcc.dll", etc. +# +# FIXME: in this case, convention would have us use LDFLAGS; once again, if +# we really want this, we should support it via a configure script option. +#LFLAGS += -static-libgcc -static-libstdc++ + +# ---------------------------------------------------------------------- +# The library can be built with some alternative behaviour to +# facilitate development of applications on Win32 that will be ported +# to other POSIX systems. Nothing definable here will make the library +# non-compliant, but applications that make assumptions that POSIX +# does not garrantee may fail or misbehave under some settings. +# +# PTW32_THREAD_ID_REUSE_INCREMENT +# Purpose: +# POSIX says that applications should assume that thread IDs can be +# recycled. However, Solaris and some other systems use a [very large] +# sequence number as the thread ID, which provides virtual uniqueness. +# Pthreads-win32 provides pseudo-unique IDs when the default increment +# (1) is used, but pthread_t is not a scalar type like Solaris's. +# +# Usage: +# Set to any value in the range: 0 <= value <= 2^wordsize +# +# Examples: +# Set to 0 to emulate non recycle-unique behaviour like Linux or *BSD. +# Set to 1 for recycle-unique thread IDs (this is the default). +# Set to some other +ve value to emulate smaller word size types +# (i.e. will wrap sooner). +# +#PTW32_FLAGS = "-DPTW32_THREAD_ID_REUSE_INCREMENT=0" +# +# ---------------------------------------------------------------------- + +GC_CFLAGS = $(PTW32_FLAGS) +GCE_CFLAGS = $(PTW32_FLAGS) -mthreads + +## Mingw +#MAKE ?= make +DEFS = @DEFS@ -DPTW32_BUILD +CFLAGS = $(OPT) $(XOPT) $(ARCH) -I. -I${srcdir} $(DEFS) -Wall + +OBJEXT = @OBJEXT@ +RESEXT = @OBJEXT@ + +include ${srcdir}/common.mk + +DLL_OBJS += $(RESOURCE_OBJS) +STATIC_OBJS += $(RESOURCE_OBJS) + +GCE_DLL = pthreadGCE$(DLL_VER).dll +GCED_DLL= pthreadGCE$(DLL_VERD).dll +GCE_LIB = libpthreadGCE$(DLL_VER).a +GCED_LIB= libpthreadGCE$(DLL_VERD).a + +GC_DLL = pthreadGC$(DLL_VER).dll +GCD_DLL = pthreadGC$(DLL_VERD).dll +GC_LIB = libpthreadGC$(DLL_VER).a +GCD_LIB = libpthreadGC$(DLL_VERD).a +GC_INLINED_STATIC_STAMP = libpthreadGC$(DLL_VER).inlined_static_stamp +GCD_INLINED_STATIC_STAMP = libpthreadGC$(DLL_VERD).inlined_static_stamp +GCE_INLINED_STATIC_STAMP = libpthreadGCE$(DLL_VER).inlined_static_stamp +GCED_INLINED_STATIC_STAMP = libpthreadGCE$(DLL_VERD).inlined_static_stamp +GC_SMALL_STATIC_STAMP = libpthreadGC$(DLL_VER).small_static_stamp +GCD_SMALL_STATIC_STAMP = libpthreadGC$(DLL_VERD).small_static_stamp +GCE_SMALL_STATIC_STAMP = libpthreadGCE$(DLL_VER).small_static_stamp +GCED_SMALL_STATIC_STAMP = libpthreadGCE$(DLL_VERD).small_static_stamp + +PTHREAD_DEF = pthread.def + +help: + @ echo "Run one of the following command lines:" + @ echo "$(MAKE) clean all (build targets GC, GCE, GC-static, GCE-static)" + @ echo "$(MAKE) clean all-tests (build and test all non-debug targets below)" + @ echo "$(MAKE) clean GC (to build the GNU C dll with C cleanup code)" + @ echo "$(MAKE) clean GC-debug (to build the GNU C debug dll with C cleanup code)" + @ echo "$(MAKE) clean GCE (to build the GNU C dll with C++ exception handling)" + @ echo "$(MAKE) clean GCE-debug (to build the GNU C debug dll with C++ exception handling)" + @ echo "$(MAKE) clean GC-static (to build the GNU C static lib with C cleanup code)" + @ echo "$(MAKE) clean GC-static-debug (to build the GNU C static debug lib with C cleanup code)" + @ echo "$(MAKE) clean GCE-static (to build the GNU C++ static lib with C++ cleanup code)" + @ echo "$(MAKE) clean GCE-static-debug (to build the GNU C++ static debug lib with C++ cleanup code)" + @ echo "$(MAKE) clean GC-small-static (to build the GNU C static lib with C cleanup code)" + @ echo "$(MAKE) clean GC-small-static-debug (to build the GNU C static debug lib with C cleanup code)" + @ echo "$(MAKE) clean GCE-small-static (to build the GNU C++ static lib with C++ cleanup code)" + @ echo "$(MAKE) clean GCE-small-static-debug (to build the GNU C++ static debug lib with C++ cleanup code)" + +all: + @ $(MAKE) clean GC + @ $(MAKE) clean GCE + @ $(MAKE) clean GC-static + @ $(MAKE) clean GCE-static + +TEST_ENV = PTW32_FLAGS="$(PTW32_FLAGS) -DNO_ERROR_DIALOGS" DLL_VER=$(DLL_VER) ARCH="$(ARCH)" + +all-tests: + $(MAKE) realclean GC-small-static + cd tests && $(MAKE) clean GC-small-static $(TEST_ENV) && $(MAKE) clean GCX-small-static $(TEST_ENV) + $(MAKE) realclean GCE-small-static + cd tests && $(MAKE) clean GCE-small-static $(TEST_ENV) + @ $(ECHO) "$@ completed successfully." + $(MAKE) realclean GC + cd tests && $(MAKE) clean GC $(TEST_ENV) && $(MAKE) clean GCX $(TEST_ENV) + $(MAKE) realclean GCE + cd tests && $(MAKE) clean GCE $(TEST_ENV) + $(MAKE) realclean GC-static + cd tests && $(MAKE) clean GC-static $(TEST_ENV) && $(MAKE) clean GCX-static $(TEST_ENV) + $(MAKE) realclean GCE-static + cd tests && $(MAKE) clean GCE-static $(TEST_ENV) + $(MAKE) realclean + +all-tests-cflags: + $(MAKE) all-tests PTW32_FLAGS="-Wall -Wextra" + @ $(ECHO) "$@ completed successfully." + +GC: + $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL) + +GC-debug: + $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_DLL) + +GCE: + $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL) + +GCE-debug: + $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_CXX -g -O0" $(GCED_DLL) + +GC-static: + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_INLINED_STATIC_STAMP) + +GC-static-debug: + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) + +GC-small-static: + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GC_SMALL_STATIC_STAMP) + +GC-small-static-debug: + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) + +GCE-static: + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_INLINED_STATIC_STAMP) + +GCE-static-debug: + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) + +GCE-small-static: + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_SMALL_STATIC_STAMP) + +GCE-small-static-debug: + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) + +tests: + @ cd tests + @ $(MAKE) auto + +# Very basic install. It assumes "realclean" was done just prior to build target if +# you want the installed $(DEVDEST_LIB_NAME) to match that build. + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +mkinstalldirs = @MKDIR_P@ $1 + +.PHONY: install installdirs install-headers +.PHONY: install-dlls install-lib-default install-libs-specific + +install: installdirs install-headers install-libs install-dlls + +installdirs: ${bindir} ${includedir} ${libdir} +${bindir} ${includedir} ${libdir}:; $(call mkinstalldirs,$@) + +install-dlls: $(wildcard ${builddir}/pthreadGC*.dll) + $(INSTALL_DATA) $^ ${bindir} + +install-libs: install-libs-specific +install-libs-specific: $(wildcard ${builddir}/libpthreadGC*.a) + $(INSTALL_DATA) $^ ${libdir} + +default_libs = $(wildcard $(addprefix $1,$(DLL_VER)$2 $(DLL_VERD)$2)) + +# FIXME: this is a ghastly, utterly non-deterministic hack; who knows +# what it's going to install as the default libpthread.a? Better to +# just explicitly make it a copy of libpthreadGC$(DLL_VER).a +install-libs: install-lib-default +install-lib-default: $(call default_libs,libpthreadGC,.a) +install-lib-default: $(call default_libs,libpthreadGCE,.a) + $(INSTALL_DATA) $(lastword $^) ${libdir}/$(DEST_LIB_NAME).a + +# FIXME: similarly, who knows what this will install? Once again, it +# would be better to explicitly install libpthread.dll.a as a copy of +# libpthreadGC$(DLL_VER).dll.a +install-libs: install-implib-default +install-implib-default: $(call default_libs,libpthreadGC,.dll.a) +install-implib-default: $(call default_libs,libpthreadGCE,.dll.a) + $(INSTALL_DATA) $(lastword $^) ${libdir}/$(DEST_LIB_NAME).dll.a + +install-headers: pthread.h sched.h semaphore.h + $(INSTALL_DATA) $^ ${includedir} + +%.pre: %.c + $(CC) -E -o $@ $(CFLAGS) $^ + +%.s: %.c + $(CC) -c $(CFLAGS) -DPTW32_BUILD_INLINED -Wa,-ahl $^ > $@ + +%.o: %.rc + $(RC) $(RC_TARGET) $(RCFLAGS) $(CLEANUP) -o $@ -i $< + +.SUFFIXES: .dll .rc .c .o + +.c.o:; $(CC) -c -o $@ $(CFLAGS) $(XC_FLAGS) $< + + +$(GC_DLL) $(GCD_DLL): $(DLL_OBJS) + $(CC) $(OPT) -shared -o $@ $^ $(LFLAGS) + $(DLLTOOL) -z pthread.def $^ + $(DLLTOOL) -k --dllname $@ --output-lib lib$@.a --def $(PTHREAD_DEF) + +$(GCE_DLL) $(GCED_DLL): $(DLL_OBJS) + $(CC) $(OPT) -mthreads -shared -o $@ $^ $(LFLAGS) + $(DLLTOOL) -z pthread.def $^ + $(DLLTOOL) -k --dllname $@ --output-lib lib$@.a --def $(PTHREAD_DEF) + +$(GC_INLINED_STATIC_STAMP) $(GCE_INLINED_STATIC_STAMP) $(GCD_INLINED_STATIC_STAMP) $(GCED_INLINED_STATIC_STAMP): $(DLL_OBJS) + $(RM) $(basename $@).a + $(AR) -rsv $(basename $@).a $^ + $(ECHO) touched > $@ + +$(GC_SMALL_STATIC_STAMP) $(GCE_SMALL_STATIC_STAMP) $(GCD_SMALL_STATIC_STAMP) $(GCED_SMALL_STATIC_STAMP): $(STATIC_OBJS) + $(RM) $(basename $@).a + $(AR) -rsv $(basename $@).a $^ + $(ECHO) touched > $@ + +clean: + -$(RM) *~ + -$(RM) *.i + -$(RM) *.s + -$(RM) *.o + -$(RM) *.obj + -$(RM) *.exe + -$(RM) *.manifest + -$(RM) $(PTHREAD_DEF) + +realclean: clean + -$(RM) lib*.a + -$(RM) *.lib + -$(RM) pthread*.dll + -$(RM) *_stamp + -$(RM) make.log.txt + -cd tests && $(MAKE) clean + +var_check_list = + +define var_check_target +var-check-$(1): + @for src in $($(1)); do \ + fgrep -q "\"$$$$src\"" $(2) && continue; \ + echo "$$$$src is in \$$$$($(1)), but not in $(2)"; \ + exit 1; \ + done + @grep '^# *include *".*\.c"' $(2) | cut -d'"' -f2 | while read src; do \ + echo " $($(1)) " | fgrep -q " $$$$src " && continue; \ + echo "$$$$src is in $(2), but not in \$$$$($(1))"; \ + exit 1; \ + done + @echo "$(1) <-> $(2): OK" + +var_check_list += var-check-$(1) +endef + +$(eval $(call var_check_target,PTHREAD_SRCS,pthread.c)) + +srcs-vars-check: $(var_check_list) diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in new file mode 100644 index 00000000..b050598e --- /dev/null +++ b/tests/GNUmakefile.in @@ -0,0 +1,255 @@ +# Makefile for the pthreads test suite. +# If all of the .pass files can be created, the test suite has passed. +# +# -------------------------------------------------------------------------- +# +# 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 +# +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ + +LOGFILE = testsuite.log + +builddir = @builddir@ +top_builddir = @top_builddir@ + +DLL_VER = 2$(EXTRAVERSION) + +CP = cp -f +MV = mv -f +RM = rm -f +CAT = cat +MKDIR = mkdir +ECHO = echo +TOUCH = $(ECHO) Passed > +TESTFILE = test -f +TESTDIR = test -d +AND = && + +# For cross compiling use e.g. +# # make CROSS=i386-mingw32msvc- clean GC +#CROSS = + +# For cross testing use e.g. +# # make RUN=wine CROSS=i386-mingw32msvc- clean GC +RUN = + +AR = $(CROSS)@AR@ +DLLTOOL = $(CROSS)@DLLTOOL@ +CC = $(CROSS)@CC@ +CXX = $(CROSS)@CXX@ +RANLIB = $(CROSS)@RANLIB@ + +# +# Mingw +# +XLIBS = +XXCFLAGS= +XXLIBS = +OPT = -O3 +DOPT = -g -O0 +CFLAGS = ${OPT} $(ARCH) -UNDEBUG -Wall $(XXCFLAGS) +LFLAGS = $(ARCH) $(XXLFLAGS) +# +# Uncomment this next to link the GCC/C++ runtime libraries statically +# (Be sure to read about these options and their associated caveats +# at http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html) +# +# NOTE 1: Doing this appears to break GCE:pthread_cleanup_*(), which +# relies on C++ class destructors being called when leaving scope. +# +# NOTE 2: If you do this DO NOT distribute your pthreads DLLs with +# the official filenaming, i.e. pthreadVC2.dll, etc. Instead, change DLL_VER +# above to "2slgcc" for example, to build "pthreadGC2slgcc.dll", etc. +# +#LFLAGS += -static-libgcc -static-libstdc++ +BUILD_DIR = .. +INCLUDES = -I ${top_srcdir} + +TEST = GC + +# Default lib version +GCX = GC$(DLL_VER) + +# Files we need to run the tests +# - paths are relative to pthreads build dir. +HDR = pthread.h semaphore.h sched.h +LIB = libpthread$(GCX).a +DLL = pthread$(GCX).dll +# The next path is relative to $BUILD_DIR +QAPC = # ../QueueUserAPCEx/User/quserex.dll + +include ${srcdir}/common.mk + +.INTERMEDIATE: $(ALL_KNOWN_TESTS:%=%.exe) $(BENCHTESTS:%=%.exe) +.SECONDARY: $(ALL_KNOWN_TESTS:%=%.exe) $(ALL_KNOWN_TESTS:%=%.pass) $(BENCHTESTS:%=%.exe) $(BENCHTESTS:%=%.bench) +.PRECIOUS: $(ALL_KNOWN_TESTS:%=%.exe) $(ALL_KNOWN_TESTS:%=%.pass) $(BENCHTESTS:%=%.exe) $(BENCHTESTS:%=%.bench) + +ASM = $(ALL_KNOWN_TESTS:%=%.s) +TESTS = $(ALL_KNOWN_TESTS) +BENCHRESULTS = $(BENCHTESTS:%=%.bench) + +# +# To build and run "foo.exe" and "bar.exe" only use, e.g.: +# make clean GC NO_DEPS=1 TESTS="foo bar" +# +# To build and run "foo.exe" and "bar.exe" and run all prerequisite tests +# use, e.g.: +# make clean GC TESTS="foo bar" +# +# Set TESTS to one or more tests. +# +ifndef NO_DEPS +include ${srcdir}/runorder.mk +endif + +help: + @ $(ECHO) "Run one of the following command lines:" + @ $(ECHO) "$(MAKE) clean GC (to test using GC dll with C (no EH) applications)" + @ $(ECHO) "$(MAKE) clean GCX (to test using GC dll with C++ (EH) applications)" + @ $(ECHO) "$(MAKE) clean GCE (to test using GCE dll with C++ (EH) applications)" + @ $(ECHO) "$(MAKE) clean GC-bench (to benchtest using GNU C dll with C cleanup code)" + @ $(ECHO) "$(MAKE) clean GC-debug (to test using GC dll with C (no EH) applications)" + @ $(ECHO) "$(MAKE) clean GC-static (to test using GC static lib with C (no EH) applications)" + @ $(ECHO) "$(MAKE) clean GC-static-debug (to test using GC static lib with C (no EH) applications)" + @ $(ECHO) "$(MAKE) clean GCE-static (to test using GC static lib with C (no EH) applications)" + @ $(ECHO) "$(MAKE) clean GCE-static-debug (to test using GC static lib with C (no EH) applications)" + @ $(ECHO) "$(MAKE) clean GCE-debug (to test using GCE dll with C++ (EH) applications)" + @ $(ECHO) "$(MAKE) clean GCX-static (to test using GC static lib with C++ applications)" + @ $(ECHO) "$(MAKE) clean GCX-static-debug (to test using GC static lib with C++ applications)" + @ $(ECHO) "$(MAKE) clean GCX-debug (to test using GCE dll with C++ (EH) applications)" + @ $(ECHO) "$(MAKE) clean GC TESTS="foo bar" (to build individual tests \"foo.c and bar.c\" with C and run using GC dll)" + +GC: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" allpassed + +GC-asm: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" all-asm + +GC-bench: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" all-bench + +GC-bench-debug: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" OPT="${DOPT}" all-bench + +GC-debug: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed + +GC-static GC-small-static: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + +GC-static-debug GC-small-static-debug: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + +GCE: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__CLEANUP_CXX" allpassed + +GCE-debug: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX" OPT="${DOPT}" allpassed + +GCE-static GCE-small-static: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + +GCE-static-debug GCE-small-static-debug: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + +GCX: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__CLEANUP_C" allpassed + +GCX-debug: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed + +GCX-static GCX-small-static: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + +GCX-static-debug GCX-small-static-debug: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + +all-asm: $(ASM) + @ $(ECHO) "ALL TESTS PASSED! Congratulations!" + +allpassed: $(HDR) $(LIB) $(DLL) $(QAPC) $(TESTS:%=%.pass) + @ $(ECHO) "ALL TESTS PASSED! Congratulations!" + +all-bench: $(HDR) $(LIB) $(DLL) $(QAPC) $(XXLIBS) $(BENCHRESULTS) + @ $(ECHO) "ALL BENCH TESTS COMPLETED." + +cancel9.exe: XLIBS = -lws2_32 + +%.pass: %.exe + @ $(ECHO) Running $(TEST) test \"$*\" | tee -a testsuite.log + @ (PATH=${top_builddir}:$$PATH $(RUN) ./$* \ + && { $(ECHO) Passed; $(TOUCH) $@; } || $(ECHO) FAILED) \ + 2>&1 | tee -a $(LOGFILE) + +%.bench: %.exe + @ $(ECHO) Running $(TEST) test \"$*\" | tee -a testsuite.log + @ (PATH=${top_builddir}:$$PATH $(RUN) ./$* \ + && { $(ECHO) Done; $(TOUCH) $@; } || $(ECHO) FAILED) \ + 2>&1 | tee -a $(LOGFILE) + +%.exe: %.c + $(CC) $(CFLAGS) $(INCLUDES) $(LFLAGS) -o $@ $< -L.. -lpthread$(GCX) $(XLIBS) $(XXLIBS) + +%.pre: %.c $(HDR) + $(CC) -E $(CFLAGS) -o $@ $< $(INCLUDES) + +%.s: %.c $(HDR) + @ $(ECHO) Compiling $@ + $(CC) -S $(CFLAGS) -o $@ $< $(INCLUDES) + +$(HDR) $(LIB) $(DLL) $(QAPC): $(LOGFILE) +# @ $(ECHO) Copying $(BUILD_DIR)/$@ +# @ $(TESTFILE) $(BUILD_DIR)/$@ $(AND) $(CP) $(BUILD_DIR)/$@ . + +.PHONY: $(LOGFILE) +$(LOGFILE):; > $@ + +benchlib.o: benchlib.c + @ $(ECHO) Compiling $@ + $(CC) -c $(CFLAGS) $< $(INCLUDES) + +clean: + - $(RM) *.dll + - $(RM) *.lib + - $(RM) pthread.h + - $(RM) semaphore.h + - $(RM) sched.h + - $(RM) *.a + - $(RM) *.e + - $(RM) *.i + - $(RM) *.o + - $(RM) *.s + - $(RM) *.so + - $(RM) *.obj + - $(RM) *.pdb + - $(RM) *.exe + - $(RM) *.manifest + - $(RM) *.pass + - $(RM) *.bench + - $(RM) *.log + From ec88c7a79d16a3dc533d84e54cdefdebec02bfc2 Mon Sep 17 00:00:00 2001 From: rpj Date: Fri, 1 Apr 2016 20:40:30 +1100 Subject: [PATCH 049/207] Post-patch tweaks. --- ChangeLog | 21 ++++++++++++++ _ptw32.h | 77 +++++++++++++++++++++++++++++++++++++++++++++++++ implement.h | 52 ++------------------------------- pthread.h | 31 +++++++++++--------- tests/ChangeLog | 9 ++++++ 5 files changed, 126 insertions(+), 64 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4b79e1d1..ca087a01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2016-02-29 Ross Johnson + + * _ptw32.h: Move more header stuff into here. + * pthread.h: Move stuff from here into _ptw32.h. + * implement.h: Likewise. + * sched.h (struct timespec): Wrap with extra condition check. + +2016-03-31 Keith Marshall + + * aclocal.m4: New from MinGW32 patches for autoconf. + * configure.ac: Likewise. + * GNUmakefile.in: Likewise. + * install-sh: Likewise. + * _ptw32.h: Likewise. + * implement.h: Patched. + * pthread.h: Patched. + * sched.h: Patched. + * sem_open.c: Patched. + * semaphore.h: Patched. + * pthread_self.c: Patched. + 2016-02-29 Ross Johnson * GNUmakefile (MINGW_HAVE_SECURE_API): Moved to config.h. Undefined diff --git a/_ptw32.h b/_ptw32.h index 70ae1122..ca42a82b 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -39,6 +39,19 @@ #ifndef __PTW32_H #define __PTW32_H +/* See the README file for an explanation of the pthreads-win32 + * version numbering scheme and how the DLL is named etc. + * + * FIXME: consider moving this to <_ptw32.h>; maybe also add a + * leading underscore to the macro names. + */ +#define PTW32_VERSION_MAJOR 2 +#define PTW32_VERSION_MINOR 10 +#define PTW32_VERSION_MICRO 0 +#define PTW32_VERION_BUILD 0 +#define PTW32_VERSION 2,10,0,0 +#define PTW32_VERSION_STRING "2, 10, 0, 0\0" + #if defined __GNUC__ # pragma GCC system_header # if ! defined __declspec @@ -104,4 +117,68 @@ # endif #endif +#ifdef HAVE_ERRNO_H +# include +#else +# include "need_errno.h" +#endif + +/* + * In case ETIMEDOUT hasn't been defined above somehow. + */ +#if !defined(ETIMEDOUT) + /* + * note: ETIMEDOUT is no longer defined in winsock.h + * WSAETIMEDOUT is so use its value. + */ +# include +# if defined(WSAETIMEDOUT) +# define ETIMEDOUT WSAETIMEDOUT +# else +# define ETIMEDOUT 10060 /* This is the value of WSAETIMEDOUT in winsock.h. */ +# endif +#endif + +/* + * Several systems may not define some error numbers; + * defining those which are likely to be missing here will let + * us complete the library builds. + */ +#if !defined(ENOTSUP) +# define ENOTSUP 48 /* This is the value in Solaris. */ +#endif + +#if !defined(ENOSYS) +# define ENOSYS 140 /* Semi-arbitrary value */ +#endif + +#if !defined(EDEADLK) +# if defined(EDEADLOCK) +# define EDEADLK EDEADLOCK +# else +# define EDEADLK 36 /* This is the value in MSVC. */ +# endif +#endif + +/* POSIX 2008 - related to robust mutexes */ +/* + * FIXME: These should be changed for version 3.0.0 onward (ABI change). + * 42 already conflicts with EILSEQ + */ +#if PTW32_VERSION_MAJOR > 2 +# if !defined(EOWNERDEAD) +# define EOWNERDEAD 1000 +# endif +# if !defined(ENOTRECOVERABLE) +# define ENOTRECOVERABLE 1001 +# endif +#else +# if !defined(EOWNERDEAD) +# define EOWNERDEAD 42 +# endif +# if !defined(ENOTRECOVERABLE) +# define ENOTRECOVERABLE 43 +# endif +#endif + #endif /* !__PTW32_H */ diff --git a/implement.h b/implement.h index 37312a4c..1f436a23 100644 --- a/implement.h +++ b/implement.h @@ -42,6 +42,8 @@ # error "config.h was not #included" #endif +#include <_ptw32.h> + #if !defined(_WIN32_WINNT) # define _WIN32_WINNT 0x0400 #endif @@ -107,56 +109,6 @@ static void ptw32_set_errno(int err) { errno = err; SetLastError(err); } # endif #endif -#ifdef HAVE_ERRNO_H -#include -#else -#include "need_errno.h" -#endif -/* - * note: ETIMEDOUT is correctly defined in winsock.h - */ -#include -/* - * In case ETIMEDOUT hasn't been defined above somehow. - */ -#if !defined(ETIMEDOUT) -# define ETIMEDOUT 10060 /* This is the value in winsock.h. */ -#endif -#if 1 -/* FIXME: Several systems may not define some error numbers; - * defining those which are likely to be missing here will let - * us complete the library builds, but we really need some way - * to deliver these to client applications. - */ -#if !defined(ENOTSUP) -# define ENOTSUP 48 /* This is the value in Solaris. */ -#endif - -#if !defined(ETIMEDOUT) -# define ETIMEDOUT 10060 /* Same as WSAETIMEDOUT */ -#endif - -#if !defined(ENOSYS) -# define ENOSYS 140 /* Semi-arbitrary value */ -#endif - -#if !defined(EDEADLK) -# if defined(EDEADLOCK) -# define EDEADLK EDEADLOCK -# else -# define EDEADLK 36 /* This is the value in MSVC. */ -# endif -#endif - -/* POSIX 2008 - related to robust mutexes */ -#if !defined(EOWNERDEAD) -# define EOWNERDEAD 43 -#endif -#if !defined(ENOTRECOVERABLE) -# define ENOTRECOVERABLE 44 -#endif -#endif - #if !defined(malloc) # include #endif diff --git a/pthread.h b/pthread.h index 3c1b4c46..9f6287d0 100644 --- a/pthread.h +++ b/pthread.h @@ -34,15 +34,6 @@ #if !defined( PTHREAD_H ) #define PTHREAD_H -/* See the README file for an explanation of the pthreads-win32 - * version numbering scheme and how the DLL is named etc. - * - * FIXME: consider moving this to <_ptw32.h>; maybe also add a - * leading underscore to the macro names. - */ -#define PTW32_VERSION 2,10,0,0 -#define PTW32_VERSION_STRING "2, 10, 0, 0\0" - /* There are three implementations of cancel cleanup. * Note that pthread.h is included in both application * compilation units and also internally for the library. @@ -81,6 +72,8 @@ #error ERROR [__FILE__, line __LINE__]: SEH is not supported for this compiler. #endif +#include <_ptw32.h> + /* * Stop here if we are being included by the resource compiler. */ @@ -90,8 +83,6 @@ #undef __PTW32_LEVEL_MAX #define __PTW32_LEVEL_MAX 3 -#include <_ptw32.h> - #if _POSIX_C_SOURCE >= 200112L /* POSIX.1-2001 and later */ # define __PTW32_LEVEL __PTW32_LEVEL_MAX /* include everything */ @@ -394,13 +385,25 @@ __PTW32_BEGIN_C_DECLS #if defined(_UWIN) && __PTW32_LEVEL >= __PTW32_LEVEL_MAX # include #else -/* Generic handle type - intended to extend uniqueness beyond - * that available with a simple pointer. It should scale for either - * IA-32 or IA-64. +/* Generic handle type - intended to provide the lifetime-uniqueness that + * a simple pointer can't. It should scale for either + * 32 or 64 bit systems. + * + * The constraint with this approach is that applications must + * strictly comply with POSIX, e.g. not assume scalar type, only + * compare pthread_t using the API function pthread_equal(), etc. + * + * Applications can use the element 'p' to compare, e.g. for sorting, + * but it will be up to the application to determine if handles are + * live or dead, or resurrected for an entirely new/different thread. */ typedef struct { void * p; /* Pointer to actual object */ +#if PTW32_VERSION_MAJOR > 2 + size_t x; /* Extra information - reuse count etc */ +#else unsigned int x; /* Extra information - reuse count etc */ +#endif } ptw32_handle_t; typedef ptw32_handle_t pthread_t; diff --git a/tests/ChangeLog b/tests/ChangeLog index 0c7d56cb..cd8b8661 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,12 @@ +2016-03-31 Ross Johnson + + * test.h: source errno.h + +2016-03-31 Keith Marshall + + * test.h: Patch for MinGW32 autoconf. + * GNUmakefile.in: New for autoconf. + 2015-11-01 Mark Smith * semaphore4t.c: Enhanced and additional testing of sub-millisecond From 49591001ed9e3a1048916f3a17179383636a6799 Mon Sep 17 00:00:00 2001 From: rpj Date: Fri, 1 Apr 2016 22:17:05 +1100 Subject: [PATCH 050/207] Changes to get MSVC builds working again after MinGW patches. --- ChangeLog | 4 +++- _ptw32.h | 3 +++ pthread.h | 6 ++++-- pthread_win32_attach_detach_np.c | 3 +++ semaphore.h | 2 +- tests/ChangeLog | 5 +++++ tests/Makefile | 2 +- 7 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index ca087a01..8f91bf85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,11 @@ -2016-02-29 Ross Johnson +2016-04-01 Ross Johnson * _ptw32.h: Move more header stuff into here. * pthread.h: Move stuff from here into _ptw32.h. * implement.h: Likewise. * sched.h (struct timespec): Wrap with extra condition check. + * pthread_win32_attach_detach.c: Source stdlib.h to define + _countof et. al. 2016-03-31 Keith Marshall diff --git a/_ptw32.h b/_ptw32.h index ca42a82b..32b14559 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -117,6 +117,9 @@ # endif #endif +#if ! defined(__MINGW32__) && ! defined(NEED_ERRNO) +# define HAVE_ERRNO_H +#endif #ifdef HAVE_ERRNO_H # include #else diff --git a/pthread.h b/pthread.h index 9f6287d0..1c38a5f2 100644 --- a/pthread.h +++ b/pthread.h @@ -180,7 +180,6 @@ enum #include #include -__PTW32_BEGIN_C_DECLS /* * ------------------------------------------------------------- * @@ -691,6 +690,7 @@ struct ptw32_cleanup_t #endif /* __CLEANUP_SEH */ + /* * =============== * =============== @@ -699,6 +699,8 @@ struct ptw32_cleanup_t * =============== */ +__PTW32_BEGIN_C_DECLS + /* * PThread Attribute Functions */ @@ -1046,7 +1048,7 @@ PTW32_DLLPORT void * PTW32_CDECL pthread_timechange_handler_np(void *); /* * Returns the Win32 HANDLE for the POSIX thread. */ -PTW32_DLLPORT void PTW32_CDECL *pthread_getw32threadhandle_np(pthread_t thread); +PTW32_DLLPORT void * PTW32_CDECL pthread_getw32threadhandle_np(pthread_t thread); /* * Returns the win32 thread ID for POSIX thread. */ diff --git a/pthread_win32_attach_detach_np.c b/pthread_win32_attach_detach_np.c index dc6f02f5..e61ac4b7 100644 --- a/pthread_win32_attach_detach_np.c +++ b/pthread_win32_attach_detach_np.c @@ -42,6 +42,9 @@ #include "pthread.h" #include "implement.h" #include +#if ! (defined(__GNUC__) || defined(PTW32_CONFIG_MSVC7) || defined(WINCE)) +# include +#endif /* * Handle to quserex.dll diff --git a/semaphore.h b/semaphore.h index 9c27de1f..ce83b7dd 100644 --- a/semaphore.h +++ b/semaphore.h @@ -108,7 +108,7 @@ PTW32_DLLPORT int PTW32_CDECL sem_post (sem_t * sem); PTW32_DLLPORT int PTW32_CDECL sem_post_multiple (sem_t * sem, int count); -PTW32_DLLPORT sem_t PTW32_CDECL *sem_open (const char *, int, ...); +PTW32_DLLPORT sem_t * PTW32_CDECL sem_open (const char *, int, ...); PTW32_DLLPORT int PTW32_CDECL sem_close (sem_t * sem); diff --git a/tests/ChangeLog b/tests/ChangeLog index cd8b8661..395202cf 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2016-03-31 Ross Johnson + + * Makefile (_ptw32.h): Copy header to tests directory required to + build tests, and apps. + 2016-03-31 Ross Johnson * test.h: source errno.h diff --git a/tests/Makefile b/tests/Makefile index 15f98686..126ece2e 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -42,7 +42,7 @@ TOUCH = $(ECHO) touched > # The next path is relative to $BUILD_DIR QAPC = # ..\QueueUserAPCEx\User\quserex.dll -CPHDR = pthread.h semaphore.h sched.h +CPHDR = _ptw32.h pthread.h semaphore.h sched.h OPTIM = /O2 /Ob0 From 701d753ff8dd8eb5ecda6bffbdf549069beab604 Mon Sep 17 00:00:00 2001 From: rpj Date: Fri, 1 Apr 2016 23:26:47 +1100 Subject: [PATCH 051/207] Document that _ptw32.h is required for user app builds. Include it in the 'make install'. --- GNUmakefile | 1 + Makefile | 1 + NEWS | 7 ++-- README | 95 ++++++++++------------------------------------------- 4 files changed, 25 insertions(+), 79 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 855bc429..2f59ba1a 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -267,6 +267,7 @@ install: -$(TESTNDIR) $(HDRDEST) $(AND) $(MKDIR) $(HDRDEST) $(CP) pthreadGC*.dll $(DLLDEST) $(CP) libpthreadGC*.a $(LIBDEST) + $(CP) _pthw32.h $(HDRDEST) $(CP) pthread.h $(HDRDEST) $(CP) sched.h $(HDRDEST) $(CP) semaphore.h $(HDRDEST) diff --git a/Makefile b/Makefile index 44f08a0e..3f6bfdfb 100644 --- a/Makefile +++ b/Makefile @@ -209,6 +209,7 @@ install: if not exist $(HDRDEST) mkdir $(HDRDEST) if exist pthreadV*.dll copy pthreadV*.dll $(DLLDEST) copy pthreadV*.lib $(LIBDEST) + copy _pth32.h $(HDRDEST) copy pthread.h $(HDRDEST) copy sched.h $(HDRDEST) copy semaphore.h $(HDRDEST) diff --git a/NEWS b/NEWS index 73b17da3..feb7c793 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ RELEASE 2.10.0 -------------- -(2016-02-11) +(2016-04-01) General ------- @@ -55,6 +55,8 @@ pthread_attr_setname_np() For MSVC builds, the thread name if set is made available for use by the MSVS debugger, i.e. it should be displayed within the debugger to identify the thread in place of/as well as a threadID. +GNU compiler environments (MinGW32 and MinGW64) now have the option of using +autoconf to automatically configure the build. Builds: New makefile targets have been added and existing targets modified or @@ -63,7 +65,8 @@ configurations of both dll and static libs. GNU compiler builds are now explicitly using ISO C and C++ 2011 standards compatibility. If your GNU compiler doesn't support this please consider -updating. +updating. Auto configuration is now possible via a 'configure' script. The +script must be generated using autoconf. Static linking: The autostatic functionality has been moved to dll.c, and extended so diff --git a/README b/README index bc637511..a0a8d2bc 100644 --- a/README +++ b/README @@ -398,11 +398,14 @@ $ nmake VC NO_DEPS=1 TESTS="foo bar" Building with MinGW ------------------- -Please use Mingw64 to build either 64 or 32 bit variants of the DLL that will -run on 64 bit systems. We have found that Mingw32 builds of the GCE library -variants fail when run on 64 bit systems. +We have found that Mingw32 builds of the GCE library variants fail when run +on 64 bit systems. The GC variants are fine. -From the source directory, run 'make' without arguments for help information. +From the source directory: + +run 'autoheader' to rewrite the config.h file +run 'autoconf' to rewrite the GNUmakefiles (library and tests) +run 'make' without arguments to list possible targets. $ make @@ -439,16 +442,16 @@ libpthreadGC2-w64.a To build and test all DLLs and static lib compatibility variants (GC, GCE): -Note that the ARCH="..." and/or EXTRAVERSION="..." options are passed to the -tests GNUmakefile when you target "all-tests". If you change to the tests -directory and run the tests you will need to repeat those options explicitly -to the test "make" command-line. - $ make all-tests or, with MinGW64 (multilib enabled): $ make all-tests ARCH=-m64 $ make all-tests ARCH=-m32 +Note that the ARCH="..." and/or EXTRAVERSION="..." options are passed to the +tests GNUmakefile when you target "all-tests". If you change to the tests +directory and run the tests you will need to repeat those options explicitly +to the test "make" command-line. + You can run the testsuite by changing to the "tests" directory and running make. E.g.: @@ -509,36 +512,13 @@ Cygwin implements it's own POSIX threads routines and these will be the ones to use if you develop using Cygwin. -Ready to run binaries ---------------------- - -For convenience, the following ready-to-run files can be downloaded -from the FTP site (see under "Availability" below): - - pthread.h - semaphore.h - sched.h - pthreadVC2.dll - built with MSVC compiler using C setjmp/longjmp - pthreadVC2.lib - pthreadVCE2.dll - built with MSVC++ compiler using C++ EH - pthreadVCE2.lib - pthreadVSE2.dll - built with MSVC compiler using SEH - pthreadVSE2.lib - pthreadGC2.dll - built with Mingw32 GCC - libpthreadGC2.a - derived from pthreadGC.dll - pthreadGCE2.dll - built with Mingw32 G++ - libpthreadGCE2.a - derived from pthreadGCE.dll - -You may also need to include runtime DLLs from your SDK when -distributing your applications. - Building applications with GNU compilers ---------------------------------------- If you're using pthreadGC2.dll: -With the three header files, pthreadGC2.dll and libpthreadGC2.a in the -same directory as your application myapp.c, you could compile, link +With the four header files, _ptw32.h, pthreadGC2.dll and libpthreadGC2.a +in the same directory as your application myapp.c, you could compile, link and run myapp.c under MinGW as follows: gcc -o myapp.exe myapp.c -I. -L. -lpthreadGC2 @@ -546,7 +526,7 @@ and run myapp.c under MinGW as follows: Or put pthreadGC2.dll in an appropriate directory in your PATH, put libpthreadGC2.a in your system lib directory, and -put the three header files in your system include directory, +put the four header files in your system include directory, then use: gcc -o myapp.exe myapp.c -lpthreadGC @@ -555,7 +535,7 @@ then use: If you're using pthreadGCE2.dll: -With the three header files, pthreadGCE2.dll and libpthreadGCE2.a +With the four header files, pthreadGCE2.dll and libpthreadGCE2.a in the same directory as your application myapp.c, you could compile, link and run myapp.c under Mingw32 as follows: @@ -564,44 +544,13 @@ link and run myapp.c under Mingw32 as follows: Or put pthreadGCE.dll and gcc.dll in an appropriate directory in your PATH, put libpthreadGCE.a in your system lib directory, and -put the three header files in your system include directory, +put the four header files in your system include directory, then use: gcc -x c++ -o myapp.exe myapp.c -lpthreadGCE myapp -Availability ------------- - -The complete source code in either unbundled, self-extracting -Zip file, or tar/gzipped format can be found at: - - ftp://sources.redhat.com/pub/pthreads-win32 - -The pre-built DLL, export libraries and matching pthread.h can -be found at: - - ftp://sources.redhat.com/pub/pthreads-win32/dll-latest - -Home page: - - http://sources.redhat.com/pthreads-win32/ - - -Mailing list ------------- - -There is a mailing list for discussing pthreads on Win32. -To join, send email to: - - pthreads-win32-subscribe@sources.redhat.com - -Unsubscribe by sending mail to: - - pthreads-win32-unsubscribe@sources.redhat.com - - Acknowledgements ---------------- @@ -618,12 +567,4 @@ industry can be measured by it's open standards. ---- Ross Johnson - - - - - - - - - + From 2205f83b37a03262d22b9a2f195c0f34f76a0b94 Mon Sep 17 00:00:00 2001 From: rpj Date: Sat, 2 Apr 2016 10:17:16 +1100 Subject: [PATCH 052/207] Add missed entries during merge --- ChangeLog | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8f91bf85..bf6d08d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,23 @@ * semaphore.h: Patched. * pthread_self.c: Patched. +2016-03-28 Ross Johnson + + * ptw32_relmillisecs.c (pthread_win32_getabstime_np): New + platform-aware function to return the current time plus optional + offset. + * pthread.h (pthread_win32_getabstime_np): New exported function. + * ptw32_timespec.c: COnditionally compile only if NEED_FTIME config + flagged. + * sched.h: Update platform config flags for applications. + * semaphore.h: Likewise. + * pthread.h: Likewise. + +2016-03-25 Bill Parker + + * pthread_mutex_init.c: Memory allocation of robust mutex element + was not being checked. + 2016-02-29 Ross Johnson * GNUmakefile (MINGW_HAVE_SECURE_API): Moved to config.h. Undefined From fdc77f52d30b84d1b12ab09caf2d0ef47628da1e Mon Sep 17 00:00:00 2001 From: rpj Date: Sat, 2 Apr 2016 10:41:59 +1100 Subject: [PATCH 053/207] Post-merge cleanup --- pthread_getname_np.c | 23 ----------- pthread_setname_np.c | 65 -------------------------------- tests/condvar3_3.c | 2 +- tests/join4.c | 90 -------------------------------------------- tests/threestage.c | 2 + 5 files changed, 3 insertions(+), 179 deletions(-) diff --git a/pthread_getname_np.c b/pthread_getname_np.c index 9023883c..b56434e5 100644 --- a/pthread_getname_np.c +++ b/pthread_getname_np.c @@ -44,7 +44,6 @@ pthread_getname_np(pthread_t thr, char *name, int len) { ptw32_mcs_local_node_t threadLock; ptw32_thread_t * tp; -<<<<<<< HEAD char * s, * d; int result; @@ -67,28 +66,6 @@ pthread_getname_np(pthread_t thr, char *name, int len) {} *d = '\0'; - -======= - int result; - - /* Validate the thread id. */ - result = pthread_kill (thr, 0); - if (0 != result) - { - return result; - } - - tp = (ptw32_thread_t *) thr.p; - - ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); - -#if defined(_MSC_VER) || ( defined(PTW32_CONFIG_MINGW) && defined(MINGW_HAS_SECURE_API) ) - result = strncpy_s(name, len, tp->name, len - 1); -#else - strncpy(name, tp->name, len - 1); - name[len - 1] = '\0'; -#endif ->>>>>>> refs/heads/mingw-patch-base ptw32_mcs_lock_release (&threadLock); return result; diff --git a/pthread_setname_np.c b/pthread_setname_np.c index e46772e4..6fb8197d 100644 --- a/pthread_setname_np.c +++ b/pthread_setname_np.c @@ -88,7 +88,6 @@ pthread_setname_np(pthread_t thr, const char *name, void *arg) DWORD Win32ThreadID; #endif -<<<<<<< HEAD /* * Validate the thread id. This method works for pthreads-win32 because * pthread_kill and pthread_t are designed to accommodate it, but the @@ -159,70 +158,6 @@ pthread_setname_np(pthread_t thr, const char *name) * pthread_kill and pthread_t are designed to accommodate it, but the * method is not portable. */ -======= - /* Validate the thread id. */ - result = pthread_kill (thr, 0); - if (0 != result) - { - return result; - } - - /* - * 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); - -#if defined(_MSC_VER) - Win32ThreadID = pthread_getw32threadid_np (thr); - if (Win32ThreadID) - { - SetThreadName(Win32ThreadID, newname); - } -#endif - - tp = (ptw32_thread_t *) thr.p; - - ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); - - oldname = tp->name; - tp->name = newname; - if (oldname) - { - free(oldname); - } - - ptw32_mcs_lock_release (&threadLock); - - return 0; -} -#else -int -pthread_setname_np(pthread_t thr, const char *name) -{ - ptw32_mcs_local_node_t threadLock; - int result; - char * newname; - char * oldname; - ptw32_thread_t * tp; -#if defined(_MSC_VER) - DWORD Win32ThreadID; -#endif - - /* Validate the thread id. */ ->>>>>>> refs/heads/mingw-patch-base result = pthread_kill (thr, 0); if (0 != result) { diff --git a/tests/condvar3_3.c b/tests/condvar3_3.c index 13bade43..35faa29b 100644 --- a/tests/condvar3_3.c +++ b/tests/condvar3_3.c @@ -83,7 +83,7 @@ pthread_cond_t cnd; pthread_mutex_t mtx; -static const int64_t NANOSEC_PER_SEC = 1000000000; +static const long NANOSEC_PER_SEC = 1000000000; int main() { diff --git a/tests/join4.c b/tests/join4.c index 28599f3e..3961dfeb 100644 --- a/tests/join4.c +++ b/tests/join4.c @@ -1,4 +1,3 @@ -<<<<<<< HEAD /* * Test for pthread_timedjoin_np() timing out. * @@ -80,92 +79,3 @@ main(int argc, char * argv[]) /* Success. */ return 0; } -======= -/* - * 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; - void* result = (void*)-1; - PTW32_STRUCT_TIMEB currSysTime; - const DWORD NANOSEC_PER_MILLISEC = 1000000; - - assert(pthread_create(&id, NULL, func, (void *)(size_t)999) == 0); - - /* - * Let thread start before we attempt to join it. - */ - Sleep(100); - - PTW32_FTIME(&currSysTime); - - abstime.tv_sec = (long)currSysTime.time; - abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm; - - /* Test for pthread_timedjoin_np timeout */ - abstime.tv_sec += 1; - 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; -} ->>>>>>> refs/heads/mingw-patch-base diff --git a/tests/threestage.c b/tests/threestage.c index 584bbb78..8443f1f7 100644 --- a/tests/threestage.c +++ b/tests/threestage.c @@ -33,6 +33,8 @@ 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) From 5369bb75ac6aa002c04be3ac0ef968d78b4abafa Mon Sep 17 00:00:00 2001 From: rpj Date: Sat, 2 Apr 2016 10:44:19 +1100 Subject: [PATCH 054/207] Tweak. --- tests/condvar3_3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/condvar3_3.c b/tests/condvar3_3.c index 35faa29b..54702847 100644 --- a/tests/condvar3_3.c +++ b/tests/condvar3_3.c @@ -83,7 +83,7 @@ pthread_cond_t cnd; pthread_mutex_t mtx; -static const long NANOSEC_PER_SEC = 1000000000; +static const long NANOSEC_PER_SEC = 1000000000L; int main() { From 468321f7deab89fdf7637804591f36e0a5eee1b3 Mon Sep 17 00:00:00 2001 From: rpj Date: Sat, 2 Apr 2016 13:10:39 +1100 Subject: [PATCH 055/207] Post-merge tweaks and cleanup --- _ptw32.h | 46 ++++++++++++++++++++++++++++++- config.h | 16 ----------- create.c | 2 +- dll.c | 6 ++-- implement.h | 64 ++++++++++--------------------------------- pthread_exit.c | 2 +- ptw32_relmillisecs.c | 8 +++--- ptw32_threadDestroy.c | 2 +- ptw32_threadStart.c | 8 +++--- ptw32_throw.c | 4 +-- tests/test.h | 4 +-- tests/timeouts.c | 2 +- 12 files changed, 78 insertions(+), 86 deletions(-) diff --git a/_ptw32.h b/_ptw32.h index 32b14559..13f23d26 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -52,7 +52,7 @@ #define PTW32_VERSION 2,10,0,0 #define PTW32_VERSION_STRING "2, 10, 0, 0\0" -#if defined __GNUC__ +#if defined(__GNUC__) # pragma GCC system_header # if ! defined __declspec # error "Please upgrade your GNU compiler to one that supports __declspec." @@ -117,6 +117,50 @@ # endif #endif +/* + * This is more or less a duplicate of what is in the autoconf config.h, + * which is only used when building the pthread-win32 libraries. They + */ + +#if !defined(PTW32_CONFIG_H) && !defined(__PTW32_PSEUDO_CONFIG_H_SOURCED) +# define __PTW32_PSEUDO_CONFIG_H_SOURCED +# if defined(WINCE) +# undef HAVE_CPU_AFFINITY +# define NEED_DUPLICATEHANDLE +# define NEED_CREATETHREAD +# define NEED_ERRNO +# define NEED_CALLOC +# define NEED_FTIME +# define NEED_UNICODE_CONSTS +# define NEED_PROCESS_AFFINITY_MASK +/* This may not be needed */ +# define RETAIN_WSALASTERROR +# elif defined(_MSC_VER) +# if _MSC_VER >= 1900 +# define HAVE_STRUCT_TIMESPEC +# elif _MSC_VER < 1300 +# define PTW32_CONFIG_MSVC6 +# elif _MSC_VER < 1400 +# define PTW32_CONFIG_MSVC7 +# endif +# elif defined(_UWIN) +# define HAVE_MODE_T +# define HAVE_STRUCT_TIMESPEC +# define HAVE_SIGNAL_H +# endif +#endif + +#if defined(__BORLANDC__) +# define int64_t LONGLONG +# define uint64_t ULONGLONG +#elif !defined(__MINGW32__) +# define int64_t _int64 +# define uint64_t unsigned _int64 +# if defined(PTW32_CONFIG_MSVC6) + typedef long intptr_t; +# endif +#endif + #if ! defined(__MINGW32__) && ! defined(NEED_ERRNO) # define HAVE_ERRNO_H #endif diff --git a/config.h b/config.h index 409edec6..2dfde261 100644 --- a/config.h +++ b/config.h @@ -138,22 +138,6 @@ # define HAVE_C_INLINE #endif -#if defined(__MINGW32__) || defined(__MINGW64__) -# include <_mingw.h> -# if defined(__MINGW64_VERSION_MAJOR) -# define PTW32_CONFIG_MINGW 64 -# elif defined(__MINGW_MAJOR_VERSION) || defined(__MINGW32_MAJOR_VERSION) -# define PTW32_CONFIG_MINGW 32 -# endif -# if PTW32_CONFIG_MINGW == 64 -# define HAVE_STRUCT_TIMESPEC -# define HAVE_MODE_T -# else -# define HAVE_MODE_T -# undef MINGW_HAS_SECURE_API -# endif -#endif - #if defined(__BORLANDC__) #endif diff --git a/create.c b/create.c index 2e070a28..5557dec7 100644 --- a/create.c +++ b/create.c @@ -220,7 +220,7 @@ pthread_create (pthread_t * tid, * finished with it here. */ -#if ! defined (PTW32_CONFIG_MINGW) || defined (__MSVCRT__) || defined (__DMC__) +#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__) tp->threadH = threadH = diff --git a/dll.c b/dll.c index 0ca2cfcc..b38581b1 100644 --- a/dll.c +++ b/dll.c @@ -146,7 +146,7 @@ EXTERN_C PIMAGE_TLS_CALLBACK _xl_b = TlsMain; * on thread exit. Code here can only do process init and exit functions. */ -#if defined(PTW32_CONFIG_MINGW) || defined(_MSC_VER) +#if defined(__MINGW32__) || defined(_MSC_VER) /* For an explanation of this code (at least the MSVC parts), refer to * @@ -177,7 +177,7 @@ static int on_process_exit(void) return 0; } -#if defined(PTW32_CONFIG_MINGW) +#if defined(__GNUC__) __attribute__((section(".ctors"), used)) static int (*gcc_ctor)(void) = on_process_init; __attribute__((section(".dtors"), used)) static int (*gcc_dtor)(void) = on_process_exit; #elif defined(_MSC_VER) @@ -195,7 +195,7 @@ static int (*msc_dtor)(void) = on_process_exit; # endif #endif -#endif /* defined(PTW32_CONFIG_MINGW) || defined(_MSC_VER) */ +#endif /* defined(__MINGW32__) || defined(_MSC_VER) */ /* This dummy function exists solely to be referenced by other modules * (specifically, in implement.h), so that the linker can't optimize away diff --git a/implement.h b/implement.h index 5c9f3269..fe36a34b 100644 --- a/implement.h +++ b/implement.h @@ -59,36 +59,20 @@ typedef VOID (APIENTRY *PAPCFUNC)(DWORD dwParam); #endif -#ifdef __PTW32_H -/* FIXME: Previously specified in , this doesn't belong in - * a system header; relocated from there, to here. - */ -#if defined(__MINGW32__) || defined(__MINGW64__) -# define PTW32_CONFIG_MINGW -#endif -#if defined(_MSC_VER) -# if _MSC_VER < 1300 -# define PTW32_CONFIG_MSVC6 -# endif -# if _MSC_VER < 1400 -# define PTW32_CONFIG_MSVC7 -# endif -#endif -#endif /* * Designed to allow error values to be set and retrieved in builds where * MSCRT libraries are statically linked to DLLs. */ #if ! defined(WINCE) && \ - (( defined(PTW32_CONFIG_MINGW) && __MSVCRT_VERSION__ >= 0x0800 ) || \ + (( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0800 ) || \ ( defined(_MSC_VER) && _MSC_VER >= 1400 )) /* MSVC8+ */ -# if defined(PTW32_CONFIG_MINGW) +# if defined(__MINGW32__) __attribute__((unused)) # endif static int ptw32_get_errno(void) { int err = 0; _get_errno(&err); return err; } # define PTW32_GET_ERRNO() ptw32_get_errno() # if defined(PTW32_USES_SEPARATE_CRT) -# if defined(PTW32_CONFIG_MINGW) +# if defined(__MINGW32__) __attribute__((unused)) # endif static void ptw32_set_errno(int err) { _set_errno(err); SetLastError(err); } @@ -99,7 +83,7 @@ static void ptw32_set_errno(int err) { _set_errno(err); SetLastError(err); } #else # define PTW32_GET_ERRNO() (errno) # if defined(PTW32_USES_SEPARATE_CRT) -# if defined(PTW32_CONFIG_MINGW) +# if defined(__MINGW32__) __attribute__((unused)) # endif static void ptw32_set_errno(int err) { errno = err; SetLastError(err); } @@ -152,25 +136,12 @@ static void ptw32_set_errno(int err) { errno = err; SetLastError(err); } # define PTW32_INTERLOCKED_SIZEPTR PTW32_INTERLOCKED_VOLATILE long* #endif -#if defined(PTW32_CONFIG_MINGW) -# include -#elif defined(__BORLANDC__) -# define int64_t LONGLONG -# define uint64_t ULONGLONG -#else -# define int64_t _int64 -# define uint64_t unsigned _int64 -# if defined(PTW32_CONFIG_MSVC6) - typedef long intptr_t; -# endif -#endif - /* * Don't allow the linker to optimize away autostatic.obj in static builds. */ #if defined(PTW32_STATIC_LIB) && defined(PTW32_BUILD) void ptw32_autostatic_anchor(void); -# if defined(PTW32_CONFIG_MINGW) +# if defined(__GNUC__) __attribute__((unused, used)) # endif static void (*local_autostatic_anchor)(void) = ptw32_autostatic_anchor; @@ -665,10 +636,7 @@ extern ptw32_mcs_lock_t ptw32_spinlock_test_init_lock; extern int pthread_count; #endif -#if defined(__cplusplus) -extern "C" -{ -#endif /* __cplusplus */ +__PTW32_BEGIN_C_DECLS /* * ===================== @@ -713,7 +681,7 @@ extern "C" void ptw32_rwlock_cancelwrwait (void *arg); -#if ! defined (PTW32_CONFIG_MINGW) || (defined (__MSVCRT__) && ! defined (__DMC__)) +#if ! defined (__MINGW32__) || (defined (__MSVCRT__) && ! defined (__DMC__)) unsigned __stdcall #else void @@ -764,17 +732,13 @@ extern "C" #endif ; -#if defined(__cplusplus) -} -#endif /* __cplusplus */ - +__PTW32_END_C_DECLS #if defined(_UWIN_) # if defined(_MT) -# if defined(__cplusplus) -extern "C" -{ -# endif + +__PTW32_BEGIN_C_DECLS + _CRTIMP unsigned long __cdecl _beginthread (void (__cdecl *) (void *), unsigned, void *); _CRTIMP void __cdecl _endthread (void); @@ -782,9 +746,9 @@ extern "C" unsigned (__stdcall *) (void *), void *, unsigned, unsigned *); _CRTIMP void __cdecl _endthreadex (unsigned); -# if defined(__cplusplus) -} -# endif + +__PTW32_END_C_DECLS + # endif #else # if ! defined(WINCE) diff --git a/pthread_exit.c b/pthread_exit.c index 6b3bc19c..bd458c34 100644 --- a/pthread_exit.c +++ b/pthread_exit.c @@ -93,7 +93,7 @@ pthread_exit (void *value_ptr) * Implicit POSIX handles are cleaned up in ptw32_throw() now. */ -#if ! defined (PTW32_CONFIG_MINGW) || defined (__MSVCRT__) || defined (__DMC__) +#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__) _endthreadex ((unsigned) (size_t) value_ptr); #else _endthread (); diff --git a/ptw32_relmillisecs.c b/ptw32_relmillisecs.c index b7372061..13a3c9f2 100644 --- a/ptw32_relmillisecs.c +++ b/ptw32_relmillisecs.c @@ -66,7 +66,7 @@ ptw32_relmillisecs (const struct timespec * abstime) FILETIME ft; #else /* ! NEED_FTIME */ #if ( defined(_MSC_VER) && _MSC_VER >= 1300 ) /* MSVC7+ */ || \ - ( defined(PTW32_CONFIG_MINGW) && __MSVCRT_VERSION__ >= 0x0601 ) + ( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0601 ) struct __timeb64 currSysTime; #else struct _timeb currSysTime; @@ -114,7 +114,7 @@ ptw32_relmillisecs (const struct timespec * abstime) #if defined(_MSC_VER) && _MSC_VER >= 1400 /* MSVC8+ */ _ftime64_s(&currSysTime); #elif ( defined(_MSC_VER) && _MSC_VER >= 1300 ) /* MSVC7+ */ || \ - ( defined(PTW32_CONFIG_MINGW) && __MSVCRT_VERSION__ >= 0x0601 ) + ( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0601 ) _ftime64(&currSysTime); #else _ftime(&currSysTime); @@ -169,7 +169,7 @@ pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * FILETIME ft; #else /* ! NEED_FTIME */ #if ( defined(_MSC_VER) && _MSC_VER >= 1300 ) /* MSVC7+ */ || \ - ( defined(PTW32_CONFIG_MINGW) && __MSVCRT_VERSION__ >= 0x0601 ) + ( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0601 ) struct __timeb64 currSysTime; #else struct _timeb currSysTime; @@ -199,7 +199,7 @@ pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * #if defined(_MSC_VER) && _MSC_VER >= 1400 /* MSVC8+ */ _ftime64_s(&currSysTime); #elif ( defined(_MSC_VER) && _MSC_VER >= 1300 ) /* MSVC7+ */ || \ - ( defined(PTW32_CONFIG_MINGW) && __MSVCRT_VERSION__ >= 0x0601 ) + ( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0601 ) _ftime64(&currSysTime); #else _ftime(&currSysTime); diff --git a/ptw32_threadDestroy.c b/ptw32_threadDestroy.c index 701a4406..a39dacd3 100644 --- a/ptw32_threadDestroy.c +++ b/ptw32_threadDestroy.c @@ -69,7 +69,7 @@ ptw32_threadDestroy (pthread_t thread) CloseHandle (threadCopy.cancelEvent); } -#if ! defined(PTW32_CONFIG_MINGW) || defined (__MSVCRT__) || defined (__DMC__) +#if ! defined(__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__) /* * See documentation for endthread vs endthreadex. */ diff --git a/ptw32_threadStart.c b/ptw32_threadStart.c index 198403ae..1fabca2e 100644 --- a/ptw32_threadStart.c +++ b/ptw32_threadStart.c @@ -119,7 +119,7 @@ using # pragma warning( disable : 4748 ) #endif -#if ! defined (PTW32_CONFIG_MINGW) || (defined (__MSVCRT__) && ! defined (__DMC__)) +#if ! defined (__MINGW32__) || (defined (__MSVCRT__) && ! defined (__DMC__)) unsigned __stdcall #else @@ -152,7 +152,7 @@ ptw32_threadStart (void *vthreadParms) free (threadParms); -#if ! defined (PTW32_CONFIG_MINGW) || defined (__MSVCRT__) || defined (__DMC__) +#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__) #else /* * _beginthread does not return the thread id and is running @@ -296,7 +296,7 @@ ptw32_threadStart (void *vthreadParms) (void) pthread_win32_thread_detach_np (); #endif -#if ! defined (PTW32_CONFIG_MINGW) || defined (__MSVCRT__) || defined (__DMC__) +#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__) _endthreadex ((unsigned)(size_t) status); #else _endthread (); @@ -306,7 +306,7 @@ ptw32_threadStart (void *vthreadParms) * Never reached. */ -#if ! defined (PTW32_CONFIG_MINGW) || defined (__MSVCRT__) || defined (__DMC__) +#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__) return (unsigned)(size_t) status; #endif diff --git a/ptw32_throw.c b/ptw32_throw.c index f96ffd48..855d33ea 100644 --- a/ptw32_throw.c +++ b/ptw32_throw.c @@ -95,7 +95,7 @@ ptw32_throw (DWORD exception) * explicit thread exit here after cleaning up POSIX * residue (i.e. cleanup handlers, POSIX thread handle etc). */ -#if ! defined (PTW32_CONFIG_MINGW) || defined (__MSVCRT__) || defined (__DMC__) +#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__) unsigned exitCode = 0; switch (exception) @@ -118,7 +118,7 @@ ptw32_throw (DWORD exception) #endif -#if ! defined (PTW32_CONFIG_MINGW) || defined (__MSVCRT__) || defined (__DMC__) +#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__) _endthreadex (exitCode); #else _endthread (); diff --git a/tests/test.h b/tests/test.h index 44ddddff..28188ff0 100644 --- a/tests/test.h +++ b/tests/test.h @@ -59,7 +59,7 @@ #define rand_r( _seed ) \ ( _seed == _seed? rand() : rand() ) -#if defined(PTW32_CONFIG_MINGW) +#if defined(__MINGW32__) # include #elif defined(__BORLANDC__) # define int64_t ULONGLONG @@ -71,7 +71,7 @@ # define PTW32_FTIME(x) _ftime64_s(x) # define PTW32_STRUCT_TIMEB struct __timeb64 #elif ( defined(_MSC_VER) && _MSC_VER >= 1300 ) || \ - ( defined(PTW32_CONFIG_MINGW) && __MSVCRT_VERSION__ >= 0x0601 ) + ( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0601 ) # define PTW32_FTIME(x) _ftime64(x) # define PTW32_STRUCT_TIMEB struct __timeb64 #else diff --git a/tests/timeouts.c b/tests/timeouts.c index 4a6097c0..1362d08d 100644 --- a/tests/timeouts.c +++ b/tests/timeouts.c @@ -91,7 +91,7 @@ #define CYG_ONEMILLION 1000000LL #define CYG_ONEKAPPA 1000LL -#if !(_MSC_VER <= 1200) +#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 From 46d56e24522f2131921f354a95b3b56ea2efd531 Mon Sep 17 00:00:00 2001 From: rpj Date: Sat, 2 Apr 2016 14:01:27 +1100 Subject: [PATCH 056/207] Prevent Windows WER dialog from stopping the test run. --- tests/cancel3.c | 3 +++ tests/cancel5.c | 3 +++ tests/cancel6a.c | 3 +++ tests/cleanup1.c | 3 +++ tests/context1.c | 3 +++ tests/exception1.c | 3 +++ tests/exception2.c | 3 +++ tests/exception3.c | 3 +++ tests/exception3_0.c | 3 +++ 9 files changed, 27 insertions(+) diff --git a/tests/cancel3.c b/tests/cancel3.c index 742cbc4f..9ccd490a 100644 --- a/tests/cancel3.c +++ b/tests/cancel3.c @@ -127,6 +127,9 @@ main () int i; pthread_t t[NUMTHREADS + 1]; + DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX); + SetErrorMode(dwMode | SEM_NOGPFAULTERRORBOX); + assert ((t[0] = pthread_self ()).p != NULL); for (i = 1; i <= NUMTHREADS; i++) diff --git a/tests/cancel5.c b/tests/cancel5.c index e78cf08c..033ecf10 100644 --- a/tests/cancel5.c +++ b/tests/cancel5.c @@ -127,6 +127,9 @@ main () int i; pthread_t t[NUMTHREADS + 1]; + DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX); + SetErrorMode(dwMode | SEM_NOGPFAULTERRORBOX); + for (i = 1; i <= NUMTHREADS; i++) { threadbag[i].started = 0; diff --git a/tests/cancel6a.c b/tests/cancel6a.c index 3a81eae6..e5da0789 100644 --- a/tests/cancel6a.c +++ b/tests/cancel6a.c @@ -115,6 +115,9 @@ main() int i; pthread_t t[NUMTHREADS + 1]; + DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX); + SetErrorMode(dwMode | SEM_NOGPFAULTERRORBOX); + assert((t[0] = pthread_self()).p != NULL); for (i = 1; i <= NUMTHREADS; i++) diff --git a/tests/cleanup1.c b/tests/cleanup1.c index a59d0561..72a43386 100644 --- a/tests/cleanup1.c +++ b/tests/cleanup1.c @@ -157,6 +157,9 @@ main() int i; pthread_t t[NUMTHREADS + 1]; + DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX); + SetErrorMode(dwMode | SEM_NOGPFAULTERRORBOX); + memset(&pop_count, 0, sizeof(sharedInt_t)); InitializeCriticalSection(&pop_count.cs); diff --git a/tests/context1.c b/tests/context1.c index 284d89f7..ffef3a66 100644 --- a/tests/context1.c +++ b/tests/context1.c @@ -105,6 +105,9 @@ main() pthread_t t; HANDLE hThread; + DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX); + SetErrorMode(dwMode | SEM_NOGPFAULTERRORBOX); + assert(pthread_create(&t, NULL, func, NULL) == 0); hThread = ((ptw32_thread_t *)t.p)->threadH; diff --git a/tests/exception1.c b/tests/exception1.c index 7899ba71..2ba4849c 100644 --- a/tests/exception1.c +++ b/tests/exception1.c @@ -197,6 +197,9 @@ main() pthread_t et[NUMTHREADS]; pthread_t ct[NUMTHREADS]; + DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX); + SetErrorMode(dwMode | SEM_NOGPFAULTERRORBOX); + assert((mt = pthread_self()).p != NULL); for (i = 0; i < NUMTHREADS; i++) diff --git a/tests/exception2.c b/tests/exception2.c index fffe2b55..7842b842 100644 --- a/tests/exception2.c +++ b/tests/exception2.c @@ -120,6 +120,9 @@ main(int argc, char* argv[]) pthread_t mt; pthread_t et[NUMTHREADS]; + DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX); + SetErrorMode(dwMode | SEM_NOGPFAULTERRORBOX); + if (argc <= 1) { int result; diff --git a/tests/exception3.c b/tests/exception3.c index 3b9ec6fd..38cd7832 100644 --- a/tests/exception3.c +++ b/tests/exception3.c @@ -164,6 +164,9 @@ main() pthread_t et[NUMTHREADS]; pthread_mutexattr_t ma; + DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX); + SetErrorMode(dwMode | SEM_NOGPFAULTERRORBOX); + assert((mt = pthread_self()).p != NULL); printf("See the notes inside of exception3.c re term_funcs.\n"); diff --git a/tests/exception3_0.c b/tests/exception3_0.c index bc06bf33..ab25c460 100644 --- a/tests/exception3_0.c +++ b/tests/exception3_0.c @@ -151,6 +151,9 @@ main() int i; DWORD et[NUMTHREADS]; + DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX); + SetErrorMode(dwMode | SEM_NOGPFAULTERRORBOX); + InitializeCriticalSection(&caughtLock); for (i = 0; i < NUMTHREADS; i++) From 9ae441ea2c458890c6755e9aa788869e973310ea Mon Sep 17 00:00:00 2001 From: rpj Date: Sat, 2 Apr 2016 15:47:22 +1100 Subject: [PATCH 057/207] Plan error number changes for next major version change --- _ptw32.h | 25 ++++++++++++++----------- need_errno.h | 21 ++++++++++++++++++--- tests/test.h | 13 ++++++++++--- 3 files changed, 42 insertions(+), 17 deletions(-) diff --git a/_ptw32.h b/_ptw32.h index 13f23d26..7b3cf4f5 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -150,6 +150,18 @@ # endif #endif +/* + * If HAVE_ERRNO_H is defined then assume that autoconf has been used + * to overwrite config.h, otherwise the original config.h is in use + * at build-time or the above block of defines is in use otherwise + * and NEED_ERRNO is either defined or not defined. + */ +#if defined(HAVE_ERRNO_H) || !defined(NEED_ERRNO) +# include +#else +# include "need_errno.h" +#endif + #if defined(__BORLANDC__) # define int64_t LONGLONG # define uint64_t ULONGLONG @@ -161,15 +173,6 @@ # endif #endif -#if ! defined(__MINGW32__) && ! defined(NEED_ERRNO) -# define HAVE_ERRNO_H -#endif -#ifdef HAVE_ERRNO_H -# include -#else -# include "need_errno.h" -#endif - /* * In case ETIMEDOUT hasn't been defined above somehow. */ @@ -209,8 +212,8 @@ /* POSIX 2008 - related to robust mutexes */ /* - * FIXME: These should be changed for version 3.0.0 onward (ABI change). - * 42 already conflicts with EILSEQ + * FIXME: These should be changed for version 3.0.0 onward. + * 42 clashes with EILSEQ. */ #if PTW32_VERSION_MAJOR > 2 # if !defined(EOWNERDEAD) diff --git a/need_errno.h b/need_errno.h index eec28c1b..77d2280b 100644 --- a/need_errno.h +++ b/need_errno.h @@ -136,9 +136,24 @@ _CRTIMP extern int errno; #define EILSEQ 42 -/* POSIX 2008 - robust mutexes */ -#define EOWNERDEAD 43 -#define ENOTRECOVERABLE 44 +/* + * POSIX 2008 - robust mutexes. + */ +#if PTW32_VERSION_MAJOR > 2 +# if !defined(EOWNERDEAD) +# define EOWNERDEAD 1000 +# endif +# if !defined(ENOTRECOVERABLE) +# define ENOTRECOVERABLE 1001 +# endif +#else +# if !defined(EOWNERDEAD) +# define EOWNERDEAD 42 +# endif +# if !defined(ENOTRECOVERABLE) +# define ENOTRECOVERABLE 43 +# endif +#endif /* * Support EDEADLOCK for compatibility with older MS-C versions. diff --git a/tests/test.h b/tests/test.h index 28188ff0..e25f3e14 100644 --- a/tests/test.h +++ b/tests/test.h @@ -123,9 +123,12 @@ const char * error_string[] = { "ENOLCK", "ENOSYS", "ENOTEMPTY", +#if PTW32_VERSION_MAJOR > 2 "EILSEQ", - "EOWNERDEAD", +#else + "EILSEQ_or_EOWNERDEAD", "ENOTRECOVERABLE" +#endif }; /* @@ -160,8 +163,12 @@ int assertE; #e, __FILE__, (int) __LINE__), \ fflush(stderr) : \ 0) : \ - (fprintf(stderr, "Assertion failed: (%s %s %s), file %s, line %d, error %s\n", \ - #e,#o,#r, __FILE__, (int) __LINE__, error_string[assertE]), exit(1), 0)) + (assertE <= sizeof(error_string)/sizeof(error_string[0])) ? \ + (fprintf(stderr, "Assertion failed: (%s %s %s), file %s, line %d, error %s\n", \ + #e,#o,#r, __FILE__, (int) __LINE__, error_string[assertE]), exit(1), 0) :\ + (fprintf(stderr, \ + "Assertion failed: (%s %s %s), file %s, line %d, error %d\n", \ + #e,#o,#r, __FILE__, (int) __LINE__, assertE), exit(1), 0)) #endif From 08de3b1a9fa62f388392323879eeb98a517fd713 Mon Sep 17 00:00:00 2001 From: rpj Date: Sat, 2 Apr 2016 15:48:21 +1100 Subject: [PATCH 058/207] Copy _ptw32.h to tests build directory --- tests/GNUmakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/GNUmakefile b/tests/GNUmakefile index c5ec83fa..99bb6eec 100644 --- a/tests/GNUmakefile +++ b/tests/GNUmakefile @@ -93,7 +93,7 @@ GCX = GC$(DLL_VER) # Files we need to run the tests # - paths are relative to pthreads build dir. -HDR = pthread.h semaphore.h sched.h +HDR = _ptw32.h pthread.h semaphore.h sched.h LIB = libpthread$(GCX).a DLL = pthread$(GCX).dll # The next path is relative to $BUILD_DIR From c41614783a489a5986f0b65e9d97cc7e0136f2d3 Mon Sep 17 00:00:00 2001 From: rpj Date: Sat, 2 Apr 2016 17:43:46 +1100 Subject: [PATCH 059/207] Fix a basic race. Fix a type comparison error in assert_e. --- tests/exception3.c | 15 ++++++++++++--- tests/test.h | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/exception3.c b/tests/exception3.c index 38cd7832..50778ec8 100644 --- a/tests/exception3.c +++ b/tests/exception3.c @@ -115,7 +115,7 @@ terminateFunction () fclose(fp); } #endif - assert(pthread_mutex_unlock(&caughtLock) == 0); + assert_e(pthread_mutex_unlock(&caughtLock), ==, 0); /* * Notes from the MSVC++ manual: @@ -129,6 +129,14 @@ terminateFunction () * exception-using version of pthreads-win32 library * is being used (i.e. either pthreadVCE or pthreadVSE). */ + /* + * Allow time for all threads to reach here before exit, otherwise + * threads will be terminated while holding the lock and cause + * the next unlock to return EPERM (we're using ERRORCHECK mutexes). + * Perhaps this would be a good test for robust mutexes. + */ + Sleep(20); + exit(0); } @@ -145,6 +153,7 @@ exceptionedThread(void * arg) int dummy = 0x1; #if defined(PTW32_USES_SEPARATE_CRT) && (defined(__CLEANUP_CXX) || defined(__CLEANUP_SEH)) + printf("PTW32_USES_SEPARATE_CRT is defined\n"); pthread_win32_set_terminate_np(&terminateFunction); set_terminate(&wrongTerminateFunction); #else @@ -181,10 +190,10 @@ main() assert(pthread_create(&et[i], NULL, exceptionedThread, NULL) == 0); } - Sleep(NUMTHREADS * 10); + while (true); /* - * Fail. Should never be reached. + * Should never be reached. */ return 1; } diff --git a/tests/test.h b/tests/test.h index e25f3e14..e926c073 100644 --- a/tests/test.h +++ b/tests/test.h @@ -163,7 +163,7 @@ int assertE; #e, __FILE__, (int) __LINE__), \ fflush(stderr) : \ 0) : \ - (assertE <= sizeof(error_string)/sizeof(error_string[0])) ? \ + (assertE <= (int) (sizeof(error_string)/sizeof(error_string[0]))) ? \ (fprintf(stderr, "Assertion failed: (%s %s %s), file %s, line %d, error %s\n", \ #e,#o,#r, __FILE__, (int) __LINE__, error_string[assertE]), exit(1), 0) :\ (fprintf(stderr, \ From f1e1854334fcd0be5e8c4d60b4260ec2506c935d Mon Sep 17 00:00:00 2001 From: rpj Date: Sun, 3 Apr 2016 09:09:10 +1000 Subject: [PATCH 060/207] Output a more informative summary at the end of the testsuite run. --- tests/GNUmakefile.in | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index b050598e..cd52393e 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -190,26 +190,28 @@ GCX-static-debug GCX-small-static-debug: @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed all-asm: $(ASM) - @ $(ECHO) "ALL TESTS PASSED! Congratulations!" + @ $(ECHO) "ALL TESTS COMPILED TO ASSEMBLER CODE" allpassed: $(HDR) $(LIB) $(DLL) $(QAPC) $(TESTS:%=%.pass) - @ $(ECHO) "ALL TESTS PASSED! Congratulations!" + @ $(ECHO) "ALL TESTS COMPLETED. Check the logfile: $(LOGFILE)" + @ $(ECHO) "FAILURES: $$( grep FAILED $(LOGFILE) | wc -l ) " ; grep FAILED $(LOGFILE) all-bench: $(HDR) $(LIB) $(DLL) $(QAPC) $(XXLIBS) $(BENCHRESULTS) - @ $(ECHO) "ALL BENCH TESTS COMPLETED." + @ $(ECHO) "ALL BENCH TESTS COMPLETED. Check the logfile: $(LOGFILE)" + @ $(ECHO) "FAILURES: $$( grep FAILED $(LOGFILE) | wc -l ) " ; grep FAILED $(LOGFILE) cancel9.exe: XLIBS = -lws2_32 %.pass: %.exe - @ $(ECHO) Running $(TEST) test \"$*\" | tee -a testsuite.log + @ $(ECHO) Running $(TEST) test \"$*\" | tee -a $(LOGFILE) @ (PATH=${top_builddir}:$$PATH $(RUN) ./$* \ - && { $(ECHO) Passed; $(TOUCH) $@; } || $(ECHO) FAILED) \ + && { $(ECHO) Passed; $(TOUCH) $@; } || { $(ECHO) FAILED: $* ; $(ECHO) ; } ) \ 2>&1 | tee -a $(LOGFILE) %.bench: %.exe - @ $(ECHO) Running $(TEST) test \"$*\" | tee -a testsuite.log + @ $(ECHO) Running $(TEST) test \"$*\" | tee -a $(LOGFILE) @ (PATH=${top_builddir}:$$PATH $(RUN) ./$* \ - && { $(ECHO) Done; $(TOUCH) $@; } || $(ECHO) FAILED) \ + && { $(ECHO) Done; $(TOUCH) $@; } || { $(ECHO) FAILED ; $(ECHO) ; } ) \ 2>&1 | tee -a $(LOGFILE) %.exe: %.c From aacf62e684c6dde7172e8c20b01da95f58ecc1a8 Mon Sep 17 00:00:00 2001 From: rpj Date: Sun, 3 Apr 2016 14:58:07 +1000 Subject: [PATCH 061/207] Ignore "missing-brace" warnings, fix one warning. --- tests/GNUmakefile | 2 +- tests/GNUmakefile.in | 5 +++-- tests/semaphore4t.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/GNUmakefile b/tests/GNUmakefile index 99bb6eec..c6af1cf7 100644 --- a/tests/GNUmakefile +++ b/tests/GNUmakefile @@ -68,7 +68,7 @@ XXCFLAGS = XXLIBS = OPT = -O3 DOPT = -g -O0 -CFLAGS = ${OPT} $(ARCH) -UNDEBUG -Wall $(XXCFLAGS) +CFLAGS = ${OPT} $(ARCH) -UNDEBUG -Wall -Wno-missing-braces $(XXCFLAGS) LFLAGS = $(ARCH) $(XXLFLAGS) # # Uncomment this next to link the GCC/C++ runtime libraries statically diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index cd52393e..e99c24fb 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -68,11 +68,11 @@ RANLIB = $(CROSS)@RANLIB@ # Mingw # XLIBS = -XXCFLAGS= +XXCFLAGS= XXLIBS = OPT = -O3 DOPT = -g -O0 -CFLAGS = ${OPT} $(ARCH) -UNDEBUG -Wall $(XXCFLAGS) +CFLAGS = ${OPT} $(ARCH) -UNDEBUG -Wall -Wno-missing-braces $(XXCFLAGS) LFLAGS = $(ARCH) $(XXLFLAGS) # # Uncomment this next to link the GCC/C++ runtime libraries statically @@ -87,6 +87,7 @@ LFLAGS = $(ARCH) $(XXLFLAGS) # above to "2slgcc" for example, to build "pthreadGC2slgcc.dll", etc. # #LFLAGS += -static-libgcc -static-libstdc++ + BUILD_DIR = .. INCLUDES = -I ${top_srcdir} diff --git a/tests/semaphore4t.c b/tests/semaphore4t.c index 3fdc86a5..660b1eec 100644 --- a/tests/semaphore4t.c +++ b/tests/semaphore4t.c @@ -127,7 +127,7 @@ timeoutwithnanos(sem_t sem, int nanoseconds) nanoseconds, rc, errno, (int)ft_before.dwLowDateTime, (int)ft_before.dwHighDateTime, (int)ft_after.dwLowDateTime, (int)ft_after.dwHighDateTime); - assert("time must advance during sem_timedwait." == NULL); + printf("time must advance during sem_timedwait."); return 1; } return 0; From 692c4151786bfa4127ee3639cc252ec4ec4de5a4 Mon Sep 17 00:00:00 2001 From: rpj Date: Sun, 3 Apr 2016 15:10:14 +1000 Subject: [PATCH 062/207] Fix warning --- tests/exit3.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/exit3.c b/tests/exit3.c index 6c01a026..13397200 100644 --- a/tests/exit3.c +++ b/tests/exit3.c @@ -42,10 +42,15 @@ void * func(void * arg) { + int failed = (int) arg; + pthread_exit(arg); /* Never reached. */ - assert(0); + /* + * assert(0) in a way to prevent warning or optimising away. + */ + assert(failed - (int) arg); return NULL; } From 8952d849265ce8015e81cb5e32dbbdd2ef3ba314 Mon Sep 17 00:00:00 2001 From: rpj Date: Sun, 3 Apr 2016 15:11:23 +1000 Subject: [PATCH 063/207] Fix missed merge conflict --- README.NONPORTABLE | 1702 ++++++++++++++++++++++---------------------- 1 file changed, 849 insertions(+), 853 deletions(-) diff --git a/README.NONPORTABLE b/README.NONPORTABLE index bd0f4bb1..4e546003 100644 --- a/README.NONPORTABLE +++ b/README.NONPORTABLE @@ -1,853 +1,849 @@ -This file documents non-portable functions and other issues. - -Non-portable functions included in pthreads-win32 -------------------------------------------------- - -BOOL -pthread_win32_test_features_np(int mask) - - This routine allows an application to check which - run-time auto-detected features are available within - the library. - - The possible features are: - - PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE - Return TRUE if the native version of - InterlockedCompareExchange() is being used. - This feature is not meaningful in recent - library versions as MSVC builds only support - system implemented ICE. Note that all Mingw - builds use inlined asm versions of all the - Interlocked routines. - PTW32_ALERTABLE_ASYNC_CANCEL - Return TRUE is the QueueUserAPCEx package - QUSEREX.DLL is available and the AlertDrv.sys - driver is loaded into Windows, providing - alertable (pre-emptive) asyncronous threads - cancellation. If this feature returns FALSE - then the default async cancel scheme is in - use, which cannot cancel blocked threads. - - Features may be Or'ed into the mask parameter, in which case - the routine returns TRUE if any of the Or'ed features would - return TRUE. At this stage it doesn't make sense to Or features - but it may some day. - - -void * -pthread_timechange_handler_np(void *) - - To improve tolerance against operator or time service - initiated system clock changes. - - This routine can be called by an application when it - receives a WM_TIMECHANGE message from the system. At - present it broadcasts all condition variables so that - waiting threads can wake up and re-evaluate their - conditions and restart their timed waits if required. - - It has the same return type and argument type as a - thread routine so that it may be called directly - through pthread_create(), i.e. as a separate thread. - - Parameters - - Although a parameter must be supplied, it is ignored. - The value NULL can be used. - - Return values - - It can return an error EAGAIN to indicate that not - all condition variables were broadcast for some reason. - Otherwise, 0 is returned. - - If run as a thread, the return value is returned - through pthread_join(). - - The return value should be cast to an integer. - - -HANDLE -pthread_getw32threadhandle_np(pthread_t thread); - - Returns the win32 thread handle that the POSIX - thread "thread" is running as. - - Applications can use the win32 handle to set - win32 specific attributes of the thread. - -DWORD -pthread_getw32threadid_np (pthread_t thread) - - Returns the Windows native thread ID that the POSIX - thread "thread" is running as. - - Only valid when the library is built where - ! (defined(__MINGW64__) || defined(__MINGW32__)) || defined (__MSVCRT__) || defined (__DMC__) - and otherwise returns 0. - - -int -pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, int kind) - -int -pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, int *kind) - - These two routines are included for Linux compatibility - and are direct equivalents to the standard routines - pthread_mutexattr_settype - pthread_mutexattr_gettype - - pthread_mutexattr_setkind_np accepts the following - mutex kinds: - PTHREAD_MUTEX_FAST_NP - PTHREAD_MUTEX_ERRORCHECK_NP - PTHREAD_MUTEX_RECURSIVE_NP - - These are really just equivalent to (respectively): - PTHREAD_MUTEX_NORMAL - PTHREAD_MUTEX_ERRORCHECK - PTHREAD_MUTEX_RECURSIVE - - -int -pthread_delay_np (const struct timespec *interval) - - This routine causes a thread to delay execution for a specific period of time. - This period ends at the current time plus the specified interval. The routine - will not return before the end of the period is reached, but may return an - arbitrary amount of time after the period has gone by. This can be due to - system load, thread priorities, and system timer granularity. - - Specifying an interval of zero (0) seconds and zero (0) nanoseconds is - allowed and can be used to force the thread to give up the processor or to - deliver a pending cancellation request. - - This routine is a cancellation point. - - The timespec structure contains the following two fields: - - tv_sec is an integer number of seconds. - tv_nsec is an integer number of nanoseconds. - - Return Values - - If an error condition occurs, this routine returns an integer value - indicating the type of error. Possible return values are as follows: - - 0 Successful completion. - [EINVAL] The value specified by interval is invalid. - - -__int64 -pthread_getunique_np (pthread_t thr) - - Returns the unique number associated with thread thr. - The unique numbers are a simple way of positively identifying a thread when - pthread_t cannot be relied upon to identify the true thread instance. I.e. a - pthread_t value may be assigned to different threads throughout the life of a - process. - - Because pthreads4w (pthreads-win32) threads can be uniquely identified by their - pthread_t values this routine is provided only for source code compatibility. - - NOTE: if the library is re-initialised, i.e. by calling pthread_win32_process_detach_np() - followed by pthread_win32_process_attach_np(), then the unique number is reset along with - several other library global values. Library reinitialisation should not be required, - however, some older applications may still call these routines as they were once required to - do when statically linking the library. - -int -pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec *abstime) - -int -pthread_tryjoin_np (pthread_t thread, void **value_ptr) - - These function is added for compatibility with Linux. - - -int -pthread_num_processors_np (void) - - This routine (found on HPUX systems) returns the number of processors - in the system. This implementation actually returns the number of - processors available to the process, which can be a lower number - than the system's number, depending on the process's affinity mask. - - -BOOL -pthread_win32_process_attach_np (void); - -BOOL -pthread_win32_process_detach_np (void); - -BOOL -pthread_win32_thread_attach_np (void); - -BOOL -pthread_win32_thread_detach_np (void); - - These functions contain the code normally run via DllMain - when the library is used as a dll. As of version 2.9.0 of the - library, static builds using either MSC or GCC will call - pthread_win32_process_* automatically at application startup and - exit respectively. - - pthread_win32_thread_attach_np() is currently a no-op. - - pthread_win32_thread_detach_np() is not a no-op. It cleans up the - implicit pthread handle that is allocated to any thread not started - via pthread_create(). Such non-posix threads should call this routine - when they exit, or call pthread_exit() to both cleanup and exit. - - These functions invariably return TRUE except for - pthread_win32_process_attach_np() which will return FALSE - if pthreads-win32 initialisation fails. - - -int -pthread_attr_getaffinity_np (pthread_attr_t * attr, size_t cpusetsize, cpu_set_t * cpuset); - -int -pthread_attr_setaffinity_np (pthread_attr_t * attr, size_t cpusetsize, const cpu_set_t * cpuset); - -int -pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t * cpuset); - -int -pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, const cpu_set_t * cpuset); - - Manipulate the CPU affinity of threads. Compatibility with libgcc-based pthreads - implementations. - - -int -pthreadCancelableWait (HANDLE waitHandle); - -int -pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout); - - These two functions provide hooks into the pthread_cancel - mechanism that will allow you to wait on a Windows handle - and make it a cancellation point. Both functions block - until either the given w32 handle is signaled, or - pthread_cancel has been called. It is implemented using - WaitForMultipleObjects on 'waitHandle' and a manually - reset w32 event used to implement pthread_cancel. - -<<<<<<< HEAD -int -pthread_getname_np(pthread_t thr, char *name, int len); - -If PTW32_COMPATIBILITY_BSD or PTW32_COMPATIBILITY_TRU64 defined -int -pthread_setname_np(pthread_t thr, const char *name, void *arg); - -Otherwise: -int -pthread_setname_np(pthread_t thr, const char *name); - - Set and get thread names. Compatibility. - - -struct timespec * -pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * relative); - - Primarily to facilitate writing unit tests but exported for convenience. - The struct timespec pointed to by the first parameter is modified to represent the - time 'now' plus an optional offset value timespec in a platform optimal way. - Returns the first parameter so is compatible as the struct timespec * parameter in - POSIX timed function calls, e.g. - - struct timespec abstime, reltime = { 0, 5000000 } /* 5 ms */; - pthread_mutex_timedwait(&mtx, pthread_win32_getabstime_np(&abstime, &reltime)); - -======= ->>>>>>> refs/heads/mingw-patch-base - -Non-portable issues -------------------- - -Thread priority - - POSIX defines a single contiguous range of numbers that determine a - thread's priority. Win32 defines priority classes and priority - levels relative to these classes. Classes are simply priority base - levels that the defined priority levels are relative to such that, - changing a process's priority class will change the priority of all - of it's threads, while the threads retain the same relativity to each - other. - - A Win32 system defines a single contiguous monotonic range of values - that define system priority levels, just like POSIX. However, Win32 - restricts individual threads to a subset of this range on a - per-process basis. - - The following table shows the base priority levels for combinations - of priority class and priority value in Win32. - - Process Priority Class Thread Priority Level - ----------------------------------------------------------------- - 1 IDLE_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 HIGH_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 2 IDLE_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 3 IDLE_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 4 IDLE_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 4 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 5 IDLE_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 5 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 5 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 6 IDLE_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 6 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 6 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 7 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 7 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 7 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 8 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 8 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 8 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 8 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 9 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 9 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 9 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 10 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 10 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 11 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 11 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 11 HIGH_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 12 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 12 HIGH_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 13 HIGH_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 14 HIGH_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 IDLE_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 16 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 17 REALTIME_PRIORITY_CLASS -7 - 18 REALTIME_PRIORITY_CLASS -6 - 19 REALTIME_PRIORITY_CLASS -5 - 20 REALTIME_PRIORITY_CLASS -4 - 21 REALTIME_PRIORITY_CLASS -3 - 22 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 23 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 24 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 25 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 26 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 27 REALTIME_PRIORITY_CLASS 3 - 28 REALTIME_PRIORITY_CLASS 4 - 29 REALTIME_PRIORITY_CLASS 5 - 30 REALTIME_PRIORITY_CLASS 6 - 31 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - - Windows NT: Values -7, -6, -5, -4, -3, 3, 4, 5, and 6 are not supported. - - - As you can see, the real priority levels available to any individual - Win32 thread are non-contiguous. - - An application using pthreads-win32 should not make assumptions about - the numbers used to represent thread priority levels, except that they - are monotonic between the values returned by sched_get_priority_min() - and sched_get_priority_max(). E.g. Windows 95, 98, NT, 2000, XP make - available a non-contiguous range of numbers between -15 and 15, while - at least one version of WinCE (3.0) defines the minimum priority - (THREAD_PRIORITY_LOWEST) as 5, and the maximum priority - (THREAD_PRIORITY_HIGHEST) as 1. - - Internally, pthreads-win32 maps any priority levels between - THREAD_PRIORITY_IDLE and THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, - or between THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to - THREAD_PRIORITY_HIGHEST. Currently, this also applies to - REALTIME_PRIORITY_CLASSi even if levels -7, -6, -5, -4, -3, 3, 4, 5, and 6 - are supported. - - If it wishes, a Win32 application using pthreads-win32 can use the Win32 - defined priority macros THREAD_PRIORITY_IDLE through - THREAD_PRIORITY_TIME_CRITICAL. - - -The opacity of the pthread_t datatype -------------------------------------- -and possible solutions for portable null/compare/hash, etc ----------------------------------------------------------- - -Because pthread_t is an opague datatype an implementation is permitted to define -pthread_t in any way it wishes. That includes defining some bits, if it is -scalar, or members, if it is an aggregate, to store information that may be -extra to the unique identifying value of the ID. As a result, pthread_t values -may not be directly comparable. - -If you want your code to be portable you must adhere to the following contraints: - -1) Don't assume it is a scalar data type, e.g. an integer or pointer value. There -are several other implementations where pthread_t is also a struct. See our FAQ -Question 11 for our reasons for defining pthread_t as a struct. - -2) You must not compare them using relational or equality operators. You must use -the API function pthread_equal() to test for equality. - -3) Never attempt to reference individual members. - - -The problem - -Certain applications would like to be able to access only the 'pure' pthread_t -id values, primarily to use as keys into data structures to manage threads or -thread-related data, but this is not possible in a maximally portable and -standards compliant way for current POSIX threads implementations. - -For implementations that define pthread_t as a scalar, programmers often employ -direct relational and equality operators on pthread_t. This code will break when -ported to an implementation that defines pthread_t as an aggregate type. - -For implementations that define pthread_t as an aggregate, e.g. a struct, -programmers can use memcmp etc., but then face the prospect that the struct may -include alignment padding bytes or bits as well as extra implementation-specific -members that are not part of the unique identifying value. - -[While this is not currently the case for pthreads-win32, opacity also -means that an implementation is free to change the definition, which should -generally only require that applications be recompiled and relinked, not -rewritten.] - - -Doesn't the compiler take care of padding? - -The C89 and later standards only effectively guarantee element-by-element -equivalence following an assignment or pass by value of a struct or union, -therefore undefined areas of any two otherwise equivalent pthread_t instances -can still compare differently, e.g. attempting to compare two such pthread_t -variables byte-by-byte, e.g. memcmp(&t1, &t2, sizeof(pthread_t) may give an -incorrect result. In practice I'm reasonably confident that compilers routinely -also copy the padding bytes, mainly because assignment of unions would be far -too complicated otherwise. But it just isn't guarranteed by the standard. - -Illustration: - -We have two thread IDs t1 and t2 - -pthread_t t1, t2; - -In an application we create the threads and intend to store the thread IDs in an -ordered data structure (linked list, tree, etc) so we need to be able to compare -them in order to insert them initially and also to traverse. - -Suppose pthread_t contains undefined padding bits and our compiler copies our -pthread_t [struct] element-by-element, then for the assignment: - -pthread_t temp = t1; - -temp and t1 will be equivalent and correct but a byte-for-byte comparison such as -memcmp(&temp, &t1, sizeof(pthread_t)) == 0 may not return true as we expect because -the undefined bits may not have the same values in the two variable instances. - -Similarly if passing by value under the same conditions. - -If, on the other hand, the undefined bits are at least constant through every -assignment and pass-by-value then the byte-for-byte comparison -memcmp(&temp, &t1, sizeof(pthread_t)) == 0 will always return the expected result. -How can we force the behaviour we need? - - -Solutions - -Adding new functions to the standard API or as non-portable extentions is -the only reliable and portable way to provide the necessary operations. -Remember also that POSIX is not tied to the C language. The most common -functions that have been suggested are: - -pthread_null() -pthread_compare() -pthread_hash() - -A single more general purpose function could also be defined as a -basis for at least the last two of the above functions. - -First we need to list the freedoms and constraints with respect -to pthread_t so that we can be sure our solution is compatible with the -standard. - -What is known or may be deduced from the standard: -1) pthread_t must be able to be passed by value, so it must be a single object. -2) from (1) it must be copyable so cannot embed thread-state information, locks -or other volatile objects required to manage the thread it associates with. -3) pthread_t may carry additional information, e.g. for debugging or to manage -itself. -4) there is an implicit requirement that the size of pthread_t is determinable -at compile-time and size-invariant, because it must be able to copy the object -(i.e. through assignment and pass-by-value). Such copies must be genuine -duplicates, not merely a copy of a pointer to a common instance such as -would be the case if pthread_t were defined as an array. - - -Suppose we define the following function: - -/* This function shall return it's argument */ -pthread_t* pthread_normalize(pthread_t* thread); - -For scalar or aggregate pthread_t types this function would simply zero any bits -within the pthread_t that don't uniquely identify the thread, including padding, -such that client code can return consistent results from operations done on the -result. If the additional bits are a pointer to an associate structure then -this function would ensure that the memory used to store that associate -structure does not leak. After normalization the following compare would be -valid and repeatable: - -memcmp(pthread_normalize(&t1),pthread_normalize(&t2),sizeof(pthread_t)) - -Note 1: such comparisons are intended merely to order and sort pthread_t values -and allow them to index various data structures. They are not intended to reveal -anything about the relationships between threads, like startup order. - -Note 2: the normalized pthread_t is also a valid pthread_t that uniquely -identifies the same thread. - -Advantages: -1) In most existing implementations this function would reduce to a no-op that -emits no additional instructions, i.e after in-lining or optimisation, or if -defined as a macro: -#define pthread_normalise(tptr) (tptr) - -2) This single function allows an application to portably derive -application-level versions of any of the other required functions. - -3) It is a generic function that could enable unanticipated uses. - -Disadvantages: -1) Less efficient than dedicated compare or hash functions for implementations -that include significant extra non-id elements in pthread_t. - -2) Still need to be concerned about padding if copying normalized pthread_t. -See the later section on defining pthread_t to neutralise padding issues. - -Generally a pthread_t may need to be normalized every time it is used, -which could have a significant impact. However, this is a design decision -for the implementor in a competitive environment. An implementation is free -to define a pthread_t in a way that minimises or eliminates padding or -renders this function a no-op. - -Hazards: -1) Pass-by-reference directly modifies 'thread' so the application must -synchronise access or ensure that the pointer refers to a copy. The alternative -of pass-by-value/return-by-value was considered but then this requires two copy -operations, disadvantaging implementations where this function is not a no-op -in terms of speed of execution. This function is intended to be used in high -frequency situations and needs to be efficient, or at least not unnecessarily -inefficient. The alternative also sits awkwardly with functions like memcmp. - -2) [Non-compliant] code that uses relational and equality operators on -arithmetic or pointer style pthread_t types would need to be rewritten, but it -should be rewritten anyway. - - -C implementation of null/compare/hash functions using pthread_normalize(): - -/* In pthread.h */ -pthread_t* pthread_normalize(pthread_t* thread); - -/* In user code */ -/* User-level bitclear function - clear bits in loc corresponding to mask */ -void* bitclear (void* loc, void* mask, size_t count); - -typedef unsigned int hash_t; - -/* User-level hash function */ -hash_t hash(void* ptr, size_t count); - -/* - * User-level pthr_null function - modifies the origin thread handle. - * The concept of a null pthread_t is highly implementation dependent - * and this design may be far from the mark. For example, in an - * implementation "null" may mean setting a special value inside one - * element of pthread_t to mean "INVALID". However, if that value was zero and - * formed part of the id component then we may get away with this design. - */ -pthread_t* pthr_null(pthread_t* tp) -{ - /* - * This should have the same effect as memset(tp, 0, sizeof(pthread_t)) - * We're just showing that we can do it. - */ - void* p = (void*) pthread_normalize(tp); - return (pthread_t*) bitclear(p, p, sizeof(pthread_t)); -} - -/* - * Safe user-level pthr_compare function - modifies temporary thread handle copies - */ -int pthr_compare_safe(pthread_t thread1, pthread_t thread2) -{ - return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); -} - -/* - * Fast user-level pthr_compare function - modifies origin thread handles - */ -int pthr_compare_fast(pthread_t* thread1, pthread_t* thread2) -{ - return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); -} - -/* - * Safe user-level pthr_hash function - modifies temporary thread handle copy - */ -hash_t pthr_hash_safe(pthread_t thread) -{ - return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); -} - -/* - * Fast user-level pthr_hash function - modifies origin thread handle - */ -hash_t pthr_hash_fast(pthread_t thread) -{ - return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); -} - -/* User-level bitclear function - modifies the origin array */ -void* bitclear(void* loc, void* mask, size_t count) -{ - int i; - for (i=0; i < count; i++) { - (unsigned char) *loc++ &= ~((unsigned char) *mask++); - } -} - -/* Donald Knuth hash */ -hash_t hash(void* str, size_t count) -{ - hash_t hash = (hash_t) count; - unsigned int i = 0; - - for(i = 0; i < len; str++, i++) - { - hash = ((hash << 5) ^ (hash >> 27)) ^ (*str); - } - return hash; -} - -/* Example of advantage point (3) - split a thread handle into its id and non-id values */ -pthread_t id = thread, non-id = thread; -bitclear((void*) &non-id, (void*) pthread_normalize(&id), sizeof(pthread_t)); - - -A pthread_t type change proposal to neutralise the effects of padding - -Even if pthread_normalize() is available, padding is still a problem because -the standard only garrantees element-by-element equivalence through -copy operations (assignment and pass-by-value). So padding bit values can -still change randomly after calls to pthread_normalize(). - -[I suspect that most compilers take the easy path and always byte-copy anyway, -partly because it becomes too complex to do (e.g. unions that contain sub-aggregates) -but also because programmers can easily design their aggregates to minimise and -often eliminate padding]. - -How can we eliminate the problem of padding bytes in structs? Could -defining pthread_t as a union rather than a struct provide a solution? - -In fact, the Linux pthread.h defines most of it's pthread_*_t objects (but not -pthread_t itself) as unions, possibly for this and/or other reasons. We'll -borrow some element naming from there but the ideas themselves are well known -- the __align element used to force alignment of the union comes from K&R's -storage allocator example. - -/* Essentially our current pthread_t renamed */ -typedef struct { - struct thread_state_t * __p; - long __x; /* sequence counter */ -} thread_id_t; - -Ensuring that the last element in the above struct is a long ensures that the -overall struct size is a multiple of sizeof(long), so there should be no trailing -padding in this struct or the union we define below. -(Later we'll see that we can handle internal but not trailing padding.) - -/* New pthread_t */ -typedef union { - char __size[sizeof(thread_id_t)]; /* array as the first element */ - thread_id_t __tid; - long __align; /* Ensure that the union starts on long boundary */ -} pthread_t; - -This guarrantees that, during an assignment or pass-by-value, the compiler copies -every byte in our thread_id_t because the compiler guarrantees that the __size -array, which we have ensured is the equal-largest element in the union, retains -equivalence. - -This means that pthread_t values stored, assigned and passed by value will at least -carry the value of any undefined padding bytes along and therefore ensure that -those values remain consistent. Our comparisons will return consistent results and -our hashes of [zero initialised] pthread_t values will also return consistent -results. - -We have also removed the need for a pthread_null() function; we can initialise -at declaration time or easily create our own const pthread_t to use in assignments -later: - -const pthread_t null_tid = {0}; /* braces are required */ - -pthread_t t; -... -t = null_tid; - - -Note that we don't have to explicitly make use of the __size array at all. It's -there just to force the compiler behaviour we want. - - -Partial solutions without a pthread_normalize function - - -An application-level pthread_null and pthread_compare proposal -(and pthread_hash proposal by extention) - -In order to deal with the problem of scalar/aggregate pthread_t type disparity in -portable code I suggest using an old-fashioned union, e.g.: - -Contraints: -- there is no padding, or padding values are preserved through assignment and - pass-by-value (see above); -- there are no extra non-id values in the pthread_t. - - -Example 1: A null initialiser for pthread_t variables... - -typedef union { - unsigned char b[sizeof(pthread_t)]; - pthread_t t; -} init_t; - -const init_t initial = {0}; - -pthread_t tid = initial.t; /* init tid to all zeroes */ - - -Example 2: A comparison function for pthread_t values - -typedef union { - unsigned char b[sizeof(pthread_t)]; - pthread_t t; -} pthcmp_t; - -int pthcmp(pthread_t left, pthread_t right) -{ - /* - * Compare two pthread handles in a way that imposes a repeatable but arbitrary - * ordering on them. - * I.e. given the same set of pthread_t handles the ordering should be the same - * each time but the order has no particular meaning other than that. E.g. - * the ordering does not imply the thread start sequence, or any other - * relationship between threads. - * - * Return values are: - * 1 : left is greater than right - * 0 : left is equal to right - * -1 : left is less than right - */ - int i; - pthcmp_t L, R; - L.t = left; - R.t = right; - for (i = 0; i < sizeof(pthread_t); i++) - { - if (L.b[i] > R.b[i]) - return 1; - else if (L.b[i] < R.b[i]) - return -1; - } - return 0; -} - -It has been pointed out that the C99 standard allows for the possibility that -integer types also may include padding bits, which could invalidate the above -method. This addition to C99 was specifically included after it was pointed -out that there was one, presumably not particularly well known, architecture -that included a padding bit in it's 32 bit integer type. See section 6.2.6.2 -of both the standard and the rationale, specifically the paragraph starting at -line 16 on page 43 of the rationale. - - -An aside - -Certain compilers, e.g. gcc and one of the IBM compilers, include a feature -extention: provided the union contains a member of the same type as the -object then the object may be cast to the union itself. - -We could use this feature to speed up the pthrcmp() function from example 2 -above by casting rather than assigning the pthread_t arguments to the union, e.g.: - -int pthcmp(pthread_t left, pthread_t right) -{ - /* - * Compare two pthread handles in a way that imposes a repeatable but arbitrary - * ordering on them. - * I.e. given the same set of pthread_t handles the ordering should be the same - * each time but the order has no particular meaning other than that. E.g. - * the ordering does not imply the thread start sequence, or any other - * relationship between threads. - * - * Return values are: - * 1 : left is greater than right - * 0 : left is equal to right - * -1 : left is less than right - */ - int i; - for (i = 0; i < sizeof(pthread_t); i++) - { - if (((pthcmp_t)left).b[i] > ((pthcmp_t)right).b[i]) - return 1; - else if (((pthcmp_t)left).b[i] < ((pthcmp_t)right).b[i]) - return -1; - } - return 0; -} - - -Result thus far - -We can't remove undefined bits if they are there in pthread_t already, but we have -attempted to render them inert for comparison and hashing functions by making them -consistent through assignment, copy and pass-by-value. - -Note: Hashing pthread_t values requires that all pthread_t variables be initialised -to the same value (usually all zeros) before being assigned a proper thread ID, i.e. -to ensure that any padding bits are zero, or at least the same value for all -pthread_t. Since all pthread_t values are generated by the library in the first -instance this need not be an application-level operation. - - -Conclusion - -I've attempted to resolve the multiple issues of type opacity and the possible -presence of undefined bits and bytes in pthread_t values, which prevent -applications from comparing or hashing pthread handles. - -Two complimentary partial solutions have been proposed, one an application-level -scheme to handle both scalar and aggregate pthread_t types equally, plus a -definition of pthread_t itself that neutralises padding bits and bytes by -coercing semantics out of the compiler to eliminate variations in the values of -padding bits. - -I have not provided any solution to the problem of handling extra values embedded -in pthread_t, e.g. debugging or trap information that an implementation is entitled -to include. Therefore none of this replaces the portability and flexibility of API -functions but what functions are needed? The threads standard is unlikely to -include new functions that can be implemented by a combination of existing features -and more generic functions (several references in the threads rationale suggest this). -Therefore I propose that the following function could replace the several functions -that have been suggested in conversations: - -pthread_t * pthread_normalize(pthread_t * handle); - -For most existing pthreads implementations this function, or macro, would reduce to -a no-op with zero call overhead. Most of the other desired operations on pthread_t -values (null, compare, hash, etc.) can be trivially derived from this and other -standard functions. +This file documents non-portable functions and other issues. + +Non-portable functions included in pthreads-win32 +------------------------------------------------- + +BOOL +pthread_win32_test_features_np(int mask) + + This routine allows an application to check which + run-time auto-detected features are available within + the library. + + The possible features are: + + PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE + Return TRUE if the native version of + InterlockedCompareExchange() is being used. + This feature is not meaningful in recent + library versions as MSVC builds only support + system implemented ICE. Note that all Mingw + builds use inlined asm versions of all the + Interlocked routines. + PTW32_ALERTABLE_ASYNC_CANCEL + Return TRUE is the QueueUserAPCEx package + QUSEREX.DLL is available and the AlertDrv.sys + driver is loaded into Windows, providing + alertable (pre-emptive) asyncronous threads + cancellation. If this feature returns FALSE + then the default async cancel scheme is in + use, which cannot cancel blocked threads. + + Features may be Or'ed into the mask parameter, in which case + the routine returns TRUE if any of the Or'ed features would + return TRUE. At this stage it doesn't make sense to Or features + but it may some day. + + +void * +pthread_timechange_handler_np(void *) + + To improve tolerance against operator or time service + initiated system clock changes. + + This routine can be called by an application when it + receives a WM_TIMECHANGE message from the system. At + present it broadcasts all condition variables so that + waiting threads can wake up and re-evaluate their + conditions and restart their timed waits if required. + + It has the same return type and argument type as a + thread routine so that it may be called directly + through pthread_create(), i.e. as a separate thread. + + Parameters + + Although a parameter must be supplied, it is ignored. + The value NULL can be used. + + Return values + + It can return an error EAGAIN to indicate that not + all condition variables were broadcast for some reason. + Otherwise, 0 is returned. + + If run as a thread, the return value is returned + through pthread_join(). + + The return value should be cast to an integer. + + +HANDLE +pthread_getw32threadhandle_np(pthread_t thread); + + Returns the win32 thread handle that the POSIX + thread "thread" is running as. + + Applications can use the win32 handle to set + win32 specific attributes of the thread. + +DWORD +pthread_getw32threadid_np (pthread_t thread) + + Returns the Windows native thread ID that the POSIX + thread "thread" is running as. + + Only valid when the library is built where + ! (defined(__MINGW64__) || defined(__MINGW32__)) || defined (__MSVCRT__) || defined (__DMC__) + and otherwise returns 0. + + +int +pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, int kind) + +int +pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, int *kind) + + These two routines are included for Linux compatibility + and are direct equivalents to the standard routines + pthread_mutexattr_settype + pthread_mutexattr_gettype + + pthread_mutexattr_setkind_np accepts the following + mutex kinds: + PTHREAD_MUTEX_FAST_NP + PTHREAD_MUTEX_ERRORCHECK_NP + PTHREAD_MUTEX_RECURSIVE_NP + + These are really just equivalent to (respectively): + PTHREAD_MUTEX_NORMAL + PTHREAD_MUTEX_ERRORCHECK + PTHREAD_MUTEX_RECURSIVE + + +int +pthread_delay_np (const struct timespec *interval) + + This routine causes a thread to delay execution for a specific period of time. + This period ends at the current time plus the specified interval. The routine + will not return before the end of the period is reached, but may return an + arbitrary amount of time after the period has gone by. This can be due to + system load, thread priorities, and system timer granularity. + + Specifying an interval of zero (0) seconds and zero (0) nanoseconds is + allowed and can be used to force the thread to give up the processor or to + deliver a pending cancellation request. + + This routine is a cancellation point. + + The timespec structure contains the following two fields: + + tv_sec is an integer number of seconds. + tv_nsec is an integer number of nanoseconds. + + Return Values + + If an error condition occurs, this routine returns an integer value + indicating the type of error. Possible return values are as follows: + + 0 Successful completion. + [EINVAL] The value specified by interval is invalid. + + +__int64 +pthread_getunique_np (pthread_t thr) + + Returns the unique number associated with thread thr. + The unique numbers are a simple way of positively identifying a thread when + pthread_t cannot be relied upon to identify the true thread instance. I.e. a + pthread_t value may be assigned to different threads throughout the life of a + process. + + Because pthreads4w (pthreads-win32) threads can be uniquely identified by their + pthread_t values this routine is provided only for source code compatibility. + + NOTE: if the library is re-initialised, i.e. by calling pthread_win32_process_detach_np() + followed by pthread_win32_process_attach_np(), then the unique number is reset along with + several other library global values. Library reinitialisation should not be required, + however, some older applications may still call these routines as they were once required to + do when statically linking the library. + +int +pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec *abstime) + +int +pthread_tryjoin_np (pthread_t thread, void **value_ptr) + + These function is added for compatibility with Linux. + + +int +pthread_num_processors_np (void) + + This routine (found on HPUX systems) returns the number of processors + in the system. This implementation actually returns the number of + processors available to the process, which can be a lower number + than the system's number, depending on the process's affinity mask. + + +BOOL +pthread_win32_process_attach_np (void); + +BOOL +pthread_win32_process_detach_np (void); + +BOOL +pthread_win32_thread_attach_np (void); + +BOOL +pthread_win32_thread_detach_np (void); + + These functions contain the code normally run via DllMain + when the library is used as a dll. As of version 2.9.0 of the + library, static builds using either MSC or GCC will call + pthread_win32_process_* automatically at application startup and + exit respectively. + + pthread_win32_thread_attach_np() is currently a no-op. + + pthread_win32_thread_detach_np() is not a no-op. It cleans up the + implicit pthread handle that is allocated to any thread not started + via pthread_create(). Such non-posix threads should call this routine + when they exit, or call pthread_exit() to both cleanup and exit. + + These functions invariably return TRUE except for + pthread_win32_process_attach_np() which will return FALSE + if pthreads-win32 initialisation fails. + + +int +pthread_attr_getaffinity_np (pthread_attr_t * attr, size_t cpusetsize, cpu_set_t * cpuset); + +int +pthread_attr_setaffinity_np (pthread_attr_t * attr, size_t cpusetsize, const cpu_set_t * cpuset); + +int +pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t * cpuset); + +int +pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, const cpu_set_t * cpuset); + + Manipulate the CPU affinity of threads. Compatibility with libgcc-based pthreads + implementations. + + +int +pthreadCancelableWait (HANDLE waitHandle); + +int +pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout); + + These two functions provide hooks into the pthread_cancel + mechanism that will allow you to wait on a Windows handle + and make it a cancellation point. Both functions block + until either the given w32 handle is signaled, or + pthread_cancel has been called. It is implemented using + WaitForMultipleObjects on 'waitHandle' and a manually + reset w32 event used to implement pthread_cancel. + +int +pthread_getname_np(pthread_t thr, char *name, int len); + +If PTW32_COMPATIBILITY_BSD or PTW32_COMPATIBILITY_TRU64 defined +int +pthread_setname_np(pthread_t thr, const char *name, void *arg); + +Otherwise: +int +pthread_setname_np(pthread_t thr, const char *name); + + Set and get thread names. Compatibility. + + +struct timespec * +pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * relative); + + Primarily to facilitate writing unit tests but exported for convenience. + The struct timespec pointed to by the first parameter is modified to represent the + time 'now' plus an optional offset value timespec in a platform optimal way. + Returns the first parameter so is compatible as the struct timespec * parameter in + POSIX timed function calls, e.g. + + struct timespec abstime, reltime = { 0, 5000000 } /* 5 ms */; + pthread_mutex_timedwait(&mtx, pthread_win32_getabstime_np(&abstime, &reltime)); + + +Non-portable issues +------------------- + +Thread priority + + POSIX defines a single contiguous range of numbers that determine a + thread's priority. Win32 defines priority classes and priority + levels relative to these classes. Classes are simply priority base + levels that the defined priority levels are relative to such that, + changing a process's priority class will change the priority of all + of it's threads, while the threads retain the same relativity to each + other. + + A Win32 system defines a single contiguous monotonic range of values + that define system priority levels, just like POSIX. However, Win32 + restricts individual threads to a subset of this range on a + per-process basis. + + The following table shows the base priority levels for combinations + of priority class and priority value in Win32. + + Process Priority Class Thread Priority Level + ----------------------------------------------------------------- + 1 IDLE_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 HIGH_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 2 IDLE_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 3 IDLE_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 4 IDLE_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 4 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 5 IDLE_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 5 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 5 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 6 IDLE_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 6 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 6 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 7 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 7 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 7 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 8 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 8 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 8 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 8 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 9 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 9 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 9 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 10 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 10 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 11 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 11 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 11 HIGH_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 12 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 12 HIGH_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 13 HIGH_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 14 HIGH_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 IDLE_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 16 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 17 REALTIME_PRIORITY_CLASS -7 + 18 REALTIME_PRIORITY_CLASS -6 + 19 REALTIME_PRIORITY_CLASS -5 + 20 REALTIME_PRIORITY_CLASS -4 + 21 REALTIME_PRIORITY_CLASS -3 + 22 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 23 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 24 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 25 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 26 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 27 REALTIME_PRIORITY_CLASS 3 + 28 REALTIME_PRIORITY_CLASS 4 + 29 REALTIME_PRIORITY_CLASS 5 + 30 REALTIME_PRIORITY_CLASS 6 + 31 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + + Windows NT: Values -7, -6, -5, -4, -3, 3, 4, 5, and 6 are not supported. + + + As you can see, the real priority levels available to any individual + Win32 thread are non-contiguous. + + An application using pthreads-win32 should not make assumptions about + the numbers used to represent thread priority levels, except that they + are monotonic between the values returned by sched_get_priority_min() + and sched_get_priority_max(). E.g. Windows 95, 98, NT, 2000, XP make + available a non-contiguous range of numbers between -15 and 15, while + at least one version of WinCE (3.0) defines the minimum priority + (THREAD_PRIORITY_LOWEST) as 5, and the maximum priority + (THREAD_PRIORITY_HIGHEST) as 1. + + Internally, pthreads-win32 maps any priority levels between + THREAD_PRIORITY_IDLE and THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, + or between THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to + THREAD_PRIORITY_HIGHEST. Currently, this also applies to + REALTIME_PRIORITY_CLASSi even if levels -7, -6, -5, -4, -3, 3, 4, 5, and 6 + are supported. + + If it wishes, a Win32 application using pthreads-win32 can use the Win32 + defined priority macros THREAD_PRIORITY_IDLE through + THREAD_PRIORITY_TIME_CRITICAL. + + +The opacity of the pthread_t datatype +------------------------------------- +and possible solutions for portable null/compare/hash, etc +---------------------------------------------------------- + +Because pthread_t is an opague datatype an implementation is permitted to define +pthread_t in any way it wishes. That includes defining some bits, if it is +scalar, or members, if it is an aggregate, to store information that may be +extra to the unique identifying value of the ID. As a result, pthread_t values +may not be directly comparable. + +If you want your code to be portable you must adhere to the following contraints: + +1) Don't assume it is a scalar data type, e.g. an integer or pointer value. There +are several other implementations where pthread_t is also a struct. See our FAQ +Question 11 for our reasons for defining pthread_t as a struct. + +2) You must not compare them using relational or equality operators. You must use +the API function pthread_equal() to test for equality. + +3) Never attempt to reference individual members. + + +The problem + +Certain applications would like to be able to access only the 'pure' pthread_t +id values, primarily to use as keys into data structures to manage threads or +thread-related data, but this is not possible in a maximally portable and +standards compliant way for current POSIX threads implementations. + +For implementations that define pthread_t as a scalar, programmers often employ +direct relational and equality operators on pthread_t. This code will break when +ported to an implementation that defines pthread_t as an aggregate type. + +For implementations that define pthread_t as an aggregate, e.g. a struct, +programmers can use memcmp etc., but then face the prospect that the struct may +include alignment padding bytes or bits as well as extra implementation-specific +members that are not part of the unique identifying value. + +Opacity also means that an implementation is free to change the definition, +which should generally only require that applications be recompiled and relinked, +not rewritten. + + +Doesn't the compiler take care of padding? + +The C89 and later standards only effectively guarantee element-by-element +equivalence following an assignment or pass by value of a struct or union, +therefore undefined areas of any two otherwise equivalent pthread_t instances +can still compare differently, e.g. attempting to compare two such pthread_t +variables byte-by-byte, e.g. memcmp(&t1, &t2, sizeof(pthread_t) may give an +incorrect result. In practice I'm reasonably confident that compilers routinely +also copy the padding bytes, mainly because assignment of unions would be far +too complicated otherwise. But it just isn't guarranteed by the standard. + +Illustration: + +We have two thread IDs t1 and t2 + +pthread_t t1, t2; + +In an application we create the threads and intend to store the thread IDs in an +ordered data structure (linked list, tree, etc) so we need to be able to compare +them in order to insert them initially and also to traverse. + +Suppose pthread_t contains undefined padding bits and our compiler copies our +pthread_t [struct] element-by-element, then for the assignment: + +pthread_t temp = t1; + +temp and t1 will be equivalent and correct but a byte-for-byte comparison such as +memcmp(&temp, &t1, sizeof(pthread_t)) == 0 may not return true as we expect because +the undefined bits may not have the same values in the two variable instances. + +Similarly if passing by value under the same conditions. + +If, on the other hand, the undefined bits are at least constant through every +assignment and pass-by-value then the byte-for-byte comparison +memcmp(&temp, &t1, sizeof(pthread_t)) == 0 will always return the expected result. +How can we force the behaviour we need? + + +Solutions + +Adding new functions to the standard API or as non-portable extentions is +the only reliable to provide the necessary operations. Remember also that +POSIX is not tied to the C language. The most common functions that have +been suggested are: + +pthread_null() +pthread_compare() +pthread_hash() + +A single more general purpose function could also be defined as a +basis for at least the last two of the above functions. + +First we need to list the freedoms and constraints with respect +to pthread_t so that we can be sure our solution is compatible with the +standard. + +What is known or may be deduced from the standard: +1) pthread_t must be able to be passed by value, so it must be a single object. +2) from (1) it must be copyable so cannot embed thread-state information, locks +or other volatile objects required to manage the thread it associates with. +3) pthread_t may carry additional information, e.g. for debugging or to manage +itself. +4) there is an implicit requirement that the size of pthread_t is determinable +at compile-time and size-invariant, because it must be able to copy the object +(i.e. through assignment and pass-by-value). Such copies must be genuine +duplicates, not merely a copy of a pointer to a common instance such as +would be the case if pthread_t were defined as an array. + + +Suppose we define the following function: + +/* This function shall return it's argument */ +pthread_t* pthread_normalize(pthread_t* thread); + +For scalar or aggregate pthread_t types this function would simply zero any bits +within the pthread_t that don't uniquely identify the thread, including padding, +such that client code can return consistent results from operations done on the +result. If the additional bits are a pointer to an associate structure then +this function would ensure that the memory used to store that associate +structure does not leak. With normalization the following compare would be +valid and repeatable: + +memcmp(pthread_normalize(&t1),pthread_normalize(&t2),sizeof(pthread_t)) + +Note 1: such comparisons are intended merely to order and sort pthread_t values +and allow them to index various data structures. They are not intended to reveal +anything about the relationships between threads, like startup order. + +Note 2: the normalized pthread_t is also a valid pthread_t that uniquely +identifies the same thread. + +Advantages: +1) In most existing implementations this function would reduce to a no-op that +emits no additional instructions, i.e after in-lining or optimisation, or if +defined as a macro: +#define pthread_normalise(tptr) (tptr) + +2) This single function allows an application to portably derive +application-level versions of any of the other required functions. + +3) It is a generic function that could enable unanticipated uses. + +Disadvantages: +1) Less efficient than dedicated compare or hash functions for implementations +that include significant extra non-id elements in pthread_t. + +2) Still need to be concerned about padding if copying normalized pthread_t. +See the later section on defining pthread_t to neutralise padding issues. + +Generally a pthread_t may need to be normalized every time it is used, +which could have a significant impact. However, this is a design decision +for the implementor in a competitive environment. An implementation is free +to define a pthread_t in a way that minimises or eliminates padding or +renders this function a no-op. + +Hazards: +1) Pass-by-reference directly modifies 'thread' so the application must +synchronise access or ensure that the pointer refers to a copy. The alternative +of pass-by-value/return-by-value was considered but then this requires two copy +operations, disadvantaging implementations where this function is not a no-op +in terms of speed of execution. This function is intended to be used in high +frequency situations and needs to be efficient, or at least not unnecessarily +inefficient. The alternative also sits awkwardly with functions like memcmp. + +2) [Non-compliant] code that uses relational and equality operators on +arithmetic or pointer style pthread_t types would need to be rewritten, but it +should be rewritten anyway. + + +C implementation of null/compare/hash functions using pthread_normalize(): + +/* In pthread.h */ +pthread_t* pthread_normalize(pthread_t* thread); + +/* In user code */ +/* User-level bitclear function - clear bits in loc corresponding to mask */ +void* bitclear (void* loc, void* mask, size_t count); + +typedef unsigned int hash_t; + +/* User-level hash function */ +hash_t hash(void* ptr, size_t count); + +/* + * User-level pthr_null function - modifies the origin thread handle. + * The concept of a null pthread_t is highly implementation dependent + * and this design may be far from the mark. For example, in an + * implementation "null" may mean setting a special value inside one + * element of pthread_t to mean "INVALID". However, if that value was zero and + * formed part of the id component then we may get away with this design. + */ +pthread_t* pthr_null(pthread_t* tp) +{ + /* + * This should have the same effect as memset(tp, 0, sizeof(pthread_t)) + * We're just showing that we can do it. + */ + void* p = (void*) pthread_normalize(tp); + return (pthread_t*) bitclear(p, p, sizeof(pthread_t)); +} + +/* + * Safe user-level pthr_compare function - modifies temporary thread handle copies + */ +int pthr_compare_safe(pthread_t thread1, pthread_t thread2) +{ + return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); +} + +/* + * Fast user-level pthr_compare function - modifies origin thread handles + */ +int pthr_compare_fast(pthread_t* thread1, pthread_t* thread2) +{ + return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); +} + +/* + * Safe user-level pthr_hash function - modifies temporary thread handle copy + */ +hash_t pthr_hash_safe(pthread_t thread) +{ + return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); +} + +/* + * Fast user-level pthr_hash function - modifies origin thread handle + */ +hash_t pthr_hash_fast(pthread_t thread) +{ + return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); +} + +/* User-level bitclear function - modifies the origin array */ +void* bitclear(void* loc, void* mask, size_t count) +{ + int i; + for (i=0; i < count; i++) { + (unsigned char) *loc++ &= ~((unsigned char) *mask++); + } +} + +/* Donald Knuth hash */ +hash_t hash(void* str, size_t count) +{ + hash_t hash = (hash_t) count; + unsigned int i = 0; + + for(i = 0; i < len; str++, i++) + { + hash = ((hash << 5) ^ (hash >> 27)) ^ (*str); + } + return hash; +} + +/* Example of advantage point (3) - split a thread handle into its id and non-id values */ +pthread_t id = thread, non-id = thread; +bitclear((void*) &non-id, (void*) pthread_normalize(&id), sizeof(pthread_t)); + + +A pthread_t type change proposal to neutralise the effects of padding + +Even if pthread_normalize() is available, padding is still a problem because +the standard only garrantees element-by-element equivalence through +copy operations (assignment and pass-by-value). So padding bit values can +still change randomly after calls to pthread_normalize(). + +[I suspect that most compilers take the easy path and always byte-copy anyway, +partly because it becomes too complex to do (e.g. unions that contain sub-aggregates) +but also because programmers can easily design their aggregates to minimise and +often eliminate padding]. + +How can we eliminate the problem of padding bytes in structs? Could +defining pthread_t as a union rather than a struct provide a solution? + +In fact, the Linux pthread.h defines most of it's pthread_*_t objects (but not +pthread_t itself) as unions, possibly for this and/or other reasons. We'll +borrow some element naming from there but the ideas themselves are well known +- the __align element used to force alignment of the union comes from K&R's +storage allocator example. + +/* Essentially our current pthread_t renamed */ +typedef struct { + struct thread_state_t * __p; + long __x; /* sequence counter */ +} thread_id_t; + +Ensuring that the last element in the above struct is a long ensures that the +overall struct size is a multiple of sizeof(long), so there should be no trailing +padding in this struct or the union we define below. +(Later we'll see that we can handle internal but not trailing padding.) + +/* New pthread_t */ +typedef union { + char __size[sizeof(thread_id_t)]; /* array as the first element */ + thread_id_t __tid; + long __align; /* Ensure that the union starts on long boundary */ +} pthread_t; + +This guarrantees that, during an assignment or pass-by-value, the compiler copies +every byte in our thread_id_t because the compiler guarrantees that the __size +array, which we have ensured is the equal-largest element in the union, retains +equivalence. + +This means that pthread_t values stored, assigned and passed by value will at least +carry the value of any undefined padding bytes along and therefore ensure that +those values remain consistent. Our comparisons will return consistent results and +our hashes of [zero initialised] pthread_t values will also return consistent +results. + +We have also removed the need for a pthread_null() function; we can initialise +at declaration time or easily create our own const pthread_t to use in assignments +later: + +const pthread_t null_tid = {0}; /* braces are required */ + +pthread_t t; +... +t = null_tid; + + +Note that we don't have to explicitly make use of the __size array at all. It's +there just to force the compiler behaviour we want. + + +Partial solutions without a pthread_normalize function + + +An application-level pthread_null and pthread_compare proposal +(and pthread_hash proposal by extention) + +In order to deal with the problem of scalar/aggregate pthread_t type disparity in +portable code I suggest using an old-fashioned union, e.g.: + +Contraints: +- there is no padding, or padding values are preserved through assignment and + pass-by-value (see above); +- there are no extra non-id values in the pthread_t. + + +Example 1: A null initialiser for pthread_t variables... + +typedef union { + unsigned char b[sizeof(pthread_t)]; + pthread_t t; +} init_t; + +const init_t initial = {0}; + +pthread_t tid = initial.t; /* init tid to all zeroes */ + + +Example 2: A comparison function for pthread_t values + +typedef union { + unsigned char b[sizeof(pthread_t)]; + pthread_t t; +} pthcmp_t; + +int pthcmp(pthread_t left, pthread_t right) +{ + /* + * Compare two pthread handles in a way that imposes a repeatable but arbitrary + * ordering on them. + * I.e. given the same set of pthread_t handles the ordering should be the same + * each time but the order has no particular meaning other than that. E.g. + * the ordering does not imply the thread start sequence, or any other + * relationship between threads. + * + * Return values are: + * 1 : left is greater than right + * 0 : left is equal to right + * -1 : left is less than right + */ + int i; + pthcmp_t L, R; + L.t = left; + R.t = right; + for (i = 0; i < sizeof(pthread_t); i++) + { + if (L.b[i] > R.b[i]) + return 1; + else if (L.b[i] < R.b[i]) + return -1; + } + return 0; +} + +It has been pointed out that the C99 standard allows for the possibility that +integer types also may include padding bits, which could invalidate the above +method. This addition to C99 was specifically included after it was pointed +out that there was one, presumably not particularly well known, architecture +that included a padding bit in it's 32 bit integer type. See section 6.2.6.2 +of both the standard and the rationale, specifically the paragraph starting at +line 16 on page 43 of the rationale. + + +An aside + +Certain compilers, e.g. gcc and one of the IBM compilers, include a feature +extention: provided the union contains a member of the same type as the +object then the object may be cast to the union itself. + +We could use this feature to speed up the pthrcmp() function from example 2 +above by casting rather than assigning the pthread_t arguments to the union, e.g.: + +int pthcmp(pthread_t left, pthread_t right) +{ + /* + * Compare two pthread handles in a way that imposes a repeatable but arbitrary + * ordering on them. + * I.e. given the same set of pthread_t handles the ordering should be the same + * each time but the order has no particular meaning other than that. E.g. + * the ordering does not imply the thread start sequence, or any other + * relationship between threads. + * + * Return values are: + * 1 : left is greater than right + * 0 : left is equal to right + * -1 : left is less than right + */ + int i; + for (i = 0; i < sizeof(pthread_t); i++) + { + if (((pthcmp_t)left).b[i] > ((pthcmp_t)right).b[i]) + return 1; + else if (((pthcmp_t)left).b[i] < ((pthcmp_t)right).b[i]) + return -1; + } + return 0; +} + + +Result thus far + +We can't remove undefined bits if they are there in pthread_t already, but we have +attempted to render them inert for comparison and hashing functions by making them +consistent through assignment, copy and pass-by-value. + +Note: Hashing pthread_t values requires that all pthread_t variables be initialised +to the same value (usually all zeros) before being assigned a proper thread ID, i.e. +to ensure that any padding bits are zero, or at least the same value for all +pthread_t. Since all pthread_t values are generated by the library in the first +instance this need not be an application-level operation. + + +Conclusion + +I've attempted to resolve the multiple issues of type opacity and the possible +presence of undefined bits and bytes in pthread_t values, which prevent +applications from comparing or hashing pthread handles. + +Two complimentary partial solutions have been proposed, one an application-level +scheme to handle both scalar and aggregate pthread_t types equally, plus a +definition of pthread_t itself that neutralises padding bits and bytes by +coercing semantics out of the compiler to eliminate variations in the values of +padding bits. + +I have not provided any solution to the problem of handling extra values embedded +in pthread_t, e.g. debugging or trap information that an implementation is entitled +to include. Therefore none of this replaces the portability and flexibility of API +functions but what functions are needed? The threads standard is unlikely to +include new functions that can be implemented by a combination of existing features +and more generic functions (several references in the threads rationale suggest this). +Therefore I propose that the following function could replace the several functions +that have been suggested in conversations: + +pthread_t * pthread_normalize(pthread_t * handle); + +For most existing pthreads implementations this function, or macro, would reduce to +a no-op with zero call overhead. Most of the other desired operations on pthread_t +values (null, compare, hash, etc.) can be trivially derived from this and other +standard functions. From fce587277a0e5cc6eea73e224b1eb9d44d335c18 Mon Sep 17 00:00:00 2001 From: rpj Date: Sun, 3 Apr 2016 18:19:34 +1000 Subject: [PATCH 064/207] Fix warning --- tests/reinit1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/reinit1.c b/tests/reinit1.c index 3b2ce3cf..b8bfdb40 100644 --- a/tests/reinit1.c +++ b/tests/reinit1.c @@ -59,7 +59,7 @@ void *thread_routine (void *arg) self->changed = 0; - assert(pthread_getunique_np(self->thread_id) == (self->thread_num + 2)); + assert(pthread_getunique_np(self->thread_id) == (unsigned __int64)(self->thread_num + 2)); for (iteration = 0; iteration < ITERATIONS; iteration++) { From c798a337126e04488b0ce03713316a2433315946 Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 4 Apr 2016 11:36:41 +1000 Subject: [PATCH 065/207] Remove exception specificiation as may be problematic in C++. --- implement.h | 18 +++--------------- ptw32_throw.c | 13 +------------ 2 files changed, 4 insertions(+), 27 deletions(-) diff --git a/implement.h b/implement.h index fe36a34b..e8e1c4b8 100644 --- a/implement.h +++ b/implement.h @@ -711,26 +711,14 @@ __PTW32_BEGIN_C_DECLS void ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts); #endif -/* Declared in misc.c */ +/* Declared in pthw32_calloc.c */ #if defined(NEED_CALLOC) #define calloc(n, s) ptw32_calloc(n, s) void *ptw32_calloc (size_t n, size_t s); #endif -/* Declared in private.c */ -#if defined(_MSC_VER) -/* - * Ignore the warning: - * "C++ exception specification ignored except to indicate that - * the function is not __declspec(nothrow)." - */ -#pragma warning(disable:4290) -#endif - void ptw32_throw (DWORD exception) -#if defined(__CLEANUP_CXX) - throw(ptw32_exception_cancel,ptw32_exception_exit) -#endif -; +/* Declared in ptw32_throw.c */ +void ptw32_throw (DWORD exception); __PTW32_END_C_DECLS diff --git a/ptw32_throw.c b/ptw32_throw.c index 855d33ea..05e1fdb1 100644 --- a/ptw32_throw.c +++ b/ptw32_throw.c @@ -50,24 +50,13 @@ /* * ptw32_throw * - * All canceled and explicitly exited POSIX threads go through + * All cancelled and explicitly exited POSIX threads go through * here. This routine knows how to exit both POSIX initiated threads and * 'implicit' POSIX threads for each of the possible language modes (C, * C++, and SEH). */ -#if defined(_MSC_VER) -/* - * Ignore the warning: - * "C++ exception specification ignored except to indicate that - * the function is not __declspec(nothrow)." - */ -#pragma warning(disable:4290) -#endif void ptw32_throw (DWORD exception) -#if defined(__CLEANUP_CXX) - throw(ptw32_exception_cancel,ptw32_exception_exit) -#endif { /* * Don't use pthread_self() to avoid creating an implicit POSIX thread handle From fd7586c2bbcf854248b3b9e44ee064bf0fa83a12 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 4 Apr 2016 23:58:37 +1000 Subject: [PATCH 066/207] Borrowed from Mark Pizzolato's fork of this project. --- .gitignore | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..416cf59d --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +*.obj +*.dll.manifest +*.dll +*.exe.manifest +*.exe +*.lib +*.pdb +*.ilk +*.exp +version.res +tests/*.pass +tests/*.bench +tests/pthread.h +tests/sched.h +tests/semaphore.h +tests/benchlib.o +tests/SIZES.* \ No newline at end of file From 21f2622fe36b08f4d9377113b0e2c16d902e2856 Mon Sep 17 00:00:00 2001 From: rosspjohnson Date: Tue, 5 Apr 2016 00:06:31 +1000 Subject: [PATCH 067/207] Add new file pattern --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 416cf59d..c795622c 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ tests/pthread.h tests/sched.h tests/semaphore.h tests/benchlib.o -tests/SIZES.* \ No newline at end of file +tests/SIZES.* +tests/*.log \ No newline at end of file From c688802d44f5bf15b64a76d1022bd9c4f1764345 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 5 Apr 2016 21:30:44 +1000 Subject: [PATCH 068/207] MinGW64 does and does not define some things we need. --- _ptw32.h | 2 +- tests/test.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/_ptw32.h b/_ptw32.h index 7b3cf4f5..bb47ab7c 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -162,7 +162,7 @@ # include "need_errno.h" #endif -#if defined(__BORLANDC__) +#if defined(__MINGW64_VERSION_MAJOR) || defined(__BORLANDC__) # define int64_t LONGLONG # define uint64_t ULONGLONG #elif !defined(__MINGW32__) diff --git a/tests/test.h b/tests/test.h index e926c073..a6b85bb9 100644 --- a/tests/test.h +++ b/tests/test.h @@ -56,8 +56,10 @@ /* * Some non-thread POSIX API substitutes */ -#define rand_r( _seed ) \ +#if !defined(__MING64_VERSION_MAJOR) +# define rand_r( _seed ) \ ( _seed == _seed? rand() : rand() ) +#endif #if defined(__MINGW32__) # include From 70e0c9f441a3ea054d4911792ac7afecbb899f2d Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 5 Apr 2016 21:31:11 +1000 Subject: [PATCH 069/207] Fix another warning from gcc --- tests/exit2.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/exit2.c b/tests/exit2.c index 7438c865..a534d477 100644 --- a/tests/exit2.c +++ b/tests/exit2.c @@ -44,12 +44,17 @@ void * func(void * arg) { - pthread_exit(arg); + int failed = (int) arg; - /* Never reached. */ - assert(0); + pthread_exit(arg); - return NULL; + /* Never reached. */ + /* + * Trick gcc compiler into not issuing a warning here + */ + assert(failed - (int)arg); + + return NULL; } int From 7b1fffc73dcfed68aea9db0b84de3abb794e74f1 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 5 Apr 2016 21:31:51 +1000 Subject: [PATCH 070/207] From allpassed: return 0 if all tests passed, 1 otherwise --- tests/GNUmakefile.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index e99c24fb..f274974b 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -43,6 +43,8 @@ CP = cp -f MV = mv -f RM = rm -f CAT = cat +GREP = grep +WC = wc MKDIR = mkdir ECHO = echo TOUCH = $(ECHO) Passed > @@ -195,11 +197,13 @@ all-asm: $(ASM) allpassed: $(HDR) $(LIB) $(DLL) $(QAPC) $(TESTS:%=%.pass) @ $(ECHO) "ALL TESTS COMPLETED. Check the logfile: $(LOGFILE)" - @ $(ECHO) "FAILURES: $$( grep FAILED $(LOGFILE) | wc -l ) " ; grep FAILED $(LOGFILE) + @ $(ECHO) "FAILURES: $$( $(GREP) FAILED $(LOGFILE) | $(WC) -l ) " + @ ! $(GREP) FAILED $(LOGFILE) all-bench: $(HDR) $(LIB) $(DLL) $(QAPC) $(XXLIBS) $(BENCHRESULTS) @ $(ECHO) "ALL BENCH TESTS COMPLETED. Check the logfile: $(LOGFILE)" - @ $(ECHO) "FAILURES: $$( grep FAILED $(LOGFILE) | wc -l ) " ; grep FAILED $(LOGFILE) + @ $(ECHO) "FAILURES: $$( $(GREP) FAILED $(LOGFILE) | $(WC) -l ) " + @ ! $(GREP) FAILED $(LOGFILE) cancel9.exe: XLIBS = -lws2_32 From b55f09e8a0b69331da4bf51a058c8acc435c3ef5 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 5 Apr 2016 21:40:26 +1000 Subject: [PATCH 071/207] Typo --- tests/test.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test.h b/tests/test.h index a6b85bb9..a909fda4 100644 --- a/tests/test.h +++ b/tests/test.h @@ -56,7 +56,7 @@ /* * Some non-thread POSIX API substitutes */ -#if !defined(__MING64_VERSION_MAJOR) +#if !defined(__MINGW64_VERSION_MAJOR) # define rand_r( _seed ) \ ( _seed == _seed? rand() : rand() ) #endif From 4b9980323fccca166002733956374f4fa1db65a7 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 5 Apr 2016 22:30:30 +1000 Subject: [PATCH 072/207] Remove obsolete define --- config.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/config.h b/config.h index 2dfde261..11321e83 100644 --- a/config.h +++ b/config.h @@ -10,9 +10,6 @@ /* We're building the pthreads-win32 library */ #define PTW32_BUILD -/* MinGW: Have strcpy_s etc */ -#define MINGW_HAS_SECURE_API - /* CPU affinity */ #define HAVE_CPU_AFFINITY From f2f8fbf8ce87ed1cb772f5d4da02a23cfd8f4f8a Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 5 Apr 2016 22:31:55 +1000 Subject: [PATCH 073/207] Use macros for commands in recipes, for consistency. --- tests/GNUmakefile.in | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index f274974b..609c05a2 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -45,6 +45,7 @@ RM = rm -f CAT = cat GREP = grep WC = wc +TEE = tee MKDIR = mkdir ECHO = echo TOUCH = $(ECHO) Passed > From fcd7a03f2f221c3e94dc95af0d911006ec652d89 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 5 Apr 2016 22:33:05 +1000 Subject: [PATCH 074/207] Replicate allpassed and allbench recipies from GNUmakefile.in --- tests/GNUmakefile | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/tests/GNUmakefile b/tests/GNUmakefile index c6af1cf7..332ebaff 100644 --- a/tests/GNUmakefile +++ b/tests/GNUmakefile @@ -29,6 +29,8 @@ # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # +LOGFILE = testsuite.log + DLL_VER = 2$(EXTRAVERSION) CP = cp -f @@ -36,6 +38,9 @@ MV = mv -f RM = rm -f CAT = cat MKDIR = mkdir +GREP = grep +WC = wc +TEE = tee ECHO = echo TOUCH = $(ECHO) Passed > TESTFILE = test -f @@ -189,24 +194,26 @@ all-asm: $(ASM) @ $(ECHO) "ALL TESTS PASSED! Congratulations!" allpassed: $(HDR) $(LIB) $(DLL) $(QAPC) $(TESTS:%=%.pass) - @ $(ECHO) "ALL TESTS PASSED! Congratulations!" + @ $(ECHO) "ALL TESTS COMPLETED. Check the logfile: $(LOGFILE)" + @ $(ECHO) "FAILURES: $$( $(GREP) FAILED $(LOGFILE) | $(WC) -l )" + @ ! $(GREP) FAILED $(LOGFILE) all-bench: $(HDR) $(LIB) $(DLL) $(QAPC) $(XXLIBS) $(BENCHRESULTS) - @ $(ECHO) "ALL BENCH TESTS COMPLETED." + @ $(ECHO) "ALL BENCH TESTS COMPLETED. Check the logfile: $(LOGFILE)" + @ $(ECHO) "FAILURES: $$( $(GREP) FAILED $(LOGFILE) | $(WC) -l ) " + @ ! $(GREP) FAILED $(LOGFILE) cancel9.exe: XLIBS = -lws2_32 %.pass: %.exe - @ $(ECHO) Running $(TEST) test \"$*\" - @ $(RUN) ./$* - @ $(ECHO) Passed - @ $(TOUCH) $@ + @ $(ECHO) Running $(TEST) test \"$*\" | $(TEE) -a $(LOGFILE) + @ $(RUN) ./$* && { $(ECHO) Passed; $(TOUCH) $@; } || { $(ECHO) FAILED: $* ; $(ECHO) ; } \ + 2>&1 | $(TEE) -a $(LOGFILE) %.bench: %.exe - @ $(ECHO) Running $(TEST) test \"$*\" - @ $(RUN) ./$* - @ $(ECHO) Done - @ $(TOUCH) $@ + @ $(ECHO) Running $(TEST) test \"$*\" | $(TEE) -a $(LOGFILE) + @ $(RUN) ./$* && { $(ECHO) Done; $(TOUCH) $@; } || { $(ECHO) FAILED ; $(ECHO) ; } \ + 2>&1 | $(TEE) -a $(LOGFILE) %.exe: %.c $(CC) $(CFLAGS) $(LFLAGS) -o $@ $< $(INCLUDES) -L. -lpthread$(GCX) $(XLIBS) $(XXLIBS) From 59c8db69ca54f3e8d8e7c804ddc53ba03d52e604 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 6 Apr 2016 10:58:56 +1000 Subject: [PATCH 075/207] Comment and note changes --- README.NONPORTABLE | 23 +++++++++++++++++------ TODO | 13 ++++++++----- ptw32_reuse.c | 8 ++++---- 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/README.NONPORTABLE b/README.NONPORTABLE index 4e546003..174f3d13 100644 --- a/README.NONPORTABLE +++ b/README.NONPORTABLE @@ -395,14 +395,24 @@ the API function pthread_equal() to test for equality. The problem -Certain applications would like to be able to access only the 'pure' pthread_t -id values, primarily to use as keys into data structures to manage threads or +Certain applications would like to be able to access a scalar pthread_t, +primarily to use as keys into data structures to manage threads or thread-related data, but this is not possible in a maximally portable and standards compliant way for current POSIX threads implementations. -For implementations that define pthread_t as a scalar, programmers often employ -direct relational and equality operators on pthread_t. This code will break when -ported to an implementation that defines pthread_t as an aggregate type. +This use is often required because pthread_t values are not unique through +the life of the process and so it is necessary for the application to keep +track of a threads status itself, and ironically this is because they are +scalar types in the first place. + +To my knowledge the only platform that provides a scalar pthread_t that is +unique through the life of a process is Solaris. Other platforms, including +HPUX, will not provide support to applications that do this. + +For implementations that define pthread_t as a scalar, programmers often +employ direct relational and equality operators with pthread_t. This code +will break when ported to a standard-comforming implementation that defines +pthread_t as an aggregate type. For implementations that define pthread_t as an aggregate, e.g. a struct, programmers can use memcmp etc., but then face the prospect that the struct may @@ -778,7 +788,8 @@ extention: provided the union contains a member of the same type as the object then the object may be cast to the union itself. We could use this feature to speed up the pthrcmp() function from example 2 -above by casting rather than assigning the pthread_t arguments to the union, e.g.: +above by directly referencing rather than copying the pthread_t arguments to +the local union variables, e.g.: int pthcmp(pthread_t left, pthread_t right) { diff --git a/TODO b/TODO index e59205b4..360be645 100644 --- a/TODO +++ b/TODO @@ -3,21 +3,24 @@ 1. Implement PTHREAD_PROCESS_SHARED for semaphores, mutexes, condition variables, read/write locks, barriers. + + IMO, to do this in a source code compatible way requires implementation of + POSIX shared memory functions, etc. 2. For version 3 onwards: the following types need to change, resulting in an ABI - change: + change. These have been written conditional on PTW32_VERSION_MAJOR > 2 a) ptw32_handle_t (a.k.a. pthread_t) Change the reuse counter from unsigned int to size_t. Type "int" on 32 bit and 64 bit Windows is 32 bits wide. To give an indication of relative effectiveness of the current "unsigned int", - consider an application that creates and detaches threads at the rate of 1 - per millisecond. At this rate the reuse counter will max out after 49 days. + consider an application that creates and detaches a single thread every + millisecond. At this rate the reuse counter will max out after 49 days. After changing to "size_t" an application compiled for x64 and creating and - detaching a thread every nanosecond would max out after 584 years. + detaching a single thread every nanosecond would max out after 584 years. b) pthread_once_t - Remove unused elements. + Remove elements no longer required after switching to use of MCS lock. \ No newline at end of file diff --git a/ptw32_reuse.c b/ptw32_reuse.c index a0b6ef01..9dbf8bff 100644 --- a/ptw32_reuse.c +++ b/ptw32_reuse.c @@ -54,7 +54,7 @@ * * The original pthread_t struct plus all copies of it contain the address of * the thread state struct ptw32_thread_t_ (p), plus a reuse counter (x). Each - * ptw32_thread_t contains the original copy of it's pthread_t. + * ptw32_thread_t contains the original copy of it's pthread_t (ptHandle). * Once malloced, a ptw32_thread_t_ struct is not freed until the process exits. * * The thread reuse stack is a simple LILO stack managed through a singly @@ -64,13 +64,13 @@ * reuse stack after it's ptHandle's reuse counter has been incremented. * * The following can now be said from this: - * - two pthread_t's are identical iff their ptw32_thread_t reference pointers - * are equal and their reuse counters are equal. That is, + * - two pthread_t's refer to the same thread iff their ptw32_thread_t reference + * pointers are equal and their reuse counters are equal. That is, * * equal = (a.p == b.p && a.x == b.x) * * - a pthread_t copy refers to a destroyed thread if the reuse counter in - * the copy is not equal to the reuse counter in the original. + * the copy is not equal to (i.e less than) the reuse counter in the original. * * threadDestroyed = (copy.x != ((ptw32_thread_t *)copy.p)->ptHandle.x) * From cd999ac005183a15959c063bb4bd1add7d98c1c6 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 6 Apr 2016 11:00:02 +1000 Subject: [PATCH 076/207] pthread_once_t change for major version 3 --- pthread.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/pthread.h b/pthread.h index 28c7237a..9b48b0a6 100644 --- a/pthread.h +++ b/pthread.h @@ -488,16 +488,30 @@ enum * ==================== * ==================== */ -#define PTHREAD_ONCE_INIT { PTW32_FALSE, 0, 0, 0} +#if PTW32_VERSION_MAJOR > 2 + +#define PTHREAD_ONCE_INIT { PTW32_FALSE, 0 } struct pthread_once_t_ { - int done; /* indicates if user function has been executed */ - void * lock; + void * lock; /* MCS lock */ + int done; /* indicates if user function has been executed */ +}; + +#else + +#define PTHREAD_ONCE_INIT { PTW32_FALSE, 0, 0, 0 } + +struct pthread_once_t_ +{ + int done; /* indicates if user function has been executed */ + void * lock; /* MCS lock */ int reserved1; int reserved2; }; +#endif + /* * ==================== From f4e998ea9c7a2c27890a3057067aea137ce655bc Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 7 Apr 2016 00:09:50 +1000 Subject: [PATCH 077/207] Must remove_ptw32.h during clean --- tests/GNUmakefile | 1 + tests/GNUmakefile.in | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/GNUmakefile b/tests/GNUmakefile index 332ebaff..7003b08d 100644 --- a/tests/GNUmakefile +++ b/tests/GNUmakefile @@ -236,6 +236,7 @@ benchlib.o: benchlib.c clean: - $(RM) *.dll - $(RM) *.lib + - $(RM) _ptw32.h - $(RM) pthread.h - $(RM) semaphore.h - $(RM) sched.h diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index 609c05a2..ace0762c 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -244,6 +244,7 @@ benchlib.o: benchlib.c clean: - $(RM) *.dll - $(RM) *.lib + - $(RM) _ptw32.h - $(RM) pthread.h - $(RM) semaphore.h - $(RM) sched.h From e2110cfa1e97369c18a2fe9959aee73a23638919 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Fri, 8 Apr 2016 12:49:35 +1000 Subject: [PATCH 078/207] Library version pthreadGCE[2] does not support asynch cancellation --- README | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README b/README index a0a8d2bc..92aaa315 100644 --- a/README +++ b/README @@ -50,7 +50,7 @@ QueueUserAPCEx by Panagiotis E. Hadjidoukas are runnable. The simulated async cancellation cannot cancel blocked threads. - [FOR SECURITY] To be found Quserex.dll MUST be installed in the + [FOR SECURITY] To be found Quserex.dll MUST be installed in the Windows System Folder. This is not an unreasonable constraint given a driver must also be installed and loaded at system startup. @@ -203,7 +203,7 @@ of the library that use exceptions as part of the thread cancellation and exit implementation. The default version uses setjmp/longjmp. -If you use either pthreadVCE or pthreadGCE: +If you use either pthreadVCE[2] or pthreadGCE[2]: 1. [See also the discussion in the FAQ file - Q2, Q4, and Q5] @@ -225,6 +225,13 @@ Otherwise neither pthreads cancellation nor pthread_exit() will work reliably when using versions of the library that use C++ exceptions for cancellation and thread exit. +NB: [lib]pthreadGCE[2] does not support asynchronous cancellation. Any +attempt to cancel a thread set for asynchronous cancellation using +this version of the library will cause the applicaton to terminate. +We believe this is due to the "unmanaged" context switch that is +disrupting the stack unwinding mechanism and which is used +to cancel blocked threads. See pthread_cancel.c + Other name changes ------------------ From ef9d6da0991cbe37929126eb5a729586b0ae0f62 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sat, 30 Apr 2016 20:41:50 +1000 Subject: [PATCH 079/207] Minor cleanup and administrative changes. --- tests/ChangeLog | 9 +++++++++ tests/Makefile | 1 + tests/semaphore4t.c | 15 --------------- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/tests/ChangeLog b/tests/ChangeLog index 8351847b..3427291f 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,12 @@ +2016-04-30 Ross Johnson + + * semaphore4t.c: No longer need to include ptw32_timespec.c and the + defines that tried to make it work (but failed). There is now an + exported routine that this test uses that can also be used by + applications. It's a general routine that keeps all the platform + conditional stuff inside the library. + * Makefile: Remove _ptw32.h copied from parent directory. + 2016-03-31 Ross Johnson * Makefile (_ptw32.h): Copy header to tests directory required to diff --git a/tests/Makefile b/tests/Makefile index 126ece2e..6d79ff35 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -205,6 +205,7 @@ VCX-static-debug VCX-small-static-debug: clean: if exist *.dll $(RM) *.dll if exist *.lib $(RM) *.lib + if exist _ptw32.h $(RM) _ptw32.h if exist pthread.h $(RM) pthread.h if exist semaphore.h $(RM) semaphore.h if exist sched.h $(RM) sched.h diff --git a/tests/semaphore4t.c b/tests/semaphore4t.c index 660b1eec..acc7985d 100644 --- a/tests/semaphore4t.c +++ b/tests/semaphore4t.c @@ -74,21 +74,6 @@ */ #include "test.h" -/* - * These before and after #defines are to avoid multiply defining - * the functions in the included .c file, by declaring them as static - * (local to this compilation unit). - */ -#if defined(INLINE) -# define XINLINE INLINE -# undef INLINE -# define INLINE static XINLINE -#endif -#include "../ptw32_timespec.c" -#if defined(XINLINE) -# define INLINE XINLINE -# undef XINLINE -#endif #define MAX_COUNT 100 From 1d80e7424b848f4ac0d32c6b0a292773516a8a43 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sat, 30 Apr 2016 20:50:57 +1000 Subject: [PATCH 080/207] Edit email address --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bf6d08d5..9e5f80bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -48,7 +48,7 @@ * ptw32_timespec.c: Fix C90 warnings from GCC; int64_t -> uint64_t -2016-02-18 Carey Gister <> +2016-02-18 Carey Gister * dll.c (DllMain): Should not be defined for static library builds. Doing so prevents static linking with a dll library. From e4564d41c71a93cdd7eb7ed5fa7d1e5fa986a9dc Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sun, 7 Aug 2016 11:27:53 +1000 Subject: [PATCH 081/207] Minor edits --- README | 97 ++++++++++++++++++++++++---------------------------- tests/README | 11 +++--- 2 files changed, 52 insertions(+), 56 deletions(-) diff --git a/README b/README index 92aaa315..05b1353c 100644 --- a/README +++ b/README @@ -145,6 +145,9 @@ not been the case with recent releases. Binary compatibility and consequently library file naming has not changed over this time either so it should not cause any problems. +NOTE: Changes to the platform ABI can cause the library ABI to change +and the current version numbering system does not account for this. + The fourth is commonly used for the build number, but will be reserved for future use. @@ -332,16 +335,23 @@ MinGW64 multilib disabled Building with MS Visual Studio (C, VC++ using C++ EH, or Structured EH) ----------------------------------------------------------------------- +NOTE: A VS project/solution/whatever file is included as a contributed +work and is not used of maintained in development. All building and +testing is done using makefiles. We use the native make system for each +toolchain, which is 'nmake' in this case. + From the source directory run nmake without any arguments to list help information. E.g. $ nmake As examples, as at Release 2.10 the pre-built DLLs and static libraries -are built from the following command-lines: +can be built using one of the following command-lines: -[Note: "setenv" comes with the SDK. "/2003" is used to override my build -system which is Win7 (at the time of writing) for backwards compatibility.] +[Note: "setenv" comes with the SDK which is not required to build the library. +I use it to build and test both 64 and 32 bit versions of the library. +"/2003" is used to override my build system which is Win7 (at the time of +writing) for backwards compatibility.] $ setenv /x64 /2003 /Release $ nmake realclean VC @@ -358,7 +368,7 @@ $ nmake realclean VC-static $ nmake realclean VCE-static $ nmake realclean VSE-static -If you want to differentiate between libraries by their names you can use, +If you want to differentiate or customise library naming you can use, e.g.: $ nmake realclean VC EXTRAVERSION="-w64" @@ -372,11 +382,6 @@ pthreadVC2-w64.lib To build and test all DLLs and static lib compatibility versions (VC, VCE, VSE): -[Note that the EXTRAVERSION="..." option is passed to the tests Makefile -when you target "all-tests". If you change to the tests directory and -run the tests you will need to repeat the option explicitly to the test -"nmake" command-line.] - $ setenv /x64 /2003 /release $ nmake all-tests @@ -386,6 +391,11 @@ running nmake. E.g.: $ cd tests $ nmake VC +Note: the EXTRAVERSION="..." option is passed to the tests Makefile +when you target "all-tests". If you build the library then change to the +tests directory to run the tests you will need to repeat the option +explicitly to the test "nmake" command-line. + For failure analysis etc. individual tests can be built and run, e.g: @@ -395,8 +405,7 @@ $ nmake VC TESTS="foo bar" This builds and runs all prerequisite tests as well as the individual tests listed. Prerequisite tests are defined in tests\runorder.mk. -To build and run only those tests listed use, i.e. without the -additional prerequistite dependency tests: +To build and run only the tests listed use: $ cd tests $ nmake VC NO_DEPS=1 TESTS="foo bar" @@ -405,6 +414,9 @@ $ nmake VC NO_DEPS=1 TESTS="foo bar" Building with MinGW ------------------- +NOTE: All building and testing is done using makefiles. We use the native +make system for each toolchain, which is 'make' in this case. + We have found that Mingw32 builds of the GCE library variants fail when run on 64 bit systems. The GC variants are fine. @@ -454,17 +466,17 @@ or, with MinGW64 (multilib enabled): $ make all-tests ARCH=-m64 $ make all-tests ARCH=-m32 -Note that the ARCH="..." and/or EXTRAVERSION="..." options are passed to the -tests GNUmakefile when you target "all-tests". If you change to the tests -directory and run the tests you will need to repeat those options explicitly -to the test "make" command-line. - You can run the testsuite by changing to the "tests" directory and running make. E.g.: $ cd tests $ make GC +Note that the ARCH="..." and/or EXTRAVERSION="..." options are passed to the +tests GNUmakefile when you target "all-tests". If you change to the tests +directory and run the tests you will need to repeat those options explicitly +to the test "make" command-line. + For failure analysis etc. individual tests can be built and run, e.g: $ cd tests @@ -473,8 +485,7 @@ $ make GC TESTS="foo bar" This builds and runs all prerequisite tests as well as the individual tests listed. Prerequisite tests are defined in tests\runorder.mk. -To build and run only those tests listed use, i.e. without the additional -prerequistite dependency tests: +To build and run only those tests listed use: $ cd tests $ make GC NO_DEPS=1 TESTS="foo bar" @@ -518,45 +529,27 @@ Building the library under Cygwin Cygwin implements it's own POSIX threads routines and these will be the ones to use if you develop using Cygwin. +Building applications +--------------------- -Building applications with GNU compilers ----------------------------------------- - -If you're using pthreadGC2.dll: - -With the four header files, _ptw32.h, pthreadGC2.dll and libpthreadGC2.a -in the same directory as your application myapp.c, you could compile, link -and run myapp.c under MinGW as follows: - - gcc -o myapp.exe myapp.c -I. -L. -lpthreadGC2 - myapp - -Or put pthreadGC2.dll in an appropriate directory in your PATH, -put libpthreadGC2.a in your system lib directory, and -put the four header files in your system include directory, -then use: - - gcc -o myapp.exe myapp.c -lpthreadGC - myapp - - -If you're using pthreadGCE2.dll: - -With the four header files, pthreadGCE2.dll and libpthreadGCE2.a -in the same directory as your application myapp.c, you could compile, -link and run myapp.c under Mingw32 as follows: +The files you will need for your application build are: - gcc -x c++ -o myapp.exe myapp.c -I. -L. -lpthreadGCE2 - myapp +The four header files: + _ptw32.h + pthread.h + semaphore.h + sched.h -Or put pthreadGCE.dll and gcc.dll in an appropriate directory in -your PATH, put libpthreadGCE.a in your system lib directory, and -put the four header files in your system include directory, -then use: +The DLL library files that you built: + pthread*.dll + plus the matching *.lib (MSVS) or *.a file (GNU) - gcc -x c++ -o myapp.exe myapp.c -lpthreadGCE - myapp +or, the static link library that you built: + pthread*.lib (MSVS) or libpthread*.a (GNU) +Place them in the appropriate directories for your build, which may be the +standard compiler locations or, locations specific to your project (you +might have a separate third-party dependency tree for example). Acknowledgements ---------------- diff --git a/tests/README b/tests/README index a1b5646b..65d46cc2 100644 --- a/tests/README +++ b/tests/README @@ -33,12 +33,15 @@ Tests written in this test suite should behave in the following manner: * If a test succeeds, leave main() with a result of 0. - * No diagnostic output should appear when the test is succeeding. - Diagnostic output may be emitted if something in the test - fails, to help determine the cause of the test failure. + * No diagnostic output should appear when the test is succeeding + unless it is particularly useful to visualise test behaviour. + Diagnostic output should be emitted if something in the test + fails, to help determine the cause of the test failure. Use assert() + for all API calls if possible. Notes: ------ Many test cases use knowledge of implementation internals which are supposed -to be opaque to portable applications. +to be opaque to portable applications. These should not be used as examples +of methods that can be conformantly applied to application code. From 02fecc211d626f28e05ecbb0c10f739bd36d6442 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sun, 18 Sep 2016 15:13:23 +1000 Subject: [PATCH 082/207] Update for 2.10.0 RC repository tag. --- ANNOUNCE | 7 +++++-- NEWS | 7 ++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 37fefbf8..5e7ab174 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,4 +1,4 @@ -PTHREADS4W RELEASE 2.10.0 (????-??-??) +PTHREADS4W RELEASE 2.10.0 (2016-09-18) -------------------------------------- Web Site: http://sourceforge.net/projects/pthreads4w/ http://sourceware.org/pthreads-win32/ @@ -28,7 +28,10 @@ is the one to use. The Sourceware CVS repository is synchronised much less often and may be abandoned altogether. Release 2.9.1 was probably the last to provide pre-built libraries. The supported -compilers are now all available free for personal use. +compilers are now all available free for personal use. The MSVS version should +build out of the box using nmake. The GCC versions now make use of GNU autoconf +to generate a configure script which in turn creates a custom config.h for the +environment you use: MinGW or MinGW64, etc. Acknowledgements diff --git a/NEWS b/NEWS index c6ed374f..1a3626aa 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ RELEASE 2.10.0 -------------- -(2016-04-01) +(2016-09-18) General ------- @@ -70,8 +70,9 @@ configurations of both dll and static libs. GNU compiler builds are now explicitly using ISO C and C++ 2011 standards compatibility. If your GNU compiler doesn't support this please consider -updating. Auto configuration is now possible via a 'configure' script. The -script must be generated using autoconf. +updating. Auto configuration is now possible via 'configure' script. The +script must be generated using autoconf - see the README file. Thanks to +Keith Marshall from the MinGW project. Static linking: The autostatic functionality has been moved to dll.c, and extended so From af3bfe92bad4d0d377835b552217a3ec266bb595 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sun, 2 Oct 2016 19:18:42 +1100 Subject: [PATCH 083/207] Tests that include ../implement.h must also include ../config.h --- implement.h | 2 +- tests/condvar2.c | 2 ++ tests/condvar2_1.c | 2 ++ tests/condvar3_1.c | 2 ++ tests/condvar3_2.c | 2 ++ tests/context1.c | 2 ++ tests/context2.c | 2 ++ tests/sizes.c | 2 ++ 8 files changed, 15 insertions(+), 1 deletion(-) diff --git a/implement.h b/implement.h index e8e1c4b8..c203cfaa 100644 --- a/implement.h +++ b/implement.h @@ -38,7 +38,7 @@ #if !defined(_IMPLEMENT_H) #define _IMPLEMENT_H -#if !defined(PTW32_CONFIG_H) && !defined(_PTHREAD_TEST_H_) +#if !defined(PTW32_CONFIG_H) # error "config.h was not #included" #endif diff --git a/tests/condvar2.c b/tests/condvar2.c index be12e2d4..2ca309f1 100644 --- a/tests/condvar2.c +++ b/tests/condvar2.c @@ -82,6 +82,8 @@ pthread_cond_t cv; pthread_mutex_t mutex; +/* Cheating here - sneaking a peek at library internals */ +#include "../config.h" #include "../implement.h" int diff --git a/tests/condvar2_1.c b/tests/condvar2_1.c index 09a51fae..bf8170ca 100644 --- a/tests/condvar2_1.c +++ b/tests/condvar2_1.c @@ -99,6 +99,8 @@ mythread(void * arg) return arg; } +/* Cheating here - sneaking a peek at library internals */ +#include "../config.h" #include "../implement.h" int diff --git a/tests/condvar3_1.c b/tests/condvar3_1.c index 84b1e276..16f0a64a 100644 --- a/tests/condvar3_1.c +++ b/tests/condvar3_1.c @@ -120,6 +120,8 @@ mythread(void * arg) return arg; } +/* Cheating here - sneaking a peek at library internals */ +#include "../config.h" #include "../implement.h" int diff --git a/tests/condvar3_2.c b/tests/condvar3_2.c index 6c51b902..909f6a19 100644 --- a/tests/condvar3_2.c +++ b/tests/condvar3_2.c @@ -120,6 +120,8 @@ mythread(void * arg) return arg; } +/* Cheating here - sneaking a peek at library internals */ +#include "../config.h" #include "../implement.h" int diff --git a/tests/context1.c b/tests/context1.c index ffef3a66..6d330d18 100644 --- a/tests/context1.c +++ b/tests/context1.c @@ -75,6 +75,8 @@ #define _WIN32_WINNT 0x400 #include "test.h" +/* Cheating here - sneaking a peek at library internals */ +#include "../config.h" #include "../implement.h" #include "../context.h" diff --git a/tests/context2.c b/tests/context2.c index 154948a4..41299b53 100644 --- a/tests/context2.c +++ b/tests/context2.c @@ -74,6 +74,8 @@ #define _WIN32_WINNT 0x400 #include "test.h" +/* Cheating here - sneaking a peek at library internals */ +#include "../config.h" #include "../implement.h" #include "../context.h" diff --git a/tests/sizes.c b/tests/sizes.c index 554d0e84..30ab601a 100644 --- a/tests/sizes.c +++ b/tests/sizes.c @@ -1,6 +1,8 @@ #define _WIN32_WINNT 0x400 #include "test.h" +/* Cheating here - sneaking a peek at library internals */ +#include "../config.h" #include "../implement.h" int From 68f0f1d82e481768b61875c2900beff8814e1268 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 3 Oct 2016 13:40:41 +1100 Subject: [PATCH 084/207] Remove out-of-date VS project files --- pthread.dsp | 142 ---------------------------------------------------- pthread.dsw | 29 ----------- 2 files changed, 171 deletions(-) delete mode 100644 pthread.dsp delete mode 100644 pthread.dsw diff --git a/pthread.dsp b/pthread.dsp deleted file mode 100644 index 112bff72..00000000 --- a/pthread.dsp +++ /dev/null @@ -1,142 +0,0 @@ -# Microsoft Developer Studio Project File - Name="pthread" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=pthread - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "pthread.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "pthread.mak" CFG="pthread - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "pthread - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "pthread - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "pthread - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "." -# PROP Intermediate_Dir "." -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PTW32_BUILD" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "__CLEANUP_C" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PTW32_BUILD" /YX /FD /c -# SUBTRACT CPP /u -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "NDEBUG" -# ADD RSC /l 0x409 /i "." /d "NDEBUG" /d "PTW32_RC_MSC" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib ws2_32.lib /nologo /dll /pdb:none /machine:I386 /out:".\pthreadVC2.dll" - -!ELSEIF "$(CFG)" == "pthread - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "." -# PROP Intermediate_Dir "." -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PTW32_BUILD" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "__CLEANUP_C" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PTW32_BUILD" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "_DEBUG" -# ADD RSC /l 0x409 /i "." /d "_DEBUG" /d "PTW32_RC_MSC" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib ws2_32.lib /nologo /dll /map /debug /machine:I386 /out:".\pthreadVC2.dll" /pdbtype:sept -# SUBTRACT LINK32 /pdb:none - -!ENDIF - -# Begin Target - -# Name "pthread - Win32 Release" -# Name "pthread - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\pthread.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\implement.h -# End Source File -# Begin Source File - -SOURCE=.\pthread.h -# End Source File -# Begin Source File - -SOURCE=.\sched.h -# End Source File -# Begin Source File - -SOURCE=.\semaphore.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# Begin Source File - -SOURCE=.\version.rc - -!IF "$(CFG)" == "pthread - Win32 Release" - -# ADD BASE RSC /l 0xc09 -# ADD RSC /l 0x409 /i "." /d "PTW32_RC_MSC" - -!ELSEIF "$(CFG)" == "pthread - Win32 Debug" - -# ADD BASE RSC /l 0xc09 -# ADD RSC /l 0x409 /i "." /d "PTW32_RC_MSC" - -!ENDIF - -# End Source File -# End Group -# End Target -# End Project diff --git a/pthread.dsw b/pthread.dsw deleted file mode 100644 index 815a6787..00000000 --- a/pthread.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "pthread"=.\pthread.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - From 8288f78d35ccc6ba0d0d393263f3b43b2bef436a Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sat, 17 Dec 2016 17:28:05 +1100 Subject: [PATCH 085/207] Mingw and Mingw64: #include stdint.h for int64_t etc --- _ptw32.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_ptw32.h b/_ptw32.h index bb47ab7c..b483e047 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -162,7 +162,7 @@ # include "need_errno.h" #endif -#if defined(__MINGW64_VERSION_MAJOR) || defined(__BORLANDC__) +#if defined(__BORLANDC__) # define int64_t LONGLONG # define uint64_t ULONGLONG #elif !defined(__MINGW32__) @@ -171,6 +171,8 @@ # if defined(PTW32_CONFIG_MSVC6) typedef long intptr_t; # endif +#else +# include #endif /* From 4b1abc99149a353d76741903cd0a0033aab971cb Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sat, 17 Dec 2016 17:28:55 +1100 Subject: [PATCH 086/207] Mingw64: pid_t is 64 bits --- sched.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sched.h b/sched.h index cd9c645c..9d6e9b28 100644 --- a/sched.h +++ b/sched.h @@ -51,9 +51,13 @@ * but note that we must do so cautiously, to avoid a typedef * conflict if MinGW's is also #included: */ -#if ! (defined __MINGW32__ && defined __have_typedef_pid_t) +#if ! defined __MINGW32__ || ! defined __have_typedef_pid_t -typedef int pid_t; +# if defined __MINGW64__ + typedef __int64 pid_t; +# else + typedef int pid_t; +#endif #if __GNUC__ < 4 /* GCC v4.0 and later, (as used by MinGW), allows us to repeat a From 52540b0bd443bb197aab2b77922dd65a5953bfee Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sun, 18 Dec 2016 11:52:45 +1100 Subject: [PATCH 087/207] Fix undefined ptw32_autostatic_anchor in (tests) make GCX-small-static --- ChangeLog | 15 +++++++++++++++ implement.h | 4 ++-- tests/ChangeLog | 6 ++++++ tests/test.h | 7 +++++++ 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9e5f80bf..2df4d5ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2016-12-18 Ross Johnson + + * implement.h (PTW32_TEST_SNEAK_PEEK): Defined in tests/test.h + to control what some tests see when sneaking a peek inside this + header. + +2016-12-17 Ross Johnson + + * _ptw32.h: MINGW(all) include stdint.h to define all specific + size integers (int64_t etc). + +2016-12-17 Kyle Schwarz + + * _ptw32.h: MINGW6464 define pid_t as __int64. + 2016-04-01 Ross Johnson * _ptw32.h: Move more header stuff into here. diff --git a/implement.h b/implement.h index c203cfaa..12184c1e 100644 --- a/implement.h +++ b/implement.h @@ -137,9 +137,9 @@ static void ptw32_set_errno(int err) { errno = err; SetLastError(err); } #endif /* - * Don't allow the linker to optimize away autostatic.obj in static builds. + * Don't allow the linker to optimize away dll.obj (dll.o) in static builds. */ -#if defined(PTW32_STATIC_LIB) && defined(PTW32_BUILD) +#if defined(PTW32_STATIC_LIB) && defined(PTW32_BUILD) && !defined(PTW32_TEST_SNEAK_PEEK) void ptw32_autostatic_anchor(void); # if defined(__GNUC__) __attribute__((unused, used)) diff --git a/tests/ChangeLog b/tests/ChangeLog index 3427291f..6bbe1615 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,9 @@ +2016-124-18 Ross Johnson + + * test.c (PTW32_TEST_SNEAK_PEEK): #define this to prevent some + tests from failing (specifically "make GCX-small-static") with + undefined ptw32_autostatic_anchor. Checked in ../implament.h. + 2016-04-30 Ross Johnson * semaphore4t.c: No longer need to include ptw32_timespec.c and the diff --git a/tests/test.h b/tests/test.h index a909fda4..bced8fb3 100644 --- a/tests/test.h +++ b/tests/test.h @@ -39,6 +39,13 @@ #ifndef _PTHREAD_TEST_H_ #define _PTHREAD_TEST_H_ +/* + * Some tests sneak a peek at ../implement.h + * This is used inside ../implement.h to control + * what these test apps see and don't see. + */ +#define PTW32_TEST_SNEAK_PEEK + #include "pthread.h" #include "sched.h" #include "semaphore.h" From 53c6c2b416fca80735143226110cafb8db8c3342 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sun, 18 Dec 2016 13:38:49 +1100 Subject: [PATCH 088/207] Retain test run logs per build type --- tests/ChangeLog | 2 ++ tests/GNUmakefile | 8 +++++--- tests/GNUmakefile.in | 8 +++++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/ChangeLog b/tests/ChangeLog index 6bbe1615..71e593b4 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -3,6 +3,8 @@ * test.c (PTW32_TEST_SNEAK_PEEK): #define this to prevent some tests from failing (specifically "make GCX-small-static") with undefined ptw32_autostatic_anchor. Checked in ../implament.h. + * GNUMakfile.in: Rename testsuite log to test-specific name and + do not remove. 2016-04-30 Ross Johnson diff --git a/tests/GNUmakefile b/tests/GNUmakefile index 7003b08d..43b147d7 100644 --- a/tests/GNUmakefile +++ b/tests/GNUmakefile @@ -196,12 +196,14 @@ all-asm: $(ASM) allpassed: $(HDR) $(LIB) $(DLL) $(QAPC) $(TESTS:%=%.pass) @ $(ECHO) "ALL TESTS COMPLETED. Check the logfile: $(LOGFILE)" @ $(ECHO) "FAILURES: $$( $(GREP) FAILED $(LOGFILE) | $(WC) -l )" - @ ! $(GREP) FAILED $(LOGFILE) + @ - ! $(GREP) FAILED $(LOGFILE) + @ $(MV) $(LOGFILE) $(TEST)-$(LOGFILE) all-bench: $(HDR) $(LIB) $(DLL) $(QAPC) $(XXLIBS) $(BENCHRESULTS) @ $(ECHO) "ALL BENCH TESTS COMPLETED. Check the logfile: $(LOGFILE)" @ $(ECHO) "FAILURES: $$( $(GREP) FAILED $(LOGFILE) | $(WC) -l ) " - @ ! $(GREP) FAILED $(LOGFILE) + @ - ! $(GREP) FAILED $(LOGFILE) + @ $(MV) $(LOGFILE) $(TEST)-$(LOGFILE) cancel9.exe: XLIBS = -lws2_32 @@ -252,5 +254,5 @@ clean: - $(RM) *.manifest - $(RM) *.pass - $(RM) *.bench - - $(RM) *.log +# - $(RM) *.log \ No newline at end of file diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index ace0762c..1f4c3084 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -199,12 +199,14 @@ all-asm: $(ASM) allpassed: $(HDR) $(LIB) $(DLL) $(QAPC) $(TESTS:%=%.pass) @ $(ECHO) "ALL TESTS COMPLETED. Check the logfile: $(LOGFILE)" @ $(ECHO) "FAILURES: $$( $(GREP) FAILED $(LOGFILE) | $(WC) -l ) " - @ ! $(GREP) FAILED $(LOGFILE) + @ - ! $(GREP) FAILED $(LOGFILE) + @ $(MV) $(LOGFILE) ../$(TEST)-$(LOGFILE) all-bench: $(HDR) $(LIB) $(DLL) $(QAPC) $(XXLIBS) $(BENCHRESULTS) @ $(ECHO) "ALL BENCH TESTS COMPLETED. Check the logfile: $(LOGFILE)" @ $(ECHO) "FAILURES: $$( $(GREP) FAILED $(LOGFILE) | $(WC) -l ) " - @ ! $(GREP) FAILED $(LOGFILE) + @ - ! $(GREP) FAILED $(LOGFILE) + @ $(MV) $(LOGFILE) $(TEST)-$(LOGFILE) cancel9.exe: XLIBS = -lws2_32 @@ -260,5 +262,5 @@ clean: - $(RM) *.manifest - $(RM) *.pass - $(RM) *.bench - - $(RM) *.log +# - $(RM) *.log From e7ba7083108808ef2626ad93f2e9b94b9a7966ea Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sun, 18 Dec 2016 14:27:50 +1100 Subject: [PATCH 089/207] Use ./configure value --- ChangeLog | 1 + GNUmakefile.in | 4 +++- _ptw32.h | 2 +- tests/ChangeLog | 1 + tests/GNUmakefile.in | 5 +++-- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2df4d5ef..dbdb20f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ * implement.h (PTW32_TEST_SNEAK_PEEK): Defined in tests/test.h to control what some tests see when sneaking a peek inside this header. + * GNUMakefile.in: call tests "make realclean" 2016-12-17 Ross Johnson diff --git a/GNUmakefile.in b/GNUmakefile.in index c5ece2bf..dbe3c923 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -59,6 +59,7 @@ DEST_LIB_NAME = libpthread RM = rm -f MV = mv -f CP = cp -f +GREP = grep MKDIR = mkdir -p ECHO = echo TESTNDIR = test ! -d @@ -235,6 +236,7 @@ all-tests: cd tests && $(MAKE) clean GC-static $(TEST_ENV) && $(MAKE) clean GCX-static $(TEST_ENV) $(MAKE) realclean GCE-static cd tests && $(MAKE) clean GCE-static $(TEST_ENV) + @ - cd tests && $(GREP) FAILED *.log $(MAKE) realclean all-tests-cflags: @@ -374,7 +376,7 @@ realclean: clean -$(RM) pthread*.dll -$(RM) *_stamp -$(RM) make.log.txt - -cd tests && $(MAKE) clean + -cd tests && $(MAKE) realclean var_check_list = diff --git a/_ptw32.h b/_ptw32.h index b483e047..86f3e506 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -171,7 +171,7 @@ # if defined(PTW32_CONFIG_MSVC6) typedef long intptr_t; # endif -#else +#elif defined(HAVE_STDINT_H) && HAVE_STDINT_H == 1 # include #endif diff --git a/tests/ChangeLog b/tests/ChangeLog index 71e593b4..7a03bb6f 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -5,6 +5,7 @@ undefined ptw32_autostatic_anchor. Checked in ../implament.h. * GNUMakfile.in: Rename testsuite log to test-specific name and do not remove. + * GNUMakfile.in: Add realclean target 2016-04-30 Ross Johnson diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index 1f4c3084..1deb8e13 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -262,5 +262,6 @@ clean: - $(RM) *.manifest - $(RM) *.pass - $(RM) *.bench -# - $(RM) *.log - + +realclean: clean + - $(RM) *.log From 4ba696d5a0de729118e2489f322b04e892453ed6 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 19 Dec 2016 10:25:42 +1100 Subject: [PATCH 090/207] Scan test run logs for failures at end of "make all-tests" --- GNUmakefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GNUmakefile.in b/GNUmakefile.in index dbe3c923..948af376 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -236,12 +236,12 @@ all-tests: cd tests && $(MAKE) clean GC-static $(TEST_ENV) && $(MAKE) clean GCX-static $(TEST_ENV) $(MAKE) realclean GCE-static cd tests && $(MAKE) clean GCE-static $(TEST_ENV) - @ - cd tests && $(GREP) FAILED *.log + @ - $(GREP) FAILED *.log $(MAKE) realclean all-tests-cflags: $(MAKE) all-tests PTW32_FLAGS="-Wall -Wextra" - @ $(ECHO) "$@ completed successfully." + @ $(ECHO) "$@ completed." GC: $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL) From 90a6831295d0b622c2ef311a7f98c13ff7a466c3 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 19 Dec 2016 19:42:46 +1100 Subject: [PATCH 091/207] Output all-tests results summary --- GNUmakefile.in | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/GNUmakefile.in b/GNUmakefile.in index 948af376..a16a6559 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -65,6 +65,7 @@ ECHO = echo TESTNDIR = test ! -d TESTFILE = test -f AND = && +COUNT_UNIQ = uniq -c # If not. #RM = erase @@ -140,7 +141,7 @@ LFLAGS = $(ARCH) # non-compliant, but applications that make assumptions that POSIX # does not garrantee may fail or misbehave under some settings. # -# PTW32_THREAD_ID_REUSE_INCREMENT +# __PTW32_THREAD_ID_REUSE_INCREMENT # Purpose: # POSIX says that applications should assume that thread IDs can be # recycled. However, Solaris and some other systems use a [very large] @@ -220,7 +221,7 @@ all: @ $(MAKE) clean GC-static @ $(MAKE) clean GCE-static -TEST_ENV = PTW32_FLAGS="$(PTW32_FLAGS) -DNO_ERROR_DIALOGS" DLL_VER=$(DLL_VER) ARCH="$(ARCH)" +TEST_ENV = __PTW32_FLAGS="$(PTW32_FLAGS) -DNO_ERROR_DIALOGS" DLL_VER=$(DLL_VER) ARCH="$(ARCH)" all-tests: $(MAKE) realclean GC-small-static @@ -236,11 +237,11 @@ all-tests: cd tests && $(MAKE) clean GC-static $(TEST_ENV) && $(MAKE) clean GCX-static $(TEST_ENV) $(MAKE) realclean GCE-static cd tests && $(MAKE) clean GCE-static $(TEST_ENV) - @ - $(GREP) FAILED *.log - $(MAKE) realclean + @ $(GREP) FAILED *.log || $(GREP) Passed *.log | $(COUNT_UNIQ) + $(MAKE) clean all-tests-cflags: - $(MAKE) all-tests PTW32_FLAGS="-Wall -Wextra" + $(MAKE) all-tests __PTW32_FLAGS="-Wall -Wextra" @ $(ECHO) "$@ completed." GC: @@ -376,6 +377,7 @@ realclean: clean -$(RM) pthread*.dll -$(RM) *_stamp -$(RM) make.log.txt + -$(RM) *.log -cd tests && $(MAKE) realclean var_check_list = From 6f3ddd3f21d32cac93dad38d50bea495299f4361 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 19 Dec 2016 20:25:12 +1100 Subject: [PATCH 092/207] Reverse PTHREAD_ONCE_INIT initial value order for PTHW32_VERSION_MAJOR > 2. --- pthread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pthread.h b/pthread.h index 9b48b0a6..7a2cd921 100644 --- a/pthread.h +++ b/pthread.h @@ -490,7 +490,7 @@ enum */ #if PTW32_VERSION_MAJOR > 2 -#define PTHREAD_ONCE_INIT { PTW32_FALSE, 0 } +#define PTHREAD_ONCE_INIT { 0, PTW32_FALSE } struct pthread_once_t_ { From 510c38b85525d2de6c3ea4e20b298c3d1260613a Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 21 Dec 2016 12:51:55 +1100 Subject: [PATCH 093/207] Bug fix --- GNUmakefile | 9 ++++++--- GNUmakefile.in | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 2f59ba1a..31fb5d3c 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -265,12 +265,15 @@ install: -$(TESTNDIR) $(DLLDEST) $(AND) $(MKDIR) $(DLLDEST) -$(TESTNDIR) $(LIBDEST) $(AND) $(MKDIR) $(LIBDEST) -$(TESTNDIR) $(HDRDEST) $(AND) $(MKDIR) $(HDRDEST) - $(CP) pthreadGC*.dll $(DLLDEST) - $(CP) libpthreadGC*.a $(LIBDEST) - $(CP) _pthw32.h $(HDRDEST) + $(CP) _pth32.h $(HDRDEST) $(CP) pthread.h $(HDRDEST) $(CP) sched.h $(HDRDEST) $(CP) semaphore.h $(HDRDEST) + -$(TESTFILE) pthreadGC$(DLL_VER).dll $(AND) $(CP) pthreadGC$(DLL_VER).dll $(DLLDEST) + -$(TESTFILE) pthreadGC$(DLL_VERD).dll $(AND) $(CP) pthreadGC$(DLL_VERD).dll $(DLLDEST) + -$(TESTFILE) pthreadGCE$(DLL_VER).dll $(AND) $(CP) pthreadGCE$(DLL_VER).dll $(DLLDEST) + -$(TESTFILE) pthreadGCE$(DLL_VERD).dll $(AND) $(CP) pthreadGCE$(DLL_VERD).dll $(DLLDEST) + # Only one of these can be installed, so run e.g. "make realclean GC install". -$(TESTFILE) libpthreadGC$(DLL_VER).a $(AND) $(CP) libpthreadGC$(DLL_VER).a $(LIBDEST)/$(DEST_LIB_NAME) -$(TESTFILE) libpthreadGC$(DLL_VERD).a $(AND) $(CP) libpthreadGC$(DLL_VERD).a $(LIBDEST)/$(DEST_LIB_NAME) -$(TESTFILE) libpthreadGCE$(DLL_VER).a $(AND) $(CP) libpthreadGCE$(DLL_VER).a $(LIBDEST)/$(DEST_LIB_NAME) diff --git a/GNUmakefile.in b/GNUmakefile.in index a16a6559..a167e799 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -324,7 +324,7 @@ install-implib-default: $(call default_libs,libpthreadGC,.dll.a) install-implib-default: $(call default_libs,libpthreadGCE,.dll.a) $(INSTALL_DATA) $(lastword $^) ${libdir}/$(DEST_LIB_NAME).dll.a -install-headers: pthread.h sched.h semaphore.h +install-headers: pthread.h sched.h semaphore.h _ptw32.h $(INSTALL_DATA) $^ ${includedir} %.pre: %.c From afc31b786baf46bc845a8c57d825ddf466fb9231 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 21 Dec 2016 16:28:14 +1100 Subject: [PATCH 094/207] Release note updates --- NEWS | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/NEWS b/NEWS index 1a3626aa..7a152b62 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,44 @@ +RELEASE 2.11.0 +-------------- +(Upcoming release) + +General +------- +New bug fixes in all releases since 2.8.0 have NOT been applied to the +1.x.x series. + +Some changes from 2011-02-26 onward may not be compatible with +pre Windows 2000 systems. + +Testing and verification +------------------------ +This version has been tested on SMP architecture (Intel x64 Hex Core) +by completing the included test suite, as well as the stress and bench +tests. + +Be sure to run your builds against the test suite. If you see failures +then please consider how your toolchains might be contributing to the +failure. See the README file for more detailed descriptions of the +toolchains and test systems that we have used to get the tests to pass +successfully. We recommend MinGW64 over MinGW32 for both 64 and 32 bit +GNU CC builds. MinGW64 also includes its own independent pthreads +implementation, which you may prefer to use. + +New Features +------------ +The autoconf configuration added in 2.10.0 should be used for all GNU +builds (MinGW, MinGW64, etc). The GNUmakefile has been removed. + +Bug Fixes +--------- +Various errors in GNUmakefile. Although this file has been removed, the +changes are recorded as commits to the repository for completeness. +- Kyle Schwarz + +MinGW64-w64 defines pid_t as __int64. sched.h now reflects that. +- Kyle Schwarz + + RELEASE 2.10.0 -------------- (2016-09-18) From 1ebc946a39762a67dea11c31ce920f21ec193550 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 21 Dec 2016 19:24:03 +1100 Subject: [PATCH 095/207] Fix: test was failing if sem_destroy returned error EBUSY --- tests/semaphore5.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/semaphore5.c b/tests/semaphore5.c index 3644b734..5ebcb35c 100644 --- a/tests/semaphore5.c +++ b/tests/semaphore5.c @@ -95,7 +95,11 @@ main() assert(pthread_create(&t, NULL, thr, (void *)&s) == 0); assert(sem_wait(&s) == 0); - assert(sem_destroy(&s) == 0); + /* + * Normally we would retry this next, but we're only + * interested in unexpected results in this test. + */ + assert(sem_destroy(&s) == 0 || errno == EBUSY); assert(pthread_join(t, NULL) == 0); From 4f80d6a1f8710d07844a81182340b13552221b83 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 21 Dec 2016 23:27:44 +1100 Subject: [PATCH 096/207] Fix random failures. --- tests/ChangeLog | 11 +++++++++++ tests/mutex6.c | 10 ++++++++-- tests/mutex6n.c | 10 ++++++++-- tests/mutex6s.c | 10 ++++++++-- tests/mutex7.c | 5 ++++- tests/mutex7n.c | 5 ++++- tests/mutex8.c | 5 ++++- tests/mutex8n.c | 5 ++++- 8 files changed, 51 insertions(+), 10 deletions(-) diff --git a/tests/ChangeLog b/tests/ChangeLog index 7a03bb6f..d2042234 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,14 @@ +2016-12-21 Ross Johnson + + * mutex6.c: fix random failures by using a polling loop to replace + a single Sleep(). + * mutex6n.c: Likewise. + * mutex6s.c: Likewise. + * mutex7.c: Likewise. + * mutex7n.c: Likewise. + * mutex8.c: Likewise + * mutex8n.c: Likewise. + 2016-124-18 Ross Johnson * test.c (PTW32_TEST_SNEAK_PEEK): #define this to prevent some diff --git a/tests/mutex6.c b/tests/mutex6.c index 79a896b8..08081010 100644 --- a/tests/mutex6.c +++ b/tests/mutex6.c @@ -73,7 +73,10 @@ main() assert(pthread_create(&t, NULL, locker, NULL) == 0); - Sleep(1000); + while (lockCount < 1) + { + Sleep(1); + } assert(lockCount == 1); @@ -83,7 +86,10 @@ main() */ assert(pthread_mutex_unlock(&mutex) == 0); - Sleep (1000); + while (lockCount < 2) + { + Sleep(1); + } assert(lockCount == 2); diff --git a/tests/mutex6n.c b/tests/mutex6n.c index cf358116..e4681a5c 100644 --- a/tests/mutex6n.c +++ b/tests/mutex6n.c @@ -88,13 +88,19 @@ main() assert(pthread_create(&t, NULL, locker, NULL) == 0); - Sleep(100); + while (lockCount < 1) + { + Sleep(1); + } assert(lockCount == 1); assert(pthread_mutex_unlock(&mutex) == (IS_ROBUST?EPERM:0)); - Sleep (100); + while (lockCount < (IS_ROBUST?1:2)) + { + Sleep(1); + } assert(lockCount == (IS_ROBUST?1:2)); diff --git a/tests/mutex6s.c b/tests/mutex6s.c index 2b13eba2..26dc0215 100644 --- a/tests/mutex6s.c +++ b/tests/mutex6s.c @@ -73,7 +73,10 @@ main() assert(pthread_create(&t, NULL, locker, NULL) == 0); - Sleep(1000); + while (lockCount < 1) + { + Sleep(1); + } assert(lockCount == 1); @@ -83,7 +86,10 @@ main() */ assert(pthread_mutex_unlock(&mutex) == 0); - Sleep (1000); + while (lockCount < 2) + { + Sleep(1); + } assert(lockCount == 2); diff --git a/tests/mutex7.c b/tests/mutex7.c index 3110ca77..ee3fe5c1 100644 --- a/tests/mutex7.c +++ b/tests/mutex7.c @@ -72,7 +72,10 @@ main() assert(pthread_create(&t, NULL, locker, NULL) == 0); - Sleep(1000); + while (lockCount < 2) + { + Sleep(1); + } assert(lockCount == 2); diff --git a/tests/mutex7n.c b/tests/mutex7n.c index e8d280fb..feca8ee2 100644 --- a/tests/mutex7n.c +++ b/tests/mutex7n.c @@ -85,7 +85,10 @@ main() assert(pthread_create(&t, NULL, locker, NULL) == 0); - Sleep(100); + while (lockCount < 2) + { + Sleep(1); + } assert(lockCount == 2); diff --git a/tests/mutex8.c b/tests/mutex8.c index ffe0afaa..d2ed686f 100644 --- a/tests/mutex8.c +++ b/tests/mutex8.c @@ -64,7 +64,10 @@ main() assert(pthread_create(&t, NULL, locker, NULL) == 0); - Sleep(2000); + while (lockCount < 1) + { + Sleep(1); + } assert(lockCount == 1); diff --git a/tests/mutex8n.c b/tests/mutex8n.c index 6be97dc1..0ea3cf32 100644 --- a/tests/mutex8n.c +++ b/tests/mutex8n.c @@ -82,7 +82,10 @@ main() assert(pthread_create(&t, NULL, locker, NULL) == 0); - Sleep(2000); + while (lockCount < 1) + { + Sleep(1); + } assert(lockCount == 1); From b002e9f0a1928f579aeaaf77c8119ff4db43d46f Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 22 Dec 2016 08:26:44 +1100 Subject: [PATCH 097/207] Update release notes --- NEWS | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 7a152b62..f02316a5 100644 --- a/NEWS +++ b/NEWS @@ -27,17 +27,27 @@ implementation, which you may prefer to use. New Features ------------ The autoconf configuration added in 2.10.0 should be used for all GNU -builds (MinGW, MinGW64, etc). The GNUmakefile has been removed. +builds (MinGW, MinGW64, etc). The redundant GNUmakefiles have been +removed. Bug Fixes --------- -Various errors in GNUmakefile. Although this file has been removed, the -changes are recorded as commits to the repository for completeness. +Various corrections to GNUmakefile. Although this file has been removed, +for completeness the changes have been recorded as commits to the +repository. - Kyle Schwarz MinGW64-w64 defines pid_t as __int64. sched.h now reflects that. - Kyle Schwarz +Several tests have been fixed that were seen to fail on machines under +load. Other tests that used similar crude mechanisms to synchronise +threads (these are unit tests) had the same improvements applied: +semaphore5.c recognises that sem_destroy can legitimately return +EBUSY; mutex6*.c, mutex7*.c and mutex8*.c all replaced a single +Sleep() with a polling loop. +- Ross Johnson + RELEASE 2.10.0 -------------- From 94be75b684f456c53e7f6cc0787bac356f678ff5 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 22 Dec 2016 09:27:24 +1100 Subject: [PATCH 098/207] Update --- tests/ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ChangeLog b/tests/ChangeLog index d2042234..862ad8bb 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -8,6 +8,7 @@ * mutex7n.c: Likewise. * mutex8.c: Likewise * mutex8n.c: Likewise. + * semaphore5.c: don't fail on expected sem_destroy EBUSY. 2016-124-18 Ross Johnson From 0202417be4f66c96bacc812b02dc16e7a184db78 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 20 Dec 2016 20:15:54 +1100 Subject: [PATCH 099/207] Initial version 3 commit; see the ChangeLogs --- ANNOUNCE | 2 +- Bmakefile | 2 +- ChangeLog | 1075 +++++++++++++++--------------- FAQ | 71 +- GNUmakefile.in | 38 +- Makefile | 46 +- NEWS | 109 ++- README | 36 +- README.CV | 70 +- README.NONPORTABLE | 2 +- TODO | 4 +- WinCE-PORT | 16 +- _ptw32.h | 54 +- cleanup.c | 26 +- config.h | 14 +- configure.ac | 4 +- context.h | 22 +- create.c | 30 +- dll.c | 28 +- errno.c | 4 +- global.c | 34 +- implement.h | 370 +++++----- manual/pthread_setname_np.html | 8 +- need_errno.h | 20 +- pthread.h | 372 ++++++----- pthread_attr_destroy.c | 2 +- pthread_attr_getaffinity_np.c | 2 +- pthread_attr_getdetachstate.c | 2 +- pthread_attr_getinheritsched.c | 2 +- pthread_attr_getschedparam.c | 2 +- pthread_attr_getschedpolicy.c | 2 +- pthread_attr_getstackaddr.c | 2 +- pthread_attr_getstacksize.c | 2 +- pthread_attr_init.c | 2 +- pthread_attr_setaffinity_np.c | 2 +- pthread_attr_setdetachstate.c | 2 +- pthread_attr_setinheritsched.c | 2 +- pthread_attr_setname_np.c | 2 +- pthread_attr_setschedparam.c | 2 +- pthread_attr_setschedpolicy.c | 2 +- pthread_attr_setstackaddr.c | 2 +- pthread_attr_setstacksize.c | 2 +- pthread_barrier_destroy.c | 12 +- pthread_barrier_wait.c | 18 +- pthread_cancel.c | 34 +- pthread_cond_destroy.c | 34 +- pthread_cond_init.c | 22 +- pthread_cond_signal.c | 14 +- pthread_cond_wait.c | 46 +- pthread_delay_np.c | 14 +- pthread_detach.c | 22 +- pthread_exit.c | 8 +- pthread_getconcurrency.c | 2 +- pthread_getname_np.c | 10 +- pthread_getschedparam.c | 2 +- pthread_getunique_np.c | 2 +- pthread_getw32threadhandle_np.c | 4 +- pthread_join.c | 8 +- pthread_key_create.c | 2 +- pthread_key_delete.c | 20 +- pthread_kill.c | 10 +- pthread_mutex_consistent.c | 38 +- pthread_mutex_destroy.c | 8 +- pthread_mutex_init.c | 8 +- pthread_mutex_lock.c | 90 +-- pthread_mutex_timedlock.c | 104 +-- pthread_mutex_trylock.c | 36 +- pthread_mutex_unlock.c | 26 +- pthread_num_processors_np.c | 2 +- pthread_once.c | 22 +- pthread_rwlock_destroy.c | 10 +- pthread_rwlock_init.c | 2 +- pthread_rwlock_rdlock.c | 6 +- pthread_rwlock_timedrdlock.c | 6 +- pthread_rwlock_timedwrlock.c | 12 +- pthread_rwlock_tryrdlock.c | 6 +- pthread_rwlock_trywrlock.c | 6 +- pthread_rwlock_unlock.c | 2 +- pthread_rwlock_wrlock.c | 12 +- pthread_self.c | 24 +- pthread_setaffinity.c | 22 +- pthread_setcancelstate.c | 12 +- pthread_setcanceltype.c | 12 +- pthread_setconcurrency.c | 2 +- pthread_setname_np.c | 22 +- pthread_setschedparam.c | 12 +- pthread_setspecific.c | 20 +- pthread_spin_destroy.c | 18 +- pthread_spin_init.c | 6 +- pthread_spin_lock.c | 14 +- pthread_spin_trylock.c | 14 +- pthread_spin_unlock.c | 12 +- pthread_testcancel.c | 12 +- pthread_timechange_handler_np.c | 8 +- pthread_timedjoin_np.c | 10 +- pthread_tryjoin_np.c | 8 +- pthread_win32_attach_detach_np.c | 96 +-- ptw32_MCS_lock.c | 146 ++-- ptw32_callUserDestroyRoutines.c | 34 +- ptw32_calloc.c | 2 +- ptw32_cond_check_need_init.c | 8 +- ptw32_getprocessors.c | 4 +- ptw32_is_attr.c | 4 +- ptw32_mutex_check_need_init.c | 20 +- ptw32_new.c | 20 +- ptw32_processInitialize.c | 50 +- ptw32_processTerminate.c | 36 +- ptw32_relmillisecs.c | 10 +- ptw32_reuse.c | 60 +- ptw32_rwlock_cancelwrwait.c | 2 +- ptw32_rwlock_check_need_init.c | 8 +- ptw32_semwait.c | 16 +- ptw32_spinlock_check_need_init.c | 8 +- ptw32_threadDestroy.c | 10 +- ptw32_threadStart.c | 70 +- ptw32_throw.c | 52 +- ptw32_timespec.c | 12 +- ptw32_tkAssocCreate.c | 6 +- ptw32_tkAssocDestroy.c | 4 +- sched.h | 32 +- sched_get_priority_max.c | 6 +- sched_get_priority_min.c | 6 +- sched_getscheduler.c | 4 +- sched_setaffinity.c | 10 +- sched_setscheduler.c | 6 +- sem_close.c | 2 +- sem_destroy.c | 8 +- sem_getvalue.c | 8 +- sem_init.c | 6 +- sem_open.c | 2 +- sem_post.c | 8 +- sem_post_multiple.c | 8 +- sem_timedwait.c | 30 +- sem_trywait.c | 8 +- sem_unlink.c | 2 +- sem_wait.c | 28 +- semaphore.h | 22 +- signal.c | 6 +- tests/Bmakefile | 6 +- tests/ChangeLog | 23 +- tests/GNUmakefile | 258 ------- tests/GNUmakefile.in | 30 +- tests/Makefile | 32 +- tests/Wmakefile | 6 +- tests/affinity2.c | 2 +- tests/benchlib.c | 42 +- tests/benchtest.h | 6 +- tests/benchtest1.c | 16 +- tests/benchtest2.c | 16 +- tests/benchtest3.c | 16 +- tests/benchtest4.c | 16 +- tests/benchtest5.c | 8 +- tests/cancel2.c | 4 +- tests/cancel9.c | 2 +- tests/cleanup1.c | 2 +- tests/context1.c | 4 +- tests/context2.c | 4 +- tests/exception1.c | 8 +- tests/exception3.c | 2 +- tests/name_np1.c | 6 +- tests/name_np2.c | 6 +- tests/once3.c | 2 +- tests/once4.c | 2 +- tests/rwlock7.c | 8 +- tests/rwlock8.c | 8 +- tests/self1.c | 4 +- tests/semaphore1.c | 4 +- tests/sizes.c | 6 +- tests/spin4.c | 12 +- tests/test.h | 18 +- tests/valid2.c | 2 +- version.rc | 110 +-- w32_CancelableWait.c | 22 +- 173 files changed, 2419 insertions(+), 2573 deletions(-) delete mode 100644 tests/GNUmakefile diff --git a/ANNOUNCE b/ANNOUNCE index 5e7ab174..6ae796e4 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,4 +1,4 @@ -PTHREADS4W RELEASE 2.10.0 (2016-09-18) +PTHREADS4W RELEASE 3.0.0 (2016-12-20) -------------------------------------- Web Site: http://sourceforge.net/projects/pthreads4w/ http://sourceware.org/pthreads-win32/ diff --git a/Bmakefile b/Bmakefile index c6bcf93d..8385fd17 100644 --- a/Bmakefile +++ b/Bmakefile @@ -25,7 +25,7 @@ CFLAGS = /q /I. /DHAVE_CONFIG_H=1 /4 /tWD /tWM \ /w-aus /w-asc /w-par #C cleanup code -BCFLAGS = $(PTW32_FLAGS) $(CFLAGS) +BCFLAGS = $ (__PTW32_FLAGS) $(CFLAGS) OBJEXT = obj RESEXT = res diff --git a/ChangeLog b/ChangeLog index dbdb20f6..809e65fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,21 @@ +2016-12-20 Ross Johnson + + * all (PTW32_*): rename to __PTW32_*. + (ptw32_*): rename to __ptw32_*. + (PtW32*): rename to __PtW32*. + * pthread.h (__PTW32_VERSION_MAJOR): = 3 + (__PTW32_VERSION_MINOR): = 0 + * GNUmakefile: removed; must now configure from GNUmakefile.in. + I.e. For either MinGW or MinGW-w64: + # autoheader + # autoconf + # ./configure + * pthread.h (PTHREAD_ONCE_INIT): for __PTW32_VERSION_MAJOR > 2, + reverse element values to conform to new pthread_once_t. + 2016-12-18 Ross Johnson - * implement.h (PTW32_TEST_SNEAK_PEEK): Defined in tests/test.h + * implement.h (__PTW32_TEST_SNEAK_PEEK): Defined in tests/test.h to control what some tests see when sneaking a peek inside this header. * GNUMakefile.in: call tests "make realclean" @@ -43,7 +58,7 @@ platform-aware function to return the current time plus optional offset. * pthread.h (pthread_win32_getabstime_np): New exported function. - * ptw32_timespec.c: COnditionally compile only if NEED_FTIME config + * ptw32_timespec.c: Conditionally compile only if NEED_FTIME config flagged. * sched.h: Update platform config flags for applications. * semaphore.h: Likewise. @@ -147,7 +162,7 @@ * pthread_attr_getname_np.c: Initial version. * pthread.h: Add new prototypes. * implement.h (pthread_attr_t_): Add "thrname" element. - * (ptw32_thread_t): Add "name" element. + * (__ptw32_thread_t): Add "name" element. 2013-06-06 Ross Johnson @@ -310,45 +325,45 @@ * README.NONPORTABLE: It's "DllMain", not "dllMain". * common.mk: Start of an attempt to define dependencies for pthread.$(OBJEXT). - * implement.h: Generalized PTW32_BROKEN_ERRNO into + * implement.h: Generalized __PTW32_BROKEN_ERRNO into PTW32_USES_SEPARATE_CRT; don't do the autostatic-anchoring thing if we're not building the library! - * pthread.h: Moved the PTW32_CDECL bit into sched.h. pthread.h + * pthread.h: Moved the __PTW32_CDECL bit into sched.h. pthread.h already #includes sched.h, so the latter is a good place to put definitions that need to be shared in common; severely simplified the errno declaration for Open Watcom, made it applicable only to Open Watcom, and made the comment less ambiguous; updated the long - comment describing PTW32_BROK^WPTW32_USES_SEPARATE_CRT; added + comment describing __PTW32_BROK^WPTW32_USES_SEPARATE_CRT; added (conditional) declaration of pthread_win32_set_terminate_np(), as - well as ptw32_terminate_handler (so that eh.h doesn't have to get + well as __ptw32_terminate_handler (so that eh.h doesn't have to get involved). * pthread_cond_wait.c: Missed a couple of errno conversions. * pthread_mutex_consistent.c: Visual Studio (either 2010 or 2008 Express, don't recall now) actually errored out due to charset issues in this file, so I've replaced non-ASCII characters with ASCII approximations. - * ptw32_threadStart.c: Big rewrite of ptw32_threadStart(). + * ptw32_threadStart.c: Big rewrite of __ptw32_threadStart(). Everything passes with this, except for GCE (and I can't figure out why). - * sched.h: Moved the PTW32_CDECL section here (and made it + * sched.h: Moved the __PTW32_CDECL section here (and made it idempotent); need to #include for size_t (one of the test programs #includes sched.h as the very first thing); moved the DWORD_PTR definition up, since it groups better with the pid_t definition; also need ULONG_PTR, don't need PDWORD_PTR; can't use PTW32_CONFIG_MSVC6, because if you only #include sched.h you don't get that bit in pthread.h; use a cpp symbol - (PTW32_HAVE_DWORD_PTR) to inhibit defining *_PTR if needed. Note + (__PTW32_HAVE_DWORD_PTR) to inhibit defining *_PTR if needed. Note that this isn't #defined inside the conditional, because there are no other instances of these typedefs that need to be disabled, and sched.h itself is already protected against multiple inclusion; DWORD_PTR can't be size_t, because (on MSVC6) the former is "unsigned long" and the latter is "unsigned int" and C++ doesn't see them as interchangeable; minor edit to the comment... I don't like saying - "VC++" without the "Microsoft" qualifier; use PTW32_CDECL instead of - a literal __cdecl (this was why I moved the PTW32_CDECL bit into this + "VC++" without the "Microsoft" qualifier; use __PTW32_CDECL instead of + a literal __cdecl (this was why I moved the __PTW32_CDECL bit into this file). - * semaphore.h: Put in another idempotentized PTW32_CDECL bit here; - use PTW32_CDECL instead of __cdecl, and fixed indentation of function + * semaphore.h: Put in another idempotentized __PTW32_CDECL bit here; + use __PTW32_CDECL instead of __cdecl, and fixed indentation of function formal parameters. 2012-09-21 Ross Johnson @@ -380,7 +395,7 @@ 2012-09-05 Daniel Richard. G * implement.h: whitespace adjustment. - * dll.c: Facilitate PTW32_STATIC_LIB being defined in a header file. + * dll.c: Facilitate __PTW32_STATIC_LIB being defined in a header file. 2012-09-04 Ross Johnson @@ -411,19 +426,19 @@ 2012-08-31 Daniel Richard. G * implement.h (INLINE): only define if building the inlined make targets. G++ - complained about undefined reference to ptw32_robust_mutex_remove() because it + complained about undefined reference to __ptw32_robust_mutex_remove() because it appears in separate compilation units for "make GCE". 2012-08-29 Ross Johnson - * ptw32_MCS_lock.c (ptw32_mcs_flag_wait): Fix cast in first 'if' statement. + * ptw32_MCS_lock.c (__ptw32_mcs_flag_wait): Fix cast in first 'if' statement. * pthread_mutex_consistent.c (comment): Fix awkward grammar. * pthread_mutexattr_init.c: Initialize robustness element. 2012-08-29 Daniel Richard. G - * implement.h (PTW32_INTERLOCKED_SIZE): Define as long or LONGLONG. - (PTW32_INTERLOCKED_SIZEPTR): Define as long* or LONGLONG*. + * implement.h (__PTW32_INTERLOCKED_SIZE): Define as long or LONGLONG. + (__PTW32_INTERLOCKED_SIZEPTR): Define as long* or LONGLONG*. * pthread_attr_getschedpolicy.c (SCHED_MAX): Fix cast. * ptw32_mutex_check_need_init.c: Fix static mutexattr_t struct initializations. * ptw32_threadStart.c (ExceptionFilter): Add cast. @@ -437,9 +452,9 @@ 2012-08-16 Daniel Richard. G - * pthread.h (PTW32_CONFIG_MINGW): Defined to simplify complex macro combination. - * (PTW32_CONFIG_MSVC6): Likewise. - * (PTW32_CONFIG_MSVC8): Likewise. + * pthread.h (__PTW32_CONFIG_MINGW): Defined to simplify complex macro combination. + * (__PTW32_CONFIG_MSVC6): Likewise. + * (__PTW32_CONFIG_MSVC8): Likewise. * autostatic.c: Substitute new macros. * create.c: Likewise. * pthread_cond_wait.c: Likewise. @@ -464,9 +479,9 @@ 2012-08-11 Daniel Richard. G - * autostatic.c (ptw32_autostatic_anchor): new function; other + * autostatic.c (__ptw32_autostatic_anchor): new function; other changes aimed at de-abstracting functionality. - * impliment.h (ptw32_autostatic_anchor): dummy reference to + * impliment.h (__ptw32_autostatic_anchor): dummy reference to ensure that autostatic.o is always linked into static applications. * GNUmakefile: Various improvements. * Makefile: Likewise. @@ -477,7 +492,7 @@ 2012-03-19 Ross Johnson - * implement.h (ptw32_spinlock_check_need_init): added missing + * implement.h (__ptw32_spinlock_check_need_init): added missing forward declaration. 2012-07-19 Daniel Richard. G @@ -498,8 +513,8 @@ * pthread.h (pthread_create): add __cdecl to prototype start arg (pthread_once): likewise for init_routine arg (pthread_key_create): likewise for destructor arg - (ptw32_cleanup_push): replace type of routine arg with previously - defined ptw32_cleanup_callback_t + (__ptw32_cleanup_push): replace type of routine arg with previously + defined __ptw32_cleanup_callback_t * pthread_key_create.c: add __cdecl attribute to destructor arg * pthread_once.c: add __cdecl attribute to init_routine arg * ptw32_threadStart.c (start): add __cdecl to start variable type @@ -546,7 +561,7 @@ 2011-07-01 Ross Johnson - * *.[ch] (PTW32_INTERLOCKED_*): Redo 23 and 64 bit versions of these + * *.[ch] (__PTW32_INTERLOCKED_*): Redo 23 and 64 bit versions of these macros and re-apply in code to undo the incorrect changes from 2011-06-29; remove some size_t casts which should not be required and may be problematic.a @@ -568,7 +583,7 @@ the superfluous static cleanup routine and call the release routine directly if popped. * create.c (stackSize): Now type size_t. - * pthread.h (struct ptw32_thread_t_): Rearrange to fix element alignments. + * pthread.h (struct __ptw32_thread_t_): Rearrange to fix element alignments. 2011-06-29 Daniel Richard G. @@ -582,7 +597,7 @@ 2011-06-29 Ross Johnson - * *.[ch] (PTW32_INTERLOCKED_*): These macros should now work for + * *.[ch] (__PTW32_INTERLOCKED_*): These macros should now work for both 32 and 64 bit builds. The MingW versions are all inlined asm while the MSVC versions expand to their Interlocked* or Interlocked*64 counterparts appropriately. The argument type have also been changed @@ -598,7 +613,7 @@ compilers such as the Intel compilter icl. * implement.h (#if): Fix forms like #if HAVE_SOMETHING. * pthread.h: Likewise. - * sched.h: Likewise; PTW32_LEVEL_* becomes PTW32_SCHED_LEVEL_*. + * sched.h: Likewise; __PTW32_LEVEL_* becomes __PTW32_SCHED_LEVEL_*. * semaphore.h: Likewise. 2011-05-11 Ross Johnson @@ -632,13 +647,13 @@ 2011-03-11 Ross Johnson - * implement.h (PTW32_INTERLOCKED_*CREMENT macros): increment/decrement + * implement.h (__PTW32_INTERLOCKED_*CREMENT macros): increment/decrement using ++/-- instead of add/subtract 1. * ptw32_MCS_lock.c: Make casts consistent. 2011-03-09 Ross Johnson - * implement.h (ptw32_thread_t_): Add process unique sequence number. + * implement.h (__ptw32_thread_t_): Add process unique sequence number. * global.c: Replace global Critical Section objects with MCS queue locks. * implement.h: Likewise. @@ -664,7 +679,7 @@ * several (MINGW64): Cast and call fixups for 64 bit compatibility; clean build via x86_64-w64-mingw32 cross toolchain on Linux i686 targeting x86_64 win64. - * ptw32_threadStart.c (ptw32_threadStart): Routine no longer attempts + * ptw32_threadStart.c (__ptw32_threadStart): Routine no longer attempts to pass [unexpected C++] exceptions out of scope but ends the thread normally setting EINTR as the exit status. * ptw32_throw.c: Fix C++ exception throwing warnings; ignore @@ -673,7 +688,7 @@ 2011-03-04 Ross Johnson - * implement.h (PTW32_INTERLOCKED_*): Mingw32 does not provide + * implement.h (__PTW32_INTERLOCKED_*): Mingw32 does not provide the __sync_* intrinsics so implemented them here as macro assembler routines. MSVS Interlocked* are emmitted as intrinsics wherever possible, so we want mingw to match it; Extended to @@ -683,8 +698,8 @@ * ptw32_MCS_lock.c: Converted interlocked calls to use new macros. * pthread_barrier_wait.c: Likewise. * pthread_once.c: Likewise. - * ptw32_MCS_lock.c (ptw32_mcs_node_substitute): Name changed to - ptw32_mcs_node_transfer. + * ptw32_MCS_lock.c (__ptw32_mcs_node_substitute): Name changed to + __ptw32_mcs_node_transfer. 2011-02-28 Ross Johnson @@ -734,9 +749,9 @@ 2010-06-19 Ross Johnson - * ptw32_MCS_lock.c (ptw32_mcs_node_substitute): Fix variable + * ptw32_MCS_lock.c (__ptw32_mcs_node_substitute): Fix variable names to avoid using C++ keyword ("new"). - * implement.h (ptw32_mcs_node_substitute): Likewise. + * implement.h (__ptw32_mcs_node_substitute): Likewise. * pthread_barrier_wait.c: Fix signed/unsigned comparison warning. 2010-06-18 Ramiro Polla @@ -766,11 +781,11 @@ 2010-01-26 Ross Johnson - * ptw32_MCS_lock.c (ptw32_mcs_node_substitute): New routine + * ptw32_MCS_lock.c (__ptw32_mcs_node_substitute): New routine to allow relocating the lock owners thread-local node to somewhere else, e.g. to global space so that another thread can release the lock. Used in pthread_barrier_wait. - (ptw32_mcs_lock_try_acquire): New routine. + (__ptw32_mcs_lock_try_acquire): New routine. * pthread_barrier_init: Only one semaphore is used now. * pthread_barrier_wait: Added an MCS guard lock with the last thread to leave the barrier releasing the lock. This removes a deadlock bug @@ -787,7 +802,7 @@ 2008-06-06 Robert Kindred - * ptw32_throw.c (ptw32_throw): Remove possible reference to NULL + * ptw32_throw.c (__ptw32_throw): Remove possible reference to NULL pointer. (At the same time made the switch block conditionally included only if exitCode is needed - RPJ.) * pthread_testcancel.c (pthread_testcancel): Remove duplicate and @@ -852,9 +867,9 @@ 2007-01-06 Romano Paolo Tenca * pthread_cond_destroy.c: Replace sem_wait() with non-cancelable - ptw32_semwait() since pthread_cond_destroy() is not a cancellation + __ptw32_semwait() since pthread_cond_destroy() is not a cancellation point. - * implement.h (ptw32_spinlock_check_need_init): Add prototype. + * implement.h (__ptw32_spinlock_check_need_init): Add prototype. * ptw32_MCS_lock.c: Reverse order of includes. 2007-01-06 Eric Berge @@ -875,7 +890,7 @@ 2007-01-04 Kip Streithorst - * implement.h (PTW32_INTERLOCKED_COMPARE_EXCHANGE): Add Win64 + * implement.h (__PTW32_INTERLOCKED_COMPARE_EXCHANGE): Add Win64 support. 2006-12-20 Ross Johnson @@ -952,7 +967,7 @@ 2005-05-13 Ross Johnson * pthread_win32_attach_detach_np.c (pthread_win32_thread_detach_np): - Move on-exit-only stuff from ptw32_threadDestroy() to here. + Move on-exit-only stuff from __ptw32_threadDestroy() to here. * ptw32_threadDestroy.c: It's purpose is now only to reclaim thread resources for detached threads, or via pthread_join() or pthread_detach() on joinable threads. @@ -967,7 +982,7 @@ * pthread_detach.c (pthread_detach): reduce extent of the thread existence check since we now don't care if the Win32 thread HANDLE has been closed; reclaim thread resources if the thread has exited already. - * ptw32_throw.c (ptw32_throw): For Win32 threads that are not implicit, + * ptw32_throw.c (__ptw32_throw): For Win32 threads that are not implicit, only Call thread cleanup if statically linking, otherwise leave it to dllMain. * sem_post.c (_POSIX_SEM_VALUE_MAX): Change to SEM_VALUE_MAX. @@ -1025,7 +1040,7 @@ until the process itself exited. In addition, at least one race condition has been removed - where two threads could attempt to release the association resources simultaneously - one via - ptw32_callUserDestroyRoutines and the other via + __ptw32_callUserDestroyRoutines and the other via pthread_key_delete. - thanks to Richard Hughes at Aculab for discovering the problem. * pthread_key_create.c: See above. @@ -1037,7 +1052,7 @@ 2005-04-27 Ross Johnson - * sem_wait.c (ptw32_sem_wait_cleanup): after cancellation re-attempt + * sem_wait.c (__ptw32_sem_wait_cleanup): after cancellation re-attempt to acquire the semaphore to avoid a race with a late sem_post. * sem_timedwait.c: Modify comments. @@ -1045,14 +1060,14 @@ * ptw32_relmillisecs.c: New module; converts future abstime to milliseconds relative to 'now'. - * pthread_mutex_timedlock.c: Use new ptw32_relmillisecs routine in + * pthread_mutex_timedlock.c: Use new __ptw32_relmillisecs routine in place of internal code; remove the NEED_SEM code - this routine is now implemented for builds that define NEED_SEM (WinCE etc) * sem_timedwait.c: Likewise; after timeout or cancellation, re-attempt to acquire the semaphore in case one has been posted since the timeout/cancel occurred. Thanks to Stefan Mueller. * Makefile: Add ptw32_relmillisecs.c module; remove - ptw32_{in,de}crease_semaphore.c modules. + __ptw32_{in,de}crease_semaphore.c modules. * GNUmakefile: Likewise. * Bmakefile: Likewise. @@ -1103,7 +1118,7 @@ * pthread.h: Fix conditional defines for static linking. * sched.h: Liekwise. * semaphore.h: Likewise. - * dll.c (PTW32_STATIC_LIB): Module is conditionally included + * dll.c (__PTW32_STATIC_LIB): Module is conditionally included in the build. 2005-03-16 Ross Johnson ^M @@ -1184,7 +1199,7 @@ starvation problem. - reported by Gottlob Frege - * ptw32_threadDestroy.c (ptw32_threadDestroy): Implicit threads were + * ptw32_threadDestroy.c (__ptw32_threadDestroy): Implicit threads were not closing their Win32 thread duplicate handle. - reported by Dmitrii Semii @@ -1205,7 +1220,7 @@ 2004-11-22 Ross Johnson - * pthread_cond_wait.c (ptw32_cond_wait_cleanup): Undo change + * pthread_cond_wait.c (__ptw32_cond_wait_cleanup): Undo change from 2004-11-02. * Makefile (DLL_VER): Added for DLL naming suffix - see README. * GNUmakefile (DLL_VER): Likewise. @@ -1220,26 +1235,26 @@ 2004-11-19 Ross Johnson - * config.h (PTW32_THREAD_ID_REUSE_INCREMENT): Added to allow + * config.h (__PTW32_THREAD_ID_REUSE_INCREMENT): Added to allow building the library for either unique thread IDs like Solaris or non-unique thread IDs like Linux; allows application developers to override the library's default insensitivity to some apps that may not be strictly POSIX compliant. * version.rc: New resource module to encode version information within the DLL. - * pthread.h: Added PTW32_VERSION* defines and grouped sections + * pthread.h: Added __PTW32_VERSION* defines and grouped sections required by resource compiler together; bulk of file is skipped if RC_INVOKED. Defined some error numbers and other names for Borland compiler. 2004-11-02 Ross Johnson - * pthread_cond_wait.c (ptw32_cond_wait_cleanup): Lock CV mutex at + * pthread_cond_wait.c (__ptw32_cond_wait_cleanup): Lock CV mutex at start of cleanup handler rather than at the end. - * implement.h (PTW32_THREAD_REUSE_EMPTY): Renamed from *_BOTTOM. - (ptw32_threadReuseBottom): New global variable. - * global.c (ptw32_threadReuseBottom): Declare new variable. - * ptw32_reuse.c (ptw32_reuse): Change reuse LIFO stack to LILO queue + * implement.h (__PTW32_THREAD_REUSE_EMPTY): Renamed from *_BOTTOM. + (__ptw32_threadReuseBottom): New global variable. + * global.c (__ptw32_threadReuseBottom): Declare new variable. + * ptw32_reuse.c (__ptw32_reuse): Change reuse LIFO stack to LILO queue to more evenly distribute use of reusable thread IDs; use renamed PTW32_THREAD_REUSE_EMPTY. * ptw32_processTerminate.c (ptw2_processTerminate): Use renamed @@ -1261,22 +1276,22 @@ 2004-10-29 Ross Johnson - * implement.h (pthread_t): Renamed to ptw32_thread_t; struct contains + * implement.h (pthread_t): Renamed to __ptw32_thread_t; struct contains all thread state. - * pthread.h (ptw32_handle_t): New general purpose struct to serve + * pthread.h (__ptw32_handle_t): New general purpose struct to serve as a handle for various reusable object IDs - currently only used - by pthread_t; contains a pointer to ptw32_thread_t (thread state) + by pthread_t; contains a pointer to __ptw32_thread_t (thread state) and a general purpose uint for use as a reuse counter or flags etc. - (pthread_t): typedef'ed to ptw32_handle_t; the uint is the reuse + (pthread_t): typedef'ed to __ptw32_handle_t; the uint is the reuse counter that allows the library to maintain unique POSIX thread IDs. When the pthread struct reuse stack was introduced, threads would often acquire an identical ID to a previously destroyed thread. The same was true for the pre-reuse stack library, by virtue of pthread_t being the address of the thread struct. The new pthread_t retains the reuse stack but provides virtually unique thread IDs. - * sem_wait.c (ptw32_sem_wait_cleanup): New routine used for + * sem_wait.c (__ptw32_sem_wait_cleanup): New routine used for cancellation cleanup. - * sem_timedwait.c (ptw32_sem_timedwait_cleanup): Likewise. + * sem_timedwait.c (__ptw32_sem_timedwait_cleanup): Likewise. 2004-10-22 Ross Johnson @@ -1294,7 +1309,7 @@ * sem_post.c (sem_post): Likewise. * sem_post_multiple.c (sem_post_multiple): Likewise. * sem_getvalue.c (sem_getvalue): Likewise. - * ptw32_semwait.c (ptw32_semwait): Likewise. + * ptw32_semwait.c (__ptw32_semwait): Likewise. * sem_destroy.c (sem_destroy): Likewise; also tightened the conditions for semaphore destruction; in particular, a semaphore will not be destroyed if it has waiters. @@ -1329,7 +1344,7 @@ * sem_timedwait.c (sem_timedwait): Likewise. * sem_post_multiple.c (sem_post_multiple): Likewise. * sem_getvalue.c (sem_getvalue): Likewise. - * ptw32_semwait.c (ptw32_semwait): Likewise. + * ptw32_semwait.c (__ptw32_semwait): Likewise. * implement.h (sem_t_): Add counter element. 2004-10-15 Ross Johnson @@ -1362,11 +1377,11 @@ * pthread_mutex_timedlock.c pthread_mutex_timedlock(): Similarly. * pthread_mutex_trylock.c (pthread_mutex_trylock): Similarly. * pthread_mutex_unlock.c (pthread_mutex_unlock): Similarly. - * ptw32_InterlockedCompareExchange.c (ptw32_InterlockExchange): New + * ptw32_InterlockedCompareExchange.c (__ptw32_InterlockExchange): New function. - (PTW32_INTERLOCKED_EXCHANGE): Sets up macro to use inlined - ptw32_InterlockedExchange. - * implement.h (PTW32_INTERLOCKED_EXCHANGE): Set default to + (__PTW32_INTERLOCKED_EXCHANGE): Sets up macro to use inlined + __ptw32_InterlockedExchange. + * implement.h (__PTW32_INTERLOCKED_EXCHANGE): Set default to InterlockedExchange(). * Makefile: Building using /Ob2 so that asm sections within inline functions are inlined. @@ -1393,7 +1408,7 @@ * pthread_spin_unlock.c (pthread_spin_unlock):Likewise. * ptw32_InterlockedCompareExchange.c: Sets up macro for inlined use. * implement.h (pthread_mutex_t_): Remove Critical Section element. - (PTW32_INTERLOCKED_COMPARE_EXCHANGE): Set to default non-inlined + (__PTW32_INTERLOCKED_COMPARE_EXCHANGE): Set to default non-inlined version of InterlockedCompareExchange(). * private.c: Include ptw32_InterlockedCompareExchange.c first for inlining. @@ -1437,7 +1452,7 @@ * pthread_barrier_wait.c (pthread_barrier_wait): Remove excessive code by substituting the internal non-cancelable version of sem_wait - (ptw32_semwait). + (__ptw32_semwait). 2004-08-25 Ross Johnson @@ -1499,7 +1514,7 @@ * pthread.h (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise. * pthread.h (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise. - * ptw32_mutex_check_need_init.c (ptw32_mutex_check_need_init): + * ptw32_mutex_check_need_init.c (__ptw32_mutex_check_need_init): Add new initialisers. * pthread_mutex_lock.c (pthread_mutex_lock): Check for new @@ -1523,14 +1538,14 @@ * pthread_cancel.c (pthread_cancel): Adapted to use auto-detected QueueUserAPCEx features at run-time. - (ptw32_Registercancellation): Drop in replacement for QueueUserAPCEx() + (__ptw32_Registercancellation): Drop in replacement for QueueUserAPCEx() if it can't be used. Provides older style non-preemptive async cancellation. * pthread_win32_attach_detach_np.c (pthread_win32_attach_np): Auto-detect quserex.dll and the availability of alertdrv.sys; initialise and close on process attach/detach. - * global.c (ptw32_register_cancellation): Pointer to either - QueueUserAPCEx() or ptw32_Registercancellation() depending on + * global.c (__ptw32_register_cancellation): Pointer to either + QueueUserAPCEx() or __ptw32_Registercancellation() depending on availability. QueueUserAPCEx makes pre-emptive async cancellation possible. * implement.h: Add definitions and prototypes related to QueueUserAPC. @@ -1565,13 +1580,13 @@ 2003-10-20 Alexander Terekhov - * pthread_mutex_timedlock.c (ptw32_semwait): Move to individual module. + * pthread_mutex_timedlock.c (__ptw32_semwait): Move to individual module. * ptw32_semwait.c: New module. - * pthread_cond_wait.c (ptw32_cond_wait_cleanup): Replace cancelable - sem_wait() call with non-cancelable ptw32_semwait() call. + * pthread_cond_wait.c (__ptw32_cond_wait_cleanup): Replace cancelable + sem_wait() call with non-cancelable __ptw32_semwait() call. * pthread.c (private.c): Re-order for inlining. GNU C warned that - function ptw32_semwait() was defined 'inline' after it was called. - * pthread_cond_signal.c (ptw32_cond_unblock): Likewise. + function __ptw32_semwait() was defined 'inline' after it was called. + * pthread_cond_signal.c (__ptw32_cond_unblock): Likewise. * pthread_delay_np.c: Disable Watcom warning with comment. * *.c (process.h): Remove include from .c files. This is conditionally included by the common project include files. @@ -1602,7 +1617,7 @@ than pushing to stack. * semaphore.h: Likewise. * sched.h: Likewise. - * pthread_cond_wait.c (ptw32_cond_wait_cleanup): Define with cdecl attribute + * pthread_cond_wait.c (__ptw32_cond_wait_cleanup): Define with cdecl attribute for Watcom compatibility. This routine is called via pthread_cleanup_push so it had to match function arg definition. * Wmakefile: New makefile for Watcom builds. @@ -1632,7 +1647,7 @@ priority levels; record priority level given via attributes, or inherited from parent thread, for later return by pthread_getschedparam. - * ptw32_new.c (ptw32_new): Initialise pthread_t_ sched_priority element. + * ptw32_new.c (__ptw32_new): Initialise pthread_t_ sched_priority element. * pthread_self.c (pthread_self): Set newly created implicit POSIX thread sched_priority to Win32 thread's current actual priority. Temporarily @@ -1648,7 +1663,7 @@ 2003-09-03 Ross Johnson - * w32_cancelableWait.c (ptw32_cancelable_wait): Allow cancellation + * w32_cancelableWait.c (__ptw32_cancelable_wait): Allow cancellation of implicit POSIX threads as well. 2003-09-02 Ross Johnson @@ -1658,16 +1673,16 @@ * pthread_exit.c (pthread_exit): Fix to recycle the POSIX thread handle in addition to calling user TSD destructors. Move the implicit POSIX thread exit - handling to ptw32_throw to centralise the logic. + handling to __ptw32_throw to centralise the logic. - * ptw32_throw.c (ptw32_throw): Implicit POSIX threads have no point + * ptw32_throw.c (__ptw32_throw): Implicit POSIX threads have no point to jump or throw to, so cleanup and exit the thread here in this case. For processes using the C runtime, the exit code will be set to the POSIX reason for the throw (i.e. PTHREAD_CANCEL or the value given to pthread_exit). Note that pthread_exit() already had similar logic, which has been moved to here. - * ptw32_threadDestroy.c (ptw32_threadDestroy): Don't close the Win32 handle + * ptw32_threadDestroy.c (__ptw32_threadDestroy): Don't close the Win32 handle of implicit POSIX threads - expect this to be done by Win32? 2003-09-01 Ross Johnson @@ -1690,10 +1705,10 @@ * pthread_cancel.c (pthread_cancel): Likewise. - * ptw32_threadDestroy.c (ptw32_threadDestroy): pthread_t structs are + * ptw32_threadDestroy.c (__ptw32_threadDestroy): pthread_t structs are never freed - push them onto a stack for reuse. - * ptw32_new.c (ptw32_new): Check for reusable pthread_t before dynamically + * ptw32_new.c (__ptw32_new): Check for reusable pthread_t before dynamically allocating new memory for the struct. * pthread_kill.c (pthread_kill): New file; new routine; takes only a zero @@ -1702,22 +1717,22 @@ * pthread.h (pthread_kill): Add prototype. - * ptw32_reuse.c (ptw32_threadReusePop): New file; new routine; pop a + * ptw32_reuse.c (__ptw32_threadReusePop): New file; new routine; pop a pthread_t off the reuse stack. pthread_t_ structs that have been destroyed, i.e. have exited detached or have been joined, are cleaned up and put onto a reuse stack. Consequently, thread IDs are no longer freed once calloced. The library will attempt to get a struct off this stack before asking the system to alloc new memory when creating threads. The stack is guarded by a global mutex. - (ptw32_threadReusePush): New routine; push a pthread_t onto the reuse stack. + (__ptw32_threadReusePush): New routine; push a pthread_t onto the reuse stack. - * implement.h (ptw32_threadReusePush): Add new prototype. - (ptw32_threadReusePop): Likewise. + * implement.h (__ptw32_threadReusePush): Add new prototype. + (__ptw32_threadReusePop): Likewise. (pthread_t): Add new element. - * ptw32_processTerminate.c (ptw32_processTerminate): Delete the thread + * ptw32_processTerminate.c (__ptw32_processTerminate): Delete the thread reuse lock; free all thread ID structs on the thread reuse stack. - * ptw32_processInitialize.c (ptw32_processInitialize): Initialise the + * ptw32_processInitialize.c (__ptw32_processInitialize): Initialise the thread reuse lock. 2003-07-19 Ross Johnson @@ -1749,7 +1764,7 @@ 2003-05-15 Steven Reddie * pthread_win32_attach_detach_np.c (pthread_win32_process_detach_np): - NULLify ptw32_selfThreadKey after the thread is destroyed, otherwise + NULLify __ptw32_selfThreadKey after the thread is destroyed, otherwise destructors calling pthreads routines might resurrect it again, creating memory leaks. Call the underlying Win32 Tls routine directly rather than pthread_setspecific(). @@ -1767,10 +1782,10 @@ 2002-12-17 Thomas Pfaff - * pthread_mutex_lock.c (ptw32_semwait): New static routine to provide + * pthread_mutex_lock.c (__ptw32_semwait): New static routine to provide a non-cancelable sem_wait() function. This is consistent with the way that pthread_mutex_timedlock.c does it. - (pthread_mutex_lock): Use ptw32_semwait() instead of sem_wait(). + (pthread_mutex_lock): Use __ptw32_semwait() instead of sem_wait(). 2002-12-11 Thomas Pfaff @@ -1786,20 +1801,20 @@ destroy a condition variable while the other is attempting to initialize a condition variable that was created with PTHREAD_COND_INITIALIZER, a deadlock can occur. Shrink - the ptw32_cond_list_lock critical section to fix it. + the __ptw32_cond_list_lock critical section to fix it. 2002-07-31 Ross Johnson - * ptw32_threadStart.c (ptw32_threadStart): Thread cancelLock - destruction moved to ptw32_threadDestroy(). + * ptw32_threadStart.c (__ptw32_threadStart): Thread cancelLock + destruction moved to __ptw32_threadDestroy(). - * ptw32_threadDestroy.c (ptw32_threadDestroy): Destroy + * ptw32_threadDestroy.c (__ptw32_threadDestroy): Destroy the thread's cancelLock. Moved here from ptw32_threadStart.c to cleanup implicit threads as well. 2002-07-30 Alexander Terekhov - * pthread_cond_wait.c (ptw32_cond_wait_cleanup): + * pthread_cond_wait.c (__ptw32_cond_wait_cleanup): Remove code designed to avoid/prevent spurious wakeup problems. It is believed that the sem_timedwait() call is consuming a CV signal that it shouldn't and this is @@ -1811,7 +1826,7 @@ unreasonable abstime values - that would result in unexpected timeout values. - * w32_CancelableWait.c (ptw32_cancelable_wait): + * w32_CancelableWait.c (__ptw32_cancelable_wait): Tighten up return value checking and add comments. @@ -1851,7 +1866,7 @@ * errno.c: Compiler directive was incorrectly including code. * pthread.h: Conditionally added some #defines from config.h needed when not building the library. e.g. NEED_ERRNO, NEED_SEM. - (PTW32_DLLPORT): Now only defined if _DLL defined. + (__PTW32_DLLPORT): Now only defined if _DLL defined. (_errno): Compiler directive was incorrectly including prototype. * sched.h: Conditionally added some #defines from config.h needed when not building the library. @@ -1903,11 +1918,11 @@ may not be tolerant of this. * pthread_cond_init.c: Add CV to linked list. * pthread_cond_destroy.c: Remove CV from linked list. - * global.c (ptw32_cond_list_head): New variable. - (ptw32_cond_list_tail): New variable. - (ptw32_cond_list_cs): New critical section. - * ptw32_processInitialize (ptw32_cond_list_cs): Initialize. - * ptw32_processTerminate (ptw32_cond_list_cs): Delete. + * global.c (__ptw32_cond_list_head): New variable. + (__ptw32_cond_list_tail): New variable. + (__ptw32_cond_list_cs): New critical section. + * __ptw32_processInitialize (__ptw32_cond_list_cs): Initialize. + * __ptw32_processTerminate (__ptw32_cond_list_cs): Delete. * Reduce executable size. @@ -2069,12 +2084,12 @@ 2002-02-07 Ross Johnson @@ -2236,9 +2251,9 @@ 2002-01-15 Ross Johnson - * pthread.h: Unless the build explicitly defines __CLEANUP_SEH, - __CLEANUP_CXX, or __CLEANUP_C, then the build defaults to - __CLEANUP_C style cleanup. This style uses setjmp/longjmp + * pthread.h: Unless the build explicitly defines __PTW32_CLEANUP_SEH, + __PTW32_CLEANUP_CXX, or __PTW32_CLEANUP_C, then the build defaults to + __PTW32_CLEANUP_C style cleanup. This style uses setjmp/longjmp in the cancellation and thread exit implementations and therefore won't do stack unwinding if linked to applications that have it (e.g. C++ apps). This is currently consistent with most/all @@ -2246,7 +2261,7 @@ * spin.c (pthread_spin_init): Edit renamed function call. * nonportable.c (pthread_num_processors_np): New. - (pthread_getprocessors_np): Renamed to ptw32_getprocessors + (pthread_getprocessors_np): Renamed to __ptw32_getprocessors and moved to private.c. * private.c (pthread_getprocessors): Moved here from nonportable.c. @@ -2271,8 +2286,8 @@ 2002-01-08 Ross Johnson * mutex.c (pthread_mutex_trylock): use - ptw32_interlocked_compare_exchange function pointer - rather than ptw32_InterlockedCompareExchange() directly + __ptw32_interlocked_compare_exchange function pointer + rather than __ptw32_InterlockedCompareExchange() directly to retain portability to non-iX86 processors, e.g. WinCE etc. The pointer will point to the native OS version of InterlockedCompareExchange() if the @@ -2285,7 +2300,7 @@ (pthread_mutex_destroy): Likewise. (pthread_mutex_unlock): Likewise. (pthread_mutex_trylock): Likewise; uses - ptw32_InterlockedCompareExchange() to avoid need for + __ptw32_InterlockedCompareExchange() to avoid need for critical section; library is no longer i386 compatible; recursive mutexes now increment the lock count rather than return EBUSY; errorcheck mutexes return EDEADLCK @@ -2327,9 +2342,9 @@ WSAGetLastError() and WSASetLastError(). * Makefile (wsock32.lib): Likewise. * create.c: Minor mostly inert changes. - * implement.h (PTW32_MAX): Move into here and renamed + * implement.h (__PTW32_MAX): Move into here and renamed from sched.h. - (PTW32_MIN): Likewise. + (__PTW32_MIN): Likewise. * GNUmakefile (TEST_ICE): Define if testing internal implementation of InterlockedCompareExchange. * Makefile (TEST_ICE): Likewise. @@ -2347,18 +2362,18 @@ 2001-10-17 Ross Johnson * barrier.c: Move _LONG and _LPLONG defines into - implement.h; rename to PTW32_INTERLOCKED_LONG and + implement.h; rename to __PTW32_INTERLOCKED_LONG and PTW32_INTERLOCKED_LPLONG respectively. - * spin.c: Likewise; ptw32_interlocked_compare_exchange used + * spin.c: Likewise; __ptw32_interlocked_compare_exchange used in place of InterlockedCompareExchange directly. - * global.c (ptw32_interlocked_compare_exchange): Add + * global.c (__ptw32_interlocked_compare_exchange): Add prototype for this new routine pointer to be used when InterlockedCompareExchange isn't supported by Windows. * nonportable.c (pthread_win32_process_attach_np): Check for support of InterlockedCompareExchange in kernel32 and assign its - address to ptw32_interlocked_compare_exchange if it exists, or - our own ix86 specific implementation ptw32_InterlockedCompareExchange. - *private.c (ptw32_InterlockedCompareExchange): An + address to __ptw32_interlocked_compare_exchange if it exists, or + our own ix86 specific implementation __ptw32_InterlockedCompareExchange. + *private.c (__ptw32_InterlockedCompareExchange): An implementation of InterlockedCompareExchange() which is specific to ix86; written directly in assembler for either MSVC or GNU C; needed because Windows 95 doesn't support @@ -2438,7 +2453,7 @@ is now stored in the barrier struct. * implement.h (pthread_barrier_t_): Lost some/gained one elements. - * private.c (ptw32_threadStart): Removed some comments. + * private.c (__ptw32_threadStart): Removed some comments. 2001-07-10 Ross Johnson @@ -2621,7 +2636,7 @@ * semaphore.h (sem_t): Fixed for compile and test. * implement.h (sem_t_): Likewise. * semaphore.c: Likewise. - * private.c (ptw32_sem_timedwait): Updated to use new + * private.c (__ptw32_sem_timedwait): Updated to use new opaque sem_t. 2001-06-06 Ross Johnson @@ -2642,16 +2657,16 @@ 2001-06-06 Ross Johnson * mutex.c (pthread_mutexattr_init): Remove - ptw32_mutex_default_kind. + __ptw32_mutex_default_kind. 2001-06-05 Ross Johnson * nonportable.c (pthread_mutex_setdefaultkind_np): Remove - should not have been included in the first place. (pthread_mutex_getdefaultkind_np): Likewise. - * global.c (ptw32_mutex_default_kind): Likewise. + * global.c (__ptw32_mutex_default_kind): Likewise. * mutex.c (pthread_mutex_init): Remove use of - ptw32_mutex_default_kind. + __ptw32_mutex_default_kind. * pthread.h (pthread_mutex_setdefaultkind_np): Likewise. (pthread_mutex_getdefaultkind_np): Likewise. * pthread.def (pthread_mutexattr_setkind_np): Added. @@ -2677,10 +2692,10 @@ * condvar.c (pthread_cond_init): Completely revamped. (pthread_cond_destroy): Likewise. - (ptw32_cond_wait_cleanup): Likewise. - (ptw32_cond_timedwait): Likewise. - (ptw32_cond_unblock): New general signaling routine. - (pthread_cond_signal): Now calls ptw32_cond_unblock. + (__ptw32_cond_wait_cleanup): Likewise. + (__ptw32_cond_timedwait): Likewise. + (__ptw32_cond_unblock): New general signaling routine. + (pthread_cond_signal): Now calls __ptw32_cond_unblock. (pthread_cond_broadcast): Likewise. * implement.h (pthread_cond_t_): Revamped. * README.CV: New; explanation of the above changes. @@ -2706,7 +2721,7 @@ using Multithreaded DLL CRT instead of Multithreaded statically linked CRT). * create.c (pthread_create): Likewise; fix typo. - * private.c (ptw32_threadStart): Eliminate use of terminate() which doesn't + * private.c (__ptw32_threadStart): Eliminate use of terminate() which doesn't throw exceptions. * Remove unnecessary #includes from a number of modules - [I had to #include malloc.h in implement.h for gcc - rpj]. @@ -2781,11 +2796,11 @@ * sync.c (pthread_join): Spelling fix in comment. - * private.c (ptw32_threadStart): Reset original termination + * private.c (__ptw32_threadStart): Reset original termination function (C++). - (ptw32_threadStart): Cleanup detached threads early in case + (__ptw32_threadStart): Cleanup detached threads early in case the library is statically linked. - (ptw32_callUserDestroyRoutines): Remove [SEH] __try block from + (__ptw32_callUserDestroyRoutines): Remove [SEH] __try block from destructor call so that unhandled exceptions will be passed through to the system; call terminate() from [C++] try block for the same reason. @@ -2803,22 +2818,22 @@ * config.h.in (HAVE_MODE_T): Added. (_UWIN): Start adding defines for the UWIN package. - * private.c (ptw32_threadStart): Unhandled exceptions are + * private.c (__ptw32_threadStart): Unhandled exceptions are now passed through to the system to deal with. This is consistent with normal Windows behaviour. C++ applications may use set_terminate() to override the default behaviour which is - to call ptw32_terminate(). Ptw32_terminate() cleans up some + to call __ptw32_terminate(). Ptw32_terminate() cleans up some POSIX thread stuff before calling the system default function which calls abort(). The users termination function should conform to standard C++ semantics which is to not return. It should exit the thread (call pthread_exit()) or exit the application. - * private.c (ptw32_terminate): Added as the default set_terminate() + * private.c (__ptw32_terminate): Added as the default set_terminate() function. It calls the system default function after cleaning up some POSIX thread stuff. - * implement.h (ptw32_try_enter_critical_section): Move + * implement.h (__ptw32_try_enter_critical_section): Move declaration. - * global.c (ptw32_try_enter_critical_section): Moved + * global.c (__ptw32_try_enter_critical_section): Moved from dll.c. * dll.c: Move process and thread attach/detach code into functions in nonportable.c. @@ -2888,12 +2903,12 @@ - Ollie Leahy (pthread_setcancelstate): Likewise. (pthread_setcanceltype): Likewise. - * misc.c (ptw32_cancelable_wait): Likewise. + * misc.c (__ptw32_cancelable_wait): Likewise. - * private.c (ptw32_tkAssocCreate): Remove unused #if 0 + * private.c (__ptw32_tkAssocCreate): Remove unused #if 0 wrapped code. - * pthread.h (ptw32_get_exception_services_code): + * pthread.h (__ptw32_get_exception_services_code): Needed to be forward declared unconditionally. 2000-09-06 Ross Johnson @@ -2907,29 +2922,29 @@ 2000-09-02 Ross Johnson - * condvar.c (ptw32_cond_wait_cleanup): Ensure that all + * condvar.c (__ptw32_cond_wait_cleanup): Ensure that all waking threads check if they are the last, and notify the broadcaster if so - even if an error occurs in the waiter. * semaphore.c (_decrease_semaphore): Should be - a call to ptw32_decrease_semaphore. + a call to __ptw32_decrease_semaphore. (_increase_semaphore): Should be a call to - ptw32_increase_semaphore. + __ptw32_increase_semaphore. - * misc.c (ptw32_cancelable_wait): Renamed from + * misc.c (__ptw32_cancelable_wait): Renamed from CancelableWait. * rwlock.c (_rwlock_check*): Renamed to - ptw32_rwlock_check*. - * mutex.c (_mutex_check*): Renamed to ptw32_mutex_check*. - * condvar.c (cond_timed*): Renamed to ptw32_cond_timed*. - (_cond_check*): Renamed to ptw32_cond_check*. - (cond_wait_cleanup*): Rename to ptw32_cond_wait_cleanup*. - (ptw32_cond_timedwait): Add comments. + __ptw32_rwlock_check*. + * mutex.c (_mutex_check*): Renamed to __ptw32_mutex_check*. + * condvar.c (cond_timed*): Renamed to __ptw32_cond_timed*. + (_cond_check*): Renamed to __ptw32_cond_check*. + (cond_wait_cleanup*): Rename to __ptw32_cond_wait_cleanup*. + (__ptw32_cond_timedwait): Add comments. 2000-08-22 Ross Johnson - * private.c (ptw32_throw): Fix exception test; + * private.c (__ptw32_throw): Fix exception test; move exceptionInformation declaration. * tsd.c (pthread_key_create): newkey wrongly declared. @@ -2947,7 +2962,7 @@ (pthread_rwlock_destroy): Invalidate the rwlock before freeing up any of it's resources - to avoid contention. - * private.c (ptw32_tkAssocCreate): Change assoc->lock + * private.c (__ptw32_tkAssocCreate): Change assoc->lock to use a dynamically initialised mutex - only consumes a W32 mutex or critical section when first used, not before. @@ -2957,9 +2972,9 @@ (pthread_mutexattr_destroy): Set attribute to NULL before freeing it's memory - to avoid contention. - * implement.h (PTW32_EPS_CANCEL/PTW32_EPS_EXIT): + * implement.h (__PTW32_EPS_CANCEL/PTW32_EPS_EXIT): Must be defined for all compilers - used as generic - exception selectors by ptw32_throw(). + exception selectors by __ptw32_throw(). * Several: Fix typos from scripted edit session yesterday. @@ -2972,43 +2987,43 @@ * mutex.c (pthread_mutexattr_setforcecs_np): Moved to new file "nonportable.c". - * pthread.h (PTW32_BUILD): Only redefine __except + * pthread.h (__PTW32_BUILD): Only redefine __except and catch compiler keywords if we aren't building - the library (ie. PTW32_BUILD is not defined) - + the library (ie. __PTW32_BUILD is not defined) - this is safer than defining and then undefining if not building the library. * implement.h: Remove __except and catch undefines. - * Makefile (CFLAGS): Define PTW32_BUILD. - * GNUmakefile (CFLAGS): Define PTW32_BUILD. + * Makefile (CFLAGS): Define __PTW32_BUILD. + * GNUmakefile (CFLAGS): Define __PTW32_BUILD. * All appropriate: Change Pthread_exception* to - ptw32_exception* to be consistent with internal + __ptw32_exception* to be consistent with internal identifier naming. - * private.c (ptw32_throw): New function to provide + * private.c (__ptw32_throw): New function to provide a generic exception throw for all internal exceptions and EH schemes. - (ptw32_threadStart): pthread_exit() value is now + (__ptw32_threadStart): pthread_exit() value is now returned via the thread structure exitStatus element. * exit.c (pthread_exit): pthread_exit() value is now returned via the thread structure exitStatus element. - * cancel.c (ptw32_cancel_self): Now uses ptw32_throw. + * cancel.c (__ptw32_cancel_self): Now uses __ptw32_throw. (pthread_setcancelstate): Ditto. (pthread_setcanceltype): Ditto. (pthread_testcancel): Ditto. (pthread_cancel): Ditto. * misc.c (CancelableWait): Ditto. * exit.c (pthread_exit): Ditto. - * All applicable: Change PTW32_ prefix to + * All applicable: Change __PTW32_ prefix to PTW32_ prefix to remove leading underscores from private library identifiers. 2000-08-17 Ross Johnson * All applicable: Change _pthread_ prefix to - ptw32_ prefix to remove leading underscores + __ptw32_ prefix to remove leading underscores from private library identifiers (single and double leading underscores are reserved in the ANSI C standard for compiler implementations). @@ -3038,7 +3053,7 @@ casting for functions that will be passed as parameters. (~PThreadCleanup): add cast and group expression. (_errno): Add _MD compile conditional. - (PtW32NoCatchWarn): Change pragma message. + (__PtW32NoCatchWarn): Change pragma message. * implement.h: Move and change PT_STDCALL define. @@ -3069,7 +3084,7 @@ * pthread.h: Add compile-time message when using MSC_VER compiler and C++ EH to warn application - programmers to use PtW32Catch instead of catch(...) + programmers to use __PtW32Catch instead of catch(...) if they want cancellation and pthread_exit to work. * implement.h: Remove #include ; we @@ -3079,18 +3094,18 @@ * cleanup.c (pthread_pop_cleanup): Remove _pthread prefix from __except and catch keywords; implement.h - now simply undefines ptw32__except and - ptw32_catch if defined; VC++ was not textually - substituting ptw32_catch etc back to catch as + now simply undefines __ptw32__except and + __ptw32_catch if defined; VC++ was not textually + substituting __ptw32_catch etc back to catch as it was redefined; the reason for using the prefixed version was to make it clear that it was not using the pthread.h redefined catch keyword. - * private.c (ptw32_threadStart): Ditto. - (ptw32_callUserDestroyRoutines): Ditto. + * private.c (__ptw32_threadStart): Ditto. + (__ptw32_callUserDestroyRoutines): Ditto. - * implement.h (ptw32__except): Remove #define. - (ptw32_catch): Remove #define. + * implement.h (__ptw32__except): Remove #define. + (__ptw32_catch): Remove #define. * GNUmakefile (pthread.a): New target to build libpthread32.a from pthread.dll using dlltool. @@ -3115,15 +3130,15 @@ 2000-08-05 Ross Johnson - * pthread.h (PtW32CatchAll): Add macro. When compiling + * pthread.h (__PtW32CatchAll): Add macro. When compiling applications using VC++ with C++ EH rather than SEH - 'PtW32CatchAll' must be used in place of any 'catch( ... )' + '__PtW32CatchAll' must be used in place of any 'catch( ... )' if the application wants pthread cancellation or pthread_exit() to work. 2000-08-03 Ross Johnson - * pthread.h: Add a base class ptw32_exception for + * pthread.h: Add a base class __ptw32_exception for library internal exceptions and change the "catch" re-define macro to use it. @@ -3147,24 +3162,24 @@ a local copy of the handle for internal use until pthread_create returns. - * private.c (ptw32_threadStart): Initialise ei[]. - (ptw32_threadStart): When beginthread is used to start the + * private.c (__ptw32_threadStart): Initialise ei[]. + (__ptw32_threadStart): When beginthread is used to start the thread, force waiting until the creator thread had the thread handle. - * cancel.c (ptw32_cancel_thread): Include context switch + * cancel.c (__ptw32_cancel_thread): Include context switch code for defined(_X86_) environments in addition to _M_IX86. * rwlock.c (pthread_rwlock_destroy): Assignment changed to avoid compiler warning. - * private.c (ptw32_get_exception_services_code): Cast + * private.c (__ptw32_get_exception_services_code): Cast NULL return value to avoid compiler warning. * cleanup.c (pthread_pop_cleanup): Initialise "cleanup" variable to avoid compiler warnings. - * misc.c (ptw32_new): Change "new" variable to "t" to avoid + * misc.c (__ptw32_new): Change "new" variable to "t" to avoid confusion with the C++ keyword of the same name. * condvar.c (cond_wait_cleanup): Initialise lastWaiter variable. @@ -3249,10 +3264,10 @@ * implement.h: Include SEH code only if MSC is not compiling as C++. - * cancel.c (ptw32_cancel_thread): Add _M_IX86 check. + * cancel.c (__ptw32_cancel_thread): Add _M_IX86 check. (pthread_testcancel): Include SEH code only if MSC is not compiling as C++. - (ptw32_cancel_self): Include SEH code only if MSC is not + (__ptw32_cancel_self): Include SEH code only if MSC is not compiling as C++. 2000-01-06 Erik Hensema @@ -3261,38 +3276,38 @@ 2000-01-04 Ross Johnson - * private.c (ptw32_get_exception_services_code): New; returns + * private.c (__ptw32_get_exception_services_code): New; returns value of EXCEPTION_PTW32_SERVICES. - (ptw32_processInitialize): Remove initialisation of - ptw32_exception_services which is no longer needed. + (__ptw32_processInitialize): Remove initialisation of + __ptw32_exception_services which is no longer needed. - * pthread.h (ptw32_exception_services): Remove extern. - (ptw32_get_exception_services_code): Add function prototype; + * pthread.h (__ptw32_exception_services): Remove extern. + (__ptw32_get_exception_services_code): Add function prototype; use this to return EXCEPTION_PTW32_SERVICES value instead of - using the ptw32_exception_services variable which I had + using the __ptw32_exception_services variable which I had trouble exporting through pthread.def. - * global.c (ptw32_exception_services): Remove declaration. + * global.c (__ptw32_exception_services): Remove declaration. 1999-11-22 Ross Johnson - * implement.h: Forward declare ptw32_new(); + * implement.h: Forward declare __ptw32_new(); - * misc.c (ptw32_new): New; alloc and initialise a new pthread_t. + * misc.c (__ptw32_new): New; alloc and initialise a new pthread_t. (pthread_self): New thread struct is generated by new routine - ptw32_new(). + __ptw32_new(). * create.c (pthread_create): New thread struct is generated - by new routine ptw32_new(). + by new routine __ptw32_new(). 1999-11-21 Ross Johnson - * global.c (ptw32_exception_services): Declare new variable. + * global.c (__ptw32_exception_services): Declare new variable. - * private.c (ptw32_threadStart): Destroy thread's + * private.c (__ptw32_threadStart): Destroy thread's cancelLock mutex; make 'catch' and '__except' usageimmune to redfinitions in pthread.h. - (ptw32_processInitialize): Init new constant ptw32_exception_services. + (__ptw32_processInitialize): Init new constant __ptw32_exception_services. * create.c (pthread_create): Initialise thread's cancelLock mutex. @@ -3306,7 +3321,7 @@ won't catch our internal exceptions. (__except): ditto for __except. - * implement.h (ptw32_catch): Define internal version + * implement.h (__ptw32_catch): Define internal version of 'catch' because 'catch' is redefined by pthread.h. (__except): ditto for __except. (struct pthread_t_): Add cancelLock mutex for async cancel @@ -3314,9 +3329,9 @@ 1999-11-21 Jason Nye , Erik Hensema - * cancel.c (ptw32_cancel_self): New; part of the async + * cancel.c (__ptw32_cancel_self): New; part of the async cancellation implementation. - (ptw32_cancel_thread): Ditto; this function is X86 + (__ptw32_cancel_thread): Ditto; this function is X86 processor specific. (pthread_setcancelstate): Add check for pending async cancel request and cancel the calling thread if @@ -3430,9 +3445,9 @@ Thu Sep 16 1999 Ross Johnson Add rwlock function prototypes. * rwlock.c: New module. * pthread.def: Add new rwlock functions. - * private.c (ptw32_processInitialize): initialise - ptw32_rwlock_test_init_lock critical section. - * global.c (ptw32_rwlock_test_init_lock): Add. + * private.c (__ptw32_processInitialize): initialise + __ptw32_rwlock_test_init_lock critical section. + * global.c (__ptw32_rwlock_test_init_lock): Add. * mutex.c (pthread_mutex_destroy): Don't free mutex memory if mutex is PTHREAD_MUTEX_INITIALIZER and has not been @@ -3449,20 +3464,20 @@ Thu Sep 16 1999 Ross Johnson 1999-08-21 Ross Johnson - * private.c (ptw32_threadStart): Apply fix of 1999-08-19 + * private.c (__ptw32_threadStart): Apply fix of 1999-08-19 this time to C++ and non-trapped C versions. Ommitted to do this the first time through. 1999-08-19 Ross Johnson - * private.c (ptw32_threadStart): Return exit status from + * private.c (__ptw32_threadStart): Return exit status from the application thread startup routine. - Milan Gardian 1999-08-18 John Bossom * exit.c (pthread_exit): Put status into pthread_t->exitStatus - * private.c (ptw32_threadStart): Set pthread->exitStatus + * private.c (__ptw32_threadStart): Set pthread->exitStatus on exit of try{} block. * sync.c (pthread_join): use pthread_exitStatus value if the thread exit doesn't return a value (for Mingw32 CRTDLL @@ -3472,8 +3487,8 @@ Tue Aug 17 20:17:58 CDT 1999 Mumit Khan * create.c (pthread_create): Add CRTDLL suppport. * exit.c (pthread_exit): Likewise. - * private.c (ptw32_threadStart): Likewise. - (ptw32_threadDestroy): Likewise. + * private.c (__ptw32_threadStart): Likewise. + (__ptw32_threadDestroy): Likewise. * sync.c (pthread_join): Likewise. * tests/join1.c (main): Warn about partial support for CRTDLL. @@ -3486,8 +3501,8 @@ Tue Aug 17 20:00:08 1999 Mumit Khan * errno.c (_errno): Fix self type. * pthread.h (PT_STDCALL): Move from here to * implement.h (PT_STDCALL): here. - (ptw32_threadStart): Fix prototype. - * private.c (ptw32_threadStart): Likewise. + (__ptw32_threadStart): Fix prototype. + * private.c (__ptw32_threadStart): Likewise. 1999-08-14 Ross Johnson @@ -3496,7 +3511,7 @@ Tue Aug 17 20:00:08 1999 Mumit Khan 1999-08-12 Ross Johnson - * private.c (ptw32_threadStart): ei[] only declared if _MSC_VER. + * private.c (__ptw32_threadStart): ei[] only declared if _MSC_VER. * exit.c (pthread_exit): Check for implicitly created threads to avoid raising an unhandled exception. @@ -3519,17 +3534,17 @@ Tue Aug 17 20:00:08 1999 Mumit Khan 1999-07-09 Ross Johnson - * misc.c (CancelableWait): PTW32_EPS_CANCEL (SEH) and - ptw32_exception_cancel (C++) used to identify the exception. + * misc.c (CancelableWait): __PTW32_EPS_CANCEL (SEH) and + __ptw32_exception_cancel (C++) used to identify the exception. - * cancel.c (pthread_testcancel): PTW32_EPS_CANCEL (SEH) and - ptw32_exception_cancel (C++) used to identify the exception. + * cancel.c (pthread_testcancel): __PTW32_EPS_CANCEL (SEH) and + __ptw32_exception_cancel (C++) used to identify the exception. * exit.c (pthread_exit): throw/raise an exception to return to - ptw32_threadStart() to exit the thread. PTW32_EPS_EXIT (SEH) - and ptw32_exception_exit (C++) used to identify the exception. + __ptw32_threadStart() to exit the thread. __PTW32_EPS_EXIT (SEH) + and __ptw32_exception_exit (C++) used to identify the exception. - * private.c (ptw32_threadStart): Add pthread_exit exception trap; + * private.c (__ptw32_threadStart): Add pthread_exit exception trap; clean up and exit the thread directly rather than via pthread_exit(). Sun May 30 00:25:02 1999 Ross Johnson @@ -3596,8 +3611,8 @@ Sun Apr 4 11:05:57 1999 Ross Johnson * sched.c (sched_yield): New function. - * condvar.c (ptw32_sem_*): Rename to sem_*; except for - ptw32_sem_timedwait which is an private function. + * condvar.c (__ptw32_sem_*): Rename to sem_*; except for + __ptw32_sem_timedwait which is an private function. Sat Apr 3 23:28:00 1999 Ross Johnson @@ -3605,32 +3620,32 @@ Sat Apr 3 23:28:00 1999 Ross Johnson Fri Apr 2 11:08:50 1999 Ross Johnson - * implement.h (ptw32_sem_*): Remove prototypes now defined in + * implement.h (__ptw32_sem_*): Remove prototypes now defined in semaphore.h. * pthread.h (sempahore.h): Include. * semaphore.h: New file for POSIX 1b semaphores. - * semaphore.c (ptw32_sem_timedwait): Moved to private.c. + * semaphore.c (__ptw32_sem_timedwait): Moved to private.c. - * pthread.h (ptw32_sem_t): Change to sem_t. + * pthread.h (__ptw32_sem_t): Change to sem_t. - * private.c (ptw32_sem_timedwait): Moved from semaphore.c; + * private.c (__ptw32_sem_timedwait): Moved from semaphore.c; set errno on error. * pthread.h (pthread_t_): Add per-thread errno element. Fri Apr 2 11:08:50 1999 John Bossom - * semaphore.c (ptw32_sem_*): Change to sem_*; these functions + * semaphore.c (__ptw32_sem_*): Change to sem_*; these functions will be exported from the library; set errno on error. * errno.c (_errno): New file. New function. Fri Mar 26 14:11:45 1999 Tor Lillqvist - * semaphore.c (ptw32_sem_timedwait): Check for negative + * semaphore.c (__ptw32_sem_timedwait): Check for negative milliseconds. Wed Mar 24 11:32:07 1999 John Bossom @@ -3642,7 +3657,7 @@ Wed Mar 24 11:32:07 1999 John Bossom * implement.h (SE_INFORMATION): Fix values. - * private.c (ptw32_threadDestroy): Close the thread handle. + * private.c (__ptw32_threadDestroy): Close the thread handle. Fri Mar 19 12:57:27 1999 Ross Johnson @@ -3650,7 +3665,7 @@ Fri Mar 19 12:57:27 1999 Ross Johnson Fri Mar 19 09:12:59 1999 Ross Johnson - * private.c (ptw32_threadStart): status returns PTHREAD_CANCELED. + * private.c (__ptw32_threadStart): status returns PTHREAD_CANCELED. * pthread.h (PTHREAD_CANCELED): defined. @@ -3701,7 +3716,7 @@ Mon Mar 8 11:18:59 1999 Ross Johnson problem of initialising the opaque critical section element in it. (PTHREAD_COND_INITIALIZER): Ditto. - * semaphore.c (ptw32_sem_timedwait): Check sem == NULL earlier. + * semaphore.c (__ptw32_sem_timedwait): Check sem == NULL earlier. Sun Mar 7 12:31:14 1999 Ross Johnson @@ -3713,11 +3728,11 @@ Sun Mar 7 12:31:14 1999 Ross Johnson the cancel event is recognised and acted apon if both objects happen to be signaled together. - * private.c (ptw32_cond_test_init_lock): Initialise and destroy. + * private.c (__ptw32_cond_test_init_lock): Initialise and destroy. - * implement.h (ptw32_cond_test_init_lock): Add extern. + * implement.h (__ptw32_cond_test_init_lock): Add extern. - * global.c (ptw32_cond_test_init_lock): Add declaration. + * global.c (__ptw32_cond_test_init_lock): Add declaration. * condvar.c (pthread_cond_destroy): check for valid initialised CV; flag destroyed CVs as invalid. @@ -3757,7 +3772,7 @@ Sat Feb 20 16:03:30 1999 Ross Johnson * dll.c (DLLMain): Expand TryEnterCriticalSection support test. * mutex.c (pthread_mutex_trylock): The check for - ptw32_try_enter_critical_section == NULL should have been + __ptw32_try_enter_critical_section == NULL should have been removed long ago. Fri Feb 19 16:03:30 1999 Ross Johnson @@ -3812,7 +3827,7 @@ Fri Feb 5 13:42:30 1999 Ross Johnson Thu Feb 4 10:07:28 1999 Ross Johnson - * global.c: Remove ptw32_exception instantiation. + * global.c: Remove __ptw32_exception instantiation. * cancel.c (pthread_testcancel): Change C++ exception throw. @@ -3820,7 +3835,7 @@ Thu Feb 4 10:07:28 1999 Ross Johnson Wed Feb 3 13:04:44 1999 Ross Johnson - * cleanup.c: Rename ptw32_*_cleanup() to pthread_*_cleanup(). + * cleanup.c: Rename __ptw32_*_cleanup() to pthread_*_cleanup(). * pthread.def: Ditto. @@ -3840,7 +3855,7 @@ Wed Feb 3 10:13:48 1999 Ross Johnson Tue Feb 2 18:07:43 1999 Ross Johnson * implement.h: Add #include . - Change sem_t to ptw32_sem_t. + Change sem_t to __ptw32_sem_t. Tue Feb 2 18:07:43 1999 Kevin Ruland @@ -3848,7 +3863,7 @@ Tue Feb 2 18:07:43 1999 Kevin Ruland Reverse LHS/RHS bitwise assignments. * pthread.h: Remove #include . - (PTW32_ATTR_VALID): Add cast. + (__PTW32_ATTR_VALID): Add cast. (struct pthread_t_): Add sigmask element. * dll.c: Add "extern C" for DLLMain. @@ -3856,7 +3871,7 @@ Tue Feb 2 18:07:43 1999 Kevin Ruland * create.c (pthread_create): Set sigmask in thread. - * condvar.c: Remove #include. Change sem_* to ptw32_sem_*. + * condvar.c: Remove #include. Change sem_* to __ptw32_sem_*. * attr.c: Changed #include. @@ -3867,8 +3882,8 @@ Fri Jan 29 11:56:28 1999 Ross Johnson * Makefile.in (OBJS): Add semaphore.o to list. - * semaphore.c (ptw32_sem_timedwait): Move from private.c. - Rename sem_* to ptw32_sem_*. + * semaphore.c (__ptw32_sem_timedwait): Move from private.c. + Rename sem_* to __ptw32_sem_*. * pthread.h (pthread_cond_t): Change type of sem_t. _POSIX_SEMAPHORES no longer defined. @@ -3877,11 +3892,11 @@ Fri Jan 29 11:56:28 1999 Ross Johnson Removed from source tree. * implement.h: Add semaphore function prototypes and rename all - functions to prepend 'ptw32_'. They are + functions to prepend '__ptw32_'. They are now private to the pthreads-win32 implementation. * private.c: Change #warning. - Move ptw32_sem_timedwait() to semaphore.c. + Move __ptw32_sem_timedwait() to semaphore.c. * cleanup.c: Change #warning. @@ -3933,14 +3948,14 @@ Fri Jan 22 14:31:59 1999 Ross Johnson * attr.c (pthread_attr_init): Remove unused 'result'. Cast malloc return value. - * private.c (ptw32_callUserDestroyRoutines): Redo conditional + * private.c (__ptw32_callUserDestroyRoutines): Redo conditional compilation. * misc.c (CancelableWait): C++ version uses 'throw'. * cancel.c (pthread_testcancel): Ditto. - * implement.h (class ptw32_exception): Define for C++. + * implement.h (class __ptw32_exception): Define for C++. * pthread.h: Fix C, C++, and Win32 SEH condition compilation mayhem around pthread_cleanup_* defines. C++ version now uses John @@ -3980,7 +3995,7 @@ Tue Jan 19 18:27:42 1999 Ross Johnson Tue Jan 19 18:27:42 1999 Scott Lightner - * private.c (ptw32_sem_timedwait): 'abstime' arg really is + * private.c (__ptw32_sem_timedwait): 'abstime' arg really is absolute time. Calculate relative time to wait from current time before passing timeout to new routine pthreadCancelableTimedWait(). @@ -4017,13 +4032,13 @@ Sun Jan 17 12:01:26 1999 Ross Johnson * pthread.h (PTHREAD_MUTEX_INITIALIZER): Init new 'staticinit' value to '1' and existing 'valid' value to '1'. - * global.c (ptw32_mutex_test_init_lock): Add. + * global.c (__ptw32_mutex_test_init_lock): Add. - * implement.h (ptw32_mutex_test_init_lock.): Add extern. + * implement.h (__ptw32_mutex_test_init_lock.): Add extern. - * private.c (ptw32_processInitialize): Init critical section for + * private.c (__ptw32_processInitialize): Init critical section for global lock used by _mutex_check_need_init(). - (ptw32_processTerminate): Ditto (:s/Init/Destroy/). + (__ptw32_processTerminate): Ditto (:s/Init/Destroy/). * dll.c (dllMain): Move call to FreeLibrary() so that it is only called once when the process detaches. @@ -4059,10 +4074,10 @@ Sun Jan 17 12:01:26 1999 Ross Johnson Sun Jan 17 12:01:26 1999 Ross Johnson - * private.c (ptw32_sem_timedwait): Move from semaphore.c. + * private.c (__ptw32_sem_timedwait): Move from semaphore.c. * semaphore.c : Remove redundant #includes. - (ptw32_sem_timedwait): Move to private.c. + (__ptw32_sem_timedwait): Move to private.c. (sem_wait): Add missing abstime arg to pthreadCancelableWait() call. Fri Jan 15 23:38:05 1999 Ross Johnson @@ -4077,20 +4092,20 @@ Fri Jan 15 15:41:28 1999 Ross Johnson * condvar.c (cond_timedwait): New generalised function called by both pthread_cond_wait() and pthread_cond_timedwait(). This is essentially pthread_cond_wait() renamed and modified to add the - 'abstime' arg and call the new ptw32_sem_timedwait() instead of + 'abstime' arg and call the new __ptw32_sem_timedwait() instead of sem_wait(). (pthread_cond_wait): Now just calls the internal static function cond_timedwait() with an INFINITE wait. (pthread_cond_timedwait): Now implemented. Calls the internal static function cond_timedwait(). - * implement.h (ptw32_sem_timedwait): New internal function + * implement.h (__ptw32_sem_timedwait): New internal function prototype. * misc.c (pthreadCancelableWait): Added new 'abstime' argument to allow shorter than INFINITE wait. - * semaphore.c (ptw32_sem_timedwait): New function for internal + * semaphore.c (__ptw32_sem_timedwait): New function for internal use. This is essentially sem_wait() modified to add the 'abstime' arg and call the modified (see above) pthreadCancelableWait(). @@ -4106,11 +4121,11 @@ Thu Jan 14 14:27:13 1999 Ross Johnson handling will not be included and thus thread cancellation, for example, will not work. - * cleanup.c (ptw32_pop_cleanup): Add #warning to compile this + * cleanup.c (__ptw32_pop_cleanup): Add #warning to compile this file as C++ if using a cygwin32 environment. Perhaps the whole package should be compiled using g++ under cygwin. - * private.c (ptw32_threadStart): Change #error directive + * private.c (__ptw32_threadStart): Change #error directive into #warning and bracket for __CYGWIN__ and derivative compilers. Wed Jan 13 09:34:52 1999 Ross Johnson @@ -4148,7 +4163,7 @@ Mon Jan 11 20:33:19 1999 Ross Johnson * pthread.h: Re-arrange conditional compile of pthread_cleanup-* macros. - * cleanup.c (ptw32_push_cleanup): Provide conditional + * cleanup.c (__ptw32_push_cleanup): Provide conditional compile of cleanup->prev. 1999-01-11 Tor Lillqvist @@ -4164,7 +4179,7 @@ Sat Jan 9 14:32:08 1999 Ross Johnson Tue Jan 5 16:33:04 1999 Ross Johnson - * cleanup.c (ptw32_pop_cleanup): Add C++ version of __try/__except + * cleanup.c (__ptw32_pop_cleanup): Add C++ version of __try/__except block. Move trailing "}" out of #ifdef _WIN32 block left there by (rpj's) mistake. @@ -4200,11 +4215,11 @@ Tue Dec 29 13:11:16 1998 Ross Johnson Now unimplemented. * tsd.c (pthread_setspecific): Rename tkAssocCreate to - ptw32_tkAssocCreate. + __ptw32_tkAssocCreate. (pthread_key_delete): Rename tkAssocDestroy to - ptw32_tkAssocDestroy. + __ptw32_tkAssocDestroy. - * sync.c (pthread_join): Rename threadDestroy to ptw32_threadDestroy + * sync.c (pthread_join): Rename threadDestroy to __ptw32_threadDestroy * sched.c (is_attr): attr is now **attr (was *attr), so add extra NULL pointer test. @@ -4215,8 +4230,8 @@ Tue Dec 29 13:11:16 1998 Ross Johnson Win32 thread Handle element name to match John Bossom's version. (pthread_getschedparam): Ditto. - * private.c (ptw32_threadDestroy): Rename call to - callUserDestroyRoutines() as ptw32_callUserDestroyRoutines() + * private.c (__ptw32_threadDestroy): Rename call to + callUserDestroyRoutines() as __ptw32_callUserDestroyRoutines() * misc.c: Add #include "implement.h". @@ -4226,7 +4241,7 @@ Tue Dec 29 13:11:16 1998 Ross Johnson Remove pthread_atfork() and fork() with #if 0/#endif. * create.c (pthread_create): Rename threadStart and threadDestroy calls - to ptw32_threadStart and ptw32_threadDestroy. + to __ptw32_threadStart and __ptw32_threadDestroy. * implement.h: Rename "detachedstate" to "detachstate". @@ -4310,14 +4325,14 @@ Mon Dec 7 09:44:40 1998 John Bossom * create.c (pthread_create): Replaced. - * private.c (ptw32_processInitialize): New. - (ptw32_processTerminate): New. - (ptw32_threadStart): New. - (ptw32_threadDestroy): New. - (ptw32_cleanupStack): New. - (ptw32_tkAssocCreate): New. - (ptw32_tkAssocDestroy): New. - (ptw32_callUserDestroyRoutines): New. + * private.c (__ptw32_processInitialize): New. + (__ptw32_processTerminate): New. + (__ptw32_threadStart): New. + (__ptw32_threadDestroy): New. + (__ptw32_cleanupStack): New. + (__ptw32_tkAssocCreate): New. + (__ptw32_tkAssocDestroy): New. + (__ptw32_callUserDestroyRoutines): New. * implement.h: Added non-API structures and declarations. @@ -4327,20 +4342,20 @@ Mon Dec 7 09:44:40 1998 John Bossom * dll.c (DLLmain): Replaced. * dll.c (PthreadsEntryPoint): Re-applied Anders Norlander's patch:- - Initialize ptw32_try_enter_critical_section at startup + Initialize __ptw32_try_enter_critical_section at startup and release kernel32 handle when DLL is being unloaded. Sun Dec 6 21:54:35 1998 Ross Johnson * buildlib.bat: Fix args to CL when building the .DLL - * cleanup.c (ptw32_destructor_run_all): Fix TSD key management. + * cleanup.c (__ptw32_destructor_run_all): Fix TSD key management. This is a tidy-up before TSD and Thread management is completely replaced by John Bossom's code. * tsd.c (pthread_key_create): Fix TSD key management. - * global.c (ptw32_key_virgin_next): Initialise. + * global.c (__ptw32_key_virgin_next): Initialise. * build.bat: New DOS script to compile and link a pthreads app using Microsoft's CL compiler linker. @@ -4350,15 +4365,15 @@ Sun Dec 6 21:54:35 1998 Ross Johnson 1998-12-05 Anders Norlander - * implement.h (ptw32_try_enter_critical_section): New extern - * dll.c (ptw32_try_enter_critical_section): New pointer to + * implement.h (__ptw32_try_enter_critical_section): New extern + * dll.c (__ptw32_try_enter_critical_section): New pointer to TryEnterCriticalSection if it exists; otherwise NULL. * dll.c (PthreadsEntryPoint): - Initialize ptw32_try_enter_critical_section at startup + Initialize __ptw32_try_enter_critical_section at startup and release kernel32 handle when DLL is being unloaded. * mutex.c (pthread_mutex_trylock): Replaced check for NT with - a check if ptw32_try_enter_critical_section is valid - pointer to a function. Call ptw32_try_enter_critical_section + a check if __ptw32_try_enter_critical_section is valid + pointer to a function. Call __ptw32_try_enter_critical_section instead of TryEnterCriticalSection to avoid errors on Win95. Thu Dec 3 13:32:00 1998 Ross Johnson @@ -4367,7 +4382,7 @@ Thu Dec 3 13:32:00 1998 Ross Johnson Sun Nov 15 21:24:06 1998 Ross Johnson - * cleanup.c (ptw32_destructor_run_all): Declare missing void * arg. + * cleanup.c (__ptw32_destructor_run_all): Declare missing void * arg. Fixup CVS merge conflicts. 1998-10-30 Ben Elliston @@ -4377,7 +4392,7 @@ Sun Nov 15 21:24:06 1998 Ross Johnson Fri Oct 30 15:15:50 1998 Ross Johnson - * cleanup.c (ptw32_handler_push): Fixed bug appending new + * cleanup.c (__ptw32_handler_push): Fixed bug appending new handler to list reported by Peter Slacik . (new_thread): Rename poorly named local variable to @@ -4391,12 +4406,12 @@ Sat Oct 24 18:34:59 1998 Ross Johnson Fri Oct 23 00:08:09 1998 Ross Johnson - * implement.h (PTW32_TSD_KEY_REUSE): Add enum. + * implement.h (__PTW32_TSD_KEY_REUSE): Add enum. - * private.c (ptw32_delete_thread): Add call to - ptw32_destructor_run_all() to clean up the threads keys. + * private.c (__ptw32_delete_thread): Add call to + __ptw32_destructor_run_all() to clean up the threads keys. - * cleanup.c (ptw32_destructor_run_all): Check for no more dirty + * cleanup.c (__ptw32_destructor_run_all): Check for no more dirty keys to run destructors on. Assume that the destructor call always succeeds and set the key value to NULL. @@ -4406,19 +4421,19 @@ Thu Oct 22 21:44:44 1998 Ross Johnson (pthread_key_create): Ditto. (pthread_key_delete): Ditto. - * implement.h (struct ptw32_tsd_key): Add status member. + * implement.h (struct __ptw32_tsd_key): Add status member. * tsd.c: Add description of pthread_key_delete() from the standard as a comment. Fri Oct 16 17:38:47 1998 Ross Johnson - * cleanup.c (ptw32_destructor_run_all): Fix and improve + * cleanup.c (__ptw32_destructor_run_all): Fix and improve stepping through the key table. Thu Oct 15 14:05:01 1998 Ross Johnson - * private.c (ptw32_new_thread): Remove init of destructorstack. + * private.c (__ptw32_new_thread): Remove init of destructorstack. No longer an element of pthread_t. * tsd.c (pthread_setspecific): Fix type declaration and cast. @@ -4428,34 +4443,34 @@ Thu Oct 15 14:05:01 1998 Ross Johnson Thu Oct 15 11:53:21 1998 Ross Johnson - * global.c (ptw32_tsd_key_table): Fix declaration. + * global.c (__ptw32_tsd_key_table): Fix declaration. - * implement.h(ptw32_TSD_keys_TlsIndex): Add missing extern. - (ptw32_tsd_mutex): Ditto. + * implement.h(__ptw32_TSD_keys_TlsIndex): Add missing extern. + (__ptw32_tsd_mutex): Ditto. - * create.c (ptw32_start_call): Fix "keys" array declaration. + * create.c (__ptw32_start_call): Fix "keys" array declaration. Add comment. * tsd.c (pthread_setspecific): Fix type declaration and cast. (pthread_getspecific): Ditto. - * cleanup.c (ptw32_destructor_run_all): Declare missing loop + * cleanup.c (__ptw32_destructor_run_all): Declare missing loop counter. Wed Oct 14 21:09:24 1998 Ross Johnson - * private.c (ptw32_new_thread): Increment ptw32_threads_count. - (ptw32_delete_thread): Decrement ptw32_threads_count. + * private.c (__ptw32_new_thread): Increment __ptw32_threads_count. + (__ptw32_delete_thread): Decrement __ptw32_threads_count. Remove some comments. - * exit.c (ptw32_exit): : Fix two pthread_mutex_lock() calls that + * exit.c (__ptw32_exit): : Fix two pthread_mutex_lock() calls that should have been pthread_mutex_unlock() calls. - (ptw32_vacuum): Remove call to ptw32_destructor_pop_all(). + (__ptw32_vacuum): Remove call to __ptw32_destructor_pop_all(). * create.c (pthread_create): Fix two pthread_mutex_lock() calls that should have been pthread_mutex_unlock() calls. - * global.c (ptw32_tsd_mutex): Add mutex for TSD operations. + * global.c (__ptw32_tsd_mutex): Add mutex for TSD operations. * tsd.c (pthread_key_create): Add critical section. (pthread_setspecific): Ditto. @@ -4467,24 +4482,24 @@ Wed Oct 14 21:09:24 1998 Ross Johnson Mon Oct 12 00:00:44 1998 Ross Johnson - * implement.h (ptw32_tsd_key_table): New. + * implement.h (__ptw32_tsd_key_table): New. - * create.c (ptw32_start_call): Initialise per-thread TSD keys + * create.c (__ptw32_start_call): Initialise per-thread TSD keys to NULL. * misc.c (pthread_once): Correct typo in comment. - * implement.h (ptw32_destructor_push): Remove. - (ptw32_destructor_pop): Remove. - (ptw32_destructor_run_all): Rename from ptw32_destructor_pop_all. - (PTW32_TSD_KEY_DELETED): Add enum. - (PTW32_TSD_KEY_INUSE): Add enum. + * implement.h (__ptw32_destructor_push): Remove. + (__ptw32_destructor_pop): Remove. + (__ptw32_destructor_run_all): Rename from __ptw32_destructor_pop_all. + (__PTW32_TSD_KEY_DELETED): Add enum. + (__PTW32_TSD_KEY_INUSE): Add enum. - * cleanup.c (ptw32_destructor_push): Remove. - (ptw32_destructor_pop): Remove. - (ptw32_destructor_run_all): Totally revamped TSD. + * cleanup.c (__ptw32_destructor_push): Remove. + (__ptw32_destructor_pop): Remove. + (__ptw32_destructor_run_all): Totally revamped TSD. - * dll.c (ptw32_TSD_keys_TlsIndex): Initialise. + * dll.c (__ptw32_TSD_keys_TlsIndex): Initialise. * tsd.c (pthread_setspecific): Totally revamped TSD. (pthread_getspecific): Ditto. @@ -4493,14 +4508,14 @@ Mon Oct 12 00:00:44 1998 Ross Johnson Sun Oct 11 22:44:55 1998 Ross Johnson - * global.c (ptw32_tsd_key_table): Add new global. + * global.c (__ptw32_tsd_key_table): Add new global. - * implement.h (ptw32_tsd_key_t and struct ptw32_tsd_key): + * implement.h (__ptw32_tsd_key_t and struct __ptw32_tsd_key): Add. (struct _pthread): Remove destructorstack. - * cleanup.c (ptw32_destructor_run_all): Rename from - ptw32_destructor_pop_all. The key destructor stack was made + * cleanup.c (__ptw32_destructor_run_all): Rename from + __ptw32_destructor_pop_all. The key destructor stack was made global rather than per-thread. No longer removes destructor nodes from the stack. Comments updated. @@ -4590,7 +4605,7 @@ Mon Oct 5 14:25:08 1998 Ross Johnson * config.h.in: Regenerate. - * create.c (ptw32_start_call): Add STDCALL prefix. + * create.c (__ptw32_start_call): Add STDCALL prefix. * mutex.c (pthread_mutex_init): Correct function signature. @@ -4676,30 +4691,30 @@ Thu Aug 6 15:19:22 1998 Ross Johnson and LeaveCriticalSection() calls to pass address-of lock. * fork.c (pthread_atfork): Typecast (void (*)(void *)) funcptr - in each ptw32_handler_push() call. + in each __ptw32_handler_push() call. - * exit.c (ptw32_exit): Fix attr arg in + * exit.c (__ptw32_exit): Fix attr arg in pthread_attr_getdetachstate() call. - * private.c (ptw32_new_thread): Typecast (HANDLE) NULL. - (ptw32_delete_thread): Ditto. + * private.c (__ptw32_new_thread): Typecast (HANDLE) NULL. + (__ptw32_delete_thread): Ditto. - * implement.h: (PTW32_MAX_THREADS): Add define. This keeps + * implement.h: (__PTW32_MAX_THREADS): Add define. This keeps changing in an attempt to make thread administration data types opaque and cleanup DLL startup. * dll.c (PthreadsEntryPoint): - (ptw32_virgins): Remove malloc() and free() calls. - (ptw32_reuse): Ditto. - (ptw32_win32handle_map): Ditto. - (ptw32_threads_mutex_table): Ditto. + (__ptw32_virgins): Remove malloc() and free() calls. + (__ptw32_reuse): Ditto. + (__ptw32_win32handle_map): Ditto. + (__ptw32_threads_mutex_table): Ditto. * global.c (_POSIX_THREAD_THREADS_MAX): Initialise with PTW32_MAX_THREADS. - (ptw32_virgins): Ditto. - (ptw32_reuse): Ditto. - (ptw32_win32handle_map): Ditto. - (ptw32_threads_mutex_table): Ditto. + (__ptw32_virgins): Ditto. + (__ptw32_reuse): Ditto. + (__ptw32_win32handle_map): Ditto. + (__ptw32_threads_mutex_table): Ditto. * create.c (pthread_create): Typecast (HANDLE) NULL. Typecast (unsigned (*)(void *)) start_routine. @@ -4709,14 +4724,14 @@ Thu Aug 6 15:19:22 1998 Ross Johnson (pthread_cond_destroy): Add address-of operator & to arg 1 of pthread_mutex_destroy() call. - * cleanup.c (ptw32_destructor_pop_all): Add (int) cast to + * cleanup.c (__ptw32_destructor_pop_all): Add (int) cast to pthread_getspecific() arg. - (ptw32_destructor_pop): Add (void *) cast to "if" conditional. - (ptw32_destructor_push): Add (void *) cast to - ptw32_handler_push() "key" arg. + (__ptw32_destructor_pop): Add (void *) cast to "if" conditional. + (__ptw32_destructor_push): Add (void *) cast to + __ptw32_handler_push() "key" arg. (malloc.h): Add include. - * implement.h (ptw32_destructor_pop): Add prototype. + * implement.h (__ptw32_destructor_pop): Add prototype. * tsd.c (implement.h): Add include. @@ -4746,59 +4761,59 @@ Thu Aug 6 15:19:22 1998 Ross Johnson Tue Aug 4 16:57:58 1998 Ross Johnson - * private.c (ptw32_delete_thread): Fix typo. Add missing ';'. + * private.c (__ptw32_delete_thread): Fix typo. Add missing ';'. - * global.c (ptw32_virgins): Change types from pointer to + * global.c (__ptw32_virgins): Change types from pointer to array pointer. - (ptw32_reuse): Ditto. - (ptw32_win32handle_map): Ditto. - (ptw32_threads_mutex_table): Ditto. + (__ptw32_reuse): Ditto. + (__ptw32_win32handle_map): Ditto. + (__ptw32_threads_mutex_table): Ditto. - * implement.h(ptw32_virgins): Change types from pointer to + * implement.h(__ptw32_virgins): Change types from pointer to array pointer. - (ptw32_reuse): Ditto. - (ptw32_win32handle_map): Ditto. - (ptw32_threads_mutex_table): Ditto. + (__ptw32_reuse): Ditto. + (__ptw32_win32handle_map): Ditto. + (__ptw32_threads_mutex_table): Ditto. - * private.c (ptw32_delete_thread): Fix "entry" should be "thread". + * private.c (__ptw32_delete_thread): Fix "entry" should be "thread". - * misc.c (pthread_self): Add extern for ptw32_threadID_TlsIndex. + * misc.c (pthread_self): Add extern for __ptw32_threadID_TlsIndex. * global.c: Add comment. * misc.c (pthread_once): Fix member -> dereferences. - Change ptw32_once_flag to once_control->flag in "if" test. + Change __ptw32_once_flag to once_control->flag in "if" test. Tue Aug 4 00:09:30 1998 Ross Johnson - * implement.h(ptw32_virgins): Add extern. - (ptw32_virgin_next): Ditto. - (ptw32_reuse): Ditto. - (ptw32_reuse_top): Ditto. - (ptw32_win32handle_map): Ditto. - (ptw32_threads_mutex_table): Ditto. + * implement.h(__ptw32_virgins): Add extern. + (__ptw32_virgin_next): Ditto. + (__ptw32_reuse): Ditto. + (__ptw32_reuse_top): Ditto. + (__ptw32_win32handle_map): Ditto. + (__ptw32_threads_mutex_table): Ditto. - * global.c (ptw32_virgins): Changed from array to pointer. + * global.c (__ptw32_virgins): Changed from array to pointer. Storage allocation for the array moved into dll.c. - (ptw32_reuse): Ditto. - (ptw32_win32handle_map): Ditto. - (ptw32_threads_mutex_table): Ditto. + (__ptw32_reuse): Ditto. + (__ptw32_win32handle_map): Ditto. + (__ptw32_threads_mutex_table): Ditto. * dll.c (PthreadsEntryPoint): Set up thread admin storage when DLL is loaded. * fork.c (pthread_atfork): Fix function pointer arg to all - ptw32_handler_push() calls. Change "arg" arg to NULL in child push. + __ptw32_handler_push() calls. Change "arg" arg to NULL in child push. * exit.c: Add windows.h and process.h includes. - (ptw32_exit): Add local detachstate declaration. - (ptw32_exit): Fix incorrect name for pthread_attr_getdetachstate(). + (__ptw32_exit): Add local detachstate declaration. + (__ptw32_exit): Fix incorrect name for pthread_attr_getdetachstate(). * pthread.h (_POSIX_THREAD_ATTR_STACKSIZE): Move from global.c (_POSIX_THREAD_ATTR_STACKADDR): Ditto. * create.c (pthread_create): Fix #if should be #ifdef. - (ptw32_start_call): Remove usused variables. + (__ptw32_start_call): Remove usused variables. * process.h: Create. @@ -4813,7 +4828,7 @@ Mon Aug 3 21:19:57 1998 Ross Johnson (cond_wait): Fix typo - cv was ev. (pthread_cond_broadcast): Fix two identical typos. - * cleanup.c (ptw32_destructor_pop_all): Remove _ prefix from + * cleanup.c (__ptw32_destructor_pop_all): Remove _ prefix from PTHREAD_DESTRUCTOR_ITERATIONS. * pthread.h: Move _POSIX_* values into posix.h @@ -4830,10 +4845,10 @@ Mon Aug 3 21:19:57 1998 Ross Johnson member initialisation - cancelstate, canceltype, cancel_pending. (is_attr): Make arg "attr" a const. - * implement.h (PTW32_HANDLER_POP_LIFO): Remove definition. - (PTW32_HANDLER_POP_FIFO): Ditto. - (PTW32_VALID): Add missing newline escape (\). - (ptw32_handler_node): Make element "next" a pointer. + * implement.h (__PTW32_HANDLER_POP_LIFO): Remove definition. + (__PTW32_HANDLER_POP_FIFO): Ditto. + (__PTW32_VALID): Add missing newline escape (\). + (__ptw32_handler_node): Make element "next" a pointer. 1998-08-02 Ben Elliston @@ -4858,11 +4873,11 @@ Sun Aug 2 19:03:42 1998 Ross Johnson Fri Jul 31 14:00:29 1998 Ross Johnson - * cleanup.c (ptw32_destructor_pop): Implement. Removes + * cleanup.c (__ptw32_destructor_pop): Implement. Removes destructors associated with a key without executing them. - (ptw32_destructor_pop_all): Add FIXME comment. + (__ptw32_destructor_pop_all): Add FIXME comment. - * tsd.c (pthread_key_delete): Add call to ptw32_destructor_pop(). + * tsd.c (pthread_key_delete): Add call to __ptw32_destructor_pop(). Fri Jul 31 00:05:45 1998 Ross Johnson @@ -4870,16 +4885,16 @@ Fri Jul 31 00:05:45 1998 Ross Johnson the destructor routine with the key. (pthread_key_delete): Add FIXME comment. - * exit.c (ptw32_vacuum): Add call to - ptw32_destructor_pop_all(). + * exit.c (__ptw32_vacuum): Add call to + __ptw32_destructor_pop_all(). - * implement.h (ptw32_handler_pop_all): Add prototype. - (ptw32_destructor_pop_all): Ditto. + * implement.h (__ptw32_handler_pop_all): Add prototype. + (__ptw32_destructor_pop_all): Ditto. - * cleanup.c (ptw32_destructor_push): Implement. This is just a - call to ptw32_handler_push(). - (ptw32_destructor_pop_all): Implement. This is significantly - different to ptw32_handler_pop_all(). + * cleanup.c (__ptw32_destructor_push): Implement. This is just a + call to __ptw32_handler_push(). + (__ptw32_destructor_pop_all): Implement. This is significantly + different to __ptw32_handler_pop_all(). * Makefile (SRCS): Create. Preliminary. @@ -4894,25 +4909,25 @@ Fri Jul 31 00:05:45 1998 Ross Johnson * condvar.c (windows.h): Add include. - * implement.h (PTW32_THIS): Remove - no longer required. - (PTW32_STACK): Use pthread_self() instead of PTW32_THIS. + * implement.h (__PTW32_THIS): Remove - no longer required. + (__PTW32_STACK): Use pthread_self() instead of __PTW32_THIS. Thu Jul 30 23:12:45 1998 Ross Johnson - * implement.h: Remove ptw32_find_entry() prototype. + * implement.h: Remove __ptw32_find_entry() prototype. * private.c: Extend comments. - Remove ptw32_find_entry() - no longer needed. + Remove __ptw32_find_entry() - no longer needed. - * create.c (ptw32_start_call): Add call to TlsSetValue() to + * create.c (__ptw32_start_call): Add call to TlsSetValue() to store the thread ID. * dll.c (PthreadsEntryPoint): Implement. This is called whenever a process loads the DLL. Used to initialise thread local storage. - * implement.h: Add ptw32_threadID_TlsIndex. - Add ()s around PTW32_VALID expression. + * implement.h: Add __ptw32_threadID_TlsIndex. + Add ()s around __PTW32_VALID expression. * misc.c (pthread_self): Re-implement using Win32 TLS to store the threads own ID. @@ -4920,21 +4935,21 @@ Thu Jul 30 23:12:45 1998 Ross Johnson Wed Jul 29 11:39:03 1998 Ross Johnson * private.c: Corrections in comments. - (ptw32_new_thread): Alter "if" flow to be more natural. + (__ptw32_new_thread): Alter "if" flow to be more natural. - * cleanup.c (ptw32_handler_push): Same as below. + * cleanup.c (__ptw32_handler_push): Same as below. * create.c (pthread_create): Same as below. - * private.c (ptw32_new_thread): Rename "new" to "new_thread". + * private.c (__ptw32_new_thread): Rename "new" to "new_thread". Since when has a C programmer been required to know C++? Tue Jul 28 14:04:29 1998 Ross Johnson - * implement.h: Add PTW32_VALID macro. + * implement.h: Add __PTW32_VALID macro. * sync.c (pthread_join): Modify to use the new thread - type and ptw32_delete_thread(). Rename "target" to "thread". + type and __ptw32_delete_thread(). Rename "target" to "thread". Remove extra local variable "target". (pthread_detach): Ditto. @@ -4945,16 +4960,16 @@ Tue Jul 28 14:04:29 1998 Ross Johnson type. (pthread_getschedparam): Ditto. - * private.c (ptw32_find_thread): Fix return type and arg. + * private.c (__ptw32_find_thread): Fix return type and arg. - * implement.h: Remove PTW32_YES and PTW32_NO. - (ptw32_new_thread): Add prototype. - (ptw32_find_thread): Ditto. - (ptw32_delete_thread): Ditto. - (ptw32_new_thread_entry): Remove prototype. - (ptw32_find_thread_entry): Ditto. - (ptw32_delete_thread_entry): Ditto. - ( PTW32_NEW, PTW32_INUSE, PTW32_EXITED, PTW32_REUSE): + * implement.h: Remove __PTW32_YES and __PTW32_NO. + (__ptw32_new_thread): Add prototype. + (__ptw32_find_thread): Ditto. + (__ptw32_delete_thread): Ditto. + (__ptw32_new_thread_entry): Remove prototype. + (__ptw32_find_thread_entry): Ditto. + (__ptw32_delete_thread_entry): Ditto. + ( __PTW32_NEW, __PTW32_INUSE, __PTW32_EXITED, __PTW32_REUSE): Add. @@ -4967,36 +4982,36 @@ Tue Jul 28 14:04:29 1998 Ross Johnson * exit.c (pthread_exit): Fix pthread_this should be pthread_self. * cancel.c (pthread_setcancelstate): Change - ptw32_threads_thread_t * to pthread_t and init with + __ptw32_threads_thread_t * to pthread_t and init with pthread_this(). (pthread_setcanceltype): Ditto. - * exit.c (ptw32_exit): Add new pthread_t arg. - Rename ptw32_delete_thread_entry to ptw32_delete_thread. + * exit.c (__ptw32_exit): Add new pthread_t arg. + Rename __ptw32_delete_thread_entry to __ptw32_delete_thread. Rename "us" to "thread". - (pthread_exit): Call ptw32_exit with added thread arg. + (pthread_exit): Call __ptw32_exit with added thread arg. - * create.c (ptw32_start_call): Insert missing ")". - Add "us" arg to ptw32_exit() call. + * create.c (__ptw32_start_call): Insert missing ")". + Add "us" arg to __ptw32_exit() call. (pthread_create): Modify to use new thread allocation scheme. * private.c: Added detailed explanation of the new thread allocation scheme. - (ptw32_new_thread): Totally rewritten to use + (__ptw32_new_thread): Totally rewritten to use new thread allocation scheme. - (ptw32_delete_thread): Ditto. - (ptw32_find_thread): Obsolete. + (__ptw32_delete_thread): Ditto. + (__ptw32_find_thread): Obsolete. Mon Jul 27 17:46:37 1998 Ross Johnson * create.c (pthread_create): Start of rewrite. Not completed yet. - * private.c (ptw32_new_thread_entry): Start of rewrite. Not + * private.c (__ptw32_new_thread_entry): Start of rewrite. Not complete. - * implement.h (ptw32_threads_thread): Rename, remove thread + * implement.h (__ptw32_threads_thread): Rename, remove thread member, add win32handle and ptstatus members. - (ptw32_t): Add. + (__ptw32_t): Add. * pthread.h: pthread_t is no longer mapped directly to a Win32 HANDLE type. This is so we can let the Win32 thread terminate and @@ -5005,40 +5020,40 @@ Mon Jul 27 17:46:37 1998 Ross Johnson Mon Jul 27 00:20:37 1998 Ross Johnson - * private.c (ptw32_delete_thread_entry): Destroy the thread + * private.c (__ptw32_delete_thread_entry): Destroy the thread entry attribute object before deleting the thread entry itself. * attr.c (pthread_attr_init): Initialise cancel_pending = FALSE. (pthread_attr_setdetachstate): Rename "detached" to "detachedstate". (pthread_attr_getdetachstate): Ditto. - * exit.c (ptw32_exit): Fix incorrect check for detachedstate. + * exit.c (__ptw32_exit): Fix incorrect check for detachedstate. - * implement.h (ptw32_call_t): Remove env member. + * implement.h (__ptw32_call_t): Remove env member. Sun Jul 26 13:06:12 1998 Ross Johnson - * implement.h (ptw32_new_thread_entry): Fix prototype. - (ptw32_find_thread_entry): Ditto. - (ptw32_delete_thread_entry): Ditto. - (ptw32_exit): Add prototype. + * implement.h (__ptw32_new_thread_entry): Fix prototype. + (__ptw32_find_thread_entry): Ditto. + (__ptw32_delete_thread_entry): Ditto. + (__ptw32_exit): Add prototype. - * exit.c (ptw32_exit): New function. Called from pthread_exit() - and ptw32_start_call() to exit the thread. It allows an extra + * exit.c (__ptw32_exit): New function. Called from pthread_exit() + and __ptw32_start_call() to exit the thread. It allows an extra argument which is the return code passed to _endthreadex(). - (ptw32_exit): Move thread entry delete call from ptw32_vacuum() + (__ptw32_exit): Move thread entry delete call from __ptw32_vacuum() into here. Add more explanation of thread entry deletion. - (ptw32_exit): Clarify comment. + (__ptw32_exit): Clarify comment. - * create.c (ptw32_start_call): Change pthread_exit() call to - ptw32_exit() call. + * create.c (__ptw32_start_call): Change pthread_exit() call to + __ptw32_exit() call. - * exit.c (ptw32_vacuum): Add thread entry deletion code - moved from ptw32_start_call(). See next item. + * exit.c (__ptw32_vacuum): Add thread entry deletion code + moved from __ptw32_start_call(). See next item. (pthread_exit): Remove longjmp(). Add mutex lock around thread table manipulation code. This routine now calls _enthreadex(). - * create.c (ptw32_start_call): Remove setjmp() call and move + * create.c (__ptw32_start_call): Remove setjmp() call and move cleanup code out. Call pthread_exit(NULL) to terminate the thread. 1998-07-26 Ben Elliston @@ -5053,18 +5068,18 @@ Sun Jul 26 13:06:12 1998 Ross Johnson Sun Jul 26 00:09:59 1998 Ross Johnson - * sync.c: Rename all instances of ptw32_count_mutex to - ptw32_table_mutex. + * sync.c: Rename all instances of __ptw32_count_mutex to + __ptw32_table_mutex. - * implement.h: Rename ptw32_count_mutex to - ptw32_table_mutex. + * implement.h: Rename __ptw32_count_mutex to + __ptw32_table_mutex. - * global.c: Rename ptw32_count_mutex to - ptw32_table_mutex. + * global.c: Rename __ptw32_count_mutex to + __ptw32_table_mutex. * create.c (pthread_create): Add critical sections. - (ptw32_start_call): Rename ptw32_count_mutex to - ptw32_table_mutex. + (__ptw32_start_call): Rename __ptw32_count_mutex to + __ptw32_table_mutex. * cancel.c (pthread_setcancelstate): Fix indirection bug and rename "this" to "us". @@ -5099,22 +5114,22 @@ Sun Jul 26 00:09:59 1998 Ross Johnson Only the thread itself can change it's cancelstate or canceltype, ie. the thread must exist already. - * private.c (ptw32_delete_thread_entry): Mutex locks removed. + * private.c (__ptw32_delete_thread_entry): Mutex locks removed. Mutexes must be applied at the caller level. - (ptw32_new_thread_entry): Ditto. - (ptw32_new_thread_entry): Init cancelstate, canceltype, and + (__ptw32_new_thread_entry): Ditto. + (__ptw32_new_thread_entry): Init cancelstate, canceltype, and cancel_pending to default values. - (ptw32_new_thread_entry): Rename "this" to "new". - (ptw32_find_thread_entry): Rename "this" to "entry". - (ptw32_delete_thread_entry): Rename "thread_entry" to "entry". + (__ptw32_new_thread_entry): Rename "this" to "new". + (__ptw32_find_thread_entry): Rename "this" to "entry". + (__ptw32_delete_thread_entry): Rename "thread_entry" to "entry". - * create.c (ptw32_start_call): Mutexes changed to - ptw32_count_mutex. All access to the threads table entries is + * create.c (__ptw32_start_call): Mutexes changed to + __ptw32_count_mutex. All access to the threads table entries is under the one mutex. Otherwise chaos reigns. Sat Jul 25 23:16:51 1998 Ross Johnson - * implement.h (ptw32_threads_thread): Move cancelstate and + * implement.h (__ptw32_threads_thread): Move cancelstate and canceltype members out of pthread_attr_t into here. * fork.c (fork): Add comment. @@ -5125,7 +5140,7 @@ Sat Jul 25 23:16:51 1998 Ross Johnson Sat Jul 25 00:00:13 1998 Ross Johnson - * create.c (ptw32_start_call): Set thread priority. Ensure our + * create.c (__ptw32_start_call): Set thread priority. Ensure our thread entry is removed from the thread table but only if pthread_detach() was called and there are no waiting joins. (pthread_create): Set detach flag in thread entry if the @@ -5137,30 +5152,30 @@ Sat Jul 25 00:00:13 1998 Ross Johnson * exit.c (pthread_exit): Fix indirection mistake. - * implement.h (PTW32_THREADS_TABLE_INDEX): Add. + * implement.h (__PTW32_THREADS_TABLE_INDEX): Add. - * exit.c (ptw32_vacuum): Fix incorrect args to - ptw32_handler_pop_all() calls. + * exit.c (__ptw32_vacuum): Fix incorrect args to + __ptw32_handler_pop_all() calls. Make thread entry removal conditional. * sync.c (pthread_join): Add multiple join and async detach handling. - * implement.h (PTW32_THREADS_TABLE_INDEX): Add. + * implement.h (__PTW32_THREADS_TABLE_INDEX): Add. - * global.c (ptw32_threads_mutex_table): Add. + * global.c (__ptw32_threads_mutex_table): Add. - * implement.h (ptw32_once_flag): Remove. - (ptw32_once_lock): Ditto. - (ptw32_threads_mutex_table): Add. + * implement.h (__ptw32_once_flag): Remove. + (__ptw32_once_lock): Ditto. + (__ptw32_threads_mutex_table): Add. - * global.c (ptw32_once_flag): Remove. - (ptw32_once_lock): Ditto. + * global.c (__ptw32_once_flag): Remove. + (__ptw32_once_lock): Ditto. * sync.c (pthread_join): Fix tests involving new return value - from ptw32_find_thread_entry(). + from __ptw32_find_thread_entry(). (pthread_detach): Ditto. - * private.c (ptw32_find_thread_entry): Failure return code + * private.c (__ptw32_find_thread_entry): Failure return code changed from -1 to NULL. Fri Jul 24 23:09:33 1998 Ross Johnson @@ -5182,9 +5197,9 @@ Fri Jul 24 21:13:55 1998 Ross Johnson * exit.c (pthread_exit): Add comment explaining the longjmp(). - * implement.h (ptw32_threads_thread_t): New member cancelthread. - (PTW32_YES): Define. - (PTW32_NO): Define. + * implement.h (__ptw32_threads_thread_t): New member cancelthread. + (__PTW32_YES): Define. + (__PTW32_NO): Define. (RND_SIZEOF): Remove. * create.c (pthread_create): Rename cancelability to cancelstate. @@ -5218,17 +5233,17 @@ Fri Jul 24 16:33:17 1998 Ross Johnson and join calls to the child fork. Add #includes. - * implement.h: (ptw32_handler_push): Fix return type and stack arg + * implement.h: (__ptw32_handler_push): Fix return type and stack arg type in prototype. - (ptw32_handler_pop): Fix stack arg type in prototype. - (ptw32_handler_pop_all): Fix stack arg type in prototype. + (__ptw32_handler_pop): Fix stack arg type in prototype. + (__ptw32_handler_pop_all): Fix stack arg type in prototype. - * cleanup.c (ptw32_handler_push): Change return type to int and + * cleanup.c (__ptw32_handler_push): Change return type to int and return ENOMEM if malloc() fails. * sync.c (pthread_detach): Use equality test, not assignment. - * create.c (ptw32_start_call): Add call to Win32 CloseHandle() + * create.c (__ptw32_start_call): Add call to Win32 CloseHandle() if thread is detached. 1998-07-24 Ben Elliston @@ -5241,22 +5256,22 @@ Fri Jul 24 03:00:25 1998 Ross Johnson * sync.c (pthread_join): Save valueptr arg in joinvalueptr for pthread_exit() to use. - * private.c (ptw32_new_thread_entry): Initialise joinvalueptr to + * private.c (__ptw32_new_thread_entry): Initialise joinvalueptr to NULL. - * create.c (ptw32_start_call): Rewrite to facilitate joins. + * create.c (__ptw32_start_call): Rewrite to facilitate joins. pthread_exit() will do a longjmp() back to here. Does appropriate cleanup and exit/return from the thread. (pthread_create): _beginthreadex() now passes a pointer to our thread table entry instead of just the call member of that entry. - * implement.h (ptw32_threads_thread): New member + * implement.h (__ptw32_threads_thread): New member void ** joinvalueptr. - (ptw32_call_t): New member jmpbuf env. + (__ptw32_call_t): New member jmpbuf env. * exit.c (pthread_exit): Major rewrite to handle joins and handing value pointer to joining thread. Uses longjmp() back to - ptw32_start_call(). + __ptw32_start_call(). * create.c (pthread_create): Ensure values of new attribute members are copied to the thread attribute object. @@ -5276,7 +5291,7 @@ Fri Jul 24 00:21:21 1998 Ross Johnson (pthread_detach): Implement. After checking for a valid and joinable thread, it's still a no-op. - * private.c (ptw32_find_thread_entry): Bug prevented returning + * private.c (__ptw32_find_thread_entry): Bug prevented returning an error value in some cases. * attr.c (pthread_attr_setdetachedstate): Implement. @@ -5300,7 +5315,7 @@ Fri Jul 24 00:21:21 1998 Ross Johnson (pthread_attr_getdetachstate): Implement. (pthread_attr_setdetachstate): Likewise. - * implement.h (PTW32_CANCEL_DEFAULTS): Remove. Bit fields + * implement.h (__PTW32_CANCEL_DEFAULTS): Remove. Bit fields proved to be too cumbersome. Set the defaults in attr.c using the public PTHREAD_CANCEL_* constants. @@ -5339,18 +5354,18 @@ Fri Jul 24 00:21:21 1998 Ross Johnson Fri Jul 24 00:21:21 1998 Ross Johnson - * create.c (pthread_create): Arg to ptw32_new_thread_entry() + * create.c (pthread_create): Arg to __ptw32_new_thread_entry() changed. See next entry. Move mutex locks out. Changes made yesterday and today allow us to start the new thread running rather than temporarily suspended. - * private.c (ptw32_new_thread_entry): ptw32_thread_table + * private.c (__ptw32_new_thread_entry): __ptw32_thread_table was changed back to a table of thread structures rather than pointers. As such we're trading storage for increaded speed. This routine was modified to work with the new table. Mutex lock put in around global data accesses. - (ptw32_find_thread_entry): Ditto - (ptw32_delete_thread_entry): Ditto + (__ptw32_find_thread_entry): Ditto + (__ptw32_delete_thread_entry): Ditto Thu Jul 23 23:25:30 1998 Ross Johnson @@ -5363,36 +5378,36 @@ Thu Jul 23 23:25:30 1998 Ross Johnson * implement.h: Move implementation hidden definitions from pthread.h. Add constants to index into the different handler stacks. - * cleanup.c (ptw32_handler_push): Simplify args. Restructure. - (ptw32_handler_pop): Simplify args. Restructure. - (ptw32_handler_pop_all): Simplify args. Restructure. + * cleanup.c (__ptw32_handler_push): Simplify args. Restructure. + (__ptw32_handler_pop): Simplify args. Restructure. + (__ptw32_handler_pop_all): Simplify args. Restructure. Wed Jul 22 00:16:22 1998 Ross Johnson * attr.c, implement.h, pthread.h, ChangeLog: Resolve CVS merge conflicts. - * private.c (ptw32_find_thread_entry): Changes to return type - to support leaner ptw32_threads_table[] which now only stores - ptw32_thread_thread_t *. - (ptw32_new_thread_entry): Internal changes. - (ptw32_delete_thread_entry): Internal changes to avoid contention. + * private.c (__ptw32_find_thread_entry): Changes to return type + to support leaner __ptw32_threads_table[] which now only stores + __ptw32_thread_thread_t *. + (__ptw32_new_thread_entry): Internal changes. + (__ptw32_delete_thread_entry): Internal changes to avoid contention. Calling routines changed accordingly. * pthread.h: Modified cleanup macros to use new generic push and pop. - Added destructor and atfork stacks to ptw32_threads_thread_t. + Added destructor and atfork stacks to __ptw32_threads_thread_t. - * cleanup.c (ptw32_handler_push, ptw32_handler_pop, - ptw32_handler_pop_all): Renamed cleanup push and pop routines + * cleanup.c (__ptw32_handler_push, __ptw32_handler_pop, + __ptw32_handler_pop_all): Renamed cleanup push and pop routines and made generic to handle destructors and atfork handlers as well. - * create.c (ptw32_start_call): New function is a wrapper for + * create.c (__ptw32_start_call): New function is a wrapper for all new threads. It allows us to do some cleanup when the thread returns, ie. that is otherwise only done if the thread is cancelled. - * exit.c (ptw32_vacuum): New function contains code from - pthread_exit() that we need in the new ptw32_start_call() + * exit.c (__ptw32_vacuum): New function contains code from + pthread_exit() that we need in the new __ptw32_start_call() as well. * implement.h: Various additions and minor changes. @@ -5406,12 +5421,12 @@ Wed Jul 22 00:16:22 1998 Ross Johnson * create.c (pthread_create): More clean up. - * private.c (ptw32_find_thread_entry): Implement. - (ptw32_delete_thread_entry): Implement. - (ptw32_new_thread_entry): Implement. + * private.c (__ptw32_find_thread_entry): Implement. + (__ptw32_delete_thread_entry): Implement. + (__ptw32_new_thread_entry): Implement. These functions manipulate the implementations internal thread table and are part of general code cleanup and modularisation. - They replace ptw32_getthreadindex() which was removed. + They replace __ptw32_getthreadindex() which was removed. * exit.c (pthread_exit): Changed to use the new code above. @@ -5430,22 +5445,22 @@ Wed Jul 22 00:16:22 1998 Ross Johnson (remove_attr): Likewise. (insert_attr): Likewise. - * implement.h (ptw32_mutexattr_t): Moved to a public definition + * implement.h (__ptw32_mutexattr_t): Moved to a public definition in pthread.h. There was little gain in hiding these details. - (ptw32_condattr_t): Likewise. - (ptw32_attr_t): Likewise. + (__ptw32_condattr_t): Likewise. + (__ptw32_attr_t): Likewise. * pthread.h (pthread_atfork): Add function prototype. (pthread_attr_t): Moved here from implement.h. * fork.c (pthread_atfork): Preliminary implementation. - (ptw32_fork): Likewise. + (__ptw32_fork): Likewise. Wed Jul 22 00:16:22 1998 Ross Johnson - * cleanup.c (ptw32_cleanup_push): Implement. - (ptw32_cleanup_pop): Implement. - (ptw32_do_cancellation): Implement. + * cleanup.c (__ptw32_cleanup_push): Implement. + (__ptw32_cleanup_pop): Implement. + (__ptw32_do_cancellation): Implement. These are private to the implementation. The real cleanup functions are macros. See below. @@ -5462,7 +5477,7 @@ Wed Jul 22 00:16:22 1998 Ross Johnson up to multiple of DWORD. Add function prototypes. - * private.c (ptw32_getthreadindex): "*thread" should have been + * private.c (__ptw32_getthreadindex): "*thread" should have been "thread". Detect empty slot fail condition. 1998-07-20 Ben Elliston @@ -5471,22 +5486,22 @@ Wed Jul 22 00:16:22 1998 Ross Johnson flag and mutex--make `pthread_once_t' contain these elements in their structure. The earlier version had incorrect semantics. - * pthread.h (ptw32_once_flag): Add new variable. Remove. - (ptw32_once_lock): Add new mutex lock to ensure integrity of - access to ptw32_once_flag. Remove. + * pthread.h (__ptw32_once_flag): Add new variable. Remove. + (__ptw32_once_lock): Add new mutex lock to ensure integrity of + access to __ptw32_once_flag. Remove. (pthread_once): Add function prototype. (pthread_once_t): Define this type. Mon Jul 20 02:31:05 1998 Ross Johnson - * private.c (ptw32_getthreadindex): Implement. + * private.c (__ptw32_getthreadindex): Implement. * pthread.h: Add application static data dependent on _PTHREADS_BUILD_DLL define. This is needed to avoid allocating non-sharable static data within the pthread DLL. - * implement.h: Add ptw32_cleanup_stack_t, ptw32_cleanup_node_t - and PTW32_HASH_INDEX. + * implement.h: Add __ptw32_cleanup_stack_t, __ptw32_cleanup_node_t + and __PTW32_HASH_INDEX. * exit.c (pthread_exit): Begin work on cleanup and de-allocate thread-private storage. @@ -5499,10 +5514,10 @@ Mon Jul 20 02:31:05 1998 Ross Johnson Sun Jul 19 16:26:23 1998 Ross Johnson - * implement.h: Rename pthreads_thread_count to ptw32_threads_count. - Create ptw32_threads_thread_t struct to keep thread specific data. + * implement.h: Rename pthreads_thread_count to __ptw32_threads_count. + Create __ptw32_threads_thread_t struct to keep thread specific data. - * create.c: Rename pthreads_thread_count to ptw32_threads_count. + * create.c: Rename pthreads_thread_count to __ptw32_threads_count. (pthread_create): Handle errors from CreateThread(). 1998-07-19 Ben Elliston @@ -5551,7 +5566,7 @@ Sun Jul 19 16:26:23 1998 Ross Johnson that the mutex contained withing the pthread_cond_t structure will be a critical section. Use our new POSIX type! - * implement.h (ptw32_condattr_t): Remove shared attribute. + * implement.h (__ptw32_condattr_t): Remove shared attribute. 1998-07-17 Ben Elliston @@ -5561,7 +5576,7 @@ Sun Jul 19 16:26:23 1998 Ross Johnson (pthread_mutex_t): Use a Win32 CRITICAL_SECTION type for better performance. - * implement.h (ptw32_mutexattr_t): Remove shared attribute. + * implement.h (__ptw32_mutexattr_t): Remove shared attribute. * mutex.c (pthread_mutexattr_setpshared): This optional function is no longer supported, since we want to implement POSIX mutex @@ -5619,8 +5634,8 @@ Mon Jul 13 01:09:55 1998 Ross Johnson * implement.h (PTHREAD_THREADS_MAX): Remove trailing semicolon. (PTHREAD_STACK_MIN): Specify; needs confirming. - (ptw32_attr_t): Define this type. - (ptw32_condattr_t): Likewise. + (__ptw32_attr_t): Define this type. + (__ptw32_condattr_t): Likewise. * pthread.h (pthread_mutex_t): Define this type. (pthread_condattr_t): Likewise. @@ -5641,7 +5656,7 @@ Mon Jul 13 01:09:55 1998 Ross Johnson 1998-07-12 Ben Elliston - * implement.h (ptw32_mutexattr_t): Define this implementation + * implement.h (__ptw32_mutexattr_t): Define this implementation internal type. Application programmers only see a mutex attribute object as a void pointer. diff --git a/FAQ b/FAQ index be19609c..d62686aa 100644 --- a/FAQ +++ b/FAQ @@ -156,13 +156,13 @@ Up to and including snapshot 2001-07-12, if not defined, the cleanup style was determined automatically from the compiler used, and one of the following was defined accordingly: - __CLEANUP_SEH MSVC only - __CLEANUP_CXX C++, including MSVC++, GNU G++ - __CLEANUP_C C, including GNU GCC, not MSVC + __PTW32_CLEANUP_SEH MSVC only + __PTW32_CLEANUP_CXX C++, including MSVC++, GNU G++ + __PTW32_CLEANUP_C C, including GNU GCC, not MSVC These defines determine the style of cleanup (see pthread.h) and, most importantly, the way that cancellation and thread exit (via -pthread_exit) is performed (see the routine ptw32_throw() in private.c). +pthread_exit) is performed (see the routine __ptw32_throw() in private.c). In short, the exceptions versions of the library throw an exception when a thread is canceled or exits (via pthread_exit()), which is @@ -171,22 +171,22 @@ the correct stack unwinding occurs regardless of where the thread is when it's canceled or exits via pthread_exit(). After snapshot 2001-07-12, unless your build explicitly defines (e.g. -via a compiler option) __CLEANUP_SEH, __CLEANUP_CXX, or __CLEANUP_C, then -the build now ALWAYS defaults to __CLEANUP_C style cleanup. This style +via a compiler option) __PTW32_CLEANUP_SEH, __PTW32_CLEANUP_CXX, or __PTW32_CLEANUP_C, then +the build now ALWAYS defaults to __PTW32_CLEANUP_C style cleanup. This style uses setjmp/longjmp in the cancellation and pthread_exit implementations, and therefore won't do stack unwinding even when linked to applications that have it (e.g. C++ apps). This is for consistency with most/all commercial Unix POSIX threads implementations. Although it was not clearly documented before, it is still necessary to -build your application using the same __CLEANUP_* define as was +build your application using the same __PTW32_CLEANUP_* define as was used for the version of the library that you link with, so that the correct parts of pthread.h are included. That is, the possible defines require the following library versions: - __CLEANUP_SEH pthreadVSE.dll - __CLEANUP_CXX pthreadVCE.dll or pthreadGCE.dll - __CLEANUP_C pthreadVC.dll or pthreadGC.dll + __PTW32_CLEANUP_SEH pthreadVSE.dll + __PTW32_CLEANUP_CXX pthreadVCE.dll or pthreadGCE.dll + __PTW32_CLEANUP_C pthreadVC.dll or pthreadGC.dll THE POINT OF ALL THIS IS: if you have not been defining one of these explicitly, then the defaults have been set according to the compiler @@ -197,12 +197,12 @@ THIS NOW CHANGES, as has been explained above. For example: If you were building your application with MSVC++ i.e. using C++ exceptions (rather than SEH) and not explicitly defining one of -__CLEANUP_*, then __CLEANUP_C++ was defined for you in pthread.h. +__PTW32_CLEANUP_*, then __PTW32_CLEANUP_C++ was defined for you in pthread.h. You should have been linking with pthreadVCE.dll, which does stack unwinding. If you now build your application as you had before, pthread.h will now -set __CLEANUP_C as the default style, and you will need to link +set __PTW32_CLEANUP_C as the default style, and you will need to link with pthreadVC.dll. Stack unwinding will now NOT occur when a thread is canceled, nor when the thread calls pthread_exit(). @@ -212,7 +212,7 @@ objects may not be destroyed or cleaned up after a thread is canceled. If you want the same behaviour as before, then you must now define -__CLEANUP_C++ explicitly using a compiler option and link with +__PTW32_CLEANUP_C++ explicitly using a compiler option and link with pthreadVCE.dll as you did before. @@ -408,18 +408,35 @@ Q 11 Why isn't pthread_t defined as a scalar (e.g. pointer or int) like it is for other POSIX threads implementations? ---- -Originally pthread_t was defined as a pointer (to the opaque pthread_t_ -struct) and later it was changed to a struct containing the original -pointer plus a sequence counter. This is allowed under both the original -POSIX Threads Standard and the current Single Unix Specification. - -When pthread_t is a simple pointer to a struct some very difficult to -debug problems arise from the process of freeing and later allocing -thread structs because new pthread_t handles can acquire the identity of -previously detached threads. The change to a struct was made, along with -some changes to their internal managment, in order to guarantee (for -practical applications) that the pthread_t handle will be unique over the -life of the running process. +The change from scalar to vector was made in response to the numerous +queries we received at that time either requesting assistance to debug +applications or reporting problems with the library that turned out to be +application bugs. Since the change we have only received requests that +we change back to scalar in order to support applications that are not +compliant with POSIX. + +Originally we defined pthread_t as a pointer (to the opaque pthread_t_ +struct) and later we changed it to a struct containing the original +pointer plus a sequence counter. This is not only allowed under both +the original POSIX Threads Standard and the current Single Unix +Specification, it is expected if the implemented chooses and is why +the standard requires pthread_t to be an opaque type. + +When pthread_t is a simple pointer some very difficult thread management +problems arise because the process of freeing and later allocing +thread structs means that new pthread_t handles can acquire the identity of +previously detached threads. There are solutions to manage this risk but +they can easily introduce their own bugs and require all developers to +spend significant time solving a problem that is not "core" to their work +and that others have already solved. The problem is rarely solved in +a portable and POSIX compliant way. It can't be because pthread_t is opaque, +i.e. a developer is not supposed to assume anything about pthread_t. Several +pthreads implmentations do provide non-portable aids, such as API calls to +return unique sequence numbers etc. + +The change to a struct was made, along with some changes to their internal +managment, in order to guarantee (for practical applications) that the +pthread_t handle will be unique over the life of the running process. Where application code attempts to compare one pthread_t against another directly, a compiler error will be emitted because structs can't be @@ -446,6 +463,6 @@ handles will remain at the peak level until the process exits. While it may be inconvenient for developers to be forced away from making assumptions about the internals of pthread_t, the advantage for the future development of pthread-win32, as well as those applications that -use it and other pthread implementations, is that the library is free to -change pthread_t internals and management as better methods arise. +use it, is that the library is free to change pthread_t internals and +management as better methods arise. diff --git a/GNUmakefile.in b/GNUmakefile.in index a167e799..ec769dd3 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -158,16 +158,16 @@ LFLAGS = $(ARCH) # Set to some other +ve value to emulate smaller word size types # (i.e. will wrap sooner). # -#PTW32_FLAGS = "-DPTW32_THREAD_ID_REUSE_INCREMENT=0" +#__PTW32_FLAGS = "-D__PTW32_THREAD_ID_REUSE_INCREMENT=0" # # ---------------------------------------------------------------------- -GC_CFLAGS = $(PTW32_FLAGS) -GCE_CFLAGS = $(PTW32_FLAGS) -mthreads +GC_CFLAGS = $(__PTW32_FLAGS) +GCE_CFLAGS = $(__PTW32_FLAGS) -mthreads ## Mingw #MAKE ?= make -DEFS = @DEFS@ -DPTW32_BUILD +DEFS = @DEFS@ -D__PTW32_BUILD CFLAGS = $(OPT) $(XOPT) $(ARCH) -I. -I${srcdir} $(DEFS) -Wall OBJEXT = @OBJEXT@ @@ -221,7 +221,7 @@ all: @ $(MAKE) clean GC-static @ $(MAKE) clean GCE-static -TEST_ENV = __PTW32_FLAGS="$(PTW32_FLAGS) -DNO_ERROR_DIALOGS" DLL_VER=$(DLL_VER) ARCH="$(ARCH)" +TEST_ENV = __PTW32_FLAGS="$(__PTW32_FLAGS) -DNO_ERROR_DIALOGS" DLL_VER=$(DLL_VER) ARCH="$(ARCH)" all-tests: $(MAKE) realclean GC-small-static @@ -239,46 +239,47 @@ all-tests: cd tests && $(MAKE) clean GCE-static $(TEST_ENV) @ $(GREP) FAILED *.log || $(GREP) Passed *.log | $(COUNT_UNIQ) $(MAKE) clean + @ $(RM) *.log all-tests-cflags: $(MAKE) all-tests __PTW32_FLAGS="-Wall -Wextra" @ $(ECHO) "$@ completed." GC: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL) GC-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_DLL) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_DLL) GCE: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL) GCE-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_CXX -g -O0" $(GCED_DLL) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_CXX -g -O0" $(GCED_DLL) GC-static: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_INLINED_STATIC_STAMP) GC-static-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) GC-small-static: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GC_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GC_SMALL_STATIC_STAMP) GC-small-static-debug: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) GCE-static: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_INLINED_STATIC_STAMP) GCE-static-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) GCE-small-static: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_SMALL_STATIC_STAMP) GCE-small-static-debug: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) tests: @ cd tests @@ -331,7 +332,7 @@ install-headers: pthread.h sched.h semaphore.h _ptw32.h $(CC) -E -o $@ $(CFLAGS) $^ %.s: %.c - $(CC) -c $(CFLAGS) -DPTW32_BUILD_INLINED -Wa,-ahl $^ > $@ + $(CC) -c $(CFLAGS) -D__PTW32_BUILD_INLINED -Wa,-ahl $^ > $@ %.o: %.rc $(RC) $(RC_TARGET) $(RCFLAGS) $(CLEANUP) -o $@ -i $< @@ -377,7 +378,6 @@ realclean: clean -$(RM) pthread*.dll -$(RM) *_stamp -$(RM) make.log.txt - -$(RM) *.log -cd tests && $(MAKE) realclean var_check_list = diff --git a/Makefile b/Makefile index 3f6bfdfb..36a8f483 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ CFLAGSD = /Z7 $(XCFLAGS) #XLIBS = wsock32.lib # Default cleanup style -CLEANUP = __CLEANUP_C +CLEANUP = __PTW32_CLEANUP_C # C++ Exceptions # (Note: If you are using Microsoft VC++6.0, the library needs to be built @@ -124,61 +124,61 @@ all-tests-cflags: @ echo $@ completed successfully. VCE: - @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VER).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(DLL_VER).dll VCE-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VERD).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(DLL_VERD).dll VSE: - @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VER).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(DLL_VER).dll VSE-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VERD).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(DLL_VERD).dll VC: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(DLL_VER).dll VC-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(DLL_VERD).dll # # Static builds # #VCE-small-static: -# @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VER).small_static_stamp +# @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(DLL_VER).small_static_stamp #VCE-small-static-debug: -# @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VERD).small_static_stamp +# @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(DLL_VERD).small_static_stamp #VSE-small-static: -# @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VER).small_static_stamp +# @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(DLL_VER).small_static_stamp #VSE-small-static-debug: -# @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VERD).small_static_stamp +# @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(DLL_VERD).small_static_stamp #VC-small-static: -# @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).small_static_stamp +# @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(DLL_VER).small_static_stamp #VC-small-static-debug: -# @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).small_static_stamp +# @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(DLL_VERD).small_static_stamp VCE-static: - @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VER).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(DLL_VER).inlined_static_stamp VCE-static-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VERD).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(DLL_VERD).inlined_static_stamp VSE-static: - @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VER).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(DLL_VER).inlined_static_stamp VSE-static-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VERD).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(DLL_VERD).inlined_static_stamp VC-static: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(DLL_VER).inlined_static_stamp VC-static-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(DLL_VERD).inlined_static_stamp realclean: clean @@ -245,14 +245,14 @@ $(SMALL_STATIC_STAMPS): $(STATIC_OBJS) .rc.res: !IF DEFINED(PLATFORM) ! IF DEFINED(PROCESSOR_ARCHITECTURE) - rc /dPTW32_ARCH$(PROCESSOR_ARCHITECTURE) /dPTW32_RC_MSC /d$(CLEANUP) $< + rc /d__PTW32_ARCH$(PROCESSOR_ARCHITECTURE) /d__PTW32_RC_MSC /d$(CLEANUP) $< ! ELSE - rc /dPTW32_ARCH$(PLATFORM) /dPTW32_RC_MSC /d$(CLEANUP) $< + rc /d__PTW32_ARCH$(PLATFORM) /d__PTW32_RC_MSC /d$(CLEANUP) $< ! ENDIF !ELSE IF DEFINED(TARGET_CPU) - rc /dPTW32_ARCH$(TARGET_CPU) /dPTW32_RC_MSC /d$(CLEANUP) $< + rc /d__PTW32_ARCH$(TARGET_CPU) /d__PTW32_RC_MSC /d$(CLEANUP) $< !ELSE - rc /dPTW32_ARCHx86 /dPTW32_RC_MSC /d$(CLEANUP) $< + rc /d__PTW32_ARCHx86 /d__PTW32_RC_MSC /d$(CLEANUP) $< !ENDIF .c.i: diff --git a/NEWS b/NEWS index f02316a5..3f0381f5 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ +<<<<<<< Upstream, based on master RELEASE 2.11.0 -------------- (Upcoming release) @@ -47,6 +48,64 @@ semaphore5.c recognises that sem_destroy can legitimately return EBUSY; mutex6*.c, mutex7*.c and mutex8*.c all replaced a single Sleep() with a polling loop. - Ross Johnson +======= +RELEASE 3.0.0 +-------------- +(2016-12-20) + +General +------- +Note that this is a new major release and consolidates the already very +stable version 2.10.0. The major version increment introduces two minor +ABI changes along with other naming changes that will require +recompilation of linking applications and possibly some textual changes +to compile-time macro references in configuration and source files, e.g. +PTW32_* to __PTW32_*, etc. + +New bug fixes in all releases since 2.8.0 have NOT been applied to the +1.x.x series. + +Some changes from 2011-02-26 onward may not be compatible with +pre Windows 2000 systems. + +Testing and verification +------------------------ +The MSVC, MinGW and MinGW64 builds have been tested on SMP architecture +(Intel x64 Hex Core) by completing the included test suite, as well as the +stress and bench tests. + +Be sure to run your builds against the test suite. If you see failures +then please consider how your toolchains might be contributing to the +failure. See the README file for more detailed descriptions of the +toolchains and test systems that we have used to get the tests to pass +successfully. + +We recommend MinGW64 over MinGW for both 64 and 32 bit GNU CC builds +only because the MinGW DWARF2 exception handling with C++ builds causes some +problems with thread cancelation. + +MinGW64 also includes its own native pthreads implementation, which you may +prefer to use. If you wish to build our library you will need to select the +Win32 native threads option at install time. We recommend also selecting the +SJLJ exception handling method for MinGW64-w32 builds. For MinGW64-w64 builds +either the SJLJ or SEH exception handling method should work. + +New Features +------------ +No major new features are introduced compared to version 2.10.0. This release +introduces a change to pthread_t and pthread_once_t that will affect +applications that link with the library. + +pthread_t: remains a struct but extends the reuse counter from 32 bits to 64 +bits. On 64 bit machines the overall size of the object will not increase, we +simply put 4 bytes of padding to good use reducing the risk that the counter +could wrap around in very long-running applications from small to, effectively, +zero. The 64 bit reuse counter extends risk-free run time from months +(assuming an average thread lifetime of 1ms) to centuries (assuming an +average thread lifetime of 1ns). + +pthread_once_t: removes two long-obsoleted elements and reduces it's size. +>>>>>>> d1c1032 Initial version 3 commit; see the ChangeLogs RELEASE 2.10.0 @@ -98,8 +157,8 @@ pthread_attr_setname_np() - added for compatibility with other POSIX implementations. Because some implementations use different *_setname_np() prototypes you can define one of the following macros when building the library: - PTW32_COMPATIBILITY_BSD (compatibility with NetBSD, FreeBSD) - PTW32_COMPATIBILITY_TRU64 + __PTW32_COMPATIBILITY_BSD (compatibility with NetBSD, FreeBSD) + __PTW32_COMPATIBILITY_TRU64 If not defined then compatibility is with Linux and other equivalents. We don't impose a strict limit on the length of the thread name for the default compatibility case. Unlike Linux, no default thread name is set. @@ -193,8 +252,8 @@ Fixed sub-millisecond timeouts, which caused the library to busy wait. - Mark Smith Fix a race condition and crash in MCS locks. The waiter queue management -code in ptw32_mcs_lock_acquire was racing with the queue management code -in ptw32_mcs_lock_release and causing a segmentation fault. +code in __ptw32_mcs_lock_acquire was racing with the queue management code +in __ptw32_mcs_lock_release and causing a segmentation fault. - Anurag Sharma - Jonathan Brown (also reported this bug and provided a fix) @@ -755,7 +814,7 @@ suffix (1) in this snapshot. E.g. pthreadVC1.dll etc. has been kept as default, but the behaviour can now be controlled when the DLL is built to effectively switch it off. This makes the library much more sensitive to applications that assume that POSIX thread IDs are unique, i.e. -are not strictly compliant with POSIX. See the PTW32_THREAD_ID_REUSE_INCREMENT +are not strictly compliant with POSIX. See the __PTW32_THREAD_ID_REUSE_INCREMENT macro comments in config.h for details. Other changes @@ -875,7 +934,7 @@ Bug fixes * Bug and memory leak in sem_init() - Alex Blanco -* ptw32_getprocessors() now returns CPU count of 1 for WinCE. +* __ptw32_getprocessors() now returns CPU count of 1 for WinCE. - James Ewing * pthread_cond_wait() could be canceled at a point where it should not @@ -936,7 +995,7 @@ SNAPSHOT 2003-09-04 Bug fixes --------- -* ptw32_cancelableWait() now allows cancellation of waiting implicit POSIX +* __ptw32_cancelableWait() now allows cancellation of waiting implicit POSIX threads. New test @@ -1065,13 +1124,13 @@ Bug fixes * sem_timedwait() now uses tighter checks for unreasonable abstime values - that would result in unexpected timeout values. -* ptw32_cond_wait_cleanup() no longer mysteriously consumes +* __ptw32_cond_wait_cleanup() no longer mysteriously consumes CV signals but may produce more spurious wakeups. It is believed that the sem_timedwait() call is consuming a CV signal that it shouldn't. - Alexander Terekhov -* Fixed a memory leak in ptw32_threadDestroy() for implicit threads. +* Fixed a memory leak in __ptw32_threadDestroy() for implicit threads. * Fixed potential for deadlock in pthread_cond_destroy(). A deadlock could occur for statically declared CVs (PTHREAD_COND_INITIALIZER), @@ -1088,13 +1147,13 @@ Cleanup code default style. (IMPORTANT) Previously, if not defined, the cleanup style was determined automatically from the compiler/language, and one of the following was defined accordingly: - __CLEANUP_SEH MSVC only - __CLEANUP_CXX C++, including MSVC++, GNU G++ - __CLEANUP_C C, including GNU GCC, not MSVC + __PTW32_CLEANUP_SEH MSVC only + __PTW32_CLEANUP_CXX C++, including MSVC++, GNU G++ + __PTW32_CLEANUP_C C, including GNU GCC, not MSVC These defines determine the style of cleanup (see pthread.h) and, most importantly, the way that cancellation and thread exit (via -pthread_exit) is performed (see the routine ptw32_throw() in private.c). +pthread_exit) is performed (see the routine __ptw32_throw() in private.c). In short, the exceptions versions of the library throw an exception when a thread is canceled or exits (via pthread_exit()), which is @@ -1103,8 +1162,8 @@ the correct stack unwinding occurs regardless of where the thread is when it's canceled or exits via pthread_exit(). In this and future snapshots, unless the build explicitly defines (e.g. -via a compiler option) __CLEANUP_SEH, __CLEANUP_CXX, or __CLEANUP_C, then -the build NOW always defaults to __CLEANUP_C style cleanup. This style +via a compiler option) __PTW32_CLEANUP_SEH, __PTW32_CLEANUP_CXX, or __PTW32_CLEANUP_C, then +the build NOW always defaults to __PTW32_CLEANUP_C style cleanup. This style uses setjmp/longjmp in the cancellation and pthread_exit implementations, and therefore won't do stack unwinding even when linked to applications that have it (e.g. C++ apps). This is for consistency with most @@ -1112,17 +1171,17 @@ current commercial Unix POSIX threads implementations. Compaq's TRU64 may be an exception (no pun intended) and possible future trend. Although it was not clearly documented before, it is still necessary to -build your application using the same __CLEANUP_* define as was +build your application using the same __PTW32_CLEANUP_* define as was used for the version of the library that you link with, so that the correct parts of pthread.h are included. That is, the possible defines require the following library versions: - __CLEANUP_SEH pthreadVSE.dll - __CLEANUP_CXX pthreadVCE.dll or pthreadGCE.dll - __CLEANUP_C pthreadVC.dll or pthreadGC.dll + __PTW32_CLEANUP_SEH pthreadVSE.dll + __PTW32_CLEANUP_CXX pthreadVCE.dll or pthreadGCE.dll + __PTW32_CLEANUP_C pthreadVC.dll or pthreadGC.dll E.g. regardless of whether your app is C or C++, if you link with -pthreadVC.lib or libpthreadGC.a, then you must define __CLEANUP_C. +pthreadVC.lib or libpthreadGC.a, then you must define __PTW32_CLEANUP_C. THE POINT OF ALL THIS IS: if you have not been defining one of these @@ -1133,13 +1192,13 @@ THIS NOW CHANGES, as has been explained above, but to try to make this clearer here's an example: If you were building your application with MSVC++ i.e. using C++ -exceptions and not explicitly defining one of __CLEANUP_*, then -__CLEANUP_C++ was automatically defined for you in pthread.h. +exceptions and not explicitly defining one of __PTW32_CLEANUP_*, then +__PTW32_CLEANUP_C++ was automatically defined for you in pthread.h. You should have been linking with pthreadVCE.dll, which does stack unwinding. If you now build your application as you had before, pthread.h will now -automatically set __CLEANUP_C as the default style, and you will need to +automatically set __PTW32_CLEANUP_C as the default style, and you will need to link with pthreadVC.dll. Stack unwinding will now NOT occur when a thread is canceled, or the thread calls pthread_exit(). @@ -1149,7 +1208,7 @@ instantiated objects may not be destroyed or cleaned up after a thread is canceled. If you want the same behaviour as before, then you must now define -__CLEANUP_C++ explicitly using a compiler option and link with +__PTW32_CLEANUP_C++ explicitly using a compiler option and link with pthreadVCE.dll as you did before. @@ -1292,7 +1351,7 @@ consistent with Solaris. - Thomas Pfaff * Found a fix for the library and workaround for applications for -the known bug #2, i.e. where __CLEANUP_CXX or __CLEANUP_SEH is defined. +the known bug #2, i.e. where __PTW32_CLEANUP_CXX or __PTW32_CLEANUP_SEH is defined. See the "Known Bugs in this snapshot" section below. This could be made transparent to applications by replacing the macros that diff --git a/README b/README index 05b1353c..e700c2da 100644 --- a/README +++ b/README @@ -212,10 +212,10 @@ If you use either pthreadVCE[2] or pthreadGCE[2]: If your application contains catch(...) blocks in your POSIX threads then you will need to replace the "catch(...)" with the macro -"PtW32Catch", eg. +"__PtW32Catch", eg. - #ifdef PtW32Catch - PtW32Catch { + #ifdef __PtW32Catch + __PtW32Catch { ... } #else @@ -242,7 +242,7 @@ Other name changes All snapshots prior to and including snapshot 2000-08-13 used "_pthread_" as the prefix to library internal functions, and "_PTHREAD_" to many library internal -macros. These have now been changed to "ptw32_" and "PTW32_" +macros. These have now been changed to "__ptw32_" and "PTW32_" respectively so as to not conflict with the ANSI standard's reservation of identifiers beginning with "_" and "__" for use by compiler implementations only. @@ -250,7 +250,7 @@ use by compiler implementations only. If you have written any applications and you are linking statically with the pthreads-win32 library then you may have included a call to _pthread_processInitialize. You will -now have to change that to ptw32_processInitialize. +now have to change that to __ptw32_processInitialize. Cleanup code default style @@ -259,13 +259,13 @@ Cleanup code default style Previously, if not defined, the cleanup style was determined automatically from the compiler used, and one of the following was defined accordingly: - __CLEANUP_SEH MSVC only - __CLEANUP_CXX C++, including MSVC++, GNU G++ - __CLEANUP_C C, including GNU GCC, not MSVC + __PTW32_CLEANUP_SEH MSVC only + __PTW32_CLEANUP_CXX C++, including MSVC++, GNU G++ + __PTW32_CLEANUP_C C, including GNU GCC, not MSVC These defines determine the style of cleanup (see pthread.h) and, most importantly, the way that cancellation and thread exit (via -pthread_exit) is performed (see the routine ptw32_throw()). +pthread_exit) is performed (see the routine __ptw32_throw()). In short, the exceptions versions of the library throw an exception when a thread is canceled, or exits via pthread_exit(). This exception is @@ -274,24 +274,24 @@ the correct stack unwinding occurs regardless of where the thread is when it's canceled or exits via pthread_exit(). In this snapshot, unless the build explicitly defines (e.g. via a -compiler option) __CLEANUP_SEH, __CLEANUP_CXX, or __CLEANUP_C, then -the build NOW always defaults to __CLEANUP_C style cleanup. This style +compiler option) __PTW32_CLEANUP_SEH, __PTW32_CLEANUP_CXX, or __PTW32_CLEANUP_C, then +the build NOW always defaults to __PTW32_CLEANUP_C style cleanup. This style uses setjmp/longjmp in the cancellation and pthread_exit implementations, and therefore won't do stack unwinding even when linked to applications that have it (e.g. C++ apps). This is for consistency with most/all commercial Unix POSIX threads implementations. Although it was not clearly documented before, it is still necessary to -build your application using the same __CLEANUP_* define as was +build your application using the same __PTW32_CLEANUP_* define as was used for the version of the library that you link with, so that the correct parts of pthread.h are included. That is, the possible defines require the following library versions: - __CLEANUP_SEH pthreadVSE.dll - __CLEANUP_CXX pthreadVCE.dll or pthreadGCE.dll - __CLEANUP_C pthreadVC.dll or pthreadGC.dll + __PTW32_CLEANUP_SEH pthreadVSE.dll + __PTW32_CLEANUP_CXX pthreadVCE.dll or pthreadGCE.dll + __PTW32_CLEANUP_C pthreadVC.dll or pthreadGC.dll -It is recommended that you let pthread.h use it's default __CLEANUP_C +It is recommended that you let pthread.h use it's default __PTW32_CLEANUP_C for both library and application builds. That is, don't define any of the above, and then link with pthreadVC.lib (MSVC or MSVC++) and libpthreadGC.a (MinGW GCC or G++). The reason is explained below, but @@ -508,7 +508,7 @@ at the URL above). Building the library as a statically linkable library ----------------------------------------------------- -General: PTW32_STATIC_LIB must be defined for both the library build and the +General: __PTW32_STATIC_LIB must be defined for both the library build and the application build. The makefiles supplied and used by the following 'make' command lines will define this for you. @@ -521,7 +521,7 @@ MinGW32 (creates libpthreadGCn.a as a static link lib): make clean GC-static -Define PTW32_STATIC_LIB also when building your application. +Define __PTW32_STATIC_LIB also when building your application. Building the library under Cygwin --------------------------------- diff --git a/README.CV b/README.CV index 735196c3..a05e0f42 100644 --- a/README.CV +++ b/README.CV @@ -672,7 +672,7 @@ x-cvsweb-markup&cvsroot=pthreads-win32 cleanup_args.cv = cv; cleanup_args.resultPtr = &result; - pthread_cleanup_push (ptw32_cond_wait_cleanup, (void *) + pthread_cleanup_push (__ptw32_cond_wait_cleanup, (void *) &cleanup_args); if ((result = pthread_mutex_unlock (mutex)) == 0) @@ -686,15 +686,15 @@ Sleep( 1 ); // @AT * a timeout * * Note: - * ptw32_sem_timedwait is a cancellation point, + * __ptw32_sem_timedwait is a cancellation point, * hence providing the * mechanism for making pthread_cond_wait a cancellation * point. We use the cleanup mechanism to ensure we * re-lock the mutex and decrement the waiters count * if we are canceled. */ - if (ptw32_sem_timedwait (&(cv->sema), abstime) == -1) { - result = PTW32_GET_ERRNO(); + if (__ptw32_sem_timedwait (&(cv->sema), abstime) == -1) { + result = __PTW32_GET_ERRNO(); } } @@ -976,7 +976,7 @@ Sleep( 1 ); //@AT #ifdef NEED_SEM - result = (ptw32_increase_semaphore( &cv->sema, cv->waiters ) + result = (__ptw32_increase_semaphore( &cv->sema, cv->waiters ) ? 0 : EINVAL); @@ -1137,7 +1137,7 @@ pthread_cond_destroy (pthread_cond_t * cond) return EINVAL; } - if (*cond != (pthread_cond_t) PTW32_OBJECT_AUTO_INIT) + if (*cond != (pthread_cond_t) __PTW32_OBJECT_AUTO_INIT) {(*cond cv = *cond; @@ -1182,14 +1182,14 @@ pthread_cond_destroy (pthread_cond_t * cond) else { /* - * See notes in ptw32_cond_check_need_init() above also. + * See notes in __ptw32_cond_check_need_init() above also. */ - EnterCriticalSection(&ptw32_cond_test_init_lock); + EnterCriticalSection(&__ptw32_cond_test_init_lock); /* * Check again. */ - if (*cond == (pthread_cond_t) PTW32_OBJECT_AUTO_INIT) + if (*cond == (pthread_cond_t) __PTW32_OBJECT_AUTO_INIT) {(*cond /* * This is all we need to do to destroy a statically @@ -1208,7 +1208,7 @@ pthread_cond_destroy (pthread_cond_t * cond) result = EBUSY; } - LeaveCriticalSection(&ptw32_cond_test_init_lock); + LeaveCriticalSection(&__ptw32_cond_test_init_lock); } return (result); @@ -1222,13 +1222,13 @@ typedef struct { pthread_mutex_t * mutexPtr; pthread_cond_t cv; int * resultPtr; -} ptw32_cond_wait_cleanup_args_t; +} __ptw32_cond_wait_cleanup_args_t; static void -ptw32_cond_wait_cleanup(void * args) +__ptw32_cond_wait_cleanup(void * args) { - ptw32_cond_wait_cleanup_args_t * cleanup_args = -(ptw32_cond_wait_cleanup_args_t *) args; + __ptw32_cond_wait_cleanup_args_t * cleanup_args = +(__ptw32_cond_wait_cleanup_args_t *) args; pthread_cond_t cv = cleanup_args->cv; int * resultPtr = cleanup_args->resultPtr; int eLastSignal; /* enum: 1=yes 0=no -1=cancelled/timedout w/o signal(s) @@ -1272,7 +1272,7 @@ ptw32_cond_wait_cleanup(void * args) */ if (sem_post(&(cv->semBlockLock)) != 0) {(sem_post(&(cv->semBlockLock)) - *resultPtr = PTW32_GET_ERRNO(); + *resultPtr = __PTW32_GET_ERRNO(); return; } } @@ -1286,7 +1286,7 @@ ptw32_cond_wait_cleanup(void * args) */ if (sem_post(&(cv->semBlockQueue)) != 0) {(sem_post(&(cv->semBlockQueue)) - *resultPtr = PTW32_GET_ERRNO(); + *resultPtr = __PTW32_GET_ERRNO(); return; } } @@ -1300,16 +1300,16 @@ ptw32_cond_wait_cleanup(void * args) *resultPtr = result; } -} /* ptw32_cond_wait_cleanup */ +} /* __ptw32_cond_wait_cleanup */ static int -ptw32_cond_timedwait (pthread_cond_t * cond, +__ptw32_cond_timedwait (pthread_cond_t * cond, pthread_mutex_t * mutex, const struct timespec *abstime) { int result = 0; pthread_cond_t cv; - ptw32_cond_wait_cleanup_args_t cleanup_args; + __ptw32_cond_wait_cleanup_args_t cleanup_args; if (cond == NULL || *cond == NULL) {(cond @@ -1319,12 +1319,12 @@ ptw32_cond_timedwait (pthread_cond_t * cond, /* * We do a quick check to see if we need to do more work * to initialise a static condition variable. We check - * again inside the guarded section of ptw32_cond_check_need_init() + * again inside the guarded section of __ptw32_cond_check_need_init() * to avoid race conditions. */ - if (*cond == (pthread_cond_t) PTW32_OBJECT_AUTO_INIT) + if (*cond == (pthread_cond_t) __PTW32_OBJECT_AUTO_INIT) {(*cond - result = ptw32_cond_check_need_init(cond); + result = __ptw32_cond_check_need_init(cond); } if (result != 0 && result != EBUSY) @@ -1359,7 +1359,7 @@ ptw32_cond_timedwait (pthread_cond_t * cond, cleanup_args.cv = cv; cleanup_args.resultPtr = &result; - pthread_cleanup_push (ptw32_cond_wait_cleanup, (void *) &cleanup_args); + pthread_cleanup_push (__ptw32_cond_wait_cleanup, (void *) &cleanup_args); /* * Now we can release 'mutex' and... @@ -1376,16 +1376,16 @@ ptw32_cond_timedwait (pthread_cond_t * cond, * * Note: * - * ptw32_sem_timedwait is a cancellation point, + * __ptw32_sem_timedwait is a cancellation point, * hence providing the mechanism for making * pthread_cond_wait a cancellation point. * We use the cleanup mechanism to ensure we * re-lock the mutex and adjust (to)unblock(ed) waiters * counts if we are cancelled, timed out or signalled. */ - if (ptw32_sem_timedwait (&(cv->semBlockQueue), abstime) != 0) - {(ptw32_sem_timedwait - result = PTW32_GET_ERRNO(); + if (__ptw32_sem_timedwait (&(cv->semBlockQueue), abstime) != 0) + {(__ptw32_sem_timedwait + result = __PTW32_GET_ERRNO(); } } @@ -1400,11 +1400,11 @@ ptw32_cond_timedwait (pthread_cond_t * cond, */ return (result); -} /* ptw32_cond_timedwait */ +} /* __ptw32_cond_timedwait */ static int -ptw32_cond_unblock (pthread_cond_t * cond, +__ptw32_cond_unblock (pthread_cond_t * cond, int unblockAll) { int result; @@ -1421,7 +1421,7 @@ ptw32_cond_unblock (pthread_cond_t * cond, * No-op if the CV is static and hasn't been initialised yet. * Assuming that any race condition is harmless. */ - if (cv == (pthread_cond_t) PTW32_OBJECT_AUTO_INIT) + if (cv == (pthread_cond_t) __PTW32_OBJECT_AUTO_INIT) {(cv return 0; } @@ -1502,14 +1502,14 @@ too return(result); -} /* ptw32_cond_unblock */ +} /* __ptw32_cond_unblock */ int pthread_cond_wait (pthread_cond_t * cond, pthread_mutex_t * mutex) { /* The NULL abstime arg means INFINITE waiting. */ - return(ptw32_cond_timedwait(cond, mutex, NULL)); + return(__ptw32_cond_timedwait(cond, mutex, NULL)); } /* pthread_cond_wait */ @@ -1523,7 +1523,7 @@ pthread_cond_timedwait (pthread_cond_t * cond, return EINVAL; } - return(ptw32_cond_timedwait(cond, mutex, abstime)); + return(__ptw32_cond_timedwait(cond, mutex, abstime)); } /* pthread_cond_timedwait */ @@ -1531,14 +1531,14 @@ int pthread_cond_signal (pthread_cond_t * cond) { /* The '0'(FALSE) unblockAll arg means unblock ONE waiter. */ - return(ptw32_cond_unblock(cond, 0)); + return(__ptw32_cond_unblock(cond, 0)); } /* pthread_cond_signal */ int pthread_cond_broadcast (pthread_cond_t * cond) { /* The '1'(TRUE) unblockAll arg means unblock ALL waiters. */ - return(ptw32_cond_unblock(cond, 1)); + return(__ptw32_cond_unblock(cond, 1)); } /* pthread_cond_broadcast */ diff --git a/README.NONPORTABLE b/README.NONPORTABLE index 174f3d13..cf1c7a13 100644 --- a/README.NONPORTABLE +++ b/README.NONPORTABLE @@ -239,7 +239,7 @@ pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout); int pthread_getname_np(pthread_t thr, char *name, int len); -If PTW32_COMPATIBILITY_BSD or PTW32_COMPATIBILITY_TRU64 defined +If __PTW32_COMPATIBILITY_BSD or __PTW32_COMPATIBILITY_TRU64 defined int pthread_setname_np(pthread_t thr, const char *name, void *arg); diff --git a/TODO b/TODO index 360be645..2932a919 100644 --- a/TODO +++ b/TODO @@ -8,9 +8,9 @@ POSIX shared memory functions, etc. 2. For version 3 onwards: the following types need to change, resulting in an ABI - change. These have been written conditional on PTW32_VERSION_MAJOR > 2 + change. These have been written conditional on __PTW32_VERSION_MAJOR > 2 - a) ptw32_handle_t (a.k.a. pthread_t) + a) __ptw32_handle_t (a.k.a. pthread_t) Change the reuse counter from unsigned int to size_t. Type "int" on 32 bit and 64 bit Windows is 32 bits wide. diff --git a/WinCE-PORT b/WinCE-PORT index 7bcfdea6..28e50343 100644 --- a/WinCE-PORT +++ b/WinCE-PORT @@ -146,30 +146,30 @@ thread handle with GetCurrentThread() is sufficient, and it seems to work perfectly fine, so maybe DuplicateHandle was just plain useless to begin with ? ------------------------------------ -- In private.c, added some code at the beginning of ptw32_processInitialize -to detect the case of multiple calls to ptw32_processInitialize. +- In private.c, added some code at the beginning of __ptw32_processInitialize +to detect the case of multiple calls to __ptw32_processInitialize. Rational: In order to debug pthread-win32, it is easier to compile it as a regular library (it is not possible to debug DLL's on winCE). -In that case, the application must call ptw32_rocessInitialize() +In that case, the application must call __ptw32_rocessInitialize() explicitely, to initialize pthread-win32. It is safer in this circumstance -to handle the case where ptw32_processInitialize() is called on +to handle the case where __ptw32_processInitialize() is called on an already initialized library: int -ptw32_processInitialize (void) +__ptw32_processInitialize (void) { - if (ptw32_processInitialized) { + if (__ptw32_processInitialized) { /* * ignore if already initialized. this is useful for * programs that uses a non-dll pthread - * library. such programs must call ptw32_processInitialize() explicitely, + * library. such programs must call __ptw32_processInitialize() explicitely, * since this initialization routine is automatically called only when * the dll is loaded. */ return TRUE; } - ptw32_processInitialized = TRUE; + __ptw32_processInitialized = TRUE; [...] } diff --git a/_ptw32.h b/_ptw32.h index 86f3e506..62194f8e 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -45,12 +45,12 @@ * FIXME: consider moving this to <_ptw32.h>; maybe also add a * leading underscore to the macro names. */ -#define PTW32_VERSION_MAJOR 2 -#define PTW32_VERSION_MINOR 10 -#define PTW32_VERSION_MICRO 0 -#define PTW32_VERION_BUILD 0 -#define PTW32_VERSION 2,10,0,0 -#define PTW32_VERSION_STRING "2, 10, 0, 0\0" +#define __PTW32_VERSION_MAJOR 3 +#define __PTW32_VERSION_MINOR 0 +#define __PTW32_VERSION_MICRO 0 +#define __PTW32_VERION_BUILD 0 +#define __PTW32_VERSION 3,0,0,0 +#define __PTW32_VERSION_STRING "3, 0, 0, 0\0" #if defined(__GNUC__) # pragma GCC system_header @@ -67,31 +67,31 @@ # define __PTW32_END_C_DECLS #endif -#if defined (PTW32_STATIC_LIB) && _MSC_VER >= 1400 -# undef PTW32_STATIC_LIB -# define PTW32_STATIC_TLSLIB +#if defined (__PTW32_STATIC_LIB) && _MSC_VER >= 1400 +# undef __PTW32_STATIC_LIB +# define __PTW32_STATIC_TLSLIB #endif -/* When building the library, you should define PTW32_BUILD so that +/* When building the library, you should define __PTW32_BUILD so that * the variables/functions are exported correctly. When using the library, - * do NOT define PTW32_BUILD, and then the variables/functions will + * do NOT define __PTW32_BUILD, and then the variables/functions will * be imported correctly. * - * FIXME: Used defined feature test macros, such as PTW32_STATIC_LIB, (and - * maybe even PTW32_BUILD), should be renamed with one initial underscore; - * internally defined macros, such as PTW32_DLLPORT, should be renamed with + * FIXME: Used defined feature test macros, such as __PTW32_STATIC_LIB, (and + * maybe even __PTW32_BUILD), should be renamed with one initial underscore; + * internally defined macros, such as __PTW32_DLLPORT, should be renamed with * two initial underscores ... perhaps __PTW32_DECLSPEC is nicer anyway? */ -#if defined PTW32_STATIC_LIB || defined PTW32_STATIC_TLSLIB -# define PTW32_DLLPORT +#if defined __PTW32_STATIC_LIB || defined __PTW32_STATIC_TLSLIB +# define __PTW32_DLLPORT -#elif defined PTW32_BUILD -# define PTW32_DLLPORT __declspec (dllexport) +#elif defined __PTW32_BUILD +# define __PTW32_DLLPORT __declspec (dllexport) #else -# define PTW32_DLLPORT /*__declspec (dllimport)*/ +# define __PTW32_DLLPORT /*__declspec (dllimport)*/ #endif -#ifndef PTW32_CDECL +#ifndef __PTW32_CDECL /* FIXME: another internal macro; should have two initial underscores; * Nominally, we prefer to use __cdecl calling convention for all our * functions, but we map it through this macro alias to facilitate the @@ -111,9 +111,9 @@ * remember that this must be defined consistently, for both the DLL * build, and the application build. */ -# define PTW32_CDECL +# define __PTW32_CDECL # else -# define PTW32_CDECL __cdecl +# define __PTW32_CDECL __cdecl # endif #endif @@ -122,7 +122,7 @@ * which is only used when building the pthread-win32 libraries. They */ -#if !defined(PTW32_CONFIG_H) && !defined(__PTW32_PSEUDO_CONFIG_H_SOURCED) +#if !defined (__PTW32_CONFIG_H) && !defined(__PTW32_PSEUDO_CONFIG_H_SOURCED) # define __PTW32_PSEUDO_CONFIG_H_SOURCED # if defined(WINCE) # undef HAVE_CPU_AFFINITY @@ -139,9 +139,9 @@ # if _MSC_VER >= 1900 # define HAVE_STRUCT_TIMESPEC # elif _MSC_VER < 1300 -# define PTW32_CONFIG_MSVC6 +# define __PTW32_CONFIG_MSVC6 # elif _MSC_VER < 1400 -# define PTW32_CONFIG_MSVC7 +# define __PTW32_CONFIG_MSVC7 # endif # elif defined(_UWIN) # define HAVE_MODE_T @@ -168,7 +168,7 @@ #elif !defined(__MINGW32__) # define int64_t _int64 # define uint64_t unsigned _int64 -# if defined(PTW32_CONFIG_MSVC6) +# if defined (__PTW32_CONFIG_MSVC6) typedef long intptr_t; # endif #elif defined(HAVE_STDINT_H) && HAVE_STDINT_H == 1 @@ -217,7 +217,7 @@ * FIXME: These should be changed for version 3.0.0 onward. * 42 clashes with EILSEQ. */ -#if PTW32_VERSION_MAJOR > 2 +#if __PTW32_VERSION_MAJOR > 2 # if !defined(EOWNERDEAD) # define EOWNERDEAD 1000 # endif diff --git a/cleanup.c b/cleanup.c index ae8ae418..21e59dff 100644 --- a/cleanup.c +++ b/cleanup.c @@ -46,13 +46,13 @@ /* - * The functions ptw32_pop_cleanup and ptw32_push_cleanup + * The functions __ptw32_pop_cleanup and __ptw32_push_cleanup * are implemented here for applications written in C with no * SEH or C++ destructor support. */ -ptw32_cleanup_t * -ptw32_pop_cleanup (int execute) +__ptw32_cleanup_t * +__ptw32_pop_cleanup (int execute) /* * ------------------------------------------------------ * DOCPUBLIC @@ -78,9 +78,9 @@ ptw32_pop_cleanup (int execute) * ------------------------------------------------------ */ { - ptw32_cleanup_t *cleanup; + __ptw32_cleanup_t *cleanup; - cleanup = (ptw32_cleanup_t *) pthread_getspecific (ptw32_cleanupKey); + cleanup = (__ptw32_cleanup_t *) pthread_getspecific (__ptw32_cleanupKey); if (cleanup != NULL) { @@ -91,18 +91,18 @@ ptw32_pop_cleanup (int execute) } - pthread_setspecific (ptw32_cleanupKey, (void *) cleanup->prev); + pthread_setspecific (__ptw32_cleanupKey, (void *) cleanup->prev); } return (cleanup); -} /* ptw32_pop_cleanup */ +} /* __ptw32_pop_cleanup */ void -ptw32_push_cleanup (ptw32_cleanup_t * cleanup, - ptw32_cleanup_callback_t routine, void *arg) +__ptw32_push_cleanup (__ptw32_cleanup_t * cleanup, + __ptw32_cleanup_callback_t routine, void *arg) /* * ------------------------------------------------------ * DOCPUBLIC @@ -133,7 +133,7 @@ ptw32_push_cleanup (ptw32_cleanup_t * cleanup, * b) when the thread acts on a cancellation request, * c) or when the thrad calls pthread_cleanup_pop with a nonzero * 'execute' argument - * NOTE: pthread_push_cleanup, ptw32_pop_cleanup must be paired + * NOTE: pthread_push_cleanup, __ptw32_pop_cleanup must be paired * in the same lexical scope. * * RESULTS @@ -146,8 +146,8 @@ ptw32_push_cleanup (ptw32_cleanup_t * cleanup, cleanup->routine = routine; cleanup->arg = arg; - cleanup->prev = (ptw32_cleanup_t *) pthread_getspecific (ptw32_cleanupKey); + cleanup->prev = (__ptw32_cleanup_t *) pthread_getspecific (__ptw32_cleanupKey); - pthread_setspecific (ptw32_cleanupKey, (void *) cleanup); + pthread_setspecific (__ptw32_cleanupKey, (void *) cleanup); -} /* ptw32_push_cleanup */ +} /* __ptw32_push_cleanup */ diff --git a/config.h b/config.h index 11321e83..3addcba1 100644 --- a/config.h +++ b/config.h @@ -1,14 +1,14 @@ /* config.h */ -#ifndef PTW32_CONFIG_H -#define PTW32_CONFIG_H +#ifndef __PTW32_CONFIG_H +#define __PTW32_CONFIG_H /********************************************************************* * Defaults: see target specific redefinitions below. *********************************************************************/ /* We're building the pthreads-win32 library */ -#define PTW32_BUILD +#define __PTW32_BUILD /* CPU affinity */ #define HAVE_CPU_AFFINITY @@ -80,7 +80,7 @@ # applications that make assumptions that POSIX does not guarantee are # not strictly compliant and may fail or misbehave with some settings. # -# PTW32_THREAD_ID_REUSE_INCREMENT +# __PTW32_THREAD_ID_REUSE_INCREMENT # Purpose: # POSIX says that applications should assume that thread IDs can be # recycled. However, Solaris (and some other systems) use a [very large] @@ -98,11 +98,11 @@ # (i.e. will wrap sooner). This might be useful to emulate some embedded # systems. # -# define PTW32_THREAD_ID_REUSE_INCREMENT 0 +# define __PTW32_THREAD_ID_REUSE_INCREMENT 0 # # ---------------------------------------------------------------------- */ -#undef PTW32_THREAD_ID_REUSE_INCREMENT +#undef __PTW32_THREAD_ID_REUSE_INCREMENT /********************************************************************* @@ -150,4 +150,4 @@ #define HAVE_STRUCT_TIMESPEC #endif -#endif /* PTW32_CONFIG_H */ +#endif /* __PTW32_CONFIG_H */ diff --git a/configure.ac b/configure.ac index 3c201b2d..5490826b 100644 --- a/configure.ac +++ b/configure.ac @@ -45,8 +45,8 @@ AC_PROG_RANLIB # not normally support it. # AH_TOP(dnl -[#ifndef PTW32_CONFIG_H] -[#define PTW32_CONFIG_H]dnl +[#ifndef __PTW32_CONFIG_H] +[#define __PTW32_CONFIG_H]dnl ) # FIXME: AC_C_INLINE defines 'inline' to work with any C compiler, # whether or not it supports inline code expansion, but it does NOT diff --git a/context.h b/context.h index b7140019..c7bda8cc 100644 --- a/context.h +++ b/context.h @@ -35,40 +35,40 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -#ifndef PTW32_CONTEXT_H -#define PTW32_CONTEXT_H +#ifndef __PTW32_CONTEXT_H +#define __PTW32_CONTEXT_H -#undef PTW32_PROGCTR +#undef __PTW32_PROGCTR #if defined(_M_IX86) || (defined(_X86_) && !defined(__amd64__)) -#define PTW32_PROGCTR(Context) ((Context).Eip) +#define __PTW32_PROGCTR(Context) ((Context).Eip) #endif #if defined (_M_IA64) || defined(_IA64) -#define PTW32_PROGCTR(Context) ((Context).StIIP) +#define __PTW32_PROGCTR(Context) ((Context).StIIP) #endif #if defined(_MIPS_) || defined(MIPS) -#define PTW32_PROGCTR(Context) ((Context).Fir) +#define __PTW32_PROGCTR(Context) ((Context).Fir) #endif #if defined(_ALPHA_) -#define PTW32_PROGCTR(Context) ((Context).Fir) +#define __PTW32_PROGCTR(Context) ((Context).Fir) #endif #if defined(_PPC_) -#define PTW32_PROGCTR(Context) ((Context).Iar) +#define __PTW32_PROGCTR(Context) ((Context).Iar) #endif #if defined(_AMD64_) || defined(__amd64__) -#define PTW32_PROGCTR(Context) ((Context).Rip) +#define __PTW32_PROGCTR(Context) ((Context).Rip) #endif #if defined(_ARM_) || defined(ARM) -#define PTW32_PROGCTR(Context) ((Context).Pc) +#define __PTW32_PROGCTR(Context) ((Context).Pc) #endif -#if !defined(PTW32_PROGCTR) +#if !defined (__PTW32_PROGCTR) #error Module contains CPU-specific code; modify and recompile. #endif diff --git a/create.c b/create.c index 5557dec7..737734bb 100644 --- a/create.c +++ b/create.c @@ -49,7 +49,7 @@ int pthread_create (pthread_t * tid, const pthread_attr_t * attr, - void *(PTW32_CDECL *start) (void *), void *arg) + void * (__PTW32_CDECL *start) (void *), void *arg) /* * ------------------------------------------------------ * DOCPUBLIC @@ -89,12 +89,12 @@ pthread_create (pthread_t * tid, */ { pthread_t thread; - ptw32_thread_t * tp; - ptw32_thread_t * sp; + __ptw32_thread_t * tp; + __ptw32_thread_t * sp; register pthread_attr_t a; HANDLE threadH = 0; int result = EAGAIN; - int run = PTW32_TRUE; + int run = __PTW32_TRUE; ThreadParms *parms = NULL; unsigned int stackSize; int priority; @@ -107,7 +107,7 @@ pthread_create (pthread_t * tid, */ tid->x = 0; - if (NULL == (sp = (ptw32_thread_t *)pthread_self().p)) + if (NULL == (sp = (__ptw32_thread_t *)pthread_self().p)) { goto FAIL0; } @@ -121,13 +121,13 @@ pthread_create (pthread_t * tid, a = NULL; } - thread = ptw32_new(); + thread = __ptw32_new(); if (thread.p == NULL) { goto FAIL0; } - tp = (ptw32_thread_t *) thread.p; + tp = (__ptw32_thread_t *) thread.p; priority = tp->sched_priority; @@ -226,7 +226,7 @@ pthread_create (pthread_t * tid, threadH = (HANDLE) _beginthreadex ((void *) NULL, /* No security info */ stackSize, /* default stack size */ - ptw32_threadStart, + __ptw32_threadStart, parms, (unsigned) CREATE_SUSPENDED, @@ -236,7 +236,7 @@ pthread_create (pthread_t * tid, { if (a != NULL) { - (void) ptw32_setthreadpriority (thread, SCHED_OTHER, priority); + (void) __ptw32_setthreadpriority (thread, SCHED_OTHER, priority); } #if defined(HAVE_CPU_AFFINITY) @@ -254,17 +254,17 @@ pthread_create (pthread_t * tid, #else { - ptw32_mcs_local_node_t stateLock; + __ptw32_mcs_local_node_t stateLock; /* * This lock will force pthread_threadStart() to wait until we have * the thread handle and have set the priority. */ - ptw32_mcs_lock_acquire(&tp->stateLock, &stateLock); + __ptw32_mcs_lock_acquire(&tp->stateLock, &stateLock); tp->threadH = threadH = - (HANDLE) _beginthread (ptw32_threadStart, stackSize, /* default stack size */ + (HANDLE) _beginthread (__ptw32_threadStart, stackSize, /* default stack size */ parms); /* @@ -288,7 +288,7 @@ pthread_create (pthread_t * tid, if (a != NULL) { - (void) ptw32_setthreadpriority (thread, SCHED_OTHER, priority); + (void) __ptw32_setthreadpriority (thread, SCHED_OTHER, priority); } #if defined(HAVE_CPU_AFFINITY) @@ -299,7 +299,7 @@ pthread_create (pthread_t * tid, } - ptw32_mcs_lock_release (&stateLock); + __ptw32_mcs_lock_release (&stateLock); } #endif @@ -319,7 +319,7 @@ pthread_create (pthread_t * tid, if (result != 0) { - ptw32_threadDestroy (thread); + __ptw32_threadDestroy (thread); tp = NULL; if (parms != NULL) diff --git a/dll.c b/dll.c index b38581b1..5d7b951c 100644 --- a/dll.c +++ b/dll.c @@ -39,15 +39,15 @@ # include #endif -#if defined(PTW32_STATIC_LIB) && defined(_MSC_VER) && _MSC_VER >= 1400 -# undef PTW32_STATIC_LIB -# define PTW32_STATIC_TLSLIB +#if defined (__PTW32_STATIC_LIB) && defined(_MSC_VER) && _MSC_VER >= 1400 +# undef __PTW32_STATIC_LIB +# define __PTW32_STATIC_TLSLIB #endif #include "pthread.h" #include "implement.h" -#if !defined(PTW32_STATIC_LIB) +#if !defined (__PTW32_STATIC_LIB) #if defined(_MSC_VER) /* @@ -64,13 +64,13 @@ extern "C" #endif /* __cplusplus */ BOOL WINAPI -#if defined(PTW32_STATIC_TLSLIB) -PTW32_StaticLibMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) +#if defined (__PTW32_STATIC_TLSLIB) +__PTW32_StaticLibMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) #else DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) #endif { - BOOL result = PTW32_TRUE; + BOOL result = __PTW32_TRUE; switch (fdwReason) { @@ -105,7 +105,7 @@ DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) #endif /* !PTW32_STATIC_LIB */ -#if ! defined(PTW32_BUILD_INLINED) +#if ! defined (__PTW32_BUILD_INLINED) /* * Avoid "translation unit is empty" warnings */ @@ -115,12 +115,12 @@ typedef int foo; /* Visual Studio 8+ can leverage PIMAGE_TLS_CALLBACK CRT segments, which * give a static lib its very own DllMain. */ -#ifdef PTW32_STATIC_TLSLIB +#ifdef __PTW32_STATIC_TLSLIB static void WINAPI TlsMain(PVOID h, DWORD r, PVOID u) { - (void)PTW32_StaticLibMain((HINSTANCE)h, r, u); + (void)__PTW32_StaticLibMain((HINSTANCE)h, r, u); } #ifdef _M_X64 @@ -137,9 +137,9 @@ EXTERN_C PIMAGE_TLS_CALLBACK _xl_b = TlsMain; # pragma data_seg() #endif /* _M_X64 */ -#endif /* PTW32_STATIC_TLSLIB */ +#endif /* __PTW32_STATIC_TLSLIB */ -#if defined(PTW32_STATIC_LIB) +#if defined (__PTW32_STATIC_LIB) /* * Note: MSVC 8 and higher use code in dll.c, which enables TLS cleanup @@ -201,7 +201,7 @@ static int (*msc_dtor)(void) = on_process_exit; * (specifically, in implement.h), so that the linker can't optimize away * this module. Don't call it. */ -void ptw32_autostatic_anchor(void) { abort(); } +void __ptw32_autostatic_anchor(void) { abort(); } -#endif /* PTW32_STATIC_LIB */ +#endif /* __PTW32_STATIC_LIB */ diff --git a/errno.c b/errno.c index f9340c4a..dbdf4d7e 100644 --- a/errno.c +++ b/errno.c @@ -89,7 +89,7 @@ _errno (void) } else { - result = (int *)(&((ptw32_thread_t *)self.p)->exitStatus); + result = (int *)(&((__ptw32_thread_t *)self.p)->exitStatus); } return (result); @@ -98,7 +98,7 @@ _errno (void) #endif /* (NEED_ERRNO) */ -#if ! defined(PTW32_BUILD_INLINED) +#if ! defined (__PTW32_BUILD_INLINED) /* * Avoid "translation unit is empty" warnings */ diff --git a/global.c b/global.c index 548455f0..7a9e354e 100644 --- a/global.c +++ b/global.c @@ -44,65 +44,65 @@ #include "implement.h" -int ptw32_processInitialized = PTW32_FALSE; -ptw32_thread_t * ptw32_threadReuseTop = PTW32_THREAD_REUSE_EMPTY; -ptw32_thread_t * ptw32_threadReuseBottom = PTW32_THREAD_REUSE_EMPTY; -pthread_key_t ptw32_selfThreadKey = NULL; -pthread_key_t ptw32_cleanupKey = NULL; -pthread_cond_t ptw32_cond_list_head = NULL; -pthread_cond_t ptw32_cond_list_tail = NULL; +int __ptw32_processInitialized = __PTW32_FALSE; +__ptw32_thread_t * __ptw32_threadReuseTop = __PTW32_THREAD_REUSE_EMPTY; +__ptw32_thread_t * __ptw32_threadReuseBottom = __PTW32_THREAD_REUSE_EMPTY; +pthread_key_t __ptw32_selfThreadKey = NULL; +pthread_key_t __ptw32_cleanupKey = NULL; +pthread_cond_t __ptw32_cond_list_head = NULL; +pthread_cond_t __ptw32_cond_list_tail = NULL; -int ptw32_concurrency = 0; +int __ptw32_concurrency = 0; /* What features have been auto-detected */ -int ptw32_features = 0; +int __ptw32_features = 0; /* * Global [process wide] thread sequence Number */ -unsigned __int64 ptw32_threadSeqNumber = 0; +unsigned __int64 __ptw32_threadSeqNumber = 0; /* * Function pointer to QueueUserAPCEx if it exists, otherwise * it will be set at runtime to a substitute routine which cannot unblock * blocked threads. */ -DWORD (*ptw32_register_cancellation) (PAPCFUNC, HANDLE, DWORD) = NULL; +DWORD (*__ptw32_register_cancellation) (PAPCFUNC, HANDLE, DWORD) = NULL; /* * Global lock for managing pthread_t struct reuse. */ -ptw32_mcs_lock_t ptw32_thread_reuse_lock = 0; +__ptw32_mcs_lock_t __ptw32_thread_reuse_lock = 0; /* * Global lock for testing internal state of statically declared mutexes. */ -ptw32_mcs_lock_t ptw32_mutex_test_init_lock = 0; +__ptw32_mcs_lock_t __ptw32_mutex_test_init_lock = 0; /* * Global lock for testing internal state of PTHREAD_COND_INITIALIZER * created condition variables. */ -ptw32_mcs_lock_t ptw32_cond_test_init_lock = 0; +__ptw32_mcs_lock_t __ptw32_cond_test_init_lock = 0; /* * Global lock for testing internal state of PTHREAD_RWLOCK_INITIALIZER * created read/write locks. */ -ptw32_mcs_lock_t ptw32_rwlock_test_init_lock = 0; +__ptw32_mcs_lock_t __ptw32_rwlock_test_init_lock = 0; /* * Global lock for testing internal state of PTHREAD_SPINLOCK_INITIALIZER * created spin locks. */ -ptw32_mcs_lock_t ptw32_spinlock_test_init_lock = 0; +__ptw32_mcs_lock_t __ptw32_spinlock_test_init_lock = 0; /* * Global lock for condition variable linked list. The list exists * to wake up CVs when a WM_TIMECHANGE message arrives. See * w32_TimeChangeHandler.c. */ -ptw32_mcs_lock_t ptw32_cond_list_lock = 0; +__ptw32_mcs_lock_t __ptw32_cond_list_lock = 0; #if defined(_UWIN) /* diff --git a/implement.h b/implement.h index 12184c1e..bed4a806 100644 --- a/implement.h +++ b/implement.h @@ -38,7 +38,7 @@ #if !defined(_IMPLEMENT_H) #define _IMPLEMENT_H -#if !defined(PTW32_CONFIG_H) +#if !defined (__PTW32_CONFIG_H) # error "config.h was not #included" #endif @@ -69,27 +69,27 @@ typedef VOID (APIENTRY *PAPCFUNC)(DWORD dwParam); # if defined(__MINGW32__) __attribute__((unused)) # endif -static int ptw32_get_errno(void) { int err = 0; _get_errno(&err); return err; } -# define PTW32_GET_ERRNO() ptw32_get_errno() -# if defined(PTW32_USES_SEPARATE_CRT) +static int __ptw32_get_errno(void) { int err = 0; _get_errno(&err); return err; } +# define __PTW32_GET_ERRNO() __ptw32_get_errno() +# if defined (__PTW32_USES_SEPARATE_CRT) # if defined(__MINGW32__) __attribute__((unused)) # endif -static void ptw32_set_errno(int err) { _set_errno(err); SetLastError(err); } -# define PTW32_SET_ERRNO(err) ptw32_set_errno(err) +static void __ptw32_set_errno(int err) { _set_errno(err); SetLastError(err); } +# define __PTW32_SET_ERRNO(err) __ptw32_set_errno(err) # else -# define PTW32_SET_ERRNO(err) _set_errno(err) +# define __PTW32_SET_ERRNO(err) _set_errno(err) # endif #else -# define PTW32_GET_ERRNO() (errno) -# if defined(PTW32_USES_SEPARATE_CRT) +# define __PTW32_GET_ERRNO() (errno) +# if defined (__PTW32_USES_SEPARATE_CRT) # if defined(__MINGW32__) __attribute__((unused)) # endif -static void ptw32_set_errno(int err) { errno = err; SetLastError(err); } -# define PTW32_SET_ERRNO(err) ptw32_set_errno(err) +static void __ptw32_set_errno(int err) { errno = err; SetLastError(err); } +# define __PTW32_SET_ERRNO(err) __ptw32_set_errno(err) # else -# define PTW32_SET_ERRNO(err) (errno = (err)) +# define __PTW32_SET_ERRNO(err) (errno = (err)) # endif #endif @@ -97,7 +97,7 @@ static void ptw32_set_errno(int err) { errno = err; SetLastError(err); } # include #endif -#if defined(__CLEANUP_C) +#if defined(__PTW32_CLEANUP_C) # include #endif @@ -111,40 +111,40 @@ static void ptw32_set_errno(int err) { errno = err; SetLastError(err); } /* MSVC 7.1 doesn't like complex #if expressions */ #define INLINE -#if defined(PTW32_BUILD_INLINED) +#if defined (__PTW32_BUILD_INLINED) # if defined(HAVE_C_INLINE) || defined(__cplusplus) # undef INLINE # define INLINE inline # endif #endif -#if defined(PTW32_CONFIG_MSVC6) -# define PTW32_INTERLOCKED_VOLATILE +#if defined (__PTW32_CONFIG_MSVC6) +# define __PTW32_INTERLOCKED_VOLATILE #else -# define PTW32_INTERLOCKED_VOLATILE volatile +# define __PTW32_INTERLOCKED_VOLATILE volatile #endif -#define PTW32_INTERLOCKED_LONG long -#define PTW32_INTERLOCKED_PVOID PVOID -#define PTW32_INTERLOCKED_LONGPTR PTW32_INTERLOCKED_VOLATILE long* -#define PTW32_INTERLOCKED_PVOID_PTR PTW32_INTERLOCKED_VOLATILE PVOID* +#define __PTW32_INTERLOCKED_LONG long +#define __PTW32_INTERLOCKED_PVOID PVOID +#define __PTW32_INTERLOCKED_LONGPTR __PTW32_INTERLOCKED_VOLATILE long* +#define __PTW32_INTERLOCKED_PVOID_PTR __PTW32_INTERLOCKED_VOLATILE PVOID* #if defined(_WIN64) -# define PTW32_INTERLOCKED_SIZE LONGLONG -# define PTW32_INTERLOCKED_SIZEPTR PTW32_INTERLOCKED_VOLATILE LONGLONG* +# define __PTW32_INTERLOCKED_SIZE LONGLONG +# define __PTW32_INTERLOCKED_SIZEPTR __PTW32_INTERLOCKED_VOLATILE LONGLONG* #else -# define PTW32_INTERLOCKED_SIZE long -# define PTW32_INTERLOCKED_SIZEPTR PTW32_INTERLOCKED_VOLATILE long* +# define __PTW32_INTERLOCKED_SIZE long +# define __PTW32_INTERLOCKED_SIZEPTR __PTW32_INTERLOCKED_VOLATILE long* #endif /* * Don't allow the linker to optimize away dll.obj (dll.o) in static builds. */ -#if defined(PTW32_STATIC_LIB) && defined(PTW32_BUILD) && !defined(PTW32_TEST_SNEAK_PEEK) - void ptw32_autostatic_anchor(void); +#if defined (__PTW32_STATIC_LIB) && defined (__PTW32_BUILD) && !defined (__PTW32_TEST_SNEAK_PEEK) + void __ptw32_autostatic_anchor(void); # if defined(__GNUC__) __attribute__((unused, used)) # endif - static void (*local_autostatic_anchor)(void) = ptw32_autostatic_anchor; + static void (*local_autostatic_anchor)(void) = __ptw32_autostatic_anchor; #endif typedef enum @@ -170,34 +170,34 @@ typedef enum } PThreadState; -typedef struct ptw32_mcs_node_t_ ptw32_mcs_local_node_t; -typedef struct ptw32_mcs_node_t_* ptw32_mcs_lock_t; -typedef struct ptw32_robust_node_t_ ptw32_robust_node_t; -typedef struct ptw32_thread_t_ ptw32_thread_t; +typedef struct __ptw32_mcs_node_t_ __ptw32_mcs_local_node_t; +typedef struct __ptw32_mcs_node_t_* __ptw32_mcs_lock_t; +typedef struct __ptw32_robust_node_t_ __ptw32_robust_node_t; +typedef struct __ptw32_thread_t_ __ptw32_thread_t; -struct ptw32_thread_t_ +struct __ptw32_thread_t_ { unsigned __int64 seqNumber; /* Process-unique thread sequence number */ HANDLE threadH; /* Win32 thread handle - POSIX thread is invalid if threadH == 0 */ pthread_t ptHandle; /* This thread's permanent pthread_t handle */ - ptw32_thread_t * prevReuse; /* Links threads on reuse stack */ + __ptw32_thread_t * prevReuse; /* Links threads on reuse stack */ volatile PThreadState state; - ptw32_mcs_lock_t threadLock; /* Used for serialised access to public thread state */ - ptw32_mcs_lock_t stateLock; /* Used for async-cancel safety */ + __ptw32_mcs_lock_t threadLock; /* Used for serialised access to public thread state */ + __ptw32_mcs_lock_t stateLock; /* Used for async-cancel safety */ HANDLE cancelEvent; void *exitStatus; void *parms; void *keys; void *nextAssoc; -#if defined(__CLEANUP_C) +#if defined(__PTW32_CLEANUP_C) jmp_buf start_mark; /* Jump buffer follows void* so should be aligned */ -#endif /* __CLEANUP_C */ +#endif /* __PTW32_CLEANUP_C */ #if defined(HAVE_SIGSET_T) sigset_t sigmask; #endif /* HAVE_SIGSET_T */ - ptw32_mcs_lock_t + __ptw32_mcs_lock_t robustMxListLock; /* robustMxList lock */ - ptw32_robust_node_t* + __ptw32_robust_node_t* robustMxList; /* List of currenty held robust mutexes */ int ptErrno; int detachState; @@ -220,7 +220,7 @@ struct ptw32_thread_t_ /* * Special value to mark attribute objects as valid. */ -#define PTW32_ATTR_VALID ((unsigned long) 0xC4C0FFEE) +#define __PTW32_ATTR_VALID ((unsigned long) 0xC4C0FFEE) struct pthread_attr_t_ { @@ -250,15 +250,15 @@ struct pthread_attr_t_ struct sem_t_ { int value; - ptw32_mcs_lock_t lock; + __ptw32_mcs_lock_t lock; HANDLE sem; #if defined(NEED_SEM) int leftToUnblock; #endif }; -#define PTW32_OBJECT_AUTO_INIT ((void *)(size_t) -1) -#define PTW32_OBJECT_INVALID NULL +#define __PTW32_OBJECT_AUTO_INIT ((void *)(size_t) -1) +#define __PTW32_OBJECT_INVALID NULL struct pthread_mutex_t_ { @@ -275,28 +275,28 @@ struct pthread_mutex_t_ pthread_t ownerThread; HANDLE event; /* Mutex release notification to waiting threads. */ - ptw32_robust_node_t* + __ptw32_robust_node_t* robustNode; /* Extra state for robust mutexes */ }; -enum ptw32_robust_state_t_ +enum __ptw32_robust_state_t_ { - PTW32_ROBUST_CONSISTENT, - PTW32_ROBUST_INCONSISTENT, - PTW32_ROBUST_NOTRECOVERABLE + __PTW32_ROBUST_CONSISTENT, + __PTW32_ROBUST_INCONSISTENT, + __PTW32_ROBUST_NOTRECOVERABLE }; -typedef enum ptw32_robust_state_t_ ptw32_robust_state_t; +typedef enum __ptw32_robust_state_t_ __ptw32_robust_state_t; /* * Node used to manage per-thread lists of currently-held robust mutexes. */ -struct ptw32_robust_node_t_ +struct __ptw32_robust_node_t_ { pthread_mutex_t mx; - ptw32_robust_state_t stateInconsistent; - ptw32_robust_node_t* prev; - ptw32_robust_node_t* next; + __ptw32_robust_state_t stateInconsistent; + __ptw32_robust_node_t* prev; + __ptw32_robust_node_t* next; }; struct pthread_mutexattr_t_ @@ -307,15 +307,15 @@ struct pthread_mutexattr_t_ }; /* - * Possible values, other than PTW32_OBJECT_INVALID, + * Possible values, other than __PTW32_OBJECT_INVALID, * for the "interlock" element in a spinlock. * * In this implementation, when a spinlock is initialised, * the number of cpus available to the process is checked. * If there is only one cpu then "interlock" is set equal to - * PTW32_SPIN_USE_MUTEX and u.mutex is an initialised mutex. + * __PTW32_SPIN_USE_MUTEX and u.mutex is an initialised mutex. * If the number of cpus is greater than 1 then "interlock" - * is set equal to PTW32_SPIN_UNLOCKED and the number is + * is set equal to __PTW32_SPIN_UNLOCKED and the number is * stored in u.cpus. This arrangement allows the spinlock * routines to attempt an InterlockedCompareExchange on "interlock" * immediately and, if that fails, to try the inferior mutex. @@ -323,10 +323,10 @@ struct pthread_mutexattr_t_ * "u.cpus" isn't used for anything yet, but could be used at * some point to optimise spinlock behaviour. */ -#define PTW32_SPIN_INVALID (0) -#define PTW32_SPIN_UNLOCKED (1) -#define PTW32_SPIN_LOCKED (2) -#define PTW32_SPIN_USE_MUTEX (3) +#define __PTW32_SPIN_INVALID (0) +#define __PTW32_SPIN_UNLOCKED (1) +#define __PTW32_SPIN_LOCKED (2) +#define __PTW32_SPIN_USE_MUTEX (3) struct pthread_spinlock_t_ { @@ -341,10 +341,10 @@ struct pthread_spinlock_t_ /* * MCS lock queue node - see ptw32_MCS_lock.c */ -struct ptw32_mcs_node_t_ +struct __ptw32_mcs_node_t_ { - struct ptw32_mcs_node_t_ **lock; /* ptr to tail of queue */ - struct ptw32_mcs_node_t_ *next; /* ptr to successor in queue */ + struct __ptw32_mcs_node_t_ **lock; /* ptr to tail of queue */ + struct __ptw32_mcs_node_t_ *next; /* ptr to successor in queue */ HANDLE readyFlag; /* set after lock is released by predecessor */ HANDLE nextFlag; /* set after 'next' ptr is set by @@ -358,8 +358,8 @@ struct pthread_barrier_t_ unsigned int nInitialBarrierHeight; int pshared; sem_t semBarrierBreeched; - ptw32_mcs_lock_t lock; - ptw32_mcs_local_node_t proxynode; + __ptw32_mcs_lock_t lock; + __ptw32_mcs_local_node_t proxynode; }; struct pthread_barrierattr_t_ @@ -370,8 +370,8 @@ struct pthread_barrierattr_t_ struct pthread_key_t_ { DWORD key; - void (PTW32_CDECL *destructor) (void *); - ptw32_mcs_lock_t keyLock; + void (__PTW32_CDECL *destructor) (void *); + __ptw32_mcs_lock_t keyLock; void *threads; }; @@ -381,7 +381,7 @@ typedef struct ThreadParms ThreadParms; struct ThreadParms { pthread_t tid; - void *(PTW32_CDECL *start) (void *); + void * (__PTW32_CDECL *start) (void *); void *arg; }; @@ -409,7 +409,7 @@ struct pthread_condattr_t_ int pshared; }; -#define PTW32_RWLOCK_MAGIC 0xfacade2 +#define __PTW32_RWLOCK_MAGIC 0xfacade2 struct pthread_rwlock_t_ { @@ -534,7 +534,7 @@ struct ThreadKeyAssoc * * */ - ptw32_thread_t * thread; + __ptw32_thread_t * thread; pthread_key_t key; ThreadKeyAssoc *nextKey; ThreadKeyAssoc *nextThread; @@ -543,7 +543,7 @@ struct ThreadKeyAssoc }; -#if defined(__CLEANUP_SEH) +#if defined(__PTW32_CLEANUP_SEH) /* * -------------------------------------------------------------- * MAKE_SOFTWARE_EXCEPTION @@ -580,57 +580,57 @@ struct ThreadKeyAssoc */ #define EXCEPTION_PTW32_SERVICES \ MAKE_SOFTWARE_EXCEPTION( SE_ERROR, \ - PTW32_SERVICES_FACILITY, \ - PTW32_SERVICES_ERROR ) + __PTW32_SERVICES_FACILITY, \ + __PTW32_SERVICES_ERROR ) -#define PTW32_SERVICES_FACILITY 0xBAD -#define PTW32_SERVICES_ERROR 0xDEED +#define __PTW32_SERVICES_FACILITY 0xBAD +#define __PTW32_SERVICES_ERROR 0xDEED -#endif /* __CLEANUP_SEH */ +#endif /* __PTW32_CLEANUP_SEH */ /* * Services available through EXCEPTION_PTW32_SERVICES - * and also used [as parameters to ptw32_throw()] as + * and also used [as parameters to __ptw32_throw()] as * generic exception selectors. */ -#define PTW32_EPS_EXIT (1) -#define PTW32_EPS_CANCEL (2) +#define __PTW32_EPS_EXIT (1) +#define __PTW32_EPS_CANCEL (2) /* Useful macros */ -#define PTW32_MAX(a,b) ((a)<(b)?(b):(a)) -#define PTW32_MIN(a,b) ((a)>(b)?(b):(a)) +#define __PTW32_MAX(a,b) ((a)<(b)?(b):(a)) +#define __PTW32_MIN(a,b) ((a)>(b)?(b):(a)) /* Declared in pthread_cancel.c */ -extern DWORD (*ptw32_register_cancellation) (PAPCFUNC, HANDLE, DWORD); +extern DWORD (*__ptw32_register_cancellation) (PAPCFUNC, HANDLE, DWORD); /* Thread Reuse stack bottom marker. Must not be NULL or any valid pointer to memory. */ -#define PTW32_THREAD_REUSE_EMPTY ((ptw32_thread_t *)(size_t) 1) +#define __PTW32_THREAD_REUSE_EMPTY ((__ptw32_thread_t *)(size_t) 1) -extern int ptw32_processInitialized; -extern ptw32_thread_t * ptw32_threadReuseTop; -extern ptw32_thread_t * ptw32_threadReuseBottom; -extern pthread_key_t ptw32_selfThreadKey; -extern pthread_key_t ptw32_cleanupKey; -extern pthread_cond_t ptw32_cond_list_head; -extern pthread_cond_t ptw32_cond_list_tail; +extern int __ptw32_processInitialized; +extern __ptw32_thread_t * __ptw32_threadReuseTop; +extern __ptw32_thread_t * __ptw32_threadReuseBottom; +extern pthread_key_t __ptw32_selfThreadKey; +extern pthread_key_t __ptw32_cleanupKey; +extern pthread_cond_t __ptw32_cond_list_head; +extern pthread_cond_t __ptw32_cond_list_tail; -extern int ptw32_mutex_default_kind; +extern int __ptw32_mutex_default_kind; -extern unsigned __int64 ptw32_threadSeqNumber; +extern unsigned __int64 __ptw32_threadSeqNumber; -extern int ptw32_concurrency; +extern int __ptw32_concurrency; -extern int ptw32_features; +extern int __ptw32_features; -extern ptw32_mcs_lock_t ptw32_thread_reuse_lock; -extern ptw32_mcs_lock_t ptw32_mutex_test_init_lock; -extern ptw32_mcs_lock_t ptw32_cond_list_lock; -extern ptw32_mcs_lock_t ptw32_cond_test_init_lock; -extern ptw32_mcs_lock_t ptw32_rwlock_test_init_lock; -extern ptw32_mcs_lock_t ptw32_spinlock_test_init_lock; +extern __ptw32_mcs_lock_t __ptw32_thread_reuse_lock; +extern __ptw32_mcs_lock_t __ptw32_mutex_test_init_lock; +extern __ptw32_mcs_lock_t __ptw32_cond_list_lock; +extern __ptw32_mcs_lock_t __ptw32_cond_test_init_lock; +extern __ptw32_mcs_lock_t __ptw32_rwlock_test_init_lock; +extern __ptw32_mcs_lock_t __ptw32_spinlock_test_init_lock; #if defined(_UWIN) extern int pthread_count; @@ -646,79 +646,79 @@ __PTW32_BEGIN_C_DECLS * ===================== */ - int ptw32_is_attr (const pthread_attr_t * attr); + int __ptw32_is_attr (const pthread_attr_t * attr); - int ptw32_cond_check_need_init (pthread_cond_t * cond); - int ptw32_mutex_check_need_init (pthread_mutex_t * mutex); - int ptw32_rwlock_check_need_init (pthread_rwlock_t * rwlock); - int ptw32_spinlock_check_need_init (pthread_spinlock_t * lock); + int __ptw32_cond_check_need_init (pthread_cond_t * cond); + int __ptw32_mutex_check_need_init (pthread_mutex_t * mutex); + int __ptw32_rwlock_check_need_init (pthread_rwlock_t * rwlock); + int __ptw32_spinlock_check_need_init (pthread_spinlock_t * lock); - int ptw32_robust_mutex_inherit(pthread_mutex_t * mutex); - void ptw32_robust_mutex_add(pthread_mutex_t* mutex, pthread_t self); - void ptw32_robust_mutex_remove(pthread_mutex_t* mutex, ptw32_thread_t* otp); + int __ptw32_robust_mutex_inherit(pthread_mutex_t * mutex); + void __ptw32_robust_mutex_add(pthread_mutex_t* mutex, pthread_t self); + void __ptw32_robust_mutex_remove(pthread_mutex_t* mutex, __ptw32_thread_t* otp); DWORD - ptw32_Registercancellation (PAPCFUNC callback, + __ptw32_Registercancellation (PAPCFUNC callback, HANDLE threadH, DWORD callback_arg); - int ptw32_processInitialize (void); + int __ptw32_processInitialize (void); - void ptw32_processTerminate (void); + void __ptw32_processTerminate (void); - void ptw32_threadDestroy (pthread_t tid); + void __ptw32_threadDestroy (pthread_t tid); - void ptw32_pop_cleanup_all (int execute); + void __ptw32_pop_cleanup_all (int execute); - pthread_t ptw32_new (void); + pthread_t __ptw32_new (void); - pthread_t ptw32_threadReusePop (void); + pthread_t __ptw32_threadReusePop (void); - void ptw32_threadReusePush (pthread_t thread); + void __ptw32_threadReusePush (pthread_t thread); - int ptw32_getprocessors (int *count); + int __ptw32_getprocessors (int *count); - int ptw32_setthreadpriority (pthread_t thread, int policy, int priority); + int __ptw32_setthreadpriority (pthread_t thread, int policy, int priority); - void ptw32_rwlock_cancelwrwait (void *arg); + void __ptw32_rwlock_cancelwrwait (void *arg); #if ! defined (__MINGW32__) || (defined (__MSVCRT__) && ! defined (__DMC__)) unsigned __stdcall #else void #endif - ptw32_threadStart (void *vthreadParms); + __ptw32_threadStart (void *vthreadParms); - void ptw32_callUserDestroyRoutines (pthread_t thread); + void __ptw32_callUserDestroyRoutines (pthread_t thread); - int ptw32_tkAssocCreate (ptw32_thread_t * thread, pthread_key_t key); + int __ptw32_tkAssocCreate (__ptw32_thread_t * thread, pthread_key_t key); - void ptw32_tkAssocDestroy (ThreadKeyAssoc * assoc); + void __ptw32_tkAssocDestroy (ThreadKeyAssoc * assoc); - int ptw32_semwait (sem_t * sem); + int __ptw32_semwait (sem_t * sem); - DWORD ptw32_relmillisecs (const struct timespec * abstime); + DWORD __ptw32_relmillisecs (const struct timespec * abstime); - void ptw32_mcs_lock_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node); + void __ptw32_mcs_lock_acquire (__ptw32_mcs_lock_t * lock, __ptw32_mcs_local_node_t * node); - int ptw32_mcs_lock_try_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node); + int __ptw32_mcs_lock_try_acquire (__ptw32_mcs_lock_t * lock, __ptw32_mcs_local_node_t * node); - void ptw32_mcs_lock_release (ptw32_mcs_local_node_t * node); + void __ptw32_mcs_lock_release (__ptw32_mcs_local_node_t * node); - void ptw32_mcs_node_transfer (ptw32_mcs_local_node_t * new_node, ptw32_mcs_local_node_t * old_node); + void __ptw32_mcs_node_transfer (__ptw32_mcs_local_node_t * new_node, __ptw32_mcs_local_node_t * old_node); #if defined(NEED_FTIME) - void ptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft); - void ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts); + void __ptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft); + void __ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts); #endif /* Declared in pthw32_calloc.c */ #if defined(NEED_CALLOC) -#define calloc(n, s) ptw32_calloc(n, s) - void *ptw32_calloc (size_t n, size_t s); +#define calloc(n, s) __ptw32_calloc(n, s) + void *__ptw32_calloc (size_t n, size_t s); #endif /* Declared in ptw32_throw.c */ -void ptw32_throw (DWORD exception); +void __ptw32_throw (DWORD exception); __PTW32_END_C_DECLS @@ -778,14 +778,14 @@ __PTW32_END_C_DECLS * The above aren't available in Mingw32 as of gcc 4.5.2 so define our own. */ #if defined(__cplusplus) -# define PTW32_TO_VLONG64PTR(ptr) reinterpret_cast(ptr) +# define __PTW32_TO_VLONG64PTR(ptr) reinterpret_cast(ptr) #else -# define PTW32_TO_VLONG64PTR(ptr) (ptr) +# define __PTW32_TO_VLONG64PTR(ptr) (ptr) #endif #if defined(__GNUC__) # if defined(_WIN64) -# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_64(location, value, comparand) \ +# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_64(location, value, comparand) \ ({ \ __typeof (value) _result; \ __asm__ __volatile__ \ @@ -797,7 +797,7 @@ __PTW32_END_C_DECLS :"memory", "cc"); \ _result; \ }) -# define PTW32_INTERLOCKED_EXCHANGE_64(location, value) \ +# define __PTW32_INTERLOCKED_EXCHANGE_64(location, value) \ ({ \ __typeof (value) _result; \ __asm__ __volatile__ \ @@ -808,7 +808,7 @@ __PTW32_END_C_DECLS :"memory", "cc"); \ _result; \ }) -# define PTW32_INTERLOCKED_EXCHANGE_ADD_64(location, value) \ +# define __PTW32_INTERLOCKED_EXCHANGE_ADD_64(location, value) \ ({ \ __typeof (value) _result; \ __asm__ __volatile__ \ @@ -820,9 +820,9 @@ __PTW32_END_C_DECLS :"memory", "cc"); \ _result; \ }) -# define PTW32_INTERLOCKED_INCREMENT_64(location) \ +# define __PTW32_INTERLOCKED_INCREMENT_64(location) \ ({ \ - PTW32_INTERLOCKED_LONG _temp = 1; \ + __PTW32_INTERLOCKED_LONG _temp = 1; \ __asm__ __volatile__ \ ( \ "lock\n\t" \ @@ -832,9 +832,9 @@ __PTW32_END_C_DECLS :"memory", "cc"); \ ++_temp; \ }) -# define PTW32_INTERLOCKED_DECREMENT_64(location) \ +# define __PTW32_INTERLOCKED_DECREMENT_64(location) \ ({ \ - PTW32_INTERLOCKED_LONG _temp = -1; \ + __PTW32_INTERLOCKED_LONG _temp = -1; \ __asm__ __volatile__ \ ( \ "lock\n\t" \ @@ -845,7 +845,7 @@ __PTW32_END_C_DECLS --_temp; \ }) #endif -# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG(location, value, comparand) \ +# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG(location, value, comparand) \ ({ \ __typeof (value) _result; \ __asm__ __volatile__ \ @@ -857,7 +857,7 @@ __PTW32_END_C_DECLS :"memory", "cc"); \ _result; \ }) -# define PTW32_INTERLOCKED_EXCHANGE_LONG(location, value) \ +# define __PTW32_INTERLOCKED_EXCHANGE_LONG(location, value) \ ({ \ __typeof (value) _result; \ __asm__ __volatile__ \ @@ -868,7 +868,7 @@ __PTW32_END_C_DECLS :"memory", "cc"); \ _result; \ }) -# define PTW32_INTERLOCKED_EXCHANGE_ADD_LONG(location, value) \ +# define __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG(location, value) \ ({ \ __typeof (value) _result; \ __asm__ __volatile__ \ @@ -880,9 +880,9 @@ __PTW32_END_C_DECLS :"memory", "cc"); \ _result; \ }) -# define PTW32_INTERLOCKED_INCREMENT_LONG(location) \ +# define __PTW32_INTERLOCKED_INCREMENT_LONG(location) \ ({ \ - PTW32_INTERLOCKED_LONG _temp = 1; \ + __PTW32_INTERLOCKED_LONG _temp = 1; \ __asm__ __volatile__ \ ( \ "lock\n\t" \ @@ -892,9 +892,9 @@ __PTW32_END_C_DECLS :"memory", "cc"); \ ++_temp; \ }) -# define PTW32_INTERLOCKED_DECREMENT_LONG(location) \ +# define __PTW32_INTERLOCKED_DECREMENT_LONG(location) \ ({ \ - PTW32_INTERLOCKED_LONG _temp = -1; \ + __PTW32_INTERLOCKED_LONG _temp = -1; \ __asm__ __volatile__ \ ( \ "lock\n\t" \ @@ -904,52 +904,52 @@ __PTW32_END_C_DECLS :"memory", "cc"); \ --_temp; \ }) -# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR(location, value, comparand) \ - PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE((PTW32_INTERLOCKED_SIZEPTR)location, \ - (PTW32_INTERLOCKED_SIZE)value, \ - (PTW32_INTERLOCKED_SIZE)comparand) -# define PTW32_INTERLOCKED_EXCHANGE_PTR(location, value) \ - PTW32_INTERLOCKED_EXCHANGE_SIZE((PTW32_INTERLOCKED_SIZEPTR)location, \ - (PTW32_INTERLOCKED_SIZE)value) +# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR(location, value, comparand) \ + __PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE ((__PTW32_INTERLOCKED_SIZEPTR)location, \ + (__PTW32_INTERLOCKED_SIZE)value, \ + (__PTW32_INTERLOCKED_SIZE)comparand) +# define __PTW32_INTERLOCKED_EXCHANGE_PTR(location, value) \ + __PTW32_INTERLOCKED_EXCHANGE_SIZE ((__PTW32_INTERLOCKED_SIZEPTR)location, \ + (__PTW32_INTERLOCKED_SIZE)value) #else # if defined(_WIN64) -# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_64(p,v,c) InterlockedCompareExchange64(PTW32_TO_VLONG64PTR(p),(v),(c)) -# define PTW32_INTERLOCKED_EXCHANGE_64(p,v) InterlockedExchange64(PTW32_TO_VLONG64PTR(p),(v)) -# define PTW32_INTERLOCKED_EXCHANGE_ADD_64(p,v) InterlockedExchangeAdd64(PTW32_TO_VLONG64PTR(p),(v)) -# define PTW32_INTERLOCKED_INCREMENT_64(p) InterlockedIncrement64(PTW32_TO_VLONG64PTR(p)) -# define PTW32_INTERLOCKED_DECREMENT_64(p) InterlockedDecrement64(PTW32_TO_VLONG64PTR(p)) +# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_64(p,v,c) InterlockedCompareExchange64 (__PTW32_TO_VLONG64PTR(p),(v),(c)) +# define __PTW32_INTERLOCKED_EXCHANGE_64(p,v) InterlockedExchange64 (__PTW32_TO_VLONG64PTR(p),(v)) +# define __PTW32_INTERLOCKED_EXCHANGE_ADD_64(p,v) InterlockedExchangeAdd64 (__PTW32_TO_VLONG64PTR(p),(v)) +# define __PTW32_INTERLOCKED_INCREMENT_64(p) InterlockedIncrement64 (__PTW32_TO_VLONG64PTR(p)) +# define __PTW32_INTERLOCKED_DECREMENT_64(p) InterlockedDecrement64 (__PTW32_TO_VLONG64PTR(p)) # endif -# if defined(PTW32_CONFIG_MSVC6) && !defined(_WIN64) -# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG(location, value, comparand) \ +# if defined (__PTW32_CONFIG_MSVC6) && !defined(_WIN64) +# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG(location, value, comparand) \ ((LONG)InterlockedCompareExchange((PVOID *)(location), (PVOID)(value), (PVOID)(comparand))) # else -# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG InterlockedCompareExchange +# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG InterlockedCompareExchange # endif -# define PTW32_INTERLOCKED_EXCHANGE_LONG(p,v) InterlockedExchange((p),(v)) -# define PTW32_INTERLOCKED_EXCHANGE_ADD_LONG(p,v) InterlockedExchangeAdd((p),(v)) -# define PTW32_INTERLOCKED_INCREMENT_LONG(p) InterlockedIncrement((p)) -# define PTW32_INTERLOCKED_DECREMENT_LONG(p) InterlockedDecrement((p)) -# if defined(PTW32_CONFIG_MSVC6) && !defined(_WIN64) -# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR InterlockedCompareExchange -# define PTW32_INTERLOCKED_EXCHANGE_PTR(location, value) \ +# define __PTW32_INTERLOCKED_EXCHANGE_LONG(p,v) InterlockedExchange((p),(v)) +# define __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG(p,v) InterlockedExchangeAdd((p),(v)) +# define __PTW32_INTERLOCKED_INCREMENT_LONG(p) InterlockedIncrement((p)) +# define __PTW32_INTERLOCKED_DECREMENT_LONG(p) InterlockedDecrement((p)) +# if defined (__PTW32_CONFIG_MSVC6) && !defined(_WIN64) +# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR InterlockedCompareExchange +# define __PTW32_INTERLOCKED_EXCHANGE_PTR(location, value) \ ((PVOID)InterlockedExchange((LPLONG)(location), (LONG)(value))) # else -# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR(p,v,c) InterlockedCompareExchangePointer((p),(v),(c)) -# define PTW32_INTERLOCKED_EXCHANGE_PTR(p,v) InterlockedExchangePointer((p),(v)) +# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR(p,v,c) InterlockedCompareExchangePointer((p),(v),(c)) +# define __PTW32_INTERLOCKED_EXCHANGE_PTR(p,v) InterlockedExchangePointer((p),(v)) # endif #endif #if defined(_WIN64) -# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE(p,v,c) PTW32_INTERLOCKED_COMPARE_EXCHANGE_64(PTW32_TO_VLONG64PTR(p),(v),(c)) -# define PTW32_INTERLOCKED_EXCHANGE_SIZE(p,v) PTW32_INTERLOCKED_EXCHANGE_64(PTW32_TO_VLONG64PTR(p),(v)) -# define PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE(p,v) PTW32_INTERLOCKED_EXCHANGE_ADD_64(PTW32_TO_VLONG64PTR(p),(v)) -# define PTW32_INTERLOCKED_INCREMENT_SIZE(p) PTW32_INTERLOCKED_INCREMENT_64(PTW32_TO_VLONG64PTR(p)) -# define PTW32_INTERLOCKED_DECREMENT_SIZE(p) PTW32_INTERLOCKED_DECREMENT_64(PTW32_TO_VLONG64PTR(p)) +# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE(p,v,c) __PTW32_INTERLOCKED_COMPARE_EXCHANGE_64 (__PTW32_TO_VLONG64PTR(p),(v),(c)) +# define __PTW32_INTERLOCKED_EXCHANGE_SIZE(p,v) __PTW32_INTERLOCKED_EXCHANGE_64 (__PTW32_TO_VLONG64PTR(p),(v)) +# define __PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE(p,v) __PTW32_INTERLOCKED_EXCHANGE_ADD_64 (__PTW32_TO_VLONG64PTR(p),(v)) +# define __PTW32_INTERLOCKED_INCREMENT_SIZE(p) __PTW32_INTERLOCKED_INCREMENT_64 (__PTW32_TO_VLONG64PTR(p)) +# define __PTW32_INTERLOCKED_DECREMENT_SIZE(p) __PTW32_INTERLOCKED_DECREMENT_64 (__PTW32_TO_VLONG64PTR(p)) #else -# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE(p,v,c) PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG((p),(v),(c)) -# define PTW32_INTERLOCKED_EXCHANGE_SIZE(p,v) PTW32_INTERLOCKED_EXCHANGE_LONG((p),(v)) -# define PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE(p,v) PTW32_INTERLOCKED_EXCHANGE_ADD_LONG((p),(v)) -# define PTW32_INTERLOCKED_INCREMENT_SIZE(p) PTW32_INTERLOCKED_INCREMENT_LONG((p)) -# define PTW32_INTERLOCKED_DECREMENT_SIZE(p) PTW32_INTERLOCKED_DECREMENT_LONG((p)) +# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE(p,v,c) __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG((p),(v),(c)) +# define __PTW32_INTERLOCKED_EXCHANGE_SIZE(p,v) __PTW32_INTERLOCKED_EXCHANGE_LONG((p),(v)) +# define __PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE(p,v) __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG((p),(v)) +# define __PTW32_INTERLOCKED_INCREMENT_SIZE(p) __PTW32_INTERLOCKED_INCREMENT_LONG((p)) +# define __PTW32_INTERLOCKED_DECREMENT_SIZE(p) __PTW32_INTERLOCKED_DECREMENT_LONG((p)) #endif #if defined(NEED_CREATETHREAD) diff --git a/manual/pthread_setname_np.html b/manual/pthread_setname_np.html index b86fed13..2b12a8a1 100644 --- a/manual/pthread_setname_np.html +++ b/manual/pthread_setname_np.html @@ -35,8 +35,8 @@

thr, char * name, int len);

-

#if defined(PTW32_COMPATIBILITY_BSD) || -defined(PTW32_COMPATIBILITY_TRU64)
int +

#if defined (__PTW32_COMPATIBILITY_BSD) || +defined (__PTW32_COMPATIBILITY_TRU64)
int pthread_setname_np(pthread_t thr, const char * name, void * arg);

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

Description

pthread_setname_np() sets the descriptive name of the thread. It takes the following arguments.

-

#if defined(PTW32_COMPATIBILITY_BSD)

+

#if defined (__PTW32_COMPATIBILITY_BSD)

@@ -78,7 +78,7 @@

Description

-

#elif defined(PTW32_COMPATIBILITY_TRU64)

+

#elif defined (__PTW32_COMPATIBILITY_TRU64)

diff --git a/need_errno.h b/need_errno.h index 77d2280b..a750e1e3 100644 --- a/need_errno.h +++ b/need_errno.h @@ -59,23 +59,23 @@ extern "C" { #endif #endif -#if defined(PTW32_STATIC_LIB) && defined(_MSC_VER) && _MSC_VER >= 1400 -# undef PTW32_STATIC_LIB -# define PTW32_STATIC_TLSLIB +#if defined (__PTW32_STATIC_LIB) && defined(_MSC_VER) && _MSC_VER >= 1400 +# undef __PTW32_STATIC_LIB +# define __PTW32_STATIC_TLSLIB #endif -#if defined(PTW32_STATIC_LIB) || defined(PTW32_STATIC_TLSLIB) -# define PTW32_DLLPORT -#elif defined(PTW32_BUILD) -# define PTW32_DLLPORT __declspec (dllexport) +#if defined (__PTW32_STATIC_LIB) || defined (__PTW32_STATIC_TLSLIB) +# define __PTW32_DLLPORT +#elif defined (__PTW32_BUILD) +# define __PTW32_DLLPORT __declspec (dllexport) # else -# define PTW32_DLLPORT __declspec (dllimport) +# define __PTW32_DLLPORT __declspec (dllimport) # endif /* declare reference to errno */ #if (defined(_MT) || defined(_MD) || defined(_DLL)) && !defined(_MAC) -PTW32_DLLPORT int * __cdecl _errno(void); +__PTW32_DLLPORT int * __cdecl _errno(void); #define errno (*_errno()) #else /* ndef _MT && ndef _MD && ndef _DLL */ _CRTIMP extern int errno; @@ -139,7 +139,7 @@ _CRTIMP extern int errno; /* * POSIX 2008 - robust mutexes. */ -#if PTW32_VERSION_MAJOR > 2 +#if __PTW32_VERSION_MAJOR > 2 # if !defined(EOWNERDEAD) # define EOWNERDEAD 1000 # endif diff --git a/pthread.h b/pthread.h index 7a2cd921..6cee1930 100644 --- a/pthread.h +++ b/pthread.h @@ -64,11 +64,11 @@ * C++ apps). This is currently consistent with most/all commercial Unix * POSIX threads implementations. */ -#if !defined( __CLEANUP_SEH ) && !defined( __CLEANUP_CXX ) && !defined( __CLEANUP_C ) -# define __CLEANUP_C +#if !defined( __PTW32_CLEANUP_SEH ) && !defined( __PTW32_CLEANUP_CXX ) && !defined( __PTW32_CLEANUP_C ) +# define __PTW32_CLEANUP_C #endif -#if defined( __CLEANUP_SEH ) && ( !defined( _MSC_VER ) && !defined(PTW32_RC_MSC)) +#if defined( __PTW32_CLEANUP_SEH ) && ( !defined( _MSC_VER ) && !defined (__PTW32_RC_MSC)) #error ERROR [__FILE__, line __LINE__]: SEH is not supported for this compiler. #endif @@ -173,8 +173,8 @@ */ enum { /* Boolean values to make us independent of system includes. */ - PTW32_FALSE = 0, - PTW32_TRUE = (! PTW32_FALSE) + __PTW32_FALSE = 0, + __PTW32_TRUE = (! __PTW32_FALSE) }; #include @@ -392,20 +392,22 @@ enum * strictly comply with POSIX, e.g. not assume scalar type, only * compare pthread_t using the API function pthread_equal(), etc. * - * Applications can use the element 'p' to compare, e.g. for sorting, - * but it will be up to the application to determine if handles are - * live or dead, or resurrected for an entirely new/different thread. + * Non-conforming applications could use the element 'p' to compare, + * e.g. for sorting, but it will be up to the application to determine + * if handles are live or dead, or resurrected for an entirely + * new/different thread. I.e. the thread is valid iff + * x == p->ptHandle.x */ typedef struct { void * p; /* Pointer to actual object */ -#if PTW32_VERSION_MAJOR > 2 +#if __PTW32_VERSION_MAJOR > 2 size_t x; /* Extra information - reuse count etc */ #else unsigned int x; /* Extra information - reuse count etc */ #endif -} ptw32_handle_t; +} __ptw32_handle_t; -typedef ptw32_handle_t pthread_t; +typedef __ptw32_handle_t pthread_t; typedef struct pthread_attr_t_ * pthread_attr_t; typedef struct pthread_once_t_ pthread_once_t; typedef struct pthread_key_t_ * pthread_key_t; @@ -488,9 +490,9 @@ enum * ==================== * ==================== */ -#if PTW32_VERSION_MAJOR > 2 +#if __PTW32_VERSION_MAJOR > 2 -#define PTHREAD_ONCE_INIT { 0, PTW32_FALSE } +#define PTHREAD_ONCE_INIT { 0, __PTW32_FALSE } struct pthread_once_t_ { @@ -500,7 +502,7 @@ struct pthread_once_t_ #else -#define PTHREAD_ONCE_INIT { PTW32_FALSE, 0, 0, 0 } +#define PTHREAD_ONCE_INIT { __PTW32_FALSE, 0, 0, 0 } struct pthread_once_t_ { @@ -556,36 +558,36 @@ enum }; -typedef struct ptw32_cleanup_t ptw32_cleanup_t; +typedef struct __ptw32_cleanup_t __ptw32_cleanup_t; #if defined(_MSC_VER) /* Disable MSVC 'anachronism used' warning */ #pragma warning( disable : 4229 ) #endif -typedef void (* PTW32_CDECL ptw32_cleanup_callback_t)(void *); +typedef void (* __PTW32_CDECL __ptw32_cleanup_callback_t)(void *); #if defined(_MSC_VER) #pragma warning( default : 4229 ) #endif -struct ptw32_cleanup_t +struct __ptw32_cleanup_t { - ptw32_cleanup_callback_t routine; + __ptw32_cleanup_callback_t routine; void *arg; - struct ptw32_cleanup_t *prev; + struct __ptw32_cleanup_t *prev; }; -#if defined(__CLEANUP_SEH) +#if defined(__PTW32_CLEANUP_SEH) /* * WIN32 SEH version of cancel cleanup. */ #define pthread_cleanup_push( _rout, _arg ) \ { \ - ptw32_cleanup_t _cleanup; \ + __ptw32_cleanup_t _cleanup; \ \ - _cleanup.routine = (ptw32_cleanup_callback_t)(_rout); \ + _cleanup.routine = (__ptw32_cleanup_callback_t)(_rout); \ _cleanup.arg = (_arg); \ __try \ { \ @@ -601,9 +603,9 @@ struct ptw32_cleanup_t } \ } -#else /* __CLEANUP_SEH */ +#else /* __PTW32_CLEANUP_SEH */ -#if defined(__CLEANUP_C) +#if defined(__PTW32_CLEANUP_C) /* * C implementation of PThreads cancel cleanup @@ -611,17 +613,17 @@ struct ptw32_cleanup_t #define pthread_cleanup_push( _rout, _arg ) \ { \ - ptw32_cleanup_t _cleanup; \ + __ptw32_cleanup_t _cleanup; \ \ - ptw32_push_cleanup( &_cleanup, (ptw32_cleanup_callback_t) (_rout), (_arg) ); \ + __ptw32_push_cleanup( &_cleanup, (__ptw32_cleanup_callback_t) (_rout), (_arg) ); \ #define pthread_cleanup_pop( _execute ) \ - (void) ptw32_pop_cleanup( _execute ); \ + (void) __ptw32_pop_cleanup( _execute ); \ } -#else /* __CLEANUP_C */ +#else /* __PTW32_CLEANUP_C */ -#if defined(__CLEANUP_CXX) +#if defined(__PTW32_CLEANUP_CXX) /* * C++ version of cancel cleanup. @@ -641,7 +643,7 @@ struct ptw32_cleanup_t * of how the code exits the scope * (i.e. such as by an exception) */ - ptw32_cleanup_callback_t cleanUpRout; + __ptw32_cleanup_callback_t cleanUpRout; void * obj; int executeIt; @@ -657,7 +659,7 @@ struct ptw32_cleanup_t } PThreadCleanup( - ptw32_cleanup_callback_t routine, + __ptw32_cleanup_callback_t routine, void * arg ) : cleanUpRout( routine ), obj( arg ), @@ -690,7 +692,7 @@ struct ptw32_cleanup_t */ #define pthread_cleanup_push( _rout, _arg ) \ { \ - PThreadCleanup cleanup((ptw32_cleanup_callback_t)(_rout), \ + PThreadCleanup cleanup((__ptw32_cleanup_callback_t)(_rout), \ (void *) (_arg) ); #define pthread_cleanup_pop( _execute ) \ @@ -701,11 +703,11 @@ struct ptw32_cleanup_t #error ERROR [__FILE__, line __LINE__]: Cleanup type undefined. -#endif /* __CLEANUP_CXX */ +#endif /* __PTW32_CLEANUP_CXX */ -#endif /* __CLEANUP_C */ +#endif /* __PTW32_CLEANUP_C */ -#endif /* __CLEANUP_SEH */ +#endif /* __PTW32_CLEANUP_SEH */ /* @@ -721,275 +723,275 @@ __PTW32_BEGIN_C_DECLS /* * PThread Attribute Functions */ -PTW32_DLLPORT int PTW32_CDECL pthread_attr_init (pthread_attr_t * attr); +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_init (pthread_attr_t * attr); -PTW32_DLLPORT int PTW32_CDECL pthread_attr_destroy (pthread_attr_t * attr); +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_destroy (pthread_attr_t * attr); -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getaffinity_np (const pthread_attr_t * attr, +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_getaffinity_np (const pthread_attr_t * attr, size_t cpusetsize, cpu_set_t * cpuset); -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getdetachstate (const pthread_attr_t * attr, +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_getdetachstate (const pthread_attr_t * attr, int *detachstate); -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getstackaddr (const pthread_attr_t * attr, +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_getstackaddr (const pthread_attr_t * attr, void **stackaddr); -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getstacksize (const pthread_attr_t * attr, +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_getstacksize (const pthread_attr_t * attr, size_t * stacksize); -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setaffinity_np (pthread_attr_t * attr, +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_setaffinity_np (pthread_attr_t * attr, size_t cpusetsize, const cpu_set_t * cpuset); -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setdetachstate (pthread_attr_t * attr, +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_setdetachstate (pthread_attr_t * attr, int detachstate); -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setstackaddr (pthread_attr_t * attr, +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_setstackaddr (pthread_attr_t * attr, void *stackaddr); -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setstacksize (pthread_attr_t * attr, +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_setstacksize (pthread_attr_t * attr, size_t stacksize); -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getschedparam (const pthread_attr_t *attr, +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_getschedparam (const pthread_attr_t *attr, struct sched_param *param); -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setschedparam (pthread_attr_t *attr, +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_setschedparam (pthread_attr_t *attr, const struct sched_param *param); -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setschedpolicy (pthread_attr_t *, +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_setschedpolicy (pthread_attr_t *, int); -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getschedpolicy (const pthread_attr_t *, +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_getschedpolicy (const pthread_attr_t *, int *); -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setinheritsched(pthread_attr_t * attr, +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_setinheritsched(pthread_attr_t * attr, int inheritsched); -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getinheritsched(const pthread_attr_t * attr, +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_getinheritsched(const pthread_attr_t * attr, int * inheritsched); -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setscope (pthread_attr_t *, +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_setscope (pthread_attr_t *, int); -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getscope (const pthread_attr_t *, +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_getscope (const pthread_attr_t *, int *); /* * PThread Functions */ -PTW32_DLLPORT int PTW32_CDECL pthread_create (pthread_t * tid, +__PTW32_DLLPORT int __PTW32_CDECL pthread_create (pthread_t * tid, const pthread_attr_t * attr, - void *(PTW32_CDECL *start) (void *), + void * (__PTW32_CDECL *start) (void *), void *arg); -PTW32_DLLPORT int PTW32_CDECL pthread_detach (pthread_t tid); +__PTW32_DLLPORT int __PTW32_CDECL pthread_detach (pthread_t tid); -PTW32_DLLPORT int PTW32_CDECL pthread_equal (pthread_t t1, +__PTW32_DLLPORT int __PTW32_CDECL pthread_equal (pthread_t t1, pthread_t t2); -PTW32_DLLPORT void PTW32_CDECL pthread_exit (void *value_ptr); +__PTW32_DLLPORT void __PTW32_CDECL pthread_exit (void *value_ptr); -PTW32_DLLPORT int PTW32_CDECL pthread_join (pthread_t thread, +__PTW32_DLLPORT int __PTW32_CDECL pthread_join (pthread_t thread, void **value_ptr); -PTW32_DLLPORT pthread_t PTW32_CDECL pthread_self (void); +__PTW32_DLLPORT pthread_t __PTW32_CDECL pthread_self (void); -PTW32_DLLPORT int PTW32_CDECL pthread_cancel (pthread_t thread); +__PTW32_DLLPORT int __PTW32_CDECL pthread_cancel (pthread_t thread); -PTW32_DLLPORT int PTW32_CDECL pthread_setcancelstate (int state, +__PTW32_DLLPORT int __PTW32_CDECL pthread_setcancelstate (int state, int *oldstate); -PTW32_DLLPORT int PTW32_CDECL pthread_setcanceltype (int type, +__PTW32_DLLPORT int __PTW32_CDECL pthread_setcanceltype (int type, int *oldtype); -PTW32_DLLPORT void PTW32_CDECL pthread_testcancel (void); +__PTW32_DLLPORT void __PTW32_CDECL pthread_testcancel (void); -PTW32_DLLPORT int PTW32_CDECL pthread_once (pthread_once_t * once_control, - void (PTW32_CDECL *init_routine) (void)); +__PTW32_DLLPORT int __PTW32_CDECL pthread_once (pthread_once_t * once_control, + void (__PTW32_CDECL *init_routine) (void)); #if __PTW32_LEVEL >= __PTW32_LEVEL_MAX -PTW32_DLLPORT ptw32_cleanup_t * PTW32_CDECL ptw32_pop_cleanup (int execute); +__PTW32_DLLPORT __ptw32_cleanup_t * __PTW32_CDECL __ptw32_pop_cleanup (int execute); -PTW32_DLLPORT void PTW32_CDECL ptw32_push_cleanup (ptw32_cleanup_t * cleanup, - ptw32_cleanup_callback_t routine, +__PTW32_DLLPORT void __PTW32_CDECL __ptw32_push_cleanup (__ptw32_cleanup_t * cleanup, + __ptw32_cleanup_callback_t routine, void *arg); #endif /* __PTW32_LEVEL >= __PTW32_LEVEL_MAX */ /* * Thread Specific Data Functions */ -PTW32_DLLPORT int PTW32_CDECL pthread_key_create (pthread_key_t * key, - void (PTW32_CDECL *destructor) (void *)); +__PTW32_DLLPORT int __PTW32_CDECL pthread_key_create (pthread_key_t * key, + void (__PTW32_CDECL *destructor) (void *)); -PTW32_DLLPORT int PTW32_CDECL pthread_key_delete (pthread_key_t key); +__PTW32_DLLPORT int __PTW32_CDECL pthread_key_delete (pthread_key_t key); -PTW32_DLLPORT int PTW32_CDECL pthread_setspecific (pthread_key_t key, +__PTW32_DLLPORT int __PTW32_CDECL pthread_setspecific (pthread_key_t key, const void *value); -PTW32_DLLPORT void * PTW32_CDECL pthread_getspecific (pthread_key_t key); +__PTW32_DLLPORT void * __PTW32_CDECL pthread_getspecific (pthread_key_t key); /* * Mutex Attribute Functions */ -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_init (pthread_mutexattr_t * attr); +__PTW32_DLLPORT int __PTW32_CDECL pthread_mutexattr_init (pthread_mutexattr_t * attr); -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_destroy (pthread_mutexattr_t * attr); +__PTW32_DLLPORT int __PTW32_CDECL pthread_mutexattr_destroy (pthread_mutexattr_t * attr); -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_getpshared (const pthread_mutexattr_t +__PTW32_DLLPORT int __PTW32_CDECL pthread_mutexattr_getpshared (const pthread_mutexattr_t * attr, int *pshared); -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_setpshared (pthread_mutexattr_t * attr, +__PTW32_DLLPORT int __PTW32_CDECL pthread_mutexattr_setpshared (pthread_mutexattr_t * attr, int pshared); -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_settype (pthread_mutexattr_t * attr, int kind); -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_gettype (const pthread_mutexattr_t * attr, int *kind); +__PTW32_DLLPORT int __PTW32_CDECL pthread_mutexattr_settype (pthread_mutexattr_t * attr, int kind); +__PTW32_DLLPORT int __PTW32_CDECL pthread_mutexattr_gettype (const pthread_mutexattr_t * attr, int *kind); -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_setrobust( +__PTW32_DLLPORT int __PTW32_CDECL pthread_mutexattr_setrobust( pthread_mutexattr_t *attr, int robust); -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_getrobust( +__PTW32_DLLPORT int __PTW32_CDECL pthread_mutexattr_getrobust( const pthread_mutexattr_t * attr, int * robust); /* * Barrier Attribute Functions */ -PTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_init (pthread_barrierattr_t * attr); +__PTW32_DLLPORT int __PTW32_CDECL pthread_barrierattr_init (pthread_barrierattr_t * attr); -PTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_destroy (pthread_barrierattr_t * attr); +__PTW32_DLLPORT int __PTW32_CDECL pthread_barrierattr_destroy (pthread_barrierattr_t * attr); -PTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_getpshared (const pthread_barrierattr_t +__PTW32_DLLPORT int __PTW32_CDECL pthread_barrierattr_getpshared (const pthread_barrierattr_t * attr, int *pshared); -PTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_setpshared (pthread_barrierattr_t * attr, +__PTW32_DLLPORT int __PTW32_CDECL pthread_barrierattr_setpshared (pthread_barrierattr_t * attr, int pshared); /* * Mutex Functions */ -PTW32_DLLPORT int PTW32_CDECL pthread_mutex_init (pthread_mutex_t * mutex, +__PTW32_DLLPORT int __PTW32_CDECL pthread_mutex_init (pthread_mutex_t * mutex, const pthread_mutexattr_t * attr); -PTW32_DLLPORT int PTW32_CDECL pthread_mutex_destroy (pthread_mutex_t * mutex); +__PTW32_DLLPORT int __PTW32_CDECL pthread_mutex_destroy (pthread_mutex_t * mutex); -PTW32_DLLPORT int PTW32_CDECL pthread_mutex_lock (pthread_mutex_t * mutex); +__PTW32_DLLPORT int __PTW32_CDECL pthread_mutex_lock (pthread_mutex_t * mutex); -PTW32_DLLPORT int PTW32_CDECL pthread_mutex_timedlock(pthread_mutex_t * mutex, +__PTW32_DLLPORT int __PTW32_CDECL pthread_mutex_timedlock(pthread_mutex_t * mutex, const struct timespec *abstime); -PTW32_DLLPORT int PTW32_CDECL pthread_mutex_trylock (pthread_mutex_t * mutex); +__PTW32_DLLPORT int __PTW32_CDECL pthread_mutex_trylock (pthread_mutex_t * mutex); -PTW32_DLLPORT int PTW32_CDECL pthread_mutex_unlock (pthread_mutex_t * mutex); +__PTW32_DLLPORT int __PTW32_CDECL pthread_mutex_unlock (pthread_mutex_t * mutex); -PTW32_DLLPORT int PTW32_CDECL pthread_mutex_consistent (pthread_mutex_t * mutex); +__PTW32_DLLPORT int __PTW32_CDECL pthread_mutex_consistent (pthread_mutex_t * mutex); /* * Spinlock Functions */ -PTW32_DLLPORT int PTW32_CDECL pthread_spin_init (pthread_spinlock_t * lock, int pshared); +__PTW32_DLLPORT int __PTW32_CDECL pthread_spin_init (pthread_spinlock_t * lock, int pshared); -PTW32_DLLPORT int PTW32_CDECL pthread_spin_destroy (pthread_spinlock_t * lock); +__PTW32_DLLPORT int __PTW32_CDECL pthread_spin_destroy (pthread_spinlock_t * lock); -PTW32_DLLPORT int PTW32_CDECL pthread_spin_lock (pthread_spinlock_t * lock); +__PTW32_DLLPORT int __PTW32_CDECL pthread_spin_lock (pthread_spinlock_t * lock); -PTW32_DLLPORT int PTW32_CDECL pthread_spin_trylock (pthread_spinlock_t * lock); +__PTW32_DLLPORT int __PTW32_CDECL pthread_spin_trylock (pthread_spinlock_t * lock); -PTW32_DLLPORT int PTW32_CDECL pthread_spin_unlock (pthread_spinlock_t * lock); +__PTW32_DLLPORT int __PTW32_CDECL pthread_spin_unlock (pthread_spinlock_t * lock); /* * Barrier Functions */ -PTW32_DLLPORT int PTW32_CDECL pthread_barrier_init (pthread_barrier_t * barrier, +__PTW32_DLLPORT int __PTW32_CDECL pthread_barrier_init (pthread_barrier_t * barrier, const pthread_barrierattr_t * attr, unsigned int count); -PTW32_DLLPORT int PTW32_CDECL pthread_barrier_destroy (pthread_barrier_t * barrier); +__PTW32_DLLPORT int __PTW32_CDECL pthread_barrier_destroy (pthread_barrier_t * barrier); -PTW32_DLLPORT int PTW32_CDECL pthread_barrier_wait (pthread_barrier_t * barrier); +__PTW32_DLLPORT int __PTW32_CDECL pthread_barrier_wait (pthread_barrier_t * barrier); /* * Condition Variable Attribute Functions */ -PTW32_DLLPORT int PTW32_CDECL pthread_condattr_init (pthread_condattr_t * attr); +__PTW32_DLLPORT int __PTW32_CDECL pthread_condattr_init (pthread_condattr_t * attr); -PTW32_DLLPORT int PTW32_CDECL pthread_condattr_destroy (pthread_condattr_t * attr); +__PTW32_DLLPORT int __PTW32_CDECL pthread_condattr_destroy (pthread_condattr_t * attr); -PTW32_DLLPORT int PTW32_CDECL pthread_condattr_getpshared (const pthread_condattr_t * attr, +__PTW32_DLLPORT int __PTW32_CDECL pthread_condattr_getpshared (const pthread_condattr_t * attr, int *pshared); -PTW32_DLLPORT int PTW32_CDECL pthread_condattr_setpshared (pthread_condattr_t * attr, +__PTW32_DLLPORT int __PTW32_CDECL pthread_condattr_setpshared (pthread_condattr_t * attr, int pshared); /* * Condition Variable Functions */ -PTW32_DLLPORT int PTW32_CDECL pthread_cond_init (pthread_cond_t * cond, +__PTW32_DLLPORT int __PTW32_CDECL pthread_cond_init (pthread_cond_t * cond, const pthread_condattr_t * attr); -PTW32_DLLPORT int PTW32_CDECL pthread_cond_destroy (pthread_cond_t * cond); +__PTW32_DLLPORT int __PTW32_CDECL pthread_cond_destroy (pthread_cond_t * cond); -PTW32_DLLPORT int PTW32_CDECL pthread_cond_wait (pthread_cond_t * cond, +__PTW32_DLLPORT int __PTW32_CDECL pthread_cond_wait (pthread_cond_t * cond, pthread_mutex_t * mutex); -PTW32_DLLPORT int PTW32_CDECL pthread_cond_timedwait (pthread_cond_t * cond, +__PTW32_DLLPORT int __PTW32_CDECL pthread_cond_timedwait (pthread_cond_t * cond, pthread_mutex_t * mutex, const struct timespec *abstime); -PTW32_DLLPORT int PTW32_CDECL pthread_cond_signal (pthread_cond_t * cond); +__PTW32_DLLPORT int __PTW32_CDECL pthread_cond_signal (pthread_cond_t * cond); -PTW32_DLLPORT int PTW32_CDECL pthread_cond_broadcast (pthread_cond_t * cond); +__PTW32_DLLPORT int __PTW32_CDECL pthread_cond_broadcast (pthread_cond_t * cond); /* * Scheduling */ -PTW32_DLLPORT int PTW32_CDECL pthread_setschedparam (pthread_t thread, +__PTW32_DLLPORT int __PTW32_CDECL pthread_setschedparam (pthread_t thread, int policy, const struct sched_param *param); -PTW32_DLLPORT int PTW32_CDECL pthread_getschedparam (pthread_t thread, +__PTW32_DLLPORT int __PTW32_CDECL pthread_getschedparam (pthread_t thread, int *policy, struct sched_param *param); -PTW32_DLLPORT int PTW32_CDECL pthread_setconcurrency (int); +__PTW32_DLLPORT int __PTW32_CDECL pthread_setconcurrency (int); -PTW32_DLLPORT int PTW32_CDECL pthread_getconcurrency (void); +__PTW32_DLLPORT int __PTW32_CDECL pthread_getconcurrency (void); /* * Read-Write Lock Functions */ -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_init(pthread_rwlock_t *lock, +__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlock_init(pthread_rwlock_t *lock, const pthread_rwlockattr_t *attr); -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_destroy(pthread_rwlock_t *lock); +__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlock_destroy(pthread_rwlock_t *lock); -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_tryrdlock(pthread_rwlock_t *); +__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlock_tryrdlock(pthread_rwlock_t *); -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_trywrlock(pthread_rwlock_t *); +__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlock_trywrlock(pthread_rwlock_t *); -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_rdlock(pthread_rwlock_t *lock); +__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlock_rdlock(pthread_rwlock_t *lock); -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_timedrdlock(pthread_rwlock_t *lock, +__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlock_timedrdlock(pthread_rwlock_t *lock, const struct timespec *abstime); -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_wrlock(pthread_rwlock_t *lock); +__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlock_wrlock(pthread_rwlock_t *lock); -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_timedwrlock(pthread_rwlock_t *lock, +__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlock_timedwrlock(pthread_rwlock_t *lock, const struct timespec *abstime); -PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_unlock(pthread_rwlock_t *lock); +__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlock_unlock(pthread_rwlock_t *lock); -PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_init (pthread_rwlockattr_t * attr); +__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlockattr_init (pthread_rwlockattr_t * attr); -PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_destroy (pthread_rwlockattr_t * attr); +__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlockattr_destroy (pthread_rwlockattr_t * attr); -PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * attr, +__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * attr, int *pshared); -PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_setpshared (pthread_rwlockattr_t * attr, +__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlockattr_setpshared (pthread_rwlockattr_t * attr, int pshared); #if __PTW32_LEVEL >= __PTW32_LEVEL_MAX - 1 @@ -998,7 +1000,7 @@ PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_setpshared (pthread_rwlockattr_ * Signal Functions. Should be defined in but MSVC and MinGW32 * already have signal.h that don't define these. */ -PTW32_DLLPORT int PTW32_CDECL pthread_kill(pthread_t thread, int sig); +__PTW32_DLLPORT int __PTW32_CDECL pthread_kill(pthread_t thread, int sig); /* * Non-portable functions @@ -1007,55 +1009,55 @@ PTW32_DLLPORT int PTW32_CDECL pthread_kill(pthread_t thread, int sig); /* * Compatibility with Linux. */ -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, +__PTW32_DLLPORT int __PTW32_CDECL pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, int kind); -PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, +__PTW32_DLLPORT int __PTW32_CDECL pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, int *kind); -PTW32_DLLPORT int PTW32_CDECL pthread_timedjoin_np(pthread_t thread, +__PTW32_DLLPORT int __PTW32_CDECL pthread_timedjoin_np(pthread_t thread, void **value_ptr, const struct timespec *abstime); -PTW32_DLLPORT int PTW32_CDECL pthread_tryjoin_np(pthread_t thread, +__PTW32_DLLPORT int __PTW32_CDECL pthread_tryjoin_np(pthread_t thread, void **value_ptr); -PTW32_DLLPORT int PTW32_CDECL pthread_setaffinity_np(pthread_t thread, +__PTW32_DLLPORT int __PTW32_CDECL pthread_setaffinity_np(pthread_t thread, size_t cpusetsize, const cpu_set_t *cpuset); -PTW32_DLLPORT int PTW32_CDECL pthread_getaffinity_np(pthread_t thread, +__PTW32_DLLPORT int __PTW32_CDECL pthread_getaffinity_np(pthread_t thread, size_t cpusetsize, cpu_set_t *cpuset); /* * Possibly supported by other POSIX threads implementations */ -PTW32_DLLPORT int PTW32_CDECL pthread_delay_np (struct timespec * interval); -PTW32_DLLPORT int PTW32_CDECL pthread_num_processors_np(void); -PTW32_DLLPORT unsigned __int64 PTW32_CDECL pthread_getunique_np(pthread_t thread); +__PTW32_DLLPORT int __PTW32_CDECL pthread_delay_np (struct timespec * interval); +__PTW32_DLLPORT int __PTW32_CDECL pthread_num_processors_np(void); +__PTW32_DLLPORT unsigned __int64 __PTW32_CDECL pthread_getunique_np(pthread_t thread); /* * Useful if an application wants to statically link * the lib rather than load the DLL at run-time. */ -PTW32_DLLPORT int PTW32_CDECL pthread_win32_process_attach_np(void); -PTW32_DLLPORT int PTW32_CDECL pthread_win32_process_detach_np(void); -PTW32_DLLPORT int PTW32_CDECL pthread_win32_thread_attach_np(void); -PTW32_DLLPORT int PTW32_CDECL pthread_win32_thread_detach_np(void); +__PTW32_DLLPORT int __PTW32_CDECL pthread_win32_process_attach_np(void); +__PTW32_DLLPORT int __PTW32_CDECL pthread_win32_process_detach_np(void); +__PTW32_DLLPORT int __PTW32_CDECL pthread_win32_thread_attach_np(void); +__PTW32_DLLPORT int __PTW32_CDECL pthread_win32_thread_detach_np(void); /* * Returns the first parameter "abstime" modified to represent the current system time. * If "relative" is not NULL it represents an interval to add to "abstime". */ -PTW32_DLLPORT struct timespec * PTW32_CDECL pthread_win32_getabstime_np( +__PTW32_DLLPORT struct timespec * __PTW32_CDECL pthread_win32_getabstime_np( struct timespec * abstime, const struct timespec * relative); /* * Features that are auto-detected at load/run time. */ -PTW32_DLLPORT int PTW32_CDECL pthread_win32_test_features_np(int); -enum ptw32_features +__PTW32_DLLPORT int __PTW32_CDECL pthread_win32_test_features_np(int); +enum __ptw32_features { - PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE = 0x0001, /* System provides it. */ - PTW32_ALERTABLE_ASYNC_CANCEL = 0x0002 /* Can cancel blocked threads. */ + __PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE = 0x0001, /* System provides it. */ + __PTW32_ALERTABLE_ASYNC_CANCEL = 0x0002 /* Can cancel blocked threads. */ }; /* @@ -1066,7 +1068,7 @@ enum ptw32_features * WM_TIMECHANGE message. It can be passed directly to * pthread_create() as a new thread if desired. */ -PTW32_DLLPORT void * PTW32_CDECL pthread_timechange_handler_np(void *); +__PTW32_DLLPORT void * __PTW32_CDECL pthread_timechange_handler_np(void *); #endif /* __PTW32_LEVEL >= __PTW32_LEVEL_MAX - 1 */ @@ -1075,27 +1077,27 @@ PTW32_DLLPORT void * PTW32_CDECL pthread_timechange_handler_np(void *); /* * Returns the Win32 HANDLE for the POSIX thread. */ -PTW32_DLLPORT void * PTW32_CDECL pthread_getw32threadhandle_np(pthread_t thread); +__PTW32_DLLPORT void * __PTW32_CDECL pthread_getw32threadhandle_np(pthread_t thread); /* * Returns the win32 thread ID for POSIX thread. */ -PTW32_DLLPORT unsigned long PTW32_CDECL pthread_getw32threadid_np (pthread_t thread); +__PTW32_DLLPORT unsigned long __PTW32_CDECL pthread_getw32threadid_np (pthread_t thread); /* * Sets the POSIX thread name. If _MSC_VER is defined the name should be displayed by * the MSVS debugger. */ -#if defined(PTW32_COMPATIBILITY_BSD) || defined(PTW32_COMPATIBILITY_TRU64) +#if defined (__PTW32_COMPATIBILITY_BSD) || defined (__PTW32_COMPATIBILITY_TRU64) #define PTHREAD_MAX_NAMELEN_NP 16 -PTW32_DLLPORT int PTW32_CDECL pthread_setname_np (pthread_t thr, const char * name, void * arg); -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setname_np (pthread_attr_t * attr, const char * name, void * arg); +__PTW32_DLLPORT int __PTW32_CDECL pthread_setname_np (pthread_t thr, const char * name, void * arg); +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_setname_np (pthread_attr_t * attr, const char * name, void * arg); #else -PTW32_DLLPORT int PTW32_CDECL pthread_setname_np (pthread_t thr, const char * name); -PTW32_DLLPORT int PTW32_CDECL pthread_attr_setname_np (pthread_attr_t * attr, const char * name); +__PTW32_DLLPORT int __PTW32_CDECL pthread_setname_np (pthread_t thr, const char * name); +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_setname_np (pthread_attr_t * attr, const char * name); #endif -PTW32_DLLPORT int PTW32_CDECL pthread_getname_np (pthread_t thr, char * name, int len); -PTW32_DLLPORT int PTW32_CDECL pthread_attr_getname_np (pthread_attr_t * attr, char * name, int len); +__PTW32_DLLPORT int __PTW32_CDECL pthread_getname_np (pthread_t thr, char * name, int len); +__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_getname_np (pthread_attr_t * attr, char * name, int len); /* @@ -1113,8 +1115,8 @@ PTW32_DLLPORT int PTW32_CDECL pthread_attr_getname_np (pthread_attr_t * attr, ch * argument to TimedWait is simply passed to * WaitForMultipleObjects. */ -PTW32_DLLPORT int PTW32_CDECL pthreadCancelableWait (void *waitHandle); -PTW32_DLLPORT int PTW32_CDECL pthreadCancelableTimedWait (void *waitHandle, +__PTW32_DLLPORT int __PTW32_CDECL pthreadCancelableWait (void *waitHandle); +__PTW32_DLLPORT int __PTW32_CDECL pthreadCancelableTimedWait (void *waitHandle, unsigned long timeout); #endif /* __PTW32_LEVEL >= __PTW32_LEVEL_MAX */ @@ -1144,7 +1146,7 @@ PTW32_DLLPORT int PTW32_CDECL pthreadCancelableTimedWait (void *waitHandle, * * http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/b4500c0d-1b69-40c7-9ef5-08da1025b5bf * - * When pthreads-win32 is built with PTW32_USES_SEPARATE_CRT + * When pthreads-win32 is built with __PTW32_USES_SEPARATE_CRT * defined, the following features are enabled: * * (1) In addition to setting the errno variable when errors @@ -1162,13 +1164,13 @@ PTW32_DLLPORT int PTW32_CDECL pthreadCancelableTimedWait (void *waitHandle, * * Note: "_DLL" implies the /MD compiler flag. */ -#if defined(_MSC_VER) && !defined(_DLL) && !defined(PTW32_STATIC_LIB) -# define PTW32_USES_SEPARATE_CRT +#if defined(_MSC_VER) && !defined(_DLL) && !defined (__PTW32_STATIC_LIB) +# define __PTW32_USES_SEPARATE_CRT #endif -#if defined(PTW32_USES_SEPARATE_CRT) && (defined(__CLEANUP_CXX) || defined(__CLEANUP_SEH)) -typedef void (*ptw32_terminate_handler)(); -PTW32_DLLPORT ptw32_terminate_handler PTW32_CDECL pthread_win32_set_terminate_np(ptw32_terminate_handler termFunction); +#if defined (__PTW32_USES_SEPARATE_CRT) && (defined(__PTW32_CLEANUP_CXX) || defined(__PTW32_CLEANUP_SEH)) +typedef void (*__ptw32_terminate_handler)(); +__PTW32_DLLPORT __ptw32_terminate_handler __PTW32_CDECL pthread_win32_set_terminate_np(__ptw32_terminate_handler termFunction); #endif /* @@ -1184,9 +1186,9 @@ PTW32_DLLPORT ptw32_terminate_handler PTW32_CDECL pthread_win32_set_terminate_np /* * Internal exceptions */ -class ptw32_exception {}; -class ptw32_exception_cancel : public ptw32_exception {}; -class ptw32_exception_exit : public ptw32_exception {}; +class __ptw32_exception {}; +class __ptw32_exception_cancel : public __ptw32_exception {}; +class __ptw32_exception_exit : public __ptw32_exception {}; #endif @@ -1196,25 +1198,25 @@ class ptw32_exception_exit : public ptw32_exception {}; /* * Get internal SEH tag */ -PTW32_DLLPORT unsigned long PTW32_CDECL ptw32_get_exception_services_code(void); +__PTW32_DLLPORT unsigned long __PTW32_CDECL __ptw32_get_exception_services_code(void); #endif /* __PTW32_LEVEL >= __PTW32_LEVEL_MAX */ -#if !defined(PTW32_BUILD) +#if !defined (__PTW32_BUILD) -#if defined(__CLEANUP_SEH) +#if defined(__PTW32_CLEANUP_SEH) /* * Redefine the SEH __except keyword to ensure that applications * propagate our internal exceptions up to the library's internal handlers. */ #define __except( E ) \ - __except( ( GetExceptionCode() == ptw32_get_exception_services_code() ) \ + __except( ( GetExceptionCode() == __ptw32_get_exception_services_code() ) \ ? EXCEPTION_CONTINUE_SEARCH : ( E ) ) -#endif /* __CLEANUP_SEH */ +#endif /* __PTW32_CLEANUP_SEH */ -#if defined(__CLEANUP_CXX) +#if defined(__PTW32_CLEANUP_CXX) /* * Redefine the C++ catch keyword to ensure that applications @@ -1222,21 +1224,21 @@ PTW32_DLLPORT unsigned long PTW32_CDECL ptw32_get_exception_services_code(void); */ #if defined(_MSC_VER) /* - * WARNING: Replace any 'catch( ... )' with 'PtW32CatchAll' + * WARNING: Replace any 'catch( ... )' with '__PtW32CatchAll' * if you want Pthread-Win32 cancellation and pthread_exit to work. */ -#if !defined(PtW32NoCatchWarn) +#if !defined(__PtW32NoCatchWarn) -#pragma message("Specify \"/DPtW32NoCatchWarn\" compiler flag to skip this message.") +#pragma message("Specify \"/D__PtW32NoCatchWarn\" compiler flag to skip this message.") #pragma message("------------------------------------------------------------------") #pragma message("When compiling applications with MSVC++ and C++ exception handling:") #pragma message(" Replace any 'catch( ... )' in routines called from POSIX threads") -#pragma message(" with 'PtW32CatchAll' or 'CATCHALL' if you want POSIX thread") +#pragma message(" with '__PtW32CatchAll' or 'CATCHALL' if you want POSIX thread") #pragma message(" cancellation and pthread_exit to work. For example:") #pragma message("") -#pragma message(" #if defined(PtW32CatchAll)") -#pragma message(" PtW32CatchAll") +#pragma message(" #if defined(__PtW32CatchAll)") +#pragma message(" __PtW32CatchAll") #pragma message(" #else") #pragma message(" catch(...)") #pragma message(" #endif") @@ -1247,21 +1249,21 @@ PTW32_DLLPORT unsigned long PTW32_CDECL ptw32_get_exception_services_code(void); #endif -#define PtW32CatchAll \ - catch( ptw32_exception & ) { throw; } \ +#define __PtW32CatchAll \ + catch( __ptw32_exception & ) { throw; } \ catch( ... ) #else /* _MSC_VER */ #define catch( E ) \ - catch( ptw32_exception & ) { throw; } \ + catch( __ptw32_exception & ) { throw; } \ catch( E ) #endif /* _MSC_VER */ -#endif /* __CLEANUP_CXX */ +#endif /* __PTW32_CLEANUP_CXX */ -#endif /* ! PTW32_BUILD */ +#endif /* ! __PTW32_BUILD */ __PTW32_END_C_DECLS diff --git a/pthread_attr_destroy.c b/pthread_attr_destroy.c index 7bb0e320..44373c8f 100644 --- a/pthread_attr_destroy.c +++ b/pthread_attr_destroy.c @@ -68,7 +68,7 @@ pthread_attr_destroy (pthread_attr_t * attr) * ------------------------------------------------------ */ { - if (ptw32_is_attr (attr) != 0) + if (__ptw32_is_attr (attr) != 0) { return EINVAL; } diff --git a/pthread_attr_getaffinity_np.c b/pthread_attr_getaffinity_np.c index 80e05af7..ae121d76 100644 --- a/pthread_attr_getaffinity_np.c +++ b/pthread_attr_getaffinity_np.c @@ -46,7 +46,7 @@ int pthread_attr_getaffinity_np (const pthread_attr_t * attr, size_t cpusetsize, cpu_set_t * cpuset) { - if (ptw32_is_attr (attr) != 0 || cpuset == NULL) + if (__ptw32_is_attr (attr) != 0 || cpuset == NULL) { return EINVAL; } diff --git a/pthread_attr_getdetachstate.c b/pthread_attr_getdetachstate.c index 93d61335..2584848b 100644 --- a/pthread_attr_getdetachstate.c +++ b/pthread_attr_getdetachstate.c @@ -81,7 +81,7 @@ pthread_attr_getdetachstate (const pthread_attr_t * attr, int *detachstate) * ------------------------------------------------------ */ { - if (ptw32_is_attr (attr) != 0 || detachstate == NULL) + if (__ptw32_is_attr (attr) != 0 || detachstate == NULL) { return EINVAL; } diff --git a/pthread_attr_getinheritsched.c b/pthread_attr_getinheritsched.c index 657624cc..443c80fd 100644 --- a/pthread_attr_getinheritsched.c +++ b/pthread_attr_getinheritsched.c @@ -46,7 +46,7 @@ int pthread_attr_getinheritsched (const pthread_attr_t * attr, int *inheritsched) { - if (ptw32_is_attr (attr) != 0 || inheritsched == NULL) + if (__ptw32_is_attr (attr) != 0 || inheritsched == NULL) { return EINVAL; } diff --git a/pthread_attr_getschedparam.c b/pthread_attr_getschedparam.c index b7be1cba..7251acf8 100644 --- a/pthread_attr_getschedparam.c +++ b/pthread_attr_getschedparam.c @@ -47,7 +47,7 @@ int pthread_attr_getschedparam (const pthread_attr_t * attr, struct sched_param *param) { - if (ptw32_is_attr (attr) != 0 || param == NULL) + if (__ptw32_is_attr (attr) != 0 || param == NULL) { return EINVAL; } diff --git a/pthread_attr_getschedpolicy.c b/pthread_attr_getschedpolicy.c index f27f5ee3..c08e74ee 100644 --- a/pthread_attr_getschedpolicy.c +++ b/pthread_attr_getschedpolicy.c @@ -46,7 +46,7 @@ int pthread_attr_getschedpolicy (const pthread_attr_t * attr, int *policy) { - if (ptw32_is_attr (attr) != 0 || policy == NULL) + if (__ptw32_is_attr (attr) != 0 || policy == NULL) { return EINVAL; } diff --git a/pthread_attr_getstackaddr.c b/pthread_attr_getstackaddr.c index 6e4c73ef..90fd0700 100644 --- a/pthread_attr_getstackaddr.c +++ b/pthread_attr_getstackaddr.c @@ -86,7 +86,7 @@ pthread_attr_getstackaddr (const pthread_attr_t * attr, void **stackaddr) { #if defined( _POSIX_THREAD_ATTR_STACKADDR ) && _POSIX_THREAD_ATTR_STACKADDR != -1 - if (ptw32_is_attr (attr) != 0) + if (__ptw32_is_attr (attr) != 0) { return EINVAL; } diff --git a/pthread_attr_getstacksize.c b/pthread_attr_getstacksize.c index 827a37a3..1735b419 100644 --- a/pthread_attr_getstacksize.c +++ b/pthread_attr_getstacksize.c @@ -87,7 +87,7 @@ pthread_attr_getstacksize (const pthread_attr_t * attr, size_t * stacksize) { #if defined(_POSIX_THREAD_ATTR_STACKSIZE) && _POSIX_THREAD_ATTR_STACKSIZE != -1 - if (ptw32_is_attr (attr) != 0) + if (__ptw32_is_attr (attr) != 0) { return EINVAL; } diff --git a/pthread_attr_init.c b/pthread_attr_init.c index 1cbe2e9c..9e8c4d4a 100644 --- a/pthread_attr_init.c +++ b/pthread_attr_init.c @@ -118,7 +118,7 @@ pthread_attr_init (pthread_attr_t * attr) attr_result->cpuset = ((_sched_cpu_set_vector_*)&cpuset)->_cpuset; attr_result->thrname = NULL; - attr_result->valid = PTW32_ATTR_VALID; + attr_result->valid = __PTW32_ATTR_VALID; *attr = attr_result; diff --git a/pthread_attr_setaffinity_np.c b/pthread_attr_setaffinity_np.c index 53f68fcc..a1091907 100644 --- a/pthread_attr_setaffinity_np.c +++ b/pthread_attr_setaffinity_np.c @@ -46,7 +46,7 @@ int pthread_attr_setaffinity_np (pthread_attr_t * attr, size_t cpusetsize, const cpu_set_t * cpuset) { - if (ptw32_is_attr (attr) != 0 || cpuset == NULL) + if (__ptw32_is_attr (attr) != 0 || cpuset == NULL) { return EINVAL; } diff --git a/pthread_attr_setdetachstate.c b/pthread_attr_setdetachstate.c index 02dd88bf..2f7c5e22 100644 --- a/pthread_attr_setdetachstate.c +++ b/pthread_attr_setdetachstate.c @@ -80,7 +80,7 @@ pthread_attr_setdetachstate (pthread_attr_t * attr, int detachstate) * ------------------------------------------------------ */ { - if (ptw32_is_attr (attr) != 0) + if (__ptw32_is_attr (attr) != 0) { return EINVAL; } diff --git a/pthread_attr_setinheritsched.c b/pthread_attr_setinheritsched.c index d551190c..db67f6d6 100644 --- a/pthread_attr_setinheritsched.c +++ b/pthread_attr_setinheritsched.c @@ -46,7 +46,7 @@ int pthread_attr_setinheritsched (pthread_attr_t * attr, int inheritsched) { - if (ptw32_is_attr (attr) != 0) + if (__ptw32_is_attr (attr) != 0) { return EINVAL; } diff --git a/pthread_attr_setname_np.c b/pthread_attr_setname_np.c index 78114428..f34b8075 100644 --- a/pthread_attr_setname_np.c +++ b/pthread_attr_setname_np.c @@ -41,7 +41,7 @@ #include "pthread.h" #include "implement.h" -#if defined(PTW32_COMPATIBILITY_BSD) || defined(PTW32_COMPATIBILITY_TRU64) +#if defined (__PTW32_COMPATIBILITY_BSD) || defined (__PTW32_COMPATIBILITY_TRU64) int pthread_attr_setname_np(pthread_attr_t * attr, const char *name, void *arg) { diff --git a/pthread_attr_setschedparam.c b/pthread_attr_setschedparam.c index 3505c9a5..1472f2df 100644 --- a/pthread_attr_setschedparam.c +++ b/pthread_attr_setschedparam.c @@ -49,7 +49,7 @@ pthread_attr_setschedparam (pthread_attr_t * attr, { int priority; - if (ptw32_is_attr (attr) != 0 || param == NULL) + if (__ptw32_is_attr (attr) != 0 || param == NULL) { return EINVAL; } diff --git a/pthread_attr_setschedpolicy.c b/pthread_attr_setschedpolicy.c index 5fe0c0c7..331be677 100644 --- a/pthread_attr_setschedpolicy.c +++ b/pthread_attr_setschedpolicy.c @@ -46,7 +46,7 @@ int pthread_attr_setschedpolicy (pthread_attr_t * attr, int policy) { - if (ptw32_is_attr (attr) != 0) + if (__ptw32_is_attr (attr) != 0) { return EINVAL; } diff --git a/pthread_attr_setstackaddr.c b/pthread_attr_setstackaddr.c index 5228d588..2a1b90e5 100644 --- a/pthread_attr_setstackaddr.c +++ b/pthread_attr_setstackaddr.c @@ -86,7 +86,7 @@ pthread_attr_setstackaddr (pthread_attr_t * attr, void *stackaddr) { #if defined( _POSIX_THREAD_ATTR_STACKADDR ) && _POSIX_THREAD_ATTR_STACKADDR != -1 - if (ptw32_is_attr (attr) != 0) + if (__ptw32_is_attr (attr) != 0) { return EINVAL; } diff --git a/pthread_attr_setstacksize.c b/pthread_attr_setstacksize.c index 728a634f..8143db50 100644 --- a/pthread_attr_setstacksize.c +++ b/pthread_attr_setstacksize.c @@ -97,7 +97,7 @@ pthread_attr_setstacksize (pthread_attr_t * attr, size_t stacksize) #endif - if (ptw32_is_attr (attr) != 0) + if (__ptw32_is_attr (attr) != 0) { return EINVAL; } diff --git a/pthread_barrier_destroy.c b/pthread_barrier_destroy.c index 61cd0cda..8f59c49f 100644 --- a/pthread_barrier_destroy.c +++ b/pthread_barrier_destroy.c @@ -47,14 +47,14 @@ pthread_barrier_destroy (pthread_barrier_t * barrier) { int result = 0; pthread_barrier_t b; - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; - if (barrier == NULL || *barrier == (pthread_barrier_t) PTW32_OBJECT_INVALID) + if (barrier == NULL || *barrier == (pthread_barrier_t) __PTW32_OBJECT_INVALID) { return EINVAL; } - if (0 != ptw32_mcs_lock_try_acquire(&(*barrier)->lock, &node)) + if (0 != __ptw32_mcs_lock_try_acquire(&(*barrier)->lock, &node)) { return EBUSY; } @@ -69,7 +69,7 @@ pthread_barrier_destroy (pthread_barrier_t * barrier) { if (0 == (result = sem_destroy (&(b->semBarrierBreeched)))) { - *barrier = (pthread_barrier_t) PTW32_OBJECT_INVALID; + *barrier = (pthread_barrier_t) __PTW32_OBJECT_INVALID; /* * Release the lock before freeing b. * @@ -80,7 +80,7 @@ pthread_barrier_destroy (pthread_barrier_t * barrier) * pthread_barrier_t_ to an instance. This is a change to the ABI * and will require a major version number increment. */ - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); (void) free (b); return 0; } @@ -103,6 +103,6 @@ pthread_barrier_destroy (pthread_barrier_t * barrier) } } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); return (result); } diff --git a/pthread_barrier_wait.c b/pthread_barrier_wait.c index 9d573afe..acbdc260 100644 --- a/pthread_barrier_wait.c +++ b/pthread_barrier_wait.c @@ -49,14 +49,14 @@ pthread_barrier_wait (pthread_barrier_t * barrier) int result; pthread_barrier_t b; - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; - if (barrier == NULL || *barrier == (pthread_barrier_t) PTW32_OBJECT_INVALID) + if (barrier == NULL || *barrier == (pthread_barrier_t) __PTW32_OBJECT_INVALID) { return EINVAL; } - ptw32_mcs_lock_acquire(&(*barrier)->lock, &node); + __ptw32_mcs_lock_acquire(&(*barrier)->lock, &node); b = *barrier; if (--b->nCurrentBarrierHeight == 0) @@ -66,7 +66,7 @@ pthread_barrier_wait (pthread_barrier_t * barrier) * Move our MCS local node to the global scope barrier handle so that the * last thread out (not necessarily us) can release the lock. */ - ptw32_mcs_node_transfer(&b->proxynode, &node); + __ptw32_mcs_node_transfer(&b->proxynode, &node); /* * Any threads that have not quite entered sem_wait below when the @@ -79,7 +79,7 @@ pthread_barrier_wait (pthread_barrier_t * barrier) } else { - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); /* * Use the non-cancelable version of sem_wait(). * @@ -89,16 +89,16 @@ pthread_barrier_wait (pthread_barrier_t * barrier) * If pthread_barrier_destroy is called at that moment then the * barrier will be destroyed along with the semas. */ - result = ptw32_semwait (&(b->semBarrierBreeched)); + result = __ptw32_semwait (&(b->semBarrierBreeched)); } - if ((PTW32_INTERLOCKED_LONG)PTW32_INTERLOCKED_INCREMENT_LONG((PTW32_INTERLOCKED_LONGPTR)&b->nCurrentBarrierHeight) - == (PTW32_INTERLOCKED_LONG)b->nInitialBarrierHeight) + if ((__PTW32_INTERLOCKED_LONG)__PTW32_INTERLOCKED_INCREMENT_LONG ((__PTW32_INTERLOCKED_LONGPTR)&b->nCurrentBarrierHeight) + == (__PTW32_INTERLOCKED_LONG)b->nInitialBarrierHeight) { /* * We are the last thread to cross this barrier */ - ptw32_mcs_lock_release(&b->proxynode); + __ptw32_mcs_lock_release(&b->proxynode); if (0 == result) { result = PTHREAD_BARRIER_SERIAL_THREAD; diff --git a/pthread_cancel.c b/pthread_cancel.c index 3c453c49..fb4b1b7f 100644 --- a/pthread_cancel.c +++ b/pthread_cancel.c @@ -44,34 +44,34 @@ #include "context.h" static void -ptw32_cancel_self (void) +__ptw32_cancel_self (void) { - ptw32_throw (PTW32_EPS_CANCEL); + __ptw32_throw (__PTW32_EPS_CANCEL); /* Never reached */ } static void CALLBACK -ptw32_cancel_callback (ULONG_PTR unused) +__ptw32_cancel_callback (ULONG_PTR unused) { - ptw32_throw (PTW32_EPS_CANCEL); + __ptw32_throw (__PTW32_EPS_CANCEL); /* Never reached */ } /* - * ptw32_Registercancellation() - + * __ptw32_Registercancellation() - * Must have args of same type as QueueUserAPCEx because this function * is a substitute for QueueUserAPCEx if it's not available. */ DWORD -ptw32_Registercancellation (PAPCFUNC unused1, HANDLE threadH, DWORD unused2) +__ptw32_Registercancellation (PAPCFUNC unused1, HANDLE threadH, DWORD unused2) { CONTEXT context; context.ContextFlags = CONTEXT_CONTROL; GetThreadContext (threadH, &context); - PTW32_PROGCTR (context) = (DWORD_PTR) ptw32_cancel_self; + __PTW32_PROGCTR (context) = (DWORD_PTR) __ptw32_cancel_self; SetThreadContext (threadH, &context); return 0; } @@ -103,8 +103,8 @@ pthread_cancel (pthread_t thread) int result; int cancel_self; pthread_t self; - ptw32_thread_t * tp; - ptw32_mcs_local_node_t stateLock; + __ptw32_thread_t * tp; + __ptw32_mcs_local_node_t stateLock; /* * Validate the thread id. This method works for pthreads-win32 because @@ -130,12 +130,12 @@ pthread_cancel (pthread_t thread) */ cancel_self = pthread_equal (thread, self); - tp = (ptw32_thread_t *) thread.p; + tp = (__ptw32_thread_t *) thread.p; /* * Lock for async-cancel safety. */ - ptw32_mcs_lock_acquire (&tp->stateLock, &stateLock); + __ptw32_mcs_lock_acquire (&tp->stateLock, &stateLock); if (tp->cancelType == PTHREAD_CANCEL_ASYNCHRONOUS && tp->cancelState == PTHREAD_CANCEL_ENABLE @@ -146,8 +146,8 @@ pthread_cancel (pthread_t thread) tp->state = PThreadStateCanceling; tp->cancelState = PTHREAD_CANCEL_DISABLE; - ptw32_mcs_lock_release (&stateLock); - ptw32_throw (PTW32_EPS_CANCEL); + __ptw32_mcs_lock_release (&stateLock); + __ptw32_throw (__PTW32_EPS_CANCEL); /* Never reached */ } @@ -164,11 +164,11 @@ pthread_cancel (pthread_t thread) /* * If alertdrv and QueueUserAPCEx is available then the following * will result in a call to QueueUserAPCEx with the args given, otherwise - * this will result in a call to ptw32_Registercancellation and only + * this will result in a call to __ptw32_Registercancellation and only * the threadH arg will be used. */ - ptw32_register_cancellation ((PAPCFUNC)ptw32_cancel_callback, threadH, 0); - ptw32_mcs_lock_release (&stateLock); + __ptw32_register_cancellation ((PAPCFUNC)__ptw32_cancel_callback, threadH, 0); + __ptw32_mcs_lock_release (&stateLock); ResumeThread (threadH); } } @@ -191,7 +191,7 @@ pthread_cancel (pthread_t thread) result = ESRCH; } - ptw32_mcs_lock_release (&stateLock); + __ptw32_mcs_lock_release (&stateLock); } return (result); diff --git a/pthread_cond_destroy.c b/pthread_cond_destroy.c index 12e76330..803ee61f 100644 --- a/pthread_cond_destroy.c +++ b/pthread_cond_destroy.c @@ -131,8 +131,8 @@ pthread_cond_destroy (pthread_cond_t * cond) if (*cond != PTHREAD_COND_INITIALIZER) { - ptw32_mcs_local_node_t node; - ptw32_mcs_lock_acquire(&ptw32_cond_list_lock, &node); + __ptw32_mcs_local_node_t node; + __ptw32_mcs_lock_acquire(&__ptw32_cond_list_lock, &node); cv = *cond; @@ -141,9 +141,9 @@ pthread_cond_destroy (pthread_cond_t * cond) * all already signaled waiters to let them retract their * waiter status - SEE NOTE 1 ABOVE!!! */ - if (ptw32_semwait (&(cv->semBlockLock)) != 0) /* Non-cancelable */ + if (__ptw32_semwait (&(cv->semBlockLock)) != 0) /* Non-cancelable */ { - result = PTW32_GET_ERRNO(); + result = __PTW32_GET_ERRNO(); } else { @@ -160,7 +160,7 @@ pthread_cond_destroy (pthread_cond_t * cond) if (result != 0) { - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); return result; } @@ -171,7 +171,7 @@ pthread_cond_destroy (pthread_cond_t * cond) { if (sem_post (&(cv->semBlockLock)) != 0) { - result = PTW32_GET_ERRNO(); + result = __PTW32_GET_ERRNO(); } result1 = pthread_mutex_unlock (&(cv->mtxUnblockLock)); result2 = EBUSY; @@ -185,11 +185,11 @@ pthread_cond_destroy (pthread_cond_t * cond) if (sem_destroy (&(cv->semBlockLock)) != 0) { - result = PTW32_GET_ERRNO(); + result = __PTW32_GET_ERRNO(); } if (sem_destroy (&(cv->semBlockQueue)) != 0) { - result1 = PTW32_GET_ERRNO(); + result1 = __PTW32_GET_ERRNO(); } if ((result2 = pthread_mutex_unlock (&(cv->mtxUnblockLock))) == 0) { @@ -198,18 +198,18 @@ pthread_cond_destroy (pthread_cond_t * cond) /* Unlink the CV from the list */ - if (ptw32_cond_list_head == cv) + if (__ptw32_cond_list_head == cv) { - ptw32_cond_list_head = cv->next; + __ptw32_cond_list_head = cv->next; } else { cv->prev->next = cv->next; } - if (ptw32_cond_list_tail == cv) + if (__ptw32_cond_list_tail == cv) { - ptw32_cond_list_tail = cv->prev; + __ptw32_cond_list_tail = cv->prev; } else { @@ -219,15 +219,15 @@ pthread_cond_destroy (pthread_cond_t * cond) (void) free (cv); } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); } else { - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; /* - * See notes in ptw32_cond_check_need_init() above also. + * See notes in __ptw32_cond_check_need_init() above also. */ - ptw32_mcs_lock_acquire(&ptw32_cond_test_init_lock, &node); + __ptw32_mcs_lock_acquire(&__ptw32_cond_test_init_lock, &node); /* * Check again. @@ -251,7 +251,7 @@ pthread_cond_destroy (pthread_cond_t * cond) result = EBUSY; } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); } return ((result != 0) ? result : ((result1 != 0) ? result1 : result2)); diff --git a/pthread_cond_init.c b/pthread_cond_init.c index b9379a37..3522be1c 100644 --- a/pthread_cond_init.c +++ b/pthread_cond_init.c @@ -106,13 +106,13 @@ pthread_cond_init (pthread_cond_t * cond, const pthread_condattr_t * attr) if (sem_init (&(cv->semBlockLock), 0, 1) != 0) { - result = PTW32_GET_ERRNO(); + result = __PTW32_GET_ERRNO(); goto FAIL0; } if (sem_init (&(cv->semBlockQueue), 0, 0) != 0) { - result = PTW32_GET_ERRNO(); + result = __PTW32_GET_ERRNO(); goto FAIL1; } @@ -143,26 +143,26 @@ pthread_cond_init (pthread_cond_t * cond, const pthread_condattr_t * attr) DONE: if (0 == result) { - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; - ptw32_mcs_lock_acquire(&ptw32_cond_list_lock, &node); + __ptw32_mcs_lock_acquire(&__ptw32_cond_list_lock, &node); cv->next = NULL; - cv->prev = ptw32_cond_list_tail; + cv->prev = __ptw32_cond_list_tail; - if (ptw32_cond_list_tail != NULL) + if (__ptw32_cond_list_tail != NULL) { - ptw32_cond_list_tail->next = cv; + __ptw32_cond_list_tail->next = cv; } - ptw32_cond_list_tail = cv; + __ptw32_cond_list_tail = cv; - if (ptw32_cond_list_head == NULL) + if (__ptw32_cond_list_head == NULL) { - ptw32_cond_list_head = cv; + __ptw32_cond_list_head = cv; } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); } *cond = cv; diff --git a/pthread_cond_signal.c b/pthread_cond_signal.c index 6c9a1c1c..31119fd1 100644 --- a/pthread_cond_signal.c +++ b/pthread_cond_signal.c @@ -48,7 +48,7 @@ #include "implement.h" static INLINE int -ptw32_cond_unblock (pthread_cond_t * cond, int unblockAll) +__ptw32_cond_unblock (pthread_cond_t * cond, int unblockAll) /* * Notes. * @@ -115,9 +115,9 @@ ptw32_cond_unblock (pthread_cond_t * cond, int unblockAll) else if (cv->nWaitersBlocked > cv->nWaitersGone) { /* Use the non-cancellable version of sem_wait() */ - if (ptw32_semwait (&(cv->semBlockLock)) != 0) + if (__ptw32_semwait (&(cv->semBlockLock)) != 0) { - result = PTW32_GET_ERRNO(); + result = __PTW32_GET_ERRNO(); (void) pthread_mutex_unlock (&(cv->mtxUnblockLock)); return result; } @@ -146,13 +146,13 @@ ptw32_cond_unblock (pthread_cond_t * cond, int unblockAll) { if (sem_post_multiple (&(cv->semBlockQueue), nSignalsToIssue) != 0) { - result = PTW32_GET_ERRNO(); + result = __PTW32_GET_ERRNO(); } } return result; -} /* ptw32_cond_unblock */ +} /* __ptw32_cond_unblock */ int pthread_cond_signal (pthread_cond_t * cond) @@ -192,7 +192,7 @@ pthread_cond_signal (pthread_cond_t * cond) /* * The '0'(FALSE) unblockAll arg means unblock ONE waiter. */ - return (ptw32_cond_unblock (cond, 0)); + return (__ptw32_cond_unblock (cond, 0)); } /* pthread_cond_signal */ @@ -231,6 +231,6 @@ pthread_cond_broadcast (pthread_cond_t * cond) /* * The TRUE unblockAll arg means unblock ALL waiters. */ - return (ptw32_cond_unblock (cond, PTW32_TRUE)); + return (__ptw32_cond_unblock (cond, __PTW32_TRUE)); } /* pthread_cond_broadcast */ diff --git a/pthread_cond_wait.c b/pthread_cond_wait.c index 0dd695cb..c6a13137 100644 --- a/pthread_cond_wait.c +++ b/pthread_cond_wait.c @@ -274,13 +274,13 @@ typedef struct pthread_mutex_t *mutexPtr; pthread_cond_t cv; int *resultPtr; -} ptw32_cond_wait_cleanup_args_t; +} __ptw32_cond_wait_cleanup_args_t; -static void PTW32_CDECL -ptw32_cond_wait_cleanup (void *args) +static void __PTW32_CDECL +__ptw32_cond_wait_cleanup (void *args) { - ptw32_cond_wait_cleanup_args_t *cleanup_args = - (ptw32_cond_wait_cleanup_args_t *) args; + __ptw32_cond_wait_cleanup_args_t *cleanup_args = + (__ptw32_cond_wait_cleanup_args_t *) args; pthread_cond_t cv = cleanup_args->cv; int *resultPtr = cleanup_args->resultPtr; int nSignalsWasLeft; @@ -305,9 +305,9 @@ ptw32_cond_wait_cleanup (void *args) else if (INT_MAX / 2 == ++(cv->nWaitersGone)) { /* Use the non-cancellable version of sem_wait() */ - if (ptw32_semwait (&(cv->semBlockLock)) != 0) + if (__ptw32_semwait (&(cv->semBlockLock)) != 0) { - *resultPtr = PTW32_GET_ERRNO(); + *resultPtr = __PTW32_GET_ERRNO(); /* * This is a fatal error for this CV, * so we deliberately don't unlock @@ -318,7 +318,7 @@ ptw32_cond_wait_cleanup (void *args) cv->nWaitersBlocked -= cv->nWaitersGone; if (sem_post (&(cv->semBlockLock)) != 0) { - *resultPtr = PTW32_GET_ERRNO(); + *resultPtr = __PTW32_GET_ERRNO(); /* * This is a fatal error for this CV, * so we deliberately don't unlock @@ -339,7 +339,7 @@ ptw32_cond_wait_cleanup (void *args) { if (sem_post (&(cv->semBlockLock)) != 0) { - *resultPtr = PTW32_GET_ERRNO(); + *resultPtr = __PTW32_GET_ERRNO(); return; } } @@ -352,15 +352,15 @@ ptw32_cond_wait_cleanup (void *args) { *resultPtr = result; } -} /* ptw32_cond_wait_cleanup */ +} /* __ptw32_cond_wait_cleanup */ static INLINE int -ptw32_cond_timedwait (pthread_cond_t * cond, +__ptw32_cond_timedwait (pthread_cond_t * cond, pthread_mutex_t * mutex, const struct timespec *abstime) { int result = 0; pthread_cond_t cv; - ptw32_cond_wait_cleanup_args_t cleanup_args; + __ptw32_cond_wait_cleanup_args_t cleanup_args; if (cond == NULL || *cond == NULL) { @@ -370,12 +370,12 @@ ptw32_cond_timedwait (pthread_cond_t * cond, /* * We do a quick check to see if we need to do more work * to initialise a static condition variable. We check - * again inside the guarded section of ptw32_cond_check_need_init() + * again inside the guarded section of __ptw32_cond_check_need_init() * to avoid race conditions. */ if (*cond == PTHREAD_COND_INITIALIZER) { - result = ptw32_cond_check_need_init (cond); + result = __ptw32_cond_check_need_init (cond); } if (result != 0 && result != EBUSY) @@ -388,14 +388,14 @@ ptw32_cond_timedwait (pthread_cond_t * cond, /* Thread can be cancelled in sem_wait() but this is OK */ if (sem_wait (&(cv->semBlockLock)) != 0) { - return PTW32_GET_ERRNO(); + return __PTW32_GET_ERRNO(); } ++(cv->nWaitersBlocked); if (sem_post (&(cv->semBlockLock)) != 0) { - return PTW32_GET_ERRNO(); + return __PTW32_GET_ERRNO(); } /* @@ -405,10 +405,10 @@ ptw32_cond_timedwait (pthread_cond_t * cond, cleanup_args.cv = cv; cleanup_args.resultPtr = &result; -#if defined(PTW32_CONFIG_MSVC7) +#if defined (__PTW32_CONFIG_MSVC7) #pragma inline_depth(0) #endif - pthread_cleanup_push (ptw32_cond_wait_cleanup, (void *) &cleanup_args); + pthread_cleanup_push (__ptw32_cond_wait_cleanup, (void *) &cleanup_args); /* * Now we can release 'mutex' and... @@ -434,7 +434,7 @@ ptw32_cond_timedwait (pthread_cond_t * cond, */ if (sem_timedwait (&(cv->semBlockQueue), abstime) != 0) { - result = PTW32_GET_ERRNO(); + result = __PTW32_GET_ERRNO(); } } @@ -442,7 +442,7 @@ ptw32_cond_timedwait (pthread_cond_t * cond, * Always cleanup */ pthread_cleanup_pop (1); -#if defined(PTW32_CONFIG_MSVC7) +#if defined (__PTW32_CONFIG_MSVC7) #pragma inline_depth() #endif @@ -451,7 +451,7 @@ ptw32_cond_timedwait (pthread_cond_t * cond, */ return result; -} /* ptw32_cond_timedwait */ +} /* __ptw32_cond_timedwait */ int @@ -507,7 +507,7 @@ pthread_cond_wait (pthread_cond_t * cond, pthread_mutex_t * mutex) /* * The NULL abstime arg means INFINITE waiting. */ - return (ptw32_cond_timedwait (cond, mutex, NULL)); + return (__ptw32_cond_timedwait (cond, mutex, NULL)); } /* pthread_cond_wait */ @@ -566,6 +566,6 @@ pthread_cond_timedwait (pthread_cond_t * cond, return EINVAL; } - return (ptw32_cond_timedwait (cond, mutex, abstime)); + return (__ptw32_cond_timedwait (cond, mutex, abstime)); } /* pthread_cond_timedwait */ diff --git a/pthread_delay_np.c b/pthread_delay_np.c index 76a54b65..fad51ca2 100644 --- a/pthread_delay_np.c +++ b/pthread_delay_np.c @@ -91,7 +91,7 @@ pthread_delay_np (struct timespec *interval) DWORD millisecs; DWORD status; pthread_t self; - ptw32_thread_t * sp; + __ptw32_thread_t * sp; if (interval == NULL) { @@ -135,7 +135,7 @@ pthread_delay_np (struct timespec *interval) return ENOMEM; } - sp = (ptw32_thread_t *) self.p; + sp = (__ptw32_thread_t *) self.p; if (sp->cancelState == PTHREAD_CANCEL_ENABLE) { @@ -146,21 +146,21 @@ pthread_delay_np (struct timespec *interval) if (WAIT_OBJECT_0 == (status = WaitForSingleObject (sp->cancelEvent, wait_time))) { - ptw32_mcs_local_node_t stateLock; + __ptw32_mcs_local_node_t stateLock; /* * Canceling! */ - ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); + __ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); if (sp->state < PThreadStateCanceling) { sp->state = PThreadStateCanceling; sp->cancelState = PTHREAD_CANCEL_DISABLE; - ptw32_mcs_lock_release (&stateLock); + __ptw32_mcs_lock_release (&stateLock); - ptw32_throw (PTW32_EPS_CANCEL); + __ptw32_throw (__PTW32_EPS_CANCEL); } - ptw32_mcs_lock_release (&stateLock); + __ptw32_mcs_lock_release (&stateLock); return ESRCH; } else if (status != WAIT_TIMEOUT) diff --git a/pthread_detach.c b/pthread_detach.c index 412fd92a..63289b1f 100644 --- a/pthread_detach.c +++ b/pthread_detach.c @@ -80,11 +80,11 @@ pthread_detach (pthread_t thread) */ { int result; - BOOL destroyIt = PTW32_FALSE; - ptw32_thread_t * tp = (ptw32_thread_t *) thread.p; - ptw32_mcs_local_node_t reuseLock; + BOOL destroyIt = __PTW32_FALSE; + __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; + __ptw32_mcs_local_node_t reuseLock; - ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &reuseLock); + __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &reuseLock); if (NULL == tp || thread.x != tp->ptHandle.x) @@ -97,15 +97,15 @@ pthread_detach (pthread_t thread) } else { - ptw32_mcs_local_node_t stateLock; + __ptw32_mcs_local_node_t stateLock; /* - * Joinable ptw32_thread_t structs are not scavenged until + * Joinable __ptw32_thread_t structs are not scavenged until * a join or detach is done. The thread may have exited already, * but all of the state and locks etc are still there. */ result = 0; - ptw32_mcs_lock_acquire (&tp->stateLock, &stateLock); + __ptw32_mcs_lock_acquire (&tp->stateLock, &stateLock); if (tp->state != PThreadStateLast) { tp->detachState = PTHREAD_CREATE_DETACHED; @@ -115,12 +115,12 @@ pthread_detach (pthread_t thread) /* * Thread is joinable and has exited or is exiting. */ - destroyIt = PTW32_TRUE; + destroyIt = __PTW32_TRUE; } - ptw32_mcs_lock_release (&stateLock); + __ptw32_mcs_lock_release (&stateLock); } - ptw32_mcs_lock_release(&reuseLock); + __ptw32_mcs_lock_release(&reuseLock); if (result == 0) { @@ -132,7 +132,7 @@ pthread_detach (pthread_t thread) * detached. Need to wait in case it's still exiting. */ (void) WaitForSingleObject(tp->threadH, INFINITE); - ptw32_threadDestroy (thread); + __ptw32_threadDestroy (thread); } } diff --git a/pthread_exit.c b/pthread_exit.c index bd458c34..a8a68ada 100644 --- a/pthread_exit.c +++ b/pthread_exit.c @@ -70,13 +70,13 @@ pthread_exit (void *value_ptr) * ------------------------------------------------------ */ { - ptw32_thread_t * sp; + __ptw32_thread_t * sp; /* * Don't use pthread_self() to avoid creating an implicit POSIX thread handle * unnecessarily. */ - sp = (ptw32_thread_t *) pthread_getspecific (ptw32_selfThreadKey); + sp = (__ptw32_thread_t *) pthread_getspecific (__ptw32_selfThreadKey); #if defined(_UWIN) if (--pthread_count <= 0) @@ -90,7 +90,7 @@ pthread_exit (void *value_ptr) * Win32 thread that has never called a pthreads-win32 routine that * required a POSIX handle. * - * Implicit POSIX handles are cleaned up in ptw32_throw() now. + * Implicit POSIX handles are cleaned up in __ptw32_throw() now. */ #if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__) @@ -104,7 +104,7 @@ pthread_exit (void *value_ptr) sp->exitStatus = value_ptr; - ptw32_throw (PTW32_EPS_EXIT); + __ptw32_throw (__PTW32_EPS_EXIT); /* Never reached. */ diff --git a/pthread_getconcurrency.c b/pthread_getconcurrency.c index de46fe7c..1e957968 100644 --- a/pthread_getconcurrency.c +++ b/pthread_getconcurrency.c @@ -46,5 +46,5 @@ int pthread_getconcurrency (void) { - return ptw32_concurrency; + return __ptw32_concurrency; } diff --git a/pthread_getname_np.c b/pthread_getname_np.c index b56434e5..97e8f88e 100644 --- a/pthread_getname_np.c +++ b/pthread_getname_np.c @@ -42,8 +42,8 @@ int pthread_getname_np(pthread_t thr, char *name, int len) { - ptw32_mcs_local_node_t threadLock; - ptw32_thread_t * tp; + __ptw32_mcs_local_node_t threadLock; + __ptw32_thread_t * tp; char * s, * d; int result; @@ -58,15 +58,15 @@ pthread_getname_np(pthread_t thr, char *name, int len) return result; } - tp = (ptw32_thread_t *) thr.p; + tp = (__ptw32_thread_t *) thr.p; - ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); + __ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); for (s = tp->name, d = name; *s && d < &name[len - 1]; *d++ = *s++) {} *d = '\0'; - ptw32_mcs_lock_release (&threadLock); + __ptw32_mcs_lock_release (&threadLock); return result; } diff --git a/pthread_getschedparam.c b/pthread_getschedparam.c index 25c7659e..0afefd5f 100644 --- a/pthread_getschedparam.c +++ b/pthread_getschedparam.c @@ -74,7 +74,7 @@ pthread_getschedparam (pthread_t thread, int *policy, * for the target thread. It must not return the actual thread * priority as altered by any system priority adjustments etc. */ - param->sched_priority = ((ptw32_thread_t *)thread.p)->sched_priority; + param->sched_priority = ((__ptw32_thread_t *)thread.p)->sched_priority; return 0; } diff --git a/pthread_getunique_np.c b/pthread_getunique_np.c index 55031f04..6a7eb409 100755 --- a/pthread_getunique_np.c +++ b/pthread_getunique_np.c @@ -48,5 +48,5 @@ unsigned __int64 pthread_getunique_np (pthread_t thread) { - return ((ptw32_thread_t*)thread.p)->seqNumber; + return ((__ptw32_thread_t*)thread.p)->seqNumber; } diff --git a/pthread_getw32threadhandle_np.c b/pthread_getw32threadhandle_np.c index b6ab544d..2de0d13c 100644 --- a/pthread_getw32threadhandle_np.c +++ b/pthread_getw32threadhandle_np.c @@ -54,7 +54,7 @@ HANDLE pthread_getw32threadhandle_np (pthread_t thread) { - return ((ptw32_thread_t *)thread.p)->threadH; + return ((__ptw32_thread_t *)thread.p)->threadH; } /* @@ -66,5 +66,5 @@ pthread_getw32threadhandle_np (pthread_t thread) DWORD pthread_getw32threadid_np (pthread_t thread) { - return ((ptw32_thread_t *)thread.p)->thread; + return ((__ptw32_thread_t *)thread.p)->thread; } diff --git a/pthread_join.c b/pthread_join.c index 96372551..f7a0760d 100644 --- a/pthread_join.c +++ b/pthread_join.c @@ -89,10 +89,10 @@ pthread_join (pthread_t thread, void **value_ptr) { int result; pthread_t self; - ptw32_thread_t * tp = (ptw32_thread_t *) thread.p; - ptw32_mcs_local_node_t node; + __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; + __ptw32_mcs_local_node_t node; - ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &node); + __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); if (NULL == tp || thread.x != tp->ptHandle.x) @@ -108,7 +108,7 @@ pthread_join (pthread_t thread, void **value_ptr) result = 0; } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); if (result == 0) { diff --git a/pthread_key_create.c b/pthread_key_create.c index 6839d88b..9d167568 100644 --- a/pthread_key_create.c +++ b/pthread_key_create.c @@ -49,7 +49,7 @@ #endif int -pthread_key_create (pthread_key_t * key, void (PTW32_CDECL *destructor) (void *)) +pthread_key_create (pthread_key_t * key, void (__PTW32_CDECL *destructor) (void *)) /* * ------------------------------------------------------ * DOCPUBLIC diff --git a/pthread_key_delete.c b/pthread_key_delete.c index 5c9dfcb5..b32eea26 100644 --- a/pthread_key_delete.c +++ b/pthread_key_delete.c @@ -71,7 +71,7 @@ pthread_key_delete (pthread_key_t key) * ------------------------------------------------------ */ { - ptw32_mcs_local_node_t keyLock; + __ptw32_mcs_local_node_t keyLock; int result = 0; if (key != NULL) @@ -79,7 +79,7 @@ pthread_key_delete (pthread_key_t key) if (key->threads != NULL && key->destructor != NULL) { ThreadKeyAssoc *assoc; - ptw32_mcs_lock_acquire (&(key->keyLock), &keyLock); + __ptw32_mcs_lock_acquire (&(key->keyLock), &keyLock); /* * Run through all Thread<-->Key associations * for this key. @@ -90,8 +90,8 @@ pthread_key_delete (pthread_key_t key) */ while ((assoc = (ThreadKeyAssoc *) key->threads) != NULL) { - ptw32_mcs_local_node_t threadLock; - ptw32_thread_t * thread = assoc->thread; + __ptw32_mcs_local_node_t threadLock; + __ptw32_thread_t * thread = assoc->thread; if (assoc == NULL) { @@ -99,25 +99,25 @@ pthread_key_delete (pthread_key_t key) break; } - ptw32_mcs_lock_acquire (&(thread->threadLock), &threadLock); + __ptw32_mcs_lock_acquire (&(thread->threadLock), &threadLock); /* * Since we are starting at the head of the key's threads * chain, this will also point key->threads at the next assoc. * While we hold key->keyLock, no other thread can insert * a new assoc for this key via pthread_setspecific. */ - ptw32_tkAssocDestroy (assoc); - ptw32_mcs_lock_release (&threadLock); + __ptw32_tkAssocDestroy (assoc); + __ptw32_mcs_lock_release (&threadLock); } - ptw32_mcs_lock_release (&keyLock); + __ptw32_mcs_lock_release (&keyLock); } TlsFree (key->key); if (key->destructor != NULL) { /* A thread could be holding the keyLock */ - ptw32_mcs_lock_acquire (&(key->keyLock), &keyLock); - ptw32_mcs_lock_release (&keyLock); + __ptw32_mcs_lock_acquire (&(key->keyLock), &keyLock); + __ptw32_mcs_lock_release (&keyLock); } #if defined( _DEBUG ) diff --git a/pthread_kill.c b/pthread_kill.c index 9bfa9fa9..f4a6cc53 100644 --- a/pthread_kill.c +++ b/pthread_kill.c @@ -81,12 +81,12 @@ pthread_kill (pthread_t thread, int sig) */ { int result = 0; - ptw32_thread_t * tp; - ptw32_mcs_local_node_t node; + __ptw32_thread_t * tp; + __ptw32_mcs_local_node_t node; - ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &node); + __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); - tp = (ptw32_thread_t *) thread.p; + tp = (__ptw32_thread_t *) thread.p; if (NULL == tp || thread.x != tp->ptHandle.x @@ -95,7 +95,7 @@ pthread_kill (pthread_t thread, int sig) result = ESRCH; } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); if (0 == result && 0 != sig) { diff --git a/pthread_mutex_consistent.c b/pthread_mutex_consistent.c index 053a5a6c..52660949 100755 --- a/pthread_mutex_consistent.c +++ b/pthread_mutex_consistent.c @@ -79,21 +79,21 @@ INLINE int -ptw32_robust_mutex_inherit(pthread_mutex_t * mutex) +__ptw32_robust_mutex_inherit(pthread_mutex_t * mutex) { int result; pthread_mutex_t mx = *mutex; - ptw32_robust_node_t* robust = mx->robustNode; + __ptw32_robust_node_t* robust = mx->robustNode; - switch ((LONG)PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( - (PTW32_INTERLOCKED_LONGPTR)&robust->stateInconsistent, - (PTW32_INTERLOCKED_LONG)PTW32_ROBUST_INCONSISTENT, - (PTW32_INTERLOCKED_LONG)-1 /* The terminating thread sets this */)) + switch ((LONG)__PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( + (__PTW32_INTERLOCKED_LONGPTR)&robust->stateInconsistent, + (__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_INCONSISTENT, + (__PTW32_INTERLOCKED_LONG)-1 /* The terminating thread sets this */)) { case -1L: result = EOWNERDEAD; break; - case (LONG)PTW32_ROBUST_NOTRECOVERABLE: + case (LONG)__PTW32_ROBUST_NOTRECOVERABLE: result = ENOTRECOVERABLE; break; default: @@ -118,12 +118,12 @@ ptw32_robust_mutex_inherit(pthread_mutex_t * mutex) INLINE void -ptw32_robust_mutex_add(pthread_mutex_t* mutex, pthread_t self) +__ptw32_robust_mutex_add(pthread_mutex_t* mutex, pthread_t self) { - ptw32_robust_node_t** list; + __ptw32_robust_node_t** list; pthread_mutex_t mx = *mutex; - ptw32_thread_t* tp = (ptw32_thread_t*)self.p; - ptw32_robust_node_t* robust = mx->robustNode; + __ptw32_thread_t* tp = (__ptw32_thread_t*)self.p; + __ptw32_robust_node_t* robust = mx->robustNode; list = &tp->robustMxList; mx->ownerThread = self; @@ -144,13 +144,13 @@ ptw32_robust_mutex_add(pthread_mutex_t* mutex, pthread_t self) INLINE void -ptw32_robust_mutex_remove(pthread_mutex_t* mutex, ptw32_thread_t* otp) +__ptw32_robust_mutex_remove(pthread_mutex_t* mutex, __ptw32_thread_t* otp) { - ptw32_robust_node_t** list; + __ptw32_robust_node_t** list; pthread_mutex_t mx = *mutex; - ptw32_robust_node_t* robust = mx->robustNode; + __ptw32_robust_node_t* robust = mx->robustNode; - list = &(((ptw32_thread_t*)mx->ownerThread.p)->robustMxList); + list = &(((__ptw32_thread_t*)mx->ownerThread.p)->robustMxList); mx->ownerThread.p = otp; if (robust->next != NULL) { @@ -182,10 +182,10 @@ pthread_mutex_consistent (pthread_mutex_t* mutex) } if (mx->kind >= 0 - || (PTW32_INTERLOCKED_LONG)PTW32_ROBUST_INCONSISTENT != PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( - (PTW32_INTERLOCKED_LONGPTR)&mx->robustNode->stateInconsistent, - (PTW32_INTERLOCKED_LONG)PTW32_ROBUST_CONSISTENT, - (PTW32_INTERLOCKED_LONG)PTW32_ROBUST_INCONSISTENT)) + || (__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_INCONSISTENT != __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( + (__PTW32_INTERLOCKED_LONGPTR)&mx->robustNode->stateInconsistent, + (__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_CONSISTENT, + (__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_INCONSISTENT)) { result = EINVAL; } diff --git a/pthread_mutex_destroy.c b/pthread_mutex_destroy.c index 545d0839..99e2a761 100644 --- a/pthread_mutex_destroy.c +++ b/pthread_mutex_destroy.c @@ -117,13 +117,13 @@ pthread_mutex_destroy (pthread_mutex_t * mutex) } else { - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; /* - * See notes in ptw32_mutex_check_need_init() above also. + * See notes in __ptw32_mutex_check_need_init() above also. */ - ptw32_mcs_lock_acquire(&ptw32_mutex_test_init_lock, &node); + __ptw32_mcs_lock_acquire(&__ptw32_mutex_test_init_lock, &node); /* * Check again. @@ -146,7 +146,7 @@ pthread_mutex_destroy (pthread_mutex_t * mutex) */ result = EBUSY; } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); } return (result); diff --git a/pthread_mutex_init.c b/pthread_mutex_init.c index 401b5673..69346f04 100644 --- a/pthread_mutex_init.c +++ b/pthread_mutex_init.c @@ -107,14 +107,14 @@ pthread_mutex_init (pthread_mutex_t * mutex, const pthread_mutexattr_t * attr) */ mx->kind = -mx->kind - 1; - mx->robustNode = (ptw32_robust_node_t*) malloc(sizeof(ptw32_robust_node_t)); + mx->robustNode = (__ptw32_robust_node_t*) malloc(sizeof(__ptw32_robust_node_t)); if (NULL == mx->robustNode) { result = ENOMEM; } else { - mx->robustNode->stateInconsistent = PTW32_ROBUST_CONSISTENT; + mx->robustNode->stateInconsistent = __PTW32_ROBUST_CONSISTENT; mx->robustNode->mx = mx; mx->robustNode->next = NULL; mx->robustNode->prev = NULL; @@ -126,8 +126,8 @@ pthread_mutex_init (pthread_mutex_t * mutex, const pthread_mutexattr_t * attr) { mx->ownerThread.p = NULL; - mx->event = CreateEvent (NULL, PTW32_FALSE, /* manual reset = No */ - PTW32_FALSE, /* initial state = not signalled */ + mx->event = CreateEvent (NULL, __PTW32_FALSE, /* manual reset = No */ + __PTW32_FALSE, /* initial state = not signalled */ NULL); /* event name */ if (0 == mx->event) diff --git a/pthread_mutex_lock.c b/pthread_mutex_lock.c index 5a7cb3ba..17a9ce0e 100644 --- a/pthread_mutex_lock.c +++ b/pthread_mutex_lock.c @@ -63,12 +63,12 @@ pthread_mutex_lock (pthread_mutex_t * mutex) /* * We do a quick check to see if we need to do more work * to initialise a static mutex. We check - * again inside the guarded section of ptw32_mutex_check_need_init() + * again inside the guarded section of __ptw32_mutex_check_need_init() * to avoid race conditions. */ if (*mutex >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) { - if ((result = ptw32_mutex_check_need_init (mutex)) != 0) + if ((result = __ptw32_mutex_check_need_init (mutex)) != 0) { return (result); } @@ -82,13 +82,13 @@ pthread_mutex_lock (pthread_mutex_t * mutex) /* Non-robust */ if (PTHREAD_MUTEX_NORMAL == kind) { - if ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( - (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (PTW32_INTERLOCKED_LONG) 1) != 0) + if ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( + (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (__PTW32_INTERLOCKED_LONG) 1) != 0) { - while ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( - (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (PTW32_INTERLOCKED_LONG) -1) != 0) + while ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( + (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (__PTW32_INTERLOCKED_LONG) -1) != 0) { if (WAIT_OBJECT_0 != WaitForSingleObject (mx->event, INFINITE)) { @@ -102,10 +102,10 @@ pthread_mutex_lock (pthread_mutex_t * mutex) { pthread_t self = pthread_self(); - if ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( - (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (PTW32_INTERLOCKED_LONG) 1, - (PTW32_INTERLOCKED_LONG) 0) == 0) + if ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( + (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (__PTW32_INTERLOCKED_LONG) 1, + (__PTW32_INTERLOCKED_LONG) 0) == 0) { mx->recursive_count = 1; mx->ownerThread = self; @@ -125,9 +125,9 @@ pthread_mutex_lock (pthread_mutex_t * mutex) } else { - while ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( - (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (PTW32_INTERLOCKED_LONG) -1) != 0) + while ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( + (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (__PTW32_INTERLOCKED_LONG) -1) != 0) { if (WAIT_OBJECT_0 != WaitForSingleObject (mx->event, INFINITE)) { @@ -152,11 +152,11 @@ pthread_mutex_lock (pthread_mutex_t * mutex) * All types record the current owner thread. * The mutex is added to a per thread list when ownership is acquired. */ - ptw32_robust_state_t* statePtr = &mx->robustNode->stateInconsistent; + __ptw32_robust_state_t* statePtr = &mx->robustNode->stateInconsistent; - if ((PTW32_INTERLOCKED_LONG)PTW32_ROBUST_NOTRECOVERABLE == PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( - (PTW32_INTERLOCKED_LONGPTR)statePtr, - (PTW32_INTERLOCKED_LONG)0)) + if ((__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_NOTRECOVERABLE == __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( + (__PTW32_INTERLOCKED_LONGPTR)statePtr, + (__PTW32_INTERLOCKED_LONG)0)) { result = ENOTRECOVERABLE; } @@ -168,24 +168,24 @@ pthread_mutex_lock (pthread_mutex_t * mutex) if (PTHREAD_MUTEX_NORMAL == kind) { - if ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( - (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (PTW32_INTERLOCKED_LONG) 1) != 0) + if ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( + (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (__PTW32_INTERLOCKED_LONG) 1) != 0) { - while (0 == (result = ptw32_robust_mutex_inherit(mutex)) - && (PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( - (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (PTW32_INTERLOCKED_LONG) -1) != 0) + while (0 == (result = __ptw32_robust_mutex_inherit(mutex)) + && (__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( + (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (__PTW32_INTERLOCKED_LONG) -1) != 0) { if (WAIT_OBJECT_0 != WaitForSingleObject (mx->event, INFINITE)) { result = EINVAL; break; } - if ((PTW32_INTERLOCKED_LONG)PTW32_ROBUST_NOTRECOVERABLE == - PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( - (PTW32_INTERLOCKED_LONGPTR)statePtr, - (PTW32_INTERLOCKED_LONG)0)) + if ((__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_NOTRECOVERABLE == + __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( + (__PTW32_INTERLOCKED_LONGPTR)statePtr, + (__PTW32_INTERLOCKED_LONG)0)) { /* Unblock the next thread */ SetEvent(mx->event); @@ -200,22 +200,22 @@ pthread_mutex_lock (pthread_mutex_t * mutex) * Add mutex to the per-thread robust mutex currently-held list. * If the thread terminates, all mutexes in this list will be unlocked. */ - ptw32_robust_mutex_add(mutex, self); + __ptw32_robust_mutex_add(mutex, self); } } else { - if ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( - (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (PTW32_INTERLOCKED_LONG) 1, - (PTW32_INTERLOCKED_LONG) 0) == 0) + if ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( + (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (__PTW32_INTERLOCKED_LONG) 1, + (__PTW32_INTERLOCKED_LONG) 0) == 0) { mx->recursive_count = 1; /* * Add mutex to the per-thread robust mutex currently-held list. * If the thread terminates, all mutexes in this list will be unlocked. */ - ptw32_robust_mutex_add(mutex, self); + __ptw32_robust_mutex_add(mutex, self); } else { @@ -232,20 +232,20 @@ pthread_mutex_lock (pthread_mutex_t * mutex) } else { - while (0 == (result = ptw32_robust_mutex_inherit(mutex)) - && (PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( - (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (PTW32_INTERLOCKED_LONG) -1) != 0) + while (0 == (result = __ptw32_robust_mutex_inherit(mutex)) + && (__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( + (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (__PTW32_INTERLOCKED_LONG) -1) != 0) { if (WAIT_OBJECT_0 != WaitForSingleObject (mx->event, INFINITE)) { result = EINVAL; break; } - if ((PTW32_INTERLOCKED_LONG)PTW32_ROBUST_NOTRECOVERABLE == - PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( - (PTW32_INTERLOCKED_LONGPTR)statePtr, - (PTW32_INTERLOCKED_LONG)0)) + if ((__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_NOTRECOVERABLE == + __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( + (__PTW32_INTERLOCKED_LONGPTR)statePtr, + (__PTW32_INTERLOCKED_LONG)0)) { /* Unblock the next thread */ SetEvent(mx->event); @@ -261,7 +261,7 @@ pthread_mutex_lock (pthread_mutex_t * mutex) * Add mutex to the per-thread robust mutex currently-held list. * If the thread terminates, all mutexes in this list will be unlocked. */ - ptw32_robust_mutex_add(mutex, self); + __ptw32_robust_mutex_add(mutex, self); } } } diff --git a/pthread_mutex_timedlock.c b/pthread_mutex_timedlock.c index d1091e98..72cb16ba 100644 --- a/pthread_mutex_timedlock.c +++ b/pthread_mutex_timedlock.c @@ -44,7 +44,7 @@ static INLINE int -ptw32_timed_eventwait (HANDLE event, const struct timespec *abstime) +__ptw32_timed_eventwait (HANDLE event, const struct timespec *abstime) /* * ------------------------------------------------------ * DESCRIPTION @@ -86,7 +86,7 @@ ptw32_timed_eventwait (HANDLE event, const struct timespec *abstime) /* * Calculate timeout as milliseconds from current system time. */ - milliseconds = ptw32_relmillisecs (abstime); + milliseconds = __ptw32_relmillisecs (abstime); } status = WaitForSingleObject (event, milliseconds); @@ -106,7 +106,7 @@ ptw32_timed_eventwait (HANDLE event, const struct timespec *abstime) return 0; -} /* ptw32_timed_semwait */ +} /* __ptw32_timed_semwait */ int @@ -124,12 +124,12 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, /* * We do a quick check to see if we need to do more work * to initialise a static mutex. We check - * again inside the guarded section of ptw32_mutex_check_need_init() + * again inside the guarded section of __ptw32_mutex_check_need_init() * to avoid race conditions. */ if (*mutex >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) { - if ((result = ptw32_mutex_check_need_init (mutex)) != 0) + if ((result = __ptw32_mutex_check_need_init (mutex)) != 0) { return (result); } @@ -142,15 +142,15 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, { if (mx->kind == PTHREAD_MUTEX_NORMAL) { - if ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( - (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (PTW32_INTERLOCKED_LONG) 1) != 0) + if ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( + (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (__PTW32_INTERLOCKED_LONG) 1) != 0) { - while ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( - (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (PTW32_INTERLOCKED_LONG) -1) != 0) + while ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( + (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (__PTW32_INTERLOCKED_LONG) -1) != 0) { - if (0 != (result = ptw32_timed_eventwait (mx->event, abstime))) + if (0 != (result = __ptw32_timed_eventwait (mx->event, abstime))) { return result; } @@ -161,10 +161,10 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, { pthread_t self = pthread_self(); - if ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( - (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (PTW32_INTERLOCKED_LONG) 1, - (PTW32_INTERLOCKED_LONG) 0) == 0) + if ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( + (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (__PTW32_INTERLOCKED_LONG) 1, + (__PTW32_INTERLOCKED_LONG) 0) == 0) { mx->recursive_count = 1; mx->ownerThread = self; @@ -184,11 +184,11 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, } else { - while ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( - (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (PTW32_INTERLOCKED_LONG) -1) != 0) + while ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( + (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (__PTW32_INTERLOCKED_LONG) -1) != 0) { - if (0 != (result = ptw32_timed_eventwait (mx->event, abstime))) + if (0 != (result = __ptw32_timed_eventwait (mx->event, abstime))) { return result; } @@ -207,11 +207,11 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, * All types record the current owner thread. * The mutex is added to a per thread list when ownership is acquired. */ - ptw32_robust_state_t* statePtr = &mx->robustNode->stateInconsistent; + __ptw32_robust_state_t* statePtr = &mx->robustNode->stateInconsistent; - if ((PTW32_INTERLOCKED_LONG)PTW32_ROBUST_NOTRECOVERABLE == PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( - (PTW32_INTERLOCKED_LONGPTR)statePtr, - (PTW32_INTERLOCKED_LONG)0)) + if ((__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_NOTRECOVERABLE == __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( + (__PTW32_INTERLOCKED_LONGPTR)statePtr, + (__PTW32_INTERLOCKED_LONG)0)) { result = ENOTRECOVERABLE; } @@ -223,23 +223,23 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, if (PTHREAD_MUTEX_NORMAL == kind) { - if ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( - (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (PTW32_INTERLOCKED_LONG) 1) != 0) + if ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( + (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (__PTW32_INTERLOCKED_LONG) 1) != 0) { - while (0 == (result = ptw32_robust_mutex_inherit(mutex)) - && (PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( - (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (PTW32_INTERLOCKED_LONG) -1) != 0) + while (0 == (result = __ptw32_robust_mutex_inherit(mutex)) + && (__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( + (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (__PTW32_INTERLOCKED_LONG) -1) != 0) { - if (0 != (result = ptw32_timed_eventwait (mx->event, abstime))) + if (0 != (result = __ptw32_timed_eventwait (mx->event, abstime))) { return result; } - if ((PTW32_INTERLOCKED_LONG)PTW32_ROBUST_NOTRECOVERABLE == - PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( - (PTW32_INTERLOCKED_LONGPTR)statePtr, - (PTW32_INTERLOCKED_LONG)0)) + if ((__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_NOTRECOVERABLE == + __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( + (__PTW32_INTERLOCKED_LONGPTR)statePtr, + (__PTW32_INTERLOCKED_LONG)0)) { /* Unblock the next thread */ SetEvent(mx->event); @@ -254,7 +254,7 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, * Add mutex to the per-thread robust mutex currently-held list. * If the thread terminates, all mutexes in this list will be unlocked. */ - ptw32_robust_mutex_add(mutex, self); + __ptw32_robust_mutex_add(mutex, self); } } } @@ -262,17 +262,17 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, { pthread_t self = pthread_self(); - if (0 == (PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( - (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (PTW32_INTERLOCKED_LONG) 1, - (PTW32_INTERLOCKED_LONG) 0)) + if (0 == (__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( + (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (__PTW32_INTERLOCKED_LONG) 1, + (__PTW32_INTERLOCKED_LONG) 0)) { mx->recursive_count = 1; /* * Add mutex to the per-thread robust mutex currently-held list. * If the thread terminates, all mutexes in this list will be unlocked. */ - ptw32_robust_mutex_add(mutex, self); + __ptw32_robust_mutex_add(mutex, self); } else { @@ -289,21 +289,21 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, } else { - while (0 == (result = ptw32_robust_mutex_inherit(mutex)) - && (PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( - (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (PTW32_INTERLOCKED_LONG) -1) != 0) + while (0 == (result = __ptw32_robust_mutex_inherit(mutex)) + && (__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( + (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (__PTW32_INTERLOCKED_LONG) -1) != 0) { - if (0 != (result = ptw32_timed_eventwait (mx->event, abstime))) + if (0 != (result = __ptw32_timed_eventwait (mx->event, abstime))) { return result; } } - if ((PTW32_INTERLOCKED_LONG)PTW32_ROBUST_NOTRECOVERABLE == - PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( - (PTW32_INTERLOCKED_LONGPTR)statePtr, - (PTW32_INTERLOCKED_LONG)0)) + if ((__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_NOTRECOVERABLE == + __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( + (__PTW32_INTERLOCKED_LONGPTR)statePtr, + (__PTW32_INTERLOCKED_LONG)0)) { /* Unblock the next thread */ SetEvent(mx->event); @@ -316,7 +316,7 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, * Add mutex to the per-thread robust mutex currently-held list. * If the thread terminates, all mutexes in this list will be unlocked. */ - ptw32_robust_mutex_add(mutex, self); + __ptw32_robust_mutex_add(mutex, self); } } } diff --git a/pthread_mutex_trylock.c b/pthread_mutex_trylock.c index 840ec421..499185f9 100644 --- a/pthread_mutex_trylock.c +++ b/pthread_mutex_trylock.c @@ -57,12 +57,12 @@ pthread_mutex_trylock (pthread_mutex_t * mutex) /* * We do a quick check to see if we need to do more work * to initialise a static mutex. We check - * again inside the guarded section of ptw32_mutex_check_need_init() + * again inside the guarded section of __ptw32_mutex_check_need_init() * to avoid race conditions. */ if (*mutex >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) { - if ((result = ptw32_mutex_check_need_init (mutex)) != 0) + if ((result = __ptw32_mutex_check_need_init (mutex)) != 0) { return (result); } @@ -74,10 +74,10 @@ pthread_mutex_trylock (pthread_mutex_t * mutex) if (kind >= 0) { /* Non-robust */ - if (0 == (PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ( - (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (PTW32_INTERLOCKED_LONG) 1, - (PTW32_INTERLOCKED_LONG) 0)) + if (0 == (__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ( + (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (__PTW32_INTERLOCKED_LONG) 1, + (__PTW32_INTERLOCKED_LONG) 0)) { if (kind != PTHREAD_MUTEX_NORMAL) { @@ -106,12 +106,12 @@ pthread_mutex_trylock (pthread_mutex_t * mutex) * The mutex is added to a per thread list when ownership is acquired. */ pthread_t self; - ptw32_robust_state_t* statePtr = &mx->robustNode->stateInconsistent; + __ptw32_robust_state_t* statePtr = &mx->robustNode->stateInconsistent; - if ((PTW32_INTERLOCKED_LONG)PTW32_ROBUST_NOTRECOVERABLE == - PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( - (PTW32_INTERLOCKED_LONGPTR)statePtr, - (PTW32_INTERLOCKED_LONG)0)) + if ((__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_NOTRECOVERABLE == + __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( + (__PTW32_INTERLOCKED_LONGPTR)statePtr, + (__PTW32_INTERLOCKED_LONG)0)) { return ENOTRECOVERABLE; } @@ -119,16 +119,16 @@ pthread_mutex_trylock (pthread_mutex_t * mutex) self = pthread_self(); kind = -kind - 1; /* Convert to non-robust range */ - if (0 == (PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ( - (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (PTW32_INTERLOCKED_LONG) 1, - (PTW32_INTERLOCKED_LONG) 0)) + if (0 == (__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ( + (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (__PTW32_INTERLOCKED_LONG) 1, + (__PTW32_INTERLOCKED_LONG) 0)) { if (kind != PTHREAD_MUTEX_NORMAL) { mx->recursive_count = 1; } - ptw32_robust_mutex_add(mutex, self); + __ptw32_robust_mutex_add(mutex, self); } else { @@ -139,10 +139,10 @@ pthread_mutex_trylock (pthread_mutex_t * mutex) } else { - if (EOWNERDEAD == (result = ptw32_robust_mutex_inherit(mutex))) + if (EOWNERDEAD == (result = __ptw32_robust_mutex_inherit(mutex))) { mx->recursive_count = 1; - ptw32_robust_mutex_add(mutex, self); + __ptw32_robust_mutex_add(mutex, self); } else { diff --git a/pthread_mutex_unlock.c b/pthread_mutex_unlock.c index aa5850a1..5c56447e 100644 --- a/pthread_mutex_unlock.c +++ b/pthread_mutex_unlock.c @@ -71,8 +71,8 @@ pthread_mutex_unlock (pthread_mutex_t * mutex) { LONG idx; - idx = (LONG) PTW32_INTERLOCKED_EXCHANGE_LONG ((PTW32_INTERLOCKED_LONGPTR)&mx->lock_idx, - (PTW32_INTERLOCKED_LONG)0); + idx = (LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG ((__PTW32_INTERLOCKED_LONGPTR)&mx->lock_idx, + (__PTW32_INTERLOCKED_LONG)0); if (idx != 0) { if (idx < 0) @@ -96,8 +96,8 @@ pthread_mutex_unlock (pthread_mutex_t * mutex) { mx->ownerThread.p = NULL; - if ((LONG) PTW32_INTERLOCKED_EXCHANGE_LONG ((PTW32_INTERLOCKED_LONGPTR)&mx->lock_idx, - (PTW32_INTERLOCKED_LONG)0) < 0L) + if ((LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG ((__PTW32_INTERLOCKED_LONGPTR)&mx->lock_idx, + (__PTW32_INTERLOCKED_LONG)0) < 0L) { /* Someone may be waiting on that mutex */ if (SetEvent (mx->event) == 0) @@ -125,15 +125,15 @@ pthread_mutex_unlock (pthread_mutex_t * mutex) */ if (pthread_equal (mx->ownerThread, self)) { - PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG((PTW32_INTERLOCKED_LONGPTR) &mx->robustNode->stateInconsistent, - (PTW32_INTERLOCKED_LONG)PTW32_ROBUST_NOTRECOVERABLE, - (PTW32_INTERLOCKED_LONG)PTW32_ROBUST_INCONSISTENT); + __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ((__PTW32_INTERLOCKED_LONGPTR) &mx->robustNode->stateInconsistent, + (__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_NOTRECOVERABLE, + (__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_INCONSISTENT); if (PTHREAD_MUTEX_NORMAL == kind) { - ptw32_robust_mutex_remove(mutex, NULL); + __ptw32_robust_mutex_remove(mutex, NULL); - if ((LONG) PTW32_INTERLOCKED_EXCHANGE_LONG((PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (PTW32_INTERLOCKED_LONG) 0) < 0) + if ((LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG ((__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (__PTW32_INTERLOCKED_LONG) 0) < 0) { /* * Someone may be waiting on that mutex. @@ -149,10 +149,10 @@ pthread_mutex_unlock (pthread_mutex_t * mutex) if (kind != PTHREAD_MUTEX_RECURSIVE || 0 == --mx->recursive_count) { - ptw32_robust_mutex_remove(mutex, NULL); + __ptw32_robust_mutex_remove(mutex, NULL); - if ((LONG) PTW32_INTERLOCKED_EXCHANGE_LONG((PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (PTW32_INTERLOCKED_LONG) 0) < 0) + if ((LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG ((__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (__PTW32_INTERLOCKED_LONG) 0) < 0) { /* * Someone may be waiting on that mutex. diff --git a/pthread_num_processors_np.c b/pthread_num_processors_np.c index f94b074d..b0da609e 100644 --- a/pthread_num_processors_np.c +++ b/pthread_num_processors_np.c @@ -52,7 +52,7 @@ pthread_num_processors_np (void) { int count; - if (ptw32_getprocessors (&count) != 0) + if (__ptw32_getprocessors (&count) != 0) { count = 1; } diff --git a/pthread_once.c b/pthread_once.c index c8098372..e48a4dcf 100644 --- a/pthread_once.c +++ b/pthread_once.c @@ -43,40 +43,40 @@ #include "implement.h" int -pthread_once (pthread_once_t * once_control, void (PTW32_CDECL *init_routine) (void)) +pthread_once (pthread_once_t * once_control, void (__PTW32_CDECL *init_routine) (void)) { if (once_control == NULL || init_routine == NULL) { return EINVAL; } - if ((PTW32_INTERLOCKED_LONG)PTW32_FALSE == - (PTW32_INTERLOCKED_LONG)PTW32_INTERLOCKED_EXCHANGE_ADD_LONG((PTW32_INTERLOCKED_LONGPTR)&once_control->done, - (PTW32_INTERLOCKED_LONG)0)) /* MBR fence */ + if ((__PTW32_INTERLOCKED_LONG)__PTW32_FALSE == + (__PTW32_INTERLOCKED_LONG)__PTW32_INTERLOCKED_EXCHANGE_ADD_LONG ((__PTW32_INTERLOCKED_LONGPTR)&once_control->done, + (__PTW32_INTERLOCKED_LONG)0)) /* MBR fence */ { - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; - ptw32_mcs_lock_acquire((ptw32_mcs_lock_t *)&once_control->lock, &node); + __ptw32_mcs_lock_acquire((__ptw32_mcs_lock_t *)&once_control->lock, &node); if (!once_control->done) { -#if defined(PTW32_CONFIG_MSVC7) +#if defined (__PTW32_CONFIG_MSVC7) #pragma inline_depth(0) #endif - pthread_cleanup_push(ptw32_mcs_lock_release, &node); + pthread_cleanup_push(__ptw32_mcs_lock_release, &node); (*init_routine)(); pthread_cleanup_pop(0); -#if defined(PTW32_CONFIG_MSVC7) +#if defined (__PTW32_CONFIG_MSVC7) #pragma inline_depth() #endif - once_control->done = PTW32_TRUE; + once_control->done = __PTW32_TRUE; } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); } return 0; diff --git a/pthread_rwlock_destroy.c b/pthread_rwlock_destroy.c index edb6338b..40fe5aad 100644 --- a/pthread_rwlock_destroy.c +++ b/pthread_rwlock_destroy.c @@ -59,7 +59,7 @@ pthread_rwlock_destroy (pthread_rwlock_t * rwlock) { rwl = *rwlock; - if (rwl->nMagic != PTW32_RWLOCK_MAGIC) + if (rwl->nMagic != __PTW32_RWLOCK_MAGIC) { return EINVAL; } @@ -113,11 +113,11 @@ pthread_rwlock_destroy (pthread_rwlock_t * rwlock) } else { - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; /* - * See notes in ptw32_rwlock_check_need_init() above also. + * See notes in __ptw32_rwlock_check_need_init() above also. */ - ptw32_mcs_lock_acquire(&ptw32_rwlock_test_init_lock, &node); + __ptw32_mcs_lock_acquire(&__ptw32_rwlock_test_init_lock, &node); /* * Check again. @@ -141,7 +141,7 @@ pthread_rwlock_destroy (pthread_rwlock_t * rwlock) result = EBUSY; } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); } return ((result != 0) ? result : ((result1 != 0) ? result1 : result2)); diff --git a/pthread_rwlock_init.c b/pthread_rwlock_init.c index 90a66946..cfcc1c00 100644 --- a/pthread_rwlock_init.c +++ b/pthread_rwlock_init.c @@ -92,7 +92,7 @@ pthread_rwlock_init (pthread_rwlock_t * rwlock, goto FAIL2; } - rwl->nMagic = PTW32_RWLOCK_MAGIC; + rwl->nMagic = __PTW32_RWLOCK_MAGIC; result = 0; goto DONE; diff --git a/pthread_rwlock_rdlock.c b/pthread_rwlock_rdlock.c index 4d0d393c..dcebd672 100644 --- a/pthread_rwlock_rdlock.c +++ b/pthread_rwlock_rdlock.c @@ -58,12 +58,12 @@ pthread_rwlock_rdlock (pthread_rwlock_t * rwlock) /* * We do a quick check to see if we need to do more work * to initialise a static rwlock. We check - * again inside the guarded section of ptw32_rwlock_check_need_init() + * again inside the guarded section of __ptw32_rwlock_check_need_init() * to avoid race conditions. */ if (*rwlock == PTHREAD_RWLOCK_INITIALIZER) { - result = ptw32_rwlock_check_need_init (rwlock); + result = __ptw32_rwlock_check_need_init (rwlock); if (result != 0 && result != EBUSY) { @@ -73,7 +73,7 @@ pthread_rwlock_rdlock (pthread_rwlock_t * rwlock) rwl = *rwlock; - if (rwl->nMagic != PTW32_RWLOCK_MAGIC) + if (rwl->nMagic != __PTW32_RWLOCK_MAGIC) { return EINVAL; } diff --git a/pthread_rwlock_timedrdlock.c b/pthread_rwlock_timedrdlock.c index ed281f3d..8ef92231 100644 --- a/pthread_rwlock_timedrdlock.c +++ b/pthread_rwlock_timedrdlock.c @@ -59,12 +59,12 @@ pthread_rwlock_timedrdlock (pthread_rwlock_t * rwlock, /* * We do a quick check to see if we need to do more work * to initialise a static rwlock. We check - * again inside the guarded section of ptw32_rwlock_check_need_init() + * again inside the guarded section of __ptw32_rwlock_check_need_init() * to avoid race conditions. */ if (*rwlock == PTHREAD_RWLOCK_INITIALIZER) { - result = ptw32_rwlock_check_need_init (rwlock); + result = __ptw32_rwlock_check_need_init (rwlock); if (result != 0 && result != EBUSY) { @@ -74,7 +74,7 @@ pthread_rwlock_timedrdlock (pthread_rwlock_t * rwlock, rwl = *rwlock; - if (rwl->nMagic != PTW32_RWLOCK_MAGIC) + if (rwl->nMagic != __PTW32_RWLOCK_MAGIC) { return EINVAL; } diff --git a/pthread_rwlock_timedwrlock.c b/pthread_rwlock_timedwrlock.c index 7622d97f..cb7e4189 100644 --- a/pthread_rwlock_timedwrlock.c +++ b/pthread_rwlock_timedwrlock.c @@ -59,12 +59,12 @@ pthread_rwlock_timedwrlock (pthread_rwlock_t * rwlock, /* * We do a quick check to see if we need to do more work * to initialise a static rwlock. We check - * again inside the guarded section of ptw32_rwlock_check_need_init() + * again inside the guarded section of __ptw32_rwlock_check_need_init() * to avoid race conditions. */ if (*rwlock == PTHREAD_RWLOCK_INITIALIZER) { - result = ptw32_rwlock_check_need_init (rwlock); + result = __ptw32_rwlock_check_need_init (rwlock); if (result != 0 && result != EBUSY) { @@ -74,7 +74,7 @@ pthread_rwlock_timedwrlock (pthread_rwlock_t * rwlock, rwl = *rwlock; - if (rwl->nMagic != PTW32_RWLOCK_MAGIC) + if (rwl->nMagic != __PTW32_RWLOCK_MAGIC) { return EINVAL; } @@ -109,10 +109,10 @@ pthread_rwlock_timedwrlock (pthread_rwlock_t * rwlock, * This routine may be a cancellation point * according to POSIX 1003.1j section 18.1.2. */ -#if defined(PTW32_CONFIG_MSVC7) +#if defined (__PTW32_CONFIG_MSVC7) #pragma inline_depth(0) #endif - pthread_cleanup_push (ptw32_rwlock_cancelwrwait, (void *) rwl); + pthread_cleanup_push (__ptw32_rwlock_cancelwrwait, (void *) rwl); do { @@ -124,7 +124,7 @@ pthread_rwlock_timedwrlock (pthread_rwlock_t * rwlock, while (result == 0 && rwl->nCompletedSharedAccessCount < 0); pthread_cleanup_pop ((result != 0) ? 1 : 0); -#if defined(PTW32_CONFIG_MSVC7) +#if defined (__PTW32_CONFIG_MSVC7) #pragma inline_depth() #endif diff --git a/pthread_rwlock_tryrdlock.c b/pthread_rwlock_tryrdlock.c index 5660b5ad..6ff255c5 100644 --- a/pthread_rwlock_tryrdlock.c +++ b/pthread_rwlock_tryrdlock.c @@ -58,12 +58,12 @@ pthread_rwlock_tryrdlock (pthread_rwlock_t * rwlock) /* * We do a quick check to see if we need to do more work * to initialise a static rwlock. We check - * again inside the guarded section of ptw32_rwlock_check_need_init() + * again inside the guarded section of __ptw32_rwlock_check_need_init() * to avoid race conditions. */ if (*rwlock == PTHREAD_RWLOCK_INITIALIZER) { - result = ptw32_rwlock_check_need_init (rwlock); + result = __ptw32_rwlock_check_need_init (rwlock); if (result != 0 && result != EBUSY) { @@ -73,7 +73,7 @@ pthread_rwlock_tryrdlock (pthread_rwlock_t * rwlock) rwl = *rwlock; - if (rwl->nMagic != PTW32_RWLOCK_MAGIC) + if (rwl->nMagic != __PTW32_RWLOCK_MAGIC) { return EINVAL; } diff --git a/pthread_rwlock_trywrlock.c b/pthread_rwlock_trywrlock.c index f12df055..676dedd8 100644 --- a/pthread_rwlock_trywrlock.c +++ b/pthread_rwlock_trywrlock.c @@ -58,12 +58,12 @@ pthread_rwlock_trywrlock (pthread_rwlock_t * rwlock) /* * We do a quick check to see if we need to do more work * to initialise a static rwlock. We check - * again inside the guarded section of ptw32_rwlock_check_need_init() + * again inside the guarded section of __ptw32_rwlock_check_need_init() * to avoid race conditions. */ if (*rwlock == PTHREAD_RWLOCK_INITIALIZER) { - result = ptw32_rwlock_check_need_init (rwlock); + result = __ptw32_rwlock_check_need_init (rwlock); if (result != 0 && result != EBUSY) { @@ -73,7 +73,7 @@ pthread_rwlock_trywrlock (pthread_rwlock_t * rwlock) rwl = *rwlock; - if (rwl->nMagic != PTW32_RWLOCK_MAGIC) + if (rwl->nMagic != __PTW32_RWLOCK_MAGIC) { return EINVAL; } diff --git a/pthread_rwlock_unlock.c b/pthread_rwlock_unlock.c index 63feac3e..2a02b7a7 100644 --- a/pthread_rwlock_unlock.c +++ b/pthread_rwlock_unlock.c @@ -65,7 +65,7 @@ pthread_rwlock_unlock (pthread_rwlock_t * rwlock) rwl = *rwlock; - if (rwl->nMagic != PTW32_RWLOCK_MAGIC) + if (rwl->nMagic != __PTW32_RWLOCK_MAGIC) { return EINVAL; } diff --git a/pthread_rwlock_wrlock.c b/pthread_rwlock_wrlock.c index 722a673f..eafb01b5 100644 --- a/pthread_rwlock_wrlock.c +++ b/pthread_rwlock_wrlock.c @@ -58,12 +58,12 @@ pthread_rwlock_wrlock (pthread_rwlock_t * rwlock) /* * We do a quick check to see if we need to do more work * to initialise a static rwlock. We check - * again inside the guarded section of ptw32_rwlock_check_need_init() + * again inside the guarded section of __ptw32_rwlock_check_need_init() * to avoid race conditions. */ if (*rwlock == PTHREAD_RWLOCK_INITIALIZER) { - result = ptw32_rwlock_check_need_init (rwlock); + result = __ptw32_rwlock_check_need_init (rwlock); if (result != 0 && result != EBUSY) { @@ -73,7 +73,7 @@ pthread_rwlock_wrlock (pthread_rwlock_t * rwlock) rwl = *rwlock; - if (rwl->nMagic != PTW32_RWLOCK_MAGIC) + if (rwl->nMagic != __PTW32_RWLOCK_MAGIC) { return EINVAL; } @@ -105,10 +105,10 @@ pthread_rwlock_wrlock (pthread_rwlock_t * rwlock) * This routine may be a cancellation point * according to POSIX 1003.1j section 18.1.2. */ -#if defined(PTW32_CONFIG_MSVC7) +#if defined (__PTW32_CONFIG_MSVC7) #pragma inline_depth(0) #endif - pthread_cleanup_push (ptw32_rwlock_cancelwrwait, (void *) rwl); + pthread_cleanup_push (__ptw32_rwlock_cancelwrwait, (void *) rwl); do { @@ -118,7 +118,7 @@ pthread_rwlock_wrlock (pthread_rwlock_t * rwlock) while (result == 0 && rwl->nCompletedSharedAccessCount < 0); pthread_cleanup_pop ((result != 0) ? 1 : 0); -#if defined(PTW32_CONFIG_MSVC7) +#if defined (__PTW32_CONFIG_MSVC7) #pragma inline_depth() #endif diff --git a/pthread_self.c b/pthread_self.c index 71c4f542..27efa192 100644 --- a/pthread_self.c +++ b/pthread_self.c @@ -66,14 +66,14 @@ pthread_self (void) { pthread_t self; pthread_t nil = {NULL, 0}; - ptw32_thread_t * sp; + __ptw32_thread_t * sp; #if defined(_UWIN) - if (!ptw32_selfThreadKey) + if (!__ptw32_selfThreadKey) return nil; #endif - sp = (ptw32_thread_t *) pthread_getspecific (ptw32_selfThreadKey); + sp = (__ptw32_thread_t *) pthread_getspecific (__ptw32_selfThreadKey); if (sp != NULL) { @@ -81,13 +81,13 @@ pthread_self (void) } else { - int fail = PTW32_FALSE; + int fail = __PTW32_FALSE; /* * Need to create an implicit 'self' for the currently * executing thread. */ - self = ptw32_new (); - sp = (ptw32_thread_t *) self.p; + self = __ptw32_new (); + sp = (__ptw32_thread_t *) self.p; if (sp != NULL) { @@ -119,7 +119,7 @@ pthread_self (void) &sp->threadH, 0, FALSE, DUPLICATE_SAME_ACCESS)) { - fail = PTW32_TRUE; + fail = __PTW32_TRUE; } #endif @@ -143,11 +143,11 @@ pthread_self (void) { sp->cpuset = (size_t) vThreadMask; } - else fail = PTW32_TRUE; + else fail = __PTW32_TRUE; } - else fail = PTW32_TRUE; + else fail = __PTW32_TRUE; } - else fail = PTW32_TRUE; + else fail = __PTW32_TRUE; #endif @@ -156,7 +156,7 @@ pthread_self (void) * because the new handle is not yet public. */ sp->sched_priority = GetThreadPriority (sp->threadH); - pthread_setspecific (ptw32_selfThreadKey, (void *) sp); + pthread_setspecific (__ptw32_selfThreadKey, (void *) sp); } } @@ -166,7 +166,7 @@ pthread_self (void) * Thread structs are never freed but are reused so if this * continues to fail at least we don't leak memory. */ - ptw32_threadReusePush (self); + __ptw32_threadReusePush (self); /* * As this is a win32 thread calling us and we have failed, * return a value that makes sense to win32. diff --git a/pthread_setaffinity.c b/pthread_setaffinity.c index fd3a30c0..79e70b5c 100644 --- a/pthread_setaffinity.c +++ b/pthread_setaffinity.c @@ -92,13 +92,13 @@ pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, #else int result = 0; - ptw32_thread_t * tp; - ptw32_mcs_local_node_t node; + __ptw32_thread_t * tp; + __ptw32_mcs_local_node_t node; cpu_set_t processCpuset; - ptw32_mcs_lock_acquire (&ptw32_thread_reuse_lock, &node); + __ptw32_mcs_lock_acquire (&__ptw32_thread_reuse_lock, &node); - tp = (ptw32_thread_t *) thread.p; + tp = (__ptw32_thread_t *) thread.p; if (NULL == tp || thread.x != tp->ptHandle.x || NULL == tp->threadH) { @@ -110,7 +110,7 @@ pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, { if (sched_getaffinity(0, sizeof(cpu_set_t), &processCpuset)) { - result = PTW32_GET_ERRNO(); + result = __PTW32_GET_ERRNO(); } else { @@ -150,7 +150,7 @@ pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, } } - ptw32_mcs_lock_release (&node); + __ptw32_mcs_lock_release (&node); return result; @@ -198,12 +198,12 @@ pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t *cpuset) #else int result = 0; - ptw32_thread_t * tp; - ptw32_mcs_local_node_t node; + __ptw32_thread_t * tp; + __ptw32_mcs_local_node_t node; - ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &node); + __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); - tp = (ptw32_thread_t *) thread.p; + tp = (__ptw32_thread_t *) thread.p; if (NULL == tp || thread.x != tp->ptHandle.x || NULL == tp->threadH) { @@ -235,7 +235,7 @@ pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t *cpuset) } } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); return result; diff --git a/pthread_setcancelstate.c b/pthread_setcancelstate.c index 15268257..90eac87a 100644 --- a/pthread_setcancelstate.c +++ b/pthread_setcancelstate.c @@ -84,10 +84,10 @@ pthread_setcancelstate (int state, int *oldstate) * ------------------------------------------------------ */ { - ptw32_mcs_local_node_t stateLock; + __ptw32_mcs_local_node_t stateLock; int result = 0; pthread_t self = pthread_self (); - ptw32_thread_t * sp = (ptw32_thread_t *) self.p; + __ptw32_thread_t * sp = (__ptw32_thread_t *) self.p; if (sp == NULL || (state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE)) @@ -98,7 +98,7 @@ pthread_setcancelstate (int state, int *oldstate) /* * Lock for async-cancel safety. */ - ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); + __ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); if (oldstate != NULL) { @@ -117,13 +117,13 @@ pthread_setcancelstate (int state, int *oldstate) sp->state = PThreadStateCanceling; sp->cancelState = PTHREAD_CANCEL_DISABLE; ResetEvent (sp->cancelEvent); - ptw32_mcs_lock_release (&stateLock); - ptw32_throw (PTW32_EPS_CANCEL); + __ptw32_mcs_lock_release (&stateLock); + __ptw32_throw (__PTW32_EPS_CANCEL); /* Never reached */ } - ptw32_mcs_lock_release (&stateLock); + __ptw32_mcs_lock_release (&stateLock); return (result); diff --git a/pthread_setcanceltype.c b/pthread_setcanceltype.c index 41ecfe0d..f201bc93 100644 --- a/pthread_setcanceltype.c +++ b/pthread_setcanceltype.c @@ -84,10 +84,10 @@ pthread_setcanceltype (int type, int *oldtype) * ------------------------------------------------------ */ { - ptw32_mcs_local_node_t stateLock; + __ptw32_mcs_local_node_t stateLock; int result = 0; pthread_t self = pthread_self (); - ptw32_thread_t * sp = (ptw32_thread_t *) self.p; + __ptw32_thread_t * sp = (__ptw32_thread_t *) self.p; if (sp == NULL || (type != PTHREAD_CANCEL_DEFERRED @@ -99,7 +99,7 @@ pthread_setcanceltype (int type, int *oldtype) /* * Lock for async-cancel safety. */ - ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); + __ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); if (oldtype != NULL) { @@ -118,13 +118,13 @@ pthread_setcanceltype (int type, int *oldtype) sp->state = PThreadStateCanceling; sp->cancelState = PTHREAD_CANCEL_DISABLE; ResetEvent (sp->cancelEvent); - ptw32_mcs_lock_release (&stateLock); - ptw32_throw (PTW32_EPS_CANCEL); + __ptw32_mcs_lock_release (&stateLock); + __ptw32_throw (__PTW32_EPS_CANCEL); /* Never reached */ } - ptw32_mcs_lock_release (&stateLock); + __ptw32_mcs_lock_release (&stateLock); return (result); diff --git a/pthread_setconcurrency.c b/pthread_setconcurrency.c index 1861f96e..b47f6b5c 100644 --- a/pthread_setconcurrency.c +++ b/pthread_setconcurrency.c @@ -52,7 +52,7 @@ pthread_setconcurrency (int level) } else { - ptw32_concurrency = level; + __ptw32_concurrency = level; return 0; } } diff --git a/pthread_setname_np.c b/pthread_setname_np.c index 6fb8197d..c3f3cd90 100644 --- a/pthread_setname_np.c +++ b/pthread_setname_np.c @@ -73,17 +73,17 @@ SetThreadName( DWORD dwThreadID, char* threadName) } #endif -#if defined(PTW32_COMPATIBILITY_BSD) || defined(PTW32_COMPATIBILITY_TRU64) +#if defined (__PTW32_COMPATIBILITY_BSD) || defined (__PTW32_COMPATIBILITY_TRU64) int pthread_setname_np(pthread_t thr, const char *name, void *arg) { - ptw32_mcs_local_node_t threadLock; + __ptw32_mcs_local_node_t threadLock; int len; int result; char tmpbuf[PTHREAD_MAX_NAMELEN_NP]; char * newname; char * oldname; - ptw32_thread_t * tp; + __ptw32_thread_t * tp; #if defined(_MSC_VER) DWORD Win32ThreadID; #endif @@ -125,9 +125,9 @@ pthread_setname_np(pthread_t thr, const char *name, void *arg) } #endif - tp = (ptw32_thread_t *) thr.p; + tp = (__ptw32_thread_t *) thr.p; - ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); + __ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); oldname = tp->name; tp->name = newname; @@ -136,7 +136,7 @@ pthread_setname_np(pthread_t thr, const char *name, void *arg) free(oldname); } - ptw32_mcs_lock_release (&threadLock); + __ptw32_mcs_lock_release (&threadLock); return 0; } @@ -144,11 +144,11 @@ pthread_setname_np(pthread_t thr, const char *name, void *arg) int pthread_setname_np(pthread_t thr, const char *name) { - ptw32_mcs_local_node_t threadLock; + __ptw32_mcs_local_node_t threadLock; int result; char * newname; char * oldname; - ptw32_thread_t * tp; + __ptw32_thread_t * tp; #if defined(_MSC_VER) DWORD Win32ThreadID; #endif @@ -175,9 +175,9 @@ pthread_setname_np(pthread_t thr, const char *name) } #endif - tp = (ptw32_thread_t *) thr.p; + tp = (__ptw32_thread_t *) thr.p; - ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); + __ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); oldname = tp->name; tp->name = newname; @@ -186,7 +186,7 @@ pthread_setname_np(pthread_t thr, const char *name) free(oldname); } - ptw32_mcs_lock_release (&threadLock); + __ptw32_mcs_lock_release (&threadLock); return 0; } diff --git a/pthread_setschedparam.c b/pthread_setschedparam.c index 4e8a0d94..28598ab6 100644 --- a/pthread_setschedparam.c +++ b/pthread_setschedparam.c @@ -72,17 +72,17 @@ pthread_setschedparam (pthread_t thread, int policy, return ENOTSUP; } - return (ptw32_setthreadpriority (thread, policy, param->sched_priority)); + return (__ptw32_setthreadpriority (thread, policy, param->sched_priority)); } int -ptw32_setthreadpriority (pthread_t thread, int policy, int priority) +__ptw32_setthreadpriority (pthread_t thread, int policy, int priority) { int prio; - ptw32_mcs_local_node_t threadLock; + __ptw32_mcs_local_node_t threadLock; int result = 0; - ptw32_thread_t * tp = (ptw32_thread_t *) thread.p; + __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; prio = priority; @@ -110,7 +110,7 @@ ptw32_setthreadpriority (pthread_t thread, int policy, int priority) #endif - ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); + __ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); /* If this fails, the current priority is unchanged. */ if (0 == SetThreadPriority (tp->threadH, prio)) @@ -126,7 +126,7 @@ ptw32_setthreadpriority (pthread_t thread, int policy, int priority) tp->sched_priority = priority; } - ptw32_mcs_lock_release (&threadLock); + __ptw32_mcs_lock_release (&threadLock); return result; } diff --git a/pthread_setspecific.c b/pthread_setspecific.c index 044308b8..f65985be 100644 --- a/pthread_setspecific.c +++ b/pthread_setspecific.c @@ -73,7 +73,7 @@ pthread_setspecific (pthread_key_t key, const void *value) pthread_t self; int result = 0; - if (key != ptw32_selfThreadKey) + if (key != __ptw32_selfThreadKey) { /* * Using pthread_self will implicitly create @@ -92,7 +92,7 @@ pthread_setspecific (pthread_key_t key, const void *value) * Resolve catch-22 of registering thread with selfThread * key */ - ptw32_thread_t * sp = (ptw32_thread_t *) pthread_getspecific (ptw32_selfThreadKey); + __ptw32_thread_t * sp = (__ptw32_thread_t *) pthread_getspecific (__ptw32_selfThreadKey); if (sp == NULL) { @@ -114,9 +114,9 @@ pthread_setspecific (pthread_key_t key, const void *value) { if (self.p != NULL && key->destructor != NULL && value != NULL) { - ptw32_mcs_local_node_t keyLock; - ptw32_mcs_local_node_t threadLock; - ptw32_thread_t * sp = (ptw32_thread_t *) self.p; + __ptw32_mcs_local_node_t keyLock; + __ptw32_mcs_local_node_t threadLock; + __ptw32_thread_t * sp = (__ptw32_thread_t *) self.p; /* * Only require associations if we have to * call user destroy routine. @@ -128,8 +128,8 @@ pthread_setspecific (pthread_key_t key, const void *value) */ ThreadKeyAssoc *assoc; - ptw32_mcs_lock_acquire(&(key->keyLock), &keyLock); - ptw32_mcs_lock_acquire(&(sp->threadLock), &threadLock); + __ptw32_mcs_lock_acquire(&(key->keyLock), &keyLock); + __ptw32_mcs_lock_acquire(&(sp->threadLock), &threadLock); assoc = (ThreadKeyAssoc *) sp->keys; /* @@ -152,11 +152,11 @@ pthread_setspecific (pthread_key_t key, const void *value) */ if (assoc == NULL) { - result = ptw32_tkAssocCreate (sp, key); + result = __ptw32_tkAssocCreate (sp, key); } - ptw32_mcs_lock_release(&threadLock); - ptw32_mcs_lock_release(&keyLock); + __ptw32_mcs_lock_release(&threadLock); + __ptw32_mcs_lock_release(&keyLock); } if (result == 0) diff --git a/pthread_spin_destroy.c b/pthread_spin_destroy.c index 8309a090..81ddd453 100644 --- a/pthread_spin_destroy.c +++ b/pthread_spin_destroy.c @@ -56,14 +56,14 @@ pthread_spin_destroy (pthread_spinlock_t * lock) if ((s = *lock) != PTHREAD_SPINLOCK_INITIALIZER) { - if (s->interlock == PTW32_SPIN_USE_MUTEX) + if (s->interlock == __PTW32_SPIN_USE_MUTEX) { result = pthread_mutex_destroy (&(s->u.mutex)); } - else if ((PTW32_INTERLOCKED_LONG) PTW32_SPIN_UNLOCKED != - PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ((PTW32_INTERLOCKED_LONGPTR) &s->interlock, - (PTW32_INTERLOCKED_LONG) PTW32_SPIN_INVALID, - (PTW32_INTERLOCKED_LONG) PTW32_SPIN_UNLOCKED)) + else if ((__PTW32_INTERLOCKED_LONG) __PTW32_SPIN_UNLOCKED != + __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ((__PTW32_INTERLOCKED_LONGPTR) &s->interlock, + (__PTW32_INTERLOCKED_LONG) __PTW32_SPIN_INVALID, + (__PTW32_INTERLOCKED_LONG) __PTW32_SPIN_UNLOCKED)) { result = EINVAL; } @@ -81,11 +81,11 @@ pthread_spin_destroy (pthread_spinlock_t * lock) else { /* - * See notes in ptw32_spinlock_check_need_init() above also. + * See notes in __ptw32_spinlock_check_need_init() above also. */ - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; - ptw32_mcs_lock_acquire(&ptw32_spinlock_test_init_lock, &node); + __ptw32_mcs_lock_acquire(&__ptw32_spinlock_test_init_lock, &node); /* * Check again. @@ -109,7 +109,7 @@ pthread_spin_destroy (pthread_spinlock_t * lock) result = EBUSY; } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); } return (result); diff --git a/pthread_spin_init.c b/pthread_spin_init.c index ae3406f6..bdf0effb 100644 --- a/pthread_spin_init.c +++ b/pthread_spin_init.c @@ -55,7 +55,7 @@ pthread_spin_init (pthread_spinlock_t * lock, int pshared) return EINVAL; } - if (0 != ptw32_getprocessors (&cpus)) + if (0 != __ptw32_getprocessors (&cpus)) { cpus = 1; } @@ -95,7 +95,7 @@ pthread_spin_init (pthread_spinlock_t * lock, int pshared) if (cpus > 1) { s->u.cpus = cpus; - s->interlock = PTW32_SPIN_UNLOCKED; + s->interlock = __PTW32_SPIN_UNLOCKED; } else { @@ -108,7 +108,7 @@ pthread_spin_init (pthread_spinlock_t * lock, int pshared) result = pthread_mutex_init (&(s->u.mutex), &ma); if (0 == result) { - s->interlock = PTW32_SPIN_USE_MUTEX; + s->interlock = __PTW32_SPIN_USE_MUTEX; } } (void) pthread_mutexattr_destroy (&ma); diff --git a/pthread_spin_lock.c b/pthread_spin_lock.c index 300ce97c..cc015d56 100644 --- a/pthread_spin_lock.c +++ b/pthread_spin_lock.c @@ -57,7 +57,7 @@ pthread_spin_lock (pthread_spinlock_t * lock) { int result; - if ((result = ptw32_spinlock_check_need_init (lock)) != 0) + if ((result = __ptw32_spinlock_check_need_init (lock)) != 0) { return (result); } @@ -65,18 +65,18 @@ pthread_spin_lock (pthread_spinlock_t * lock) s = *lock; - while ((PTW32_INTERLOCKED_LONG) PTW32_SPIN_LOCKED == - PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ((PTW32_INTERLOCKED_LONGPTR) &s->interlock, - (PTW32_INTERLOCKED_LONG) PTW32_SPIN_LOCKED, - (PTW32_INTERLOCKED_LONG) PTW32_SPIN_UNLOCKED)) + while ((__PTW32_INTERLOCKED_LONG) __PTW32_SPIN_LOCKED == + __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ((__PTW32_INTERLOCKED_LONGPTR) &s->interlock, + (__PTW32_INTERLOCKED_LONG) __PTW32_SPIN_LOCKED, + (__PTW32_INTERLOCKED_LONG) __PTW32_SPIN_UNLOCKED)) { } - if (s->interlock == PTW32_SPIN_LOCKED) + if (s->interlock == __PTW32_SPIN_LOCKED) { return 0; } - else if (s->interlock == PTW32_SPIN_USE_MUTEX) + else if (s->interlock == __PTW32_SPIN_USE_MUTEX) { return pthread_mutex_lock (&(s->u.mutex)); } diff --git a/pthread_spin_trylock.c b/pthread_spin_trylock.c index 51fc879e..bf4f2c31 100644 --- a/pthread_spin_trylock.c +++ b/pthread_spin_trylock.c @@ -57,7 +57,7 @@ pthread_spin_trylock (pthread_spinlock_t * lock) { int result; - if ((result = ptw32_spinlock_check_need_init (lock)) != 0) + if ((result = __ptw32_spinlock_check_need_init (lock)) != 0) { return (result); } @@ -66,15 +66,15 @@ pthread_spin_trylock (pthread_spinlock_t * lock) s = *lock; switch ((long) - PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ((PTW32_INTERLOCKED_LONGPTR) &s->interlock, - (PTW32_INTERLOCKED_LONG) PTW32_SPIN_LOCKED, - (PTW32_INTERLOCKED_LONG) PTW32_SPIN_UNLOCKED)) + __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ((__PTW32_INTERLOCKED_LONGPTR) &s->interlock, + (__PTW32_INTERLOCKED_LONG) __PTW32_SPIN_LOCKED, + (__PTW32_INTERLOCKED_LONG) __PTW32_SPIN_UNLOCKED)) { - case PTW32_SPIN_UNLOCKED: + case __PTW32_SPIN_UNLOCKED: return 0; - case PTW32_SPIN_LOCKED: + case __PTW32_SPIN_LOCKED: return EBUSY; - case PTW32_SPIN_USE_MUTEX: + case __PTW32_SPIN_USE_MUTEX: return pthread_mutex_trylock (&(s->u.mutex)); } diff --git a/pthread_spin_unlock.c b/pthread_spin_unlock.c index 762584ce..0f039abc 100644 --- a/pthread_spin_unlock.c +++ b/pthread_spin_unlock.c @@ -61,14 +61,14 @@ pthread_spin_unlock (pthread_spinlock_t * lock) } switch ((long) - PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ((PTW32_INTERLOCKED_LONGPTR) &s->interlock, - (PTW32_INTERLOCKED_LONG) PTW32_SPIN_UNLOCKED, - (PTW32_INTERLOCKED_LONG) PTW32_SPIN_LOCKED)) + __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ((__PTW32_INTERLOCKED_LONGPTR) &s->interlock, + (__PTW32_INTERLOCKED_LONG) __PTW32_SPIN_UNLOCKED, + (__PTW32_INTERLOCKED_LONG) __PTW32_SPIN_LOCKED)) { - case PTW32_SPIN_LOCKED: - case PTW32_SPIN_UNLOCKED: + case __PTW32_SPIN_LOCKED: + case __PTW32_SPIN_UNLOCKED: return 0; - case PTW32_SPIN_USE_MUTEX: + case __PTW32_SPIN_USE_MUTEX: return pthread_mutex_unlock (&(s->u.mutex)); } diff --git a/pthread_testcancel.c b/pthread_testcancel.c index f6958563..cce05f2f 100644 --- a/pthread_testcancel.c +++ b/pthread_testcancel.c @@ -73,9 +73,9 @@ pthread_testcancel (void) * ------------------------------------------------------ */ { - ptw32_mcs_local_node_t stateLock; + __ptw32_mcs_local_node_t stateLock; pthread_t self = pthread_self (); - ptw32_thread_t * sp = (ptw32_thread_t *) self.p; + __ptw32_thread_t * sp = (__ptw32_thread_t *) self.p; if (sp == NULL) { @@ -92,17 +92,17 @@ pthread_testcancel (void) return; } - ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); + __ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); if (sp->cancelState != PTHREAD_CANCEL_DISABLE) { ResetEvent(sp->cancelEvent); sp->state = PThreadStateCanceling; sp->cancelState = PTHREAD_CANCEL_DISABLE; - ptw32_mcs_lock_release (&stateLock); - ptw32_throw (PTW32_EPS_CANCEL); + __ptw32_mcs_lock_release (&stateLock); + __ptw32_throw (__PTW32_EPS_CANCEL); /* Never returns here */ } - ptw32_mcs_lock_release (&stateLock); + __ptw32_mcs_lock_release (&stateLock); } /* pthread_testcancel */ diff --git a/pthread_timechange_handler_np.c b/pthread_timechange_handler_np.c index 98934e3c..943a928b 100644 --- a/pthread_timechange_handler_np.c +++ b/pthread_timechange_handler_np.c @@ -95,11 +95,11 @@ pthread_timechange_handler_np (void *arg) { int result = 0; pthread_cond_t cv; - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; - ptw32_mcs_lock_acquire(&ptw32_cond_list_lock, &node); + __ptw32_mcs_lock_acquire(&__ptw32_cond_list_lock, &node); - cv = ptw32_cond_list_head; + cv = __ptw32_cond_list_head; while (cv != NULL && 0 == result) { @@ -107,7 +107,7 @@ pthread_timechange_handler_np (void *arg) cv = cv->next; } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); return (void *) (size_t) (result != 0 ? EAGAIN : 0); } diff --git a/pthread_timedjoin_np.c b/pthread_timedjoin_np.c index 827b6f67..0eec13cb 100644 --- a/pthread_timedjoin_np.c +++ b/pthread_timedjoin_np.c @@ -103,8 +103,8 @@ pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec int result; pthread_t self; DWORD milliseconds; - ptw32_thread_t * tp = (ptw32_thread_t *) thread.p; - ptw32_mcs_local_node_t node; + __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; + __ptw32_mcs_local_node_t node; if (abstime == NULL) { @@ -115,10 +115,10 @@ pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec /* * Calculate timeout as milliseconds from current system time. */ - milliseconds = ptw32_relmillisecs (abstime); + milliseconds = __ptw32_relmillisecs (abstime); } - ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &node); + __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); if (NULL == tp || thread.x != tp->ptHandle.x) @@ -134,7 +134,7 @@ pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec result = 0; } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); if (result == 0) { diff --git a/pthread_tryjoin_np.c b/pthread_tryjoin_np.c index e9fe1dae..cdc47584 100644 --- a/pthread_tryjoin_np.c +++ b/pthread_tryjoin_np.c @@ -96,10 +96,10 @@ pthread_tryjoin_np (pthread_t thread, void **value_ptr) { int result; pthread_t self; - ptw32_thread_t * tp = (ptw32_thread_t *) thread.p; - ptw32_mcs_local_node_t node; + __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; + __ptw32_mcs_local_node_t node; - ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &node); + __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); if (NULL == tp || thread.x != tp->ptHandle.x) @@ -115,7 +115,7 @@ pthread_tryjoin_np (pthread_t thread, void **value_ptr) result = 0; } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); if (result == 0) { diff --git a/pthread_win32_attach_detach_np.c b/pthread_win32_attach_detach_np.c index e61ac4b7..247681dd 100644 --- a/pthread_win32_attach_detach_np.c +++ b/pthread_win32_attach_detach_np.c @@ -42,14 +42,14 @@ #include "pthread.h" #include "implement.h" #include -#if ! (defined(__GNUC__) || defined(PTW32_CONFIG_MSVC7) || defined(WINCE)) +#if ! (defined(__GNUC__) || defined (__PTW32_CONFIG_MSVC7) || defined(WINCE)) # include #endif /* * Handle to quserex.dll */ -static HINSTANCE ptw32_h_quserex; +static HINSTANCE __ptw32_h_quserex; BOOL pthread_win32_process_attach_np () @@ -57,19 +57,19 @@ pthread_win32_process_attach_np () TCHAR QuserExDLLPathBuf[1024]; BOOL result = TRUE; - result = ptw32_processInitialize (); + result = __ptw32_processInitialize (); #if defined(_UWIN) pthread_count++; #endif #if defined(__GNUC__) - ptw32_features = 0; + __ptw32_features = 0; #else /* * This is obsolete now. */ - ptw32_features = PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE; + __ptw32_features = __PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE; #endif /* @@ -79,44 +79,44 @@ pthread_win32_process_attach_np () * * This should take care of any security issues. */ -#if defined(__GNUC__) || defined(PTW32_CONFIG_MSVC7) +#if defined(__GNUC__) || defined (__PTW32_CONFIG_MSVC7) if(GetSystemDirectory(QuserExDLLPathBuf, sizeof(QuserExDLLPathBuf))) { (void) strncat(QuserExDLLPathBuf, "\\QUSEREX.DLL", sizeof(QuserExDLLPathBuf) - strlen(QuserExDLLPathBuf) - 1); - ptw32_h_quserex = LoadLibrary(QuserExDLLPathBuf); + __ptw32_h_quserex = LoadLibrary(QuserExDLLPathBuf); } #else # if ! defined(WINCE) if(GetSystemDirectory(QuserExDLLPathBuf, sizeof(QuserExDLLPathBuf)/sizeof(TCHAR)) && 0 == _tcsncat_s(QuserExDLLPathBuf, _countof(QuserExDLLPathBuf), TEXT("\\QUSEREX.DLL"), 12)) { - ptw32_h_quserex = LoadLibrary(QuserExDLLPathBuf); + __ptw32_h_quserex = LoadLibrary(QuserExDLLPathBuf); } # endif #endif - if (ptw32_h_quserex != NULL) + if (__ptw32_h_quserex != NULL) { - ptw32_register_cancellation = (DWORD (*)(PAPCFUNC, HANDLE, DWORD)) + __ptw32_register_cancellation = (DWORD (*)(PAPCFUNC, HANDLE, DWORD)) #if defined(NEED_UNICODE_CONSTS) - GetProcAddress (ptw32_h_quserex, + GetProcAddress (__ptw32_h_quserex, (const TCHAR *) TEXT ("QueueUserAPCEx")); #else - GetProcAddress (ptw32_h_quserex, (LPCSTR) "QueueUserAPCEx"); + GetProcAddress (__ptw32_h_quserex, (LPCSTR) "QueueUserAPCEx"); #endif } - if (NULL == ptw32_register_cancellation) + if (NULL == __ptw32_register_cancellation) { - ptw32_register_cancellation = ptw32_Registercancellation; + __ptw32_register_cancellation = __ptw32_Registercancellation; - if (ptw32_h_quserex != NULL) + if (__ptw32_h_quserex != NULL) { - (void) FreeLibrary (ptw32_h_quserex); + (void) FreeLibrary (__ptw32_h_quserex); } - ptw32_h_quserex = 0; + __ptw32_h_quserex = 0; } else { @@ -125,24 +125,24 @@ pthread_win32_process_attach_np () queue_user_apc_ex_init = (BOOL (*)(VOID)) #if defined(NEED_UNICODE_CONSTS) - GetProcAddress (ptw32_h_quserex, + GetProcAddress (__ptw32_h_quserex, (const TCHAR *) TEXT ("QueueUserAPCEx_Init")); #else - GetProcAddress (ptw32_h_quserex, (LPCSTR) "QueueUserAPCEx_Init"); + GetProcAddress (__ptw32_h_quserex, (LPCSTR) "QueueUserAPCEx_Init"); #endif if (queue_user_apc_ex_init == NULL || !queue_user_apc_ex_init ()) { - ptw32_register_cancellation = ptw32_Registercancellation; + __ptw32_register_cancellation = __ptw32_Registercancellation; - (void) FreeLibrary (ptw32_h_quserex); - ptw32_h_quserex = 0; + (void) FreeLibrary (__ptw32_h_quserex); + __ptw32_h_quserex = 0; } } - if (ptw32_h_quserex) + if (__ptw32_h_quserex) { - ptw32_features |= PTW32_ALERTABLE_ASYNC_CANCEL; + __ptw32_features |= __PTW32_ALERTABLE_ASYNC_CANCEL; } return result; @@ -152,9 +152,9 @@ pthread_win32_process_attach_np () BOOL pthread_win32_process_detach_np () { - if (ptw32_processInitialized) + if (__ptw32_processInitialized) { - ptw32_thread_t * sp = (ptw32_thread_t *) pthread_getspecific (ptw32_selfThreadKey); + __ptw32_thread_t * sp = (__ptw32_thread_t *) pthread_getspecific (__ptw32_selfThreadKey); if (sp != NULL) { @@ -164,10 +164,10 @@ pthread_win32_process_detach_np () */ if (sp->detachState == PTHREAD_CREATE_DETACHED) { - ptw32_threadDestroy (sp->ptHandle); - if (ptw32_selfThreadKey) + __ptw32_threadDestroy (sp->ptHandle); + if (__ptw32_selfThreadKey) { - TlsSetValue (ptw32_selfThreadKey->key, NULL); + TlsSetValue (__ptw32_selfThreadKey->key, NULL); } } } @@ -175,26 +175,26 @@ pthread_win32_process_detach_np () /* * The DLL is being unmapped from the process's address space */ - ptw32_processTerminate (); + __ptw32_processTerminate (); - if (ptw32_h_quserex) + if (__ptw32_h_quserex) { /* Close QueueUserAPCEx */ BOOL (*queue_user_apc_ex_fini) (VOID); queue_user_apc_ex_fini = (BOOL (*)(VOID)) #if defined(NEED_UNICODE_CONSTS) - GetProcAddress (ptw32_h_quserex, + GetProcAddress (__ptw32_h_quserex, (const TCHAR *) TEXT ("QueueUserAPCEx_Fini")); #else - GetProcAddress (ptw32_h_quserex, (LPCSTR) "QueueUserAPCEx_Fini"); + GetProcAddress (__ptw32_h_quserex, (LPCSTR) "QueueUserAPCEx_Fini"); #endif if (queue_user_apc_ex_fini != NULL) { (void) queue_user_apc_ex_fini (); } - (void) FreeLibrary (ptw32_h_quserex); + (void) FreeLibrary (__ptw32_h_quserex); } } @@ -210,26 +210,26 @@ pthread_win32_thread_attach_np () BOOL pthread_win32_thread_detach_np () { - if (ptw32_processInitialized) + if (__ptw32_processInitialized) { /* * Don't use pthread_self() - to avoid creating an implicit POSIX thread handle * unnecessarily. */ - ptw32_thread_t * sp = (ptw32_thread_t *) pthread_getspecific (ptw32_selfThreadKey); + __ptw32_thread_t * sp = (__ptw32_thread_t *) pthread_getspecific (__ptw32_selfThreadKey); if (sp != NULL) // otherwise Win32 thread with no implicit POSIX handle. { - ptw32_mcs_local_node_t stateLock; - ptw32_callUserDestroyRoutines (sp->ptHandle); + __ptw32_mcs_local_node_t stateLock; + __ptw32_callUserDestroyRoutines (sp->ptHandle); - ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); + __ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); sp->state = PThreadStateLast; /* * If the thread is joinable at this point then it MUST be joined * or detached explicitly by the application. */ - ptw32_mcs_lock_release (&stateLock); + __ptw32_mcs_lock_release (&stateLock); /* * Robust Mutexes @@ -237,10 +237,10 @@ pthread_win32_thread_detach_np () while (sp->robustMxList != NULL) { pthread_mutex_t mx = sp->robustMxList->mx; - ptw32_robust_mutex_remove(&mx, sp); - (void) PTW32_INTERLOCKED_EXCHANGE_LONG( - (PTW32_INTERLOCKED_LONGPTR)&mx->robustNode->stateInconsistent, - (PTW32_INTERLOCKED_LONG)-1); + __ptw32_robust_mutex_remove(&mx, sp); + (void) __PTW32_INTERLOCKED_EXCHANGE_LONG( + (__PTW32_INTERLOCKED_LONGPTR)&mx->robustNode->stateInconsistent, + (__PTW32_INTERLOCKED_LONG)-1); /* * If there are no waiters then the next thread to block will * sleep, wake up immediately and then go back to sleep. @@ -252,11 +252,11 @@ pthread_win32_thread_detach_np () if (sp->detachState == PTHREAD_CREATE_DETACHED) { - ptw32_threadDestroy (sp->ptHandle); + __ptw32_threadDestroy (sp->ptHandle); - if (ptw32_selfThreadKey) + if (__ptw32_selfThreadKey) { - TlsSetValue (ptw32_selfThreadKey->key, NULL); + TlsSetValue (__ptw32_selfThreadKey->key, NULL); } } } @@ -268,5 +268,5 @@ pthread_win32_thread_detach_np () BOOL pthread_win32_test_features_np (int feature_mask) { - return ((ptw32_features & feature_mask) == feature_mask); + return ((__ptw32_features & feature_mask) == feature_mask); } diff --git a/ptw32_MCS_lock.c b/ptw32_MCS_lock.c index ad89b2b2..48623a58 100644 --- a/ptw32_MCS_lock.c +++ b/ptw32_MCS_lock.c @@ -59,33 +59,33 @@ * * Usage of MCS locks: * - * - you need a global ptw32_mcs_lock_t instance initialised to 0 or NULL. - * - you need a local thread-scope ptw32_mcs_local_node_t instance, which + * - you need a global __ptw32_mcs_lock_t instance initialised to 0 or NULL. + * - you need a local thread-scope __ptw32_mcs_local_node_t instance, which * may serve several different locks but you need at least one node for * every lock held concurrently by a thread. * * E.g.: * - * ptw32_mcs_lock_t lock1 = 0; - * ptw32_mcs_lock_t lock2 = 0; + * __ptw32_mcs_lock_t lock1 = 0; + * __ptw32_mcs_lock_t lock2 = 0; * * void *mythread(void *arg) * { - * ptw32_mcs_local_node_t node; + * __ptw32_mcs_local_node_t node; * - * ptw32_mcs_acquire (&lock1, &node); - * ptw32_mcs_lock_release (&node); + * __ptw32_mcs_acquire (&lock1, &node); + * __ptw32_mcs_lock_release (&node); * - * ptw32_mcs_lock_acquire (&lock2, &node); - * ptw32_mcs_lock_release (&node); + * __ptw32_mcs_lock_acquire (&lock2, &node); + * __ptw32_mcs_lock_release (&node); * { - * ptw32_mcs_local_node_t nodex; + * __ptw32_mcs_local_node_t nodex; * - * ptw32_mcs_lock_acquire (&lock1, &node); - * ptw32_mcs_lock_acquire (&lock2, &nodex); + * __ptw32_mcs_lock_acquire (&lock1, &node); + * __ptw32_mcs_lock_acquire (&lock2, &nodex); * - * ptw32_mcs_lock_release (&nodex); - * ptw32_mcs_lock_release (&node); + * __ptw32_mcs_lock_release (&nodex); + * __ptw32_mcs_lock_release (&node); * } * return (void *)0; * } @@ -101,18 +101,18 @@ #include "implement.h" /* - * ptw32_mcs_flag_set -- notify another thread about an event. + * __ptw32_mcs_flag_set -- notify another thread about an event. * * Set event if an event handle has been stored in the flag, and * set flag to -1 otherwise. Note that -1 cannot be a valid handle value. */ INLINE void -ptw32_mcs_flag_set (HANDLE * flag) +__ptw32_mcs_flag_set (HANDLE * flag) { - HANDLE e = (HANDLE)(PTW32_INTERLOCKED_SIZE)PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE( - (PTW32_INTERLOCKED_SIZEPTR)flag, - (PTW32_INTERLOCKED_SIZE)-1, - (PTW32_INTERLOCKED_SIZE)0); + HANDLE e = (HANDLE) (__PTW32_INTERLOCKED_SIZE)__PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE( + (__PTW32_INTERLOCKED_SIZEPTR)flag, + (__PTW32_INTERLOCKED_SIZE)-1, + (__PTW32_INTERLOCKED_SIZE)0); /* * NOTE: when e == -1 and the MSVC debugger is attached to * the process, we get an exception that halts the @@ -131,26 +131,26 @@ ptw32_mcs_flag_set (HANDLE * flag) } /* - * ptw32_mcs_flag_wait -- wait for notification from another. + * __ptw32_mcs_flag_wait -- wait for notification from another. * * Store an event handle in the flag and wait on it if the flag has not been * set, and proceed without creating an event otherwise. */ INLINE void -ptw32_mcs_flag_wait (HANDLE * flag) +__ptw32_mcs_flag_wait (HANDLE * flag) { - if ((PTW32_INTERLOCKED_SIZE)0 == - PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE((PTW32_INTERLOCKED_SIZEPTR)flag, - (PTW32_INTERLOCKED_SIZE)0)) /* MBR fence */ + if ((__PTW32_INTERLOCKED_SIZE)0 == + __PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE ((__PTW32_INTERLOCKED_SIZEPTR)flag, + (__PTW32_INTERLOCKED_SIZE)0)) /* MBR fence */ { /* the flag is not set. create event. */ - HANDLE e = CreateEvent(NULL, PTW32_FALSE, PTW32_FALSE, NULL); + HANDLE e = CreateEvent(NULL, __PTW32_FALSE, __PTW32_FALSE, NULL); - if ((PTW32_INTERLOCKED_SIZE)0 == PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE( - (PTW32_INTERLOCKED_SIZEPTR)flag, - (PTW32_INTERLOCKED_SIZE)e, - (PTW32_INTERLOCKED_SIZE)0)) + if ((__PTW32_INTERLOCKED_SIZE)0 == __PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE( + (__PTW32_INTERLOCKED_SIZEPTR)flag, + (__PTW32_INTERLOCKED_SIZE)e, + (__PTW32_INTERLOCKED_SIZE)0)) { /* stored handle in the flag. wait on it now. */ WaitForSingleObject(e, INFINITE); @@ -161,20 +161,20 @@ ptw32_mcs_flag_wait (HANDLE * flag) } /* - * ptw32_mcs_lock_acquire -- acquire an MCS lock. + * __ptw32_mcs_lock_acquire -- acquire an MCS lock. * * See: * J. M. Mellor-Crummey and M. L. Scott. * Algorithms for Scalable Synchronization on Shared-Memory Multiprocessors. * ACM Transactions on Computer Systems, 9(1):21-65, Feb. 1991. */ -#if defined(PTW32_BUILD_INLINED) +#if defined (__PTW32_BUILD_INLINED) INLINE -#endif /* PTW32_BUILD_INLINED */ +#endif /* __PTW32_BUILD_INLINED */ void -ptw32_mcs_lock_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node) +__ptw32_mcs_lock_acquire (__ptw32_mcs_lock_t * lock, __ptw32_mcs_local_node_t * node) { - ptw32_mcs_local_node_t *pred; + __ptw32_mcs_local_node_t *pred; node->lock = lock; node->nextFlag = 0; @@ -182,87 +182,87 @@ ptw32_mcs_lock_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node) node->next = 0; /* initially, no successor */ /* queue for the lock */ - pred = (ptw32_mcs_local_node_t *)PTW32_INTERLOCKED_EXCHANGE_PTR((PTW32_INTERLOCKED_PVOID_PTR)lock, - (PTW32_INTERLOCKED_PVOID)node); + pred = (__ptw32_mcs_local_node_t *)__PTW32_INTERLOCKED_EXCHANGE_PTR ((__PTW32_INTERLOCKED_PVOID_PTR)lock, + (__PTW32_INTERLOCKED_PVOID)node); if (0 != pred) { /* the lock was not free. link behind predecessor. */ - PTW32_INTERLOCKED_EXCHANGE_PTR((PTW32_INTERLOCKED_PVOID_PTR)&pred->next, (PTW32_INTERLOCKED_PVOID)node); - ptw32_mcs_flag_set(&pred->nextFlag); - ptw32_mcs_flag_wait(&node->readyFlag); + __PTW32_INTERLOCKED_EXCHANGE_PTR ((__PTW32_INTERLOCKED_PVOID_PTR)&pred->next, (__PTW32_INTERLOCKED_PVOID)node); + __ptw32_mcs_flag_set(&pred->nextFlag); + __ptw32_mcs_flag_wait(&node->readyFlag); } } /* - * ptw32_mcs_lock_release -- release an MCS lock. + * __ptw32_mcs_lock_release -- release an MCS lock. * * See: * J. M. Mellor-Crummey and M. L. Scott. * Algorithms for Scalable Synchronization on Shared-Memory Multiprocessors. * ACM Transactions on Computer Systems, 9(1):21-65, Feb. 1991. */ -#if defined(PTW32_BUILD_INLINED) +#if defined (__PTW32_BUILD_INLINED) INLINE -#endif /* PTW32_BUILD_INLINED */ +#endif /* __PTW32_BUILD_INLINED */ void -ptw32_mcs_lock_release (ptw32_mcs_local_node_t * node) +__ptw32_mcs_lock_release (__ptw32_mcs_local_node_t * node) { - ptw32_mcs_lock_t *lock = node->lock; - ptw32_mcs_local_node_t *next = - (ptw32_mcs_local_node_t *) - PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE((PTW32_INTERLOCKED_SIZEPTR)&node->next, (PTW32_INTERLOCKED_SIZE)0); /* MBR fence */ + __ptw32_mcs_lock_t *lock = node->lock; + __ptw32_mcs_local_node_t *next = + (__ptw32_mcs_local_node_t *) + __PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE ((__PTW32_INTERLOCKED_SIZEPTR)&node->next, (__PTW32_INTERLOCKED_SIZE)0); /* MBR fence */ if (0 == next) { /* no known successor */ - if (node == (ptw32_mcs_local_node_t *) - PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR((PTW32_INTERLOCKED_PVOID_PTR)lock, - (PTW32_INTERLOCKED_PVOID)0, - (PTW32_INTERLOCKED_PVOID)node)) + if (node == (__ptw32_mcs_local_node_t *) + __PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR ((__PTW32_INTERLOCKED_PVOID_PTR)lock, + (__PTW32_INTERLOCKED_PVOID)0, + (__PTW32_INTERLOCKED_PVOID)node)) { /* no successor, lock is free now */ return; } /* wait for successor */ - ptw32_mcs_flag_wait(&node->nextFlag); - next = (ptw32_mcs_local_node_t *) - PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE((PTW32_INTERLOCKED_SIZEPTR)&node->next, (PTW32_INTERLOCKED_SIZE)0); /* MBR fence */ + __ptw32_mcs_flag_wait(&node->nextFlag); + next = (__ptw32_mcs_local_node_t *) + __PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE ((__PTW32_INTERLOCKED_SIZEPTR)&node->next, (__PTW32_INTERLOCKED_SIZE)0); /* MBR fence */ } else { /* Even if the next is non-0, the successor may still be trying to set the next flag on us, therefore we must wait. */ - ptw32_mcs_flag_wait(&node->nextFlag); + __ptw32_mcs_flag_wait(&node->nextFlag); } /* pass the lock */ - ptw32_mcs_flag_set(&next->readyFlag); + __ptw32_mcs_flag_set(&next->readyFlag); } /* - * ptw32_mcs_lock_try_acquire + * __ptw32_mcs_lock_try_acquire */ -#if defined(PTW32_BUILD_INLINED) +#if defined (__PTW32_BUILD_INLINED) INLINE -#endif /* PTW32_BUILD_INLINED */ +#endif /* __PTW32_BUILD_INLINED */ int -ptw32_mcs_lock_try_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node) +__ptw32_mcs_lock_try_acquire (__ptw32_mcs_lock_t * lock, __ptw32_mcs_local_node_t * node) { node->lock = lock; node->nextFlag = 0; node->readyFlag = 0; node->next = 0; /* initially, no successor */ - return ((PTW32_INTERLOCKED_PVOID)PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR((PTW32_INTERLOCKED_PVOID_PTR)lock, - (PTW32_INTERLOCKED_PVOID)node, - (PTW32_INTERLOCKED_PVOID)0) - == (PTW32_INTERLOCKED_PVOID)0) ? 0 : EBUSY; + return ((__PTW32_INTERLOCKED_PVOID)__PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR ((__PTW32_INTERLOCKED_PVOID_PTR)lock, + (__PTW32_INTERLOCKED_PVOID)node, + (__PTW32_INTERLOCKED_PVOID)0) + == (__PTW32_INTERLOCKED_PVOID)0) ? 0 : EBUSY; } /* - * ptw32_mcs_node_transfer -- move an MCS lock local node, usually from thread + * __ptw32_mcs_node_transfer -- move an MCS lock local node, usually from thread * space to, for example, global space so that another thread can release * the lock on behalf of the current lock owner. * @@ -272,20 +272,20 @@ ptw32_mcs_lock_try_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * no * * Should only be called by the thread that has the lock. */ -#if defined(PTW32_BUILD_INLINED) +#if defined (__PTW32_BUILD_INLINED) INLINE -#endif /* PTW32_BUILD_INLINED */ +#endif /* __PTW32_BUILD_INLINED */ void -ptw32_mcs_node_transfer (ptw32_mcs_local_node_t * new_node, ptw32_mcs_local_node_t * old_node) +__ptw32_mcs_node_transfer (__ptw32_mcs_local_node_t * new_node, __ptw32_mcs_local_node_t * old_node) { new_node->lock = old_node->lock; new_node->nextFlag = 0; /* Not needed - used only in initial Acquire */ new_node->readyFlag = 0; /* Not needed - we were waiting on this */ new_node->next = 0; - if ((ptw32_mcs_local_node_t *)PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR((PTW32_INTERLOCKED_PVOID_PTR)new_node->lock, - (PTW32_INTERLOCKED_PVOID)new_node, - (PTW32_INTERLOCKED_PVOID)old_node) + if ((__ptw32_mcs_local_node_t *)__PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR ((__PTW32_INTERLOCKED_PVOID_PTR)new_node->lock, + (__PTW32_INTERLOCKED_PVOID)new_node, + (__PTW32_INTERLOCKED_PVOID)old_node) != old_node) { /* @@ -297,7 +297,7 @@ ptw32_mcs_node_transfer (ptw32_mcs_local_node_t * new_node, ptw32_mcs_local_node } /* we must wait for the next Node to finish inserting itself. */ - ptw32_mcs_flag_wait(&old_node->nextFlag); + __ptw32_mcs_flag_wait(&old_node->nextFlag); /* * Copy the nextFlag state also so we don't block on it when releasing * this lock. diff --git a/ptw32_callUserDestroyRoutines.c b/ptw32_callUserDestroyRoutines.c index 88325dc9..d0d20321 100644 --- a/ptw32_callUserDestroyRoutines.c +++ b/ptw32_callUserDestroyRoutines.c @@ -43,7 +43,7 @@ #include "pthread.h" #include "implement.h" -#if defined(__CLEANUP_CXX) +#if defined(__PTW32_CLEANUP_CXX) # if defined(_MSC_VER) # include # elif defined(__WATCOMC__) @@ -61,7 +61,7 @@ #endif void -ptw32_callUserDestroyRoutines (pthread_t thread) +__ptw32_callUserDestroyRoutines (pthread_t thread) /* * ------------------------------------------------------------------- * DOCPRIVATE @@ -83,11 +83,11 @@ ptw32_callUserDestroyRoutines (pthread_t thread) if (thread.p != NULL) { - ptw32_mcs_local_node_t threadLock; - ptw32_mcs_local_node_t keyLock; + __ptw32_mcs_local_node_t threadLock; + __ptw32_mcs_local_node_t keyLock; int assocsRemaining; int iterations = 0; - ptw32_thread_t * sp = (ptw32_thread_t *) thread.p; + __ptw32_thread_t * sp = (__ptw32_thread_t *) thread.p; /* * Run through all Thread<-->Key associations @@ -100,7 +100,7 @@ ptw32_callUserDestroyRoutines (pthread_t thread) assocsRemaining = 0; iterations++; - ptw32_mcs_lock_acquire(&(sp->threadLock), &threadLock); + __ptw32_mcs_lock_acquire(&(sp->threadLock), &threadLock); /* * The pointer to the next assoc is stored in the thread struct so that * the assoc destructor in pthread_key_delete can adjust it @@ -110,7 +110,7 @@ ptw32_callUserDestroyRoutines (pthread_t thread) * before us. */ sp->nextAssoc = sp->keys; - ptw32_mcs_lock_release(&threadLock); + __ptw32_mcs_lock_release(&threadLock); for (;;) { @@ -123,12 +123,12 @@ ptw32_callUserDestroyRoutines (pthread_t thread) * both assoc guards, but in the reverse order to our convention, * so we must be careful to avoid deadlock. */ - ptw32_mcs_lock_acquire(&(sp->threadLock), &threadLock); + __ptw32_mcs_lock_acquire(&(sp->threadLock), &threadLock); if ((assoc = (ThreadKeyAssoc *)sp->nextAssoc) == NULL) { /* Finished */ - ptw32_mcs_lock_release(&threadLock); + __ptw32_mcs_lock_release(&threadLock); break; } else @@ -143,9 +143,9 @@ ptw32_callUserDestroyRoutines (pthread_t thread) * If we fail, we need to relinquish the first lock and the * processor and then try to acquire them all again. */ - if (ptw32_mcs_lock_try_acquire(&(assoc->key->keyLock), &keyLock) == EBUSY) + if (__ptw32_mcs_lock_try_acquire(&(assoc->key->keyLock), &keyLock) == EBUSY) { - ptw32_mcs_lock_release(&threadLock); + __ptw32_mcs_lock_release(&threadLock); Sleep(0); /* * Go around again. @@ -182,8 +182,8 @@ ptw32_callUserDestroyRoutines (pthread_t thread) * pthread_setspecific can also be run from destructors and * also needs to be able to access the assocs. */ - ptw32_mcs_lock_release(&threadLock); - ptw32_mcs_lock_release(&keyLock); + __ptw32_mcs_lock_release(&threadLock); + __ptw32_mcs_lock_release(&keyLock); assocsRemaining++; @@ -226,12 +226,12 @@ ptw32_callUserDestroyRoutines (pthread_t thread) * Remove association from both the key and thread chains * and reclaim it's memory resources. */ - ptw32_tkAssocDestroy (assoc); - ptw32_mcs_lock_release(&threadLock); - ptw32_mcs_lock_release(&keyLock); + __ptw32_tkAssocDestroy (assoc); + __ptw32_mcs_lock_release(&threadLock); + __ptw32_mcs_lock_release(&keyLock); } } } while (assocsRemaining); } -} /* ptw32_callUserDestroyRoutines */ +} /* __ptw32_callUserDestroyRoutines */ diff --git a/ptw32_calloc.c b/ptw32_calloc.c index b01c335e..bc6a5b0e 100644 --- a/ptw32_calloc.c +++ b/ptw32_calloc.c @@ -45,7 +45,7 @@ #if defined(NEED_CALLOC) void * -ptw32_calloc (size_t n, size_t s) +__ptw32_calloc (size_t n, size_t s) { unsigned int m = n * s; void *p; diff --git a/ptw32_cond_check_need_init.c b/ptw32_cond_check_need_init.c index 251678cc..fb3e41f7 100644 --- a/ptw32_cond_check_need_init.c +++ b/ptw32_cond_check_need_init.c @@ -45,16 +45,16 @@ INLINE int -ptw32_cond_check_need_init (pthread_cond_t * cond) +__ptw32_cond_check_need_init (pthread_cond_t * cond) { int result = 0; - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; /* * The following guarded test is specifically for statically * initialised condition variables (via PTHREAD_OBJECT_INITIALIZER). */ - ptw32_mcs_lock_acquire(&ptw32_cond_test_init_lock, &node); + __ptw32_mcs_lock_acquire(&__ptw32_cond_test_init_lock, &node); /* * We got here possibly under race @@ -77,7 +77,7 @@ ptw32_cond_check_need_init (pthread_cond_t * cond) result = EINVAL; } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); return result; } diff --git a/ptw32_getprocessors.c b/ptw32_getprocessors.c index 4ac3cce9..0ec6054c 100644 --- a/ptw32_getprocessors.c +++ b/ptw32_getprocessors.c @@ -45,7 +45,7 @@ /* - * ptw32_getprocessors() + * __ptw32_getprocessors() * * Get the number of CPUs available to the process. * @@ -58,7 +58,7 @@ * newly initialised spinlocks will notice. */ int -ptw32_getprocessors (int *count) +__ptw32_getprocessors (int *count) { DWORD_PTR vProcessCPUs; DWORD_PTR vSystemCPUs; diff --git a/ptw32_is_attr.c b/ptw32_is_attr.c index 80917cfb..01ca0363 100644 --- a/ptw32_is_attr.c +++ b/ptw32_is_attr.c @@ -43,10 +43,10 @@ #include "implement.h" int -ptw32_is_attr (const pthread_attr_t * attr) +__ptw32_is_attr (const pthread_attr_t * attr) { /* Return 0 if the attr object is valid, non-zero otherwise. */ return (attr == NULL || - *attr == NULL || (*attr)->valid != PTW32_ATTR_VALID); + *attr == NULL || (*attr)->valid != __PTW32_ATTR_VALID); } diff --git a/ptw32_mutex_check_need_init.c b/ptw32_mutex_check_need_init.c index 846a4b7c..6c189a57 100644 --- a/ptw32_mutex_check_need_init.c +++ b/ptw32_mutex_check_need_init.c @@ -42,22 +42,22 @@ #include "pthread.h" #include "implement.h" -static struct pthread_mutexattr_t_ ptw32_recursive_mutexattr_s = +static struct pthread_mutexattr_t_ __ptw32_recursive_mutexattr_s = {PTHREAD_PROCESS_PRIVATE, PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_STALLED}; -static struct pthread_mutexattr_t_ ptw32_errorcheck_mutexattr_s = +static struct pthread_mutexattr_t_ __ptw32_errorcheck_mutexattr_s = {PTHREAD_PROCESS_PRIVATE, PTHREAD_MUTEX_ERRORCHECK, PTHREAD_MUTEX_STALLED}; -static pthread_mutexattr_t ptw32_recursive_mutexattr = &ptw32_recursive_mutexattr_s; -static pthread_mutexattr_t ptw32_errorcheck_mutexattr = &ptw32_errorcheck_mutexattr_s; +static pthread_mutexattr_t __ptw32_recursive_mutexattr = &__ptw32_recursive_mutexattr_s; +static pthread_mutexattr_t __ptw32_errorcheck_mutexattr = &__ptw32_errorcheck_mutexattr_s; INLINE int -ptw32_mutex_check_need_init (pthread_mutex_t * mutex) +__ptw32_mutex_check_need_init (pthread_mutex_t * mutex) { register int result = 0; register pthread_mutex_t mtx; - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; - ptw32_mcs_lock_acquire(&ptw32_mutex_test_init_lock, &node); + __ptw32_mcs_lock_acquire(&__ptw32_mutex_test_init_lock, &node); /* * We got here possibly under race @@ -75,11 +75,11 @@ ptw32_mutex_check_need_init (pthread_mutex_t * mutex) } else if (mtx == PTHREAD_RECURSIVE_MUTEX_INITIALIZER) { - result = pthread_mutex_init (mutex, &ptw32_recursive_mutexattr); + result = pthread_mutex_init (mutex, &__ptw32_recursive_mutexattr); } else if (mtx == PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) { - result = pthread_mutex_init (mutex, &ptw32_errorcheck_mutexattr); + result = pthread_mutex_init (mutex, &__ptw32_errorcheck_mutexattr); } else if (mtx == NULL) { @@ -91,7 +91,7 @@ ptw32_mutex_check_need_init (pthread_mutex_t * mutex) result = EINVAL; } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); return (result); } diff --git a/ptw32_new.c b/ptw32_new.c index 9fa460bf..79c673af 100644 --- a/ptw32_new.c +++ b/ptw32_new.c @@ -44,38 +44,38 @@ pthread_t -ptw32_new (void) +__ptw32_new (void) { pthread_t t; pthread_t nil = {NULL, 0}; - ptw32_thread_t * tp; + __ptw32_thread_t * tp; /* * If there's a reusable pthread_t then use it. */ - t = ptw32_threadReusePop (); + t = __ptw32_threadReusePop (); if (NULL != t.p) { - tp = (ptw32_thread_t *) t.p; + tp = (__ptw32_thread_t *) t.p; } else { /* No reuse threads available */ - tp = (ptw32_thread_t *) calloc (1, sizeof(ptw32_thread_t)); + tp = (__ptw32_thread_t *) calloc (1, sizeof(__ptw32_thread_t)); if (tp == NULL) { return nil; } - /* ptHandle.p needs to point to it's parent ptw32_thread_t. */ + /* ptHandle.p needs to point to it's parent __ptw32_thread_t. */ t.p = tp->ptHandle.p = tp; t.x = tp->ptHandle.x = 0; } /* Set default state. */ - tp->seqNumber = ++ptw32_threadSeqNumber; + tp->seqNumber = ++__ptw32_threadSeqNumber; tp->sched_priority = THREAD_PRIORITY_NORMAL; tp->detachState = PTHREAD_CREATE_JOINABLE; tp->cancelState = PTHREAD_CANCEL_ENABLE; @@ -88,13 +88,13 @@ ptw32_new (void) #if defined(HAVE_CPU_AFFINITY) CPU_ZERO((cpu_set_t*)&tp->cpuset); #endif - tp->cancelEvent = CreateEvent (0, (int) PTW32_TRUE, /* manualReset */ - (int) PTW32_FALSE, /* setSignaled */ + tp->cancelEvent = CreateEvent (0, (int) __PTW32_TRUE, /* manualReset */ + (int) __PTW32_FALSE, /* setSignaled */ NULL); if (tp->cancelEvent == NULL) { - ptw32_threadReusePush (tp->ptHandle); + __ptw32_threadReusePush (tp->ptHandle); return nil; } diff --git a/ptw32_processInitialize.c b/ptw32_processInitialize.c index 31b96630..b9a64c5a 100644 --- a/ptw32_processInitialize.c +++ b/ptw32_processInitialize.c @@ -45,7 +45,7 @@ int -ptw32_processInitialize (void) +__ptw32_processInitialize (void) /* * ------------------------------------------------------ * DOCPRIVATE @@ -59,7 +59,7 @@ ptw32_processInitialize (void) * This function performs process wide initialization for * the pthread library. * If successful, this routine sets the global variable - * ptw32_processInitialized to TRUE. + * __ptw32_processInitialized to TRUE. * * RESULTS * TRUE if successful, @@ -68,72 +68,72 @@ ptw32_processInitialize (void) * ------------------------------------------------------ */ { - if (ptw32_processInitialized) + if (__ptw32_processInitialized) { - return PTW32_TRUE; + return __PTW32_TRUE; } /* * Explicitly initialise all variables from global.c */ - ptw32_threadReuseTop = PTW32_THREAD_REUSE_EMPTY; - ptw32_threadReuseBottom = PTW32_THREAD_REUSE_EMPTY; - ptw32_selfThreadKey = NULL; - ptw32_cleanupKey = NULL; - ptw32_cond_list_head = NULL; - ptw32_cond_list_tail = NULL; + __ptw32_threadReuseTop = __PTW32_THREAD_REUSE_EMPTY; + __ptw32_threadReuseBottom = __PTW32_THREAD_REUSE_EMPTY; + __ptw32_selfThreadKey = NULL; + __ptw32_cleanupKey = NULL; + __ptw32_cond_list_head = NULL; + __ptw32_cond_list_tail = NULL; - ptw32_concurrency = 0; + __ptw32_concurrency = 0; /* What features have been auto-detected */ - ptw32_features = 0; + __ptw32_features = 0; /* * Global [process wide] thread sequence Number */ - ptw32_threadSeqNumber = 0; + __ptw32_threadSeqNumber = 0; /* * Function pointer to QueueUserAPCEx if it exists, otherwise * it will be set at runtime to a substitute routine which cannot unblock * blocked threads. */ - ptw32_register_cancellation = NULL; + __ptw32_register_cancellation = NULL; /* * Global lock for managing pthread_t struct reuse. */ - ptw32_thread_reuse_lock = 0; + __ptw32_thread_reuse_lock = 0; /* * Global lock for testing internal state of statically declared mutexes. */ - ptw32_mutex_test_init_lock = 0; + __ptw32_mutex_test_init_lock = 0; /* * Global lock for testing internal state of PTHREAD_COND_INITIALIZER * created condition variables. */ - ptw32_cond_test_init_lock = 0; + __ptw32_cond_test_init_lock = 0; /* * Global lock for testing internal state of PTHREAD_RWLOCK_INITIALIZER * created read/write locks. */ - ptw32_rwlock_test_init_lock = 0; + __ptw32_rwlock_test_init_lock = 0; /* * Global lock for testing internal state of PTHREAD_SPINLOCK_INITIALIZER * created spin locks. */ - ptw32_spinlock_test_init_lock = 0; + __ptw32_spinlock_test_init_lock = 0; /* * Global lock for condition variable linked list. The list exists * to wake up CVs when a WM_TIMECHANGE message arrives. See * w32_TimeChangeHandler.c. */ - ptw32_cond_list_lock = 0; + __ptw32_cond_list_lock = 0; #if defined(_UWIN) /* @@ -142,18 +142,18 @@ ptw32_processInitialize (void) pthread_count = 0; #endif - ptw32_processInitialized = PTW32_TRUE; + __ptw32_processInitialized = __PTW32_TRUE; /* * Initialize Keys */ - if ((pthread_key_create (&ptw32_selfThreadKey, NULL) != 0) || - (pthread_key_create (&ptw32_cleanupKey, NULL) != 0)) + if ((pthread_key_create (&__ptw32_selfThreadKey, NULL) != 0) || + (pthread_key_create (&__ptw32_cleanupKey, NULL) != 0)) { - ptw32_processTerminate (); + __ptw32_processTerminate (); } - return (ptw32_processInitialized); + return (__ptw32_processInitialized); } /* processInitialize */ diff --git a/ptw32_processTerminate.c b/ptw32_processTerminate.c index 035bac6d..f53ad5a6 100644 --- a/ptw32_processTerminate.c +++ b/ptw32_processTerminate.c @@ -45,7 +45,7 @@ void -ptw32_processTerminate (void) +__ptw32_processTerminate (void) /* * ------------------------------------------------------ * DOCPRIVATE @@ -59,7 +59,7 @@ ptw32_processTerminate (void) * This function performs process wide termination for * the pthread library. * This routine sets the global variable - * ptw32_processInitialized to FALSE + * __ptw32_processInitialized to FALSE * * RESULTS * N/A @@ -67,44 +67,44 @@ ptw32_processTerminate (void) * ------------------------------------------------------ */ { - if (ptw32_processInitialized) + if (__ptw32_processInitialized) { - ptw32_thread_t * tp, * tpNext; - ptw32_mcs_local_node_t node; + __ptw32_thread_t * tp, * tpNext; + __ptw32_mcs_local_node_t node; - if (ptw32_selfThreadKey != NULL) + if (__ptw32_selfThreadKey != NULL) { /* - * Release ptw32_selfThreadKey + * Release __ptw32_selfThreadKey */ - pthread_key_delete (ptw32_selfThreadKey); + pthread_key_delete (__ptw32_selfThreadKey); - ptw32_selfThreadKey = NULL; + __ptw32_selfThreadKey = NULL; } - if (ptw32_cleanupKey != NULL) + if (__ptw32_cleanupKey != NULL) { /* - * Release ptw32_cleanupKey + * Release __ptw32_cleanupKey */ - pthread_key_delete (ptw32_cleanupKey); + pthread_key_delete (__ptw32_cleanupKey); - ptw32_cleanupKey = NULL; + __ptw32_cleanupKey = NULL; } - ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &node); + __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); - tp = ptw32_threadReuseTop; - while (tp != PTW32_THREAD_REUSE_EMPTY) + tp = __ptw32_threadReuseTop; + while (tp != __PTW32_THREAD_REUSE_EMPTY) { tpNext = tp->prevReuse; free (tp); tp = tpNext; } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); - ptw32_processInitialized = PTW32_FALSE; + __ptw32_processInitialized = __PTW32_FALSE; } } /* processTerminate */ diff --git a/ptw32_relmillisecs.c b/ptw32_relmillisecs.c index 13a3c9f2..7ea14185 100644 --- a/ptw32_relmillisecs.c +++ b/ptw32_relmillisecs.c @@ -49,11 +49,11 @@ static const int64_t NANOSEC_PER_SEC = 1000000000; static const int64_t NANOSEC_PER_MILLISEC = 1000000; static const int64_t MILLISEC_PER_SEC = 1000; -#if defined(PTW32_BUILD_INLINED) +#if defined (__PTW32_BUILD_INLINED) INLINE -#endif /* PTW32_BUILD_INLINED */ +#endif /* __PTW32_BUILD_INLINED */ DWORD -ptw32_relmillisecs (const struct timespec * abstime) +__ptw32_relmillisecs (const struct timespec * abstime) { DWORD milliseconds; int64_t tmpAbsMilliseconds; @@ -102,7 +102,7 @@ ptw32_relmillisecs (const struct timespec * abstime) GetSystemTimeAsFileTime(&ft); # endif - ptw32_filetime_to_timespec(&ft, &currSysTime); + __ptw32_filetime_to_timespec(&ft, &currSysTime); tmpCurrMilliseconds = (int64_t)currSysTime.tv_sec * MILLISEC_PER_SEC; tmpCurrMilliseconds += ((int64_t)currSysTime.tv_nsec + (NANOSEC_PER_MILLISEC/2)) @@ -189,7 +189,7 @@ pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * GetSystemTimeAsFileTime(&ft); # endif - ptw32_filetime_to_timespec(&ft, &currSysTime); + __ptw32_filetime_to_timespec(&ft, &currSysTime); sec = currSysTime.tv_sec; nsec = currSysTime.tv_nsec; diff --git a/ptw32_reuse.c b/ptw32_reuse.c index 9dbf8bff..86df4f88 100644 --- a/ptw32_reuse.c +++ b/ptw32_reuse.c @@ -53,18 +53,18 @@ * time. * * The original pthread_t struct plus all copies of it contain the address of - * the thread state struct ptw32_thread_t_ (p), plus a reuse counter (x). Each - * ptw32_thread_t contains the original copy of it's pthread_t (ptHandle). - * Once malloced, a ptw32_thread_t_ struct is not freed until the process exits. + * the thread state struct __ptw32_thread_t_ (p), plus a reuse counter (x). Each + * __ptw32_thread_t contains the original copy of it's pthread_t (ptHandle). + * Once malloced, a __ptw32_thread_t_ struct is not freed until the process exits. * * The thread reuse stack is a simple LILO stack managed through a singly - * linked list element in the ptw32_thread_t. + * linked list element in the __ptw32_thread_t. * - * Each time a thread is destroyed, the ptw32_thread_t address is pushed onto the + * Each time a thread is destroyed, the __ptw32_thread_t address is pushed onto the * reuse stack after it's ptHandle's reuse counter has been incremented. * * The following can now be said from this: - * - two pthread_t's refer to the same thread iff their ptw32_thread_t reference + * - two pthread_t's refer to the same thread iff their __ptw32_thread_t reference * pointers are equal and their reuse counters are equal. That is, * * equal = (a.p == b.p && a.x == b.x) @@ -72,7 +72,7 @@ * - a pthread_t copy refers to a destroyed thread if the reuse counter in * the copy is not equal to (i.e less than) the reuse counter in the original. * - * threadDestroyed = (copy.x != ((ptw32_thread_t *)copy.p)->ptHandle.x) + * threadDestroyed = (copy.x != ((__ptw32_thread_t *)copy.p)->ptHandle.x) * */ @@ -80,24 +80,24 @@ * Pop a clean pthread_t struct off the reuse stack. */ pthread_t -ptw32_threadReusePop (void) +__ptw32_threadReusePop (void) { pthread_t t = {NULL, 0}; - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; - ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &node); + __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); - if (PTW32_THREAD_REUSE_EMPTY != ptw32_threadReuseTop) + if (__PTW32_THREAD_REUSE_EMPTY != __ptw32_threadReuseTop) { - ptw32_thread_t * tp; + __ptw32_thread_t * tp; - tp = ptw32_threadReuseTop; + tp = __ptw32_threadReuseTop; - ptw32_threadReuseTop = tp->prevReuse; + __ptw32_threadReuseTop = tp->prevReuse; - if (PTW32_THREAD_REUSE_EMPTY == ptw32_threadReuseTop) + if (__PTW32_THREAD_REUSE_EMPTY == __ptw32_threadReuseTop) { - ptw32_threadReuseBottom = PTW32_THREAD_REUSE_EMPTY; + __ptw32_threadReuseBottom = __PTW32_THREAD_REUSE_EMPTY; } tp->prevReuse = NULL; @@ -105,7 +105,7 @@ ptw32_threadReusePop (void) t = tp->ptHandle; } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); return t; @@ -118,41 +118,41 @@ ptw32_threadReusePop (void) * destroyed before this, or never initialised. */ void -ptw32_threadReusePush (pthread_t thread) +__ptw32_threadReusePush (pthread_t thread) { - ptw32_thread_t * tp = (ptw32_thread_t *) thread.p; + __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; pthread_t t; - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; - ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &node); + __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); t = tp->ptHandle; - memset(tp, 0, sizeof(ptw32_thread_t)); + memset(tp, 0, sizeof(__ptw32_thread_t)); /* Must restore the original POSIX handle that we just wiped. */ tp->ptHandle = t; /* Bump the reuse counter now */ -#if defined(PTW32_THREAD_ID_REUSE_INCREMENT) - tp->ptHandle.x += PTW32_THREAD_ID_REUSE_INCREMENT; +#if defined (__PTW32_THREAD_ID_REUSE_INCREMENT) + tp->ptHandle.x += __PTW32_THREAD_ID_REUSE_INCREMENT; #else tp->ptHandle.x++; #endif tp->state = PThreadStateReuse; - tp->prevReuse = PTW32_THREAD_REUSE_EMPTY; + tp->prevReuse = __PTW32_THREAD_REUSE_EMPTY; - if (PTW32_THREAD_REUSE_EMPTY != ptw32_threadReuseBottom) + if (__PTW32_THREAD_REUSE_EMPTY != __ptw32_threadReuseBottom) { - ptw32_threadReuseBottom->prevReuse = tp; + __ptw32_threadReuseBottom->prevReuse = tp; } else { - ptw32_threadReuseTop = tp; + __ptw32_threadReuseTop = tp; } - ptw32_threadReuseBottom = tp; + __ptw32_threadReuseBottom = tp; - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); } diff --git a/ptw32_rwlock_cancelwrwait.c b/ptw32_rwlock_cancelwrwait.c index 9d5630c3..9552833c 100644 --- a/ptw32_rwlock_cancelwrwait.c +++ b/ptw32_rwlock_cancelwrwait.c @@ -43,7 +43,7 @@ #include "implement.h" void -ptw32_rwlock_cancelwrwait (void *arg) +__ptw32_rwlock_cancelwrwait (void *arg) { pthread_rwlock_t rwl = (pthread_rwlock_t) arg; diff --git a/ptw32_rwlock_check_need_init.c b/ptw32_rwlock_check_need_init.c index 8e24da88..a4a2bbbb 100644 --- a/ptw32_rwlock_check_need_init.c +++ b/ptw32_rwlock_check_need_init.c @@ -43,16 +43,16 @@ #include "implement.h" INLINE int -ptw32_rwlock_check_need_init (pthread_rwlock_t * rwlock) +__ptw32_rwlock_check_need_init (pthread_rwlock_t * rwlock) { int result = 0; - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; /* * The following guarded test is specifically for statically * initialised rwlocks (via PTHREAD_RWLOCK_INITIALIZER). */ - ptw32_mcs_lock_acquire(&ptw32_rwlock_test_init_lock, &node); + __ptw32_mcs_lock_acquire(&__ptw32_rwlock_test_init_lock, &node); /* * We got here possibly under race @@ -76,7 +76,7 @@ ptw32_rwlock_check_need_init (pthread_rwlock_t * rwlock) result = EINVAL; } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); return result; } diff --git a/ptw32_semwait.c b/ptw32_semwait.c index 9c76b6b9..d9b1bdd2 100644 --- a/ptw32_semwait.c +++ b/ptw32_semwait.c @@ -47,7 +47,7 @@ int -ptw32_semwait (sem_t * sem) +__ptw32_semwait (sem_t * sem) /* * ------------------------------------------------------ * DESCRIPTION @@ -71,14 +71,14 @@ ptw32_semwait (sem_t * sem) * ------------------------------------------------------ */ { - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; int v; int result = 0; sem_t s = *sem; - ptw32_mcs_lock_acquire(&s->lock, &node); + __ptw32_mcs_lock_acquire(&s->lock, &node); v = --s->value; - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); if (v < 0) { @@ -86,13 +86,13 @@ ptw32_semwait (sem_t * sem) if (WaitForSingleObject (s->sem, INFINITE) == WAIT_OBJECT_0) { #if defined(NEED_SEM) - ptw32_mcs_lock_acquire(&s->lock, &node); + __ptw32_mcs_lock_acquire(&s->lock, &node); if (s->leftToUnblock > 0) { --s->leftToUnblock; SetEvent(s->sem); } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); #endif return 0; } @@ -104,10 +104,10 @@ return 0; if (result != 0) { - PTW32_SET_ERRNO(result); + __PTW32_SET_ERRNO(result); return -1; } return 0; -} /* ptw32_semwait */ +} /* __ptw32_semwait */ diff --git a/ptw32_spinlock_check_need_init.c b/ptw32_spinlock_check_need_init.c index 1cd0ff3f..52db677b 100644 --- a/ptw32_spinlock_check_need_init.c +++ b/ptw32_spinlock_check_need_init.c @@ -44,16 +44,16 @@ INLINE int -ptw32_spinlock_check_need_init (pthread_spinlock_t * lock) +__ptw32_spinlock_check_need_init (pthread_spinlock_t * lock) { int result = 0; - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; /* * The following guarded test is specifically for statically * initialised spinlocks (via PTHREAD_SPINLOCK_INITIALIZER). */ - ptw32_mcs_lock_acquire(&ptw32_spinlock_test_init_lock, &node); + __ptw32_mcs_lock_acquire(&__ptw32_spinlock_test_init_lock, &node); /* * We got here possibly under race @@ -77,7 +77,7 @@ ptw32_spinlock_check_need_init (pthread_spinlock_t * lock) result = EINVAL; } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); return (result); } diff --git a/ptw32_threadDestroy.c b/ptw32_threadDestroy.c index a39dacd3..cdfe2145 100644 --- a/ptw32_threadDestroy.c +++ b/ptw32_threadDestroy.c @@ -45,10 +45,10 @@ void -ptw32_threadDestroy (pthread_t thread) +__ptw32_threadDestroy (pthread_t thread) { - ptw32_thread_t * tp = (ptw32_thread_t *) thread.p; - ptw32_thread_t threadCopy; + __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; + __ptw32_thread_t threadCopy; if (tp != NULL) { @@ -61,7 +61,7 @@ ptw32_threadDestroy (pthread_t thread) * Thread ID structs are never freed. They're NULLed and reused. * This also sets the thread to PThreadStateInitial (invalid). */ - ptw32_threadReusePush (thread); + __ptw32_threadReusePush (thread); /* Now work on the copy. */ if (threadCopy.cancelEvent != NULL) @@ -80,5 +80,5 @@ ptw32_threadDestroy (pthread_t thread) #endif } -} /* ptw32_threadDestroy */ +} /* __ptw32_threadDestroy */ diff --git a/ptw32_threadStart.c b/ptw32_threadStart.c index 1fabca2e..da74bc01 100644 --- a/ptw32_threadStart.c +++ b/ptw32_threadStart.c @@ -44,11 +44,11 @@ #include "implement.h" #include -#if defined(__CLEANUP_C) +#if defined(__PTW32_CLEANUP_C) # include #endif -#if defined(__CLEANUP_SEH) +#if defined(__PTW32_CLEANUP_SEH) static DWORD ExceptionFilter (EXCEPTION_POINTERS * ep, DWORD * ei) @@ -79,7 +79,7 @@ ExceptionFilter (EXCEPTION_POINTERS * ep, DWORD * ei) */ pthread_t self = pthread_self (); - ptw32_callUserDestroyRoutines (self); + __ptw32_callUserDestroyRoutines (self); return EXCEPTION_CONTINUE_SEARCH; break; @@ -87,7 +87,7 @@ ExceptionFilter (EXCEPTION_POINTERS * ep, DWORD * ei) } } -#elif defined(__CLEANUP_CXX) +#elif defined(__PTW32_CLEANUP_CXX) #if defined(_MSC_VER) # include @@ -106,10 +106,10 @@ using # endif #endif -#endif /* __CLEANUP_CXX */ +#endif /* __PTW32_CLEANUP_CXX */ /* - * MSVC6 does not optimize ptw32_threadStart() safely + * MSVC6 does not optimize __ptw32_threadStart() safely * (i.e. tests/context1.c fails with "abnormal program * termination" in some configurations), and there's no * point to optimizing this routine anyway @@ -125,28 +125,28 @@ unsigned #else void #endif -ptw32_threadStart (void *vthreadParms) +__ptw32_threadStart (void *vthreadParms) { ThreadParms * threadParms = (ThreadParms *) vthreadParms; pthread_t self; - ptw32_thread_t * sp; - void * (PTW32_CDECL *start) (void *); + __ptw32_thread_t * sp; + void * (__PTW32_CDECL *start) (void *); void * arg; -#if defined(__CLEANUP_SEH) +#if defined(__PTW32_CLEANUP_SEH) DWORD ei[] = { 0, 0, 0 }; #endif -#if defined(__CLEANUP_C) +#if defined(__PTW32_CLEANUP_C) int setjmp_rc; #endif - ptw32_mcs_local_node_t stateLock; + __ptw32_mcs_local_node_t stateLock; void * status = (void *) 0; self = threadParms->tid; - sp = (ptw32_thread_t *) self.p; + sp = (__ptw32_thread_t *) self.p; start = threadParms->start; arg = threadParms->arg; @@ -161,17 +161,17 @@ ptw32_threadStart (void *vthreadParms) sp->thread = GetCurrentThreadId (); #endif - pthread_setspecific (ptw32_selfThreadKey, sp); + pthread_setspecific (__ptw32_selfThreadKey, sp); /* * Here we're using stateLock as a general-purpose lock * to make the new thread wait until the creating thread * has the new handle. */ - ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); + __ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); sp->state = PThreadStateRunning; - ptw32_mcs_lock_release (&stateLock); + __ptw32_mcs_lock_release (&stateLock); -#if defined(__CLEANUP_SEH) +#if defined(__PTW32_CLEANUP_SEH) __try { @@ -191,14 +191,14 @@ ptw32_threadStart (void *vthreadParms) { switch (ei[0]) { - case PTW32_EPS_CANCEL: + case __PTW32_EPS_CANCEL: status = sp->exitStatus = PTHREAD_CANCELED; #if defined(_UWIN) if (--pthread_count <= 0) exit (0); #endif break; - case PTW32_EPS_EXIT: + case __PTW32_EPS_EXIT: status = sp->exitStatus; break; default: @@ -207,9 +207,9 @@ ptw32_threadStart (void *vthreadParms) } } -#else /* __CLEANUP_SEH */ +#else /* __PTW32_CLEANUP_SEH */ -#if defined(__CLEANUP_C) +#if defined(__PTW32_CLEANUP_C) setjmp_rc = setjmp (sp->start_mark); @@ -225,10 +225,10 @@ ptw32_threadStart (void *vthreadParms) { switch (setjmp_rc) { - case PTW32_EPS_CANCEL: + case __PTW32_EPS_CANCEL: status = sp->exitStatus = PTHREAD_CANCELED; break; - case PTW32_EPS_EXIT: + case __PTW32_EPS_EXIT: status = sp->exitStatus; break; default: @@ -237,23 +237,23 @@ ptw32_threadStart (void *vthreadParms) } } -#else /* __CLEANUP_C */ +#else /* __PTW32_CLEANUP_C */ -#if defined(__CLEANUP_CXX) +#if defined(__PTW32_CLEANUP_CXX) try { status = sp->exitStatus = (*start) (arg); sp->state = PThreadStateExiting; } - catch (ptw32_exception_cancel &) + catch (__ptw32_exception_cancel &) { /* * Thread was canceled. */ status = sp->exitStatus = PTHREAD_CANCELED; } - catch (ptw32_exception_exit &) + catch (__ptw32_exception_exit &) { /* * Thread was exited via pthread_exit(). @@ -274,11 +274,11 @@ ptw32_threadStart (void *vthreadParms) #error ERROR [__FILE__, line __LINE__]: Cleanup type undefined. -#endif /* __CLEANUP_CXX */ -#endif /* __CLEANUP_C */ -#endif /* __CLEANUP_SEH */ +#endif /* __PTW32_CLEANUP_CXX */ +#endif /* __PTW32_CLEANUP_C */ +#endif /* __PTW32_CLEANUP_SEH */ -#if defined(PTW32_STATIC_LIB) +#if defined (__PTW32_STATIC_LIB) /* * We need to cleanup the pthread now if we have * been statically linked, in which case the cleanup @@ -310,7 +310,7 @@ ptw32_threadStart (void *vthreadParms) return (unsigned)(size_t) status; #endif -} /* ptw32_threadStart */ +} /* __ptw32_threadStart */ /* * Reset optimization @@ -319,9 +319,9 @@ ptw32_threadStart (void *vthreadParms) # pragma optimize("", on) #endif -#if defined (PTW32_USES_SEPARATE_CRT) && defined (__cplusplus) -ptw32_terminate_handler -pthread_win32_set_terminate_np(ptw32_terminate_handler termFunction) +#if defined (__PTW32_USES_SEPARATE_CRT) && defined (__cplusplus) +__ptw32_terminate_handler +pthread_win32_set_terminate_np(__ptw32_terminate_handler termFunction) { return set_terminate(termFunction); } diff --git a/ptw32_throw.c b/ptw32_throw.c index 05e1fdb1..95b84027 100644 --- a/ptw32_throw.c +++ b/ptw32_throw.c @@ -43,12 +43,12 @@ #include "pthread.h" #include "implement.h" -#if defined(__CLEANUP_C) +#if defined(__PTW32_CLEANUP_C) # include #endif /* - * ptw32_throw + * __ptw32_throw * * All cancelled and explicitly exited POSIX threads go through * here. This routine knows how to exit both POSIX initiated threads and @@ -56,21 +56,21 @@ * C++, and SEH). */ void -ptw32_throw (DWORD exception) +__ptw32_throw (DWORD exception) { /* * Don't use pthread_self() to avoid creating an implicit POSIX thread handle * unnecessarily. */ - ptw32_thread_t * sp = (ptw32_thread_t *) pthread_getspecific (ptw32_selfThreadKey); + __ptw32_thread_t * sp = (__ptw32_thread_t *) pthread_getspecific (__ptw32_selfThreadKey); -#if defined(__CLEANUP_SEH) +#if defined(__PTW32_CLEANUP_SEH) DWORD exceptionInformation[3]; #endif sp->state = PThreadStateExiting; - if (exception != PTW32_EPS_CANCEL && exception != PTW32_EPS_EXIT) + if (exception != __PTW32_EPS_CANCEL && exception != __PTW32_EPS_EXIT) { /* Should never enter here */ exit (1); @@ -89,10 +89,10 @@ ptw32_throw (DWORD exception) switch (exception) { - case PTW32_EPS_CANCEL: + case __PTW32_EPS_CANCEL: exitCode = (unsigned)(size_t) PTHREAD_CANCELED; break; - case PTW32_EPS_EXIT: + case __PTW32_EPS_EXIT: if (NULL != sp) { exitCode = (unsigned)(size_t) sp->exitStatus; @@ -101,7 +101,7 @@ ptw32_throw (DWORD exception) } #endif -#if defined(PTW32_STATIC_LIB) +#if defined (__PTW32_STATIC_LIB) pthread_win32_thread_detach_np (); @@ -115,7 +115,7 @@ ptw32_throw (DWORD exception) } -#if defined(__CLEANUP_SEH) +#if defined(__PTW32_CLEANUP_SEH) exceptionInformation[0] = (DWORD) (exception); @@ -124,24 +124,24 @@ ptw32_throw (DWORD exception) RaiseException (EXCEPTION_PTW32_SERVICES, 0, 3, (ULONG_PTR *) exceptionInformation); -#else /* __CLEANUP_SEH */ +#else /* __PTW32_CLEANUP_SEH */ -#if defined(__CLEANUP_C) +#if defined(__PTW32_CLEANUP_C) - ptw32_pop_cleanup_all (1); + __ptw32_pop_cleanup_all (1); longjmp (sp->start_mark, exception); -#else /* __CLEANUP_C */ +#else /* __PTW32_CLEANUP_C */ -#if defined(__CLEANUP_CXX) +#if defined(__PTW32_CLEANUP_CXX) switch (exception) { - case PTW32_EPS_CANCEL: - throw ptw32_exception_cancel (); + case __PTW32_EPS_CANCEL: + throw __ptw32_exception_cancel (); break; - case PTW32_EPS_EXIT: - throw ptw32_exception_exit (); + case __PTW32_EPS_EXIT: + throw __ptw32_exception_exit (); break; } @@ -149,29 +149,29 @@ ptw32_throw (DWORD exception) #error ERROR [__FILE__, line __LINE__]: Cleanup type undefined. -#endif /* __CLEANUP_CXX */ +#endif /* __PTW32_CLEANUP_CXX */ -#endif /* __CLEANUP_C */ +#endif /* __PTW32_CLEANUP_C */ -#endif /* __CLEANUP_SEH */ +#endif /* __PTW32_CLEANUP_SEH */ /* Never reached */ } void -ptw32_pop_cleanup_all (int execute) +__ptw32_pop_cleanup_all (int execute) { - while (NULL != ptw32_pop_cleanup (execute)) + while (NULL != __ptw32_pop_cleanup (execute)) { } } DWORD -ptw32_get_exception_services_code (void) +__ptw32_get_exception_services_code (void) { -#if defined(__CLEANUP_SEH) +#if defined(__PTW32_CLEANUP_SEH) return EXCEPTION_PTW32_SERVICES; diff --git a/ptw32_timespec.c b/ptw32_timespec.c index c9098ec8..cd9782c5 100644 --- a/ptw32_timespec.c +++ b/ptw32_timespec.c @@ -48,11 +48,11 @@ /* * time between jan 1, 1601 and jan 1, 1970 in units of 100 nanoseconds */ -#define PTW32_TIMESPEC_TO_FILETIME_OFFSET \ +#define __PTW32_TIMESPEC_TO_FILETIME_OFFSET \ ( ((uint64_t) 27111902UL << 32) + (uint64_t) 3577643008UL ) INLINE void -ptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft) +__ptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft) /* * ------------------------------------------------------------------- * converts struct timespec @@ -63,11 +63,11 @@ ptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft) */ { *(uint64_t *) ft = ts->tv_sec * 10000000UL - + (ts->tv_nsec + 50) / 100 + PTW32_TIMESPEC_TO_FILETIME_OFFSET; + + (ts->tv_nsec + 50) / 100 + __PTW32_TIMESPEC_TO_FILETIME_OFFSET; } INLINE void -ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts) +__ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts) /* * ------------------------------------------------------------------- * converts FILETIME (as set by GetSystemTimeAsFileTime), where the time is @@ -78,9 +78,9 @@ ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts) */ { ts->tv_sec = - (int) ((*(uint64_t *) ft - PTW32_TIMESPEC_TO_FILETIME_OFFSET) / 10000000UL); + (int) ((*(uint64_t *) ft - __PTW32_TIMESPEC_TO_FILETIME_OFFSET) / 10000000UL); ts->tv_nsec = - (int) ((*(uint64_t *) ft - PTW32_TIMESPEC_TO_FILETIME_OFFSET - + (int) ((*(uint64_t *) ft - __PTW32_TIMESPEC_TO_FILETIME_OFFSET - ((uint64_t) ts->tv_sec * (uint64_t) 10000000UL)) * 100); } diff --git a/ptw32_tkAssocCreate.c b/ptw32_tkAssocCreate.c index 85569be3..153b8162 100644 --- a/ptw32_tkAssocCreate.c +++ b/ptw32_tkAssocCreate.c @@ -45,7 +45,7 @@ int -ptw32_tkAssocCreate (ptw32_thread_t * sp, pthread_key_t key) +__ptw32_tkAssocCreate (__ptw32_thread_t * sp, pthread_key_t key) /* * ------------------------------------------------------------------- * This routine creates an association that @@ -59,7 +59,7 @@ ptw32_tkAssocCreate (ptw32_thread_t * sp, pthread_key_t key) * * Notes: * 1) New associations are pushed to the beginning of the - * chain so that the internal ptw32_selfThreadKey association + * chain so that the internal __ptw32_selfThreadKey association * is always last, thus allowing selfThreadExit to * be implicitly called last by pthread_exit. * 2) @@ -120,4 +120,4 @@ ptw32_tkAssocCreate (ptw32_thread_t * sp, pthread_key_t key) return (0); -} /* ptw32_tkAssocCreate */ +} /* __ptw32_tkAssocCreate */ diff --git a/ptw32_tkAssocDestroy.c b/ptw32_tkAssocDestroy.c index 87f78abe..c150384e 100644 --- a/ptw32_tkAssocDestroy.c +++ b/ptw32_tkAssocDestroy.c @@ -45,7 +45,7 @@ void -ptw32_tkAssocDestroy (ThreadKeyAssoc * assoc) +__ptw32_tkAssocDestroy (ThreadKeyAssoc * assoc) /* * ------------------------------------------------------------------- * This routine releases all resources for the given ThreadKeyAssoc @@ -116,4 +116,4 @@ ptw32_tkAssocDestroy (ThreadKeyAssoc * assoc) free (assoc); } -} /* ptw32_tkAssocDestroy */ +} /* __ptw32_tkAssocDestroy */ diff --git a/sched.h b/sched.h index 9d6e9b28..89d54481 100644 --- a/sched.h +++ b/sched.h @@ -107,7 +107,7 @@ struct timespec /* * Microsoft VC++6.0 lacks these *_PTR types */ -#if defined(_MSC_VER) && _MSC_VER < 1300 && !defined(PTW32_HAVE_DWORD_PTR) +#if defined(_MSC_VER) && _MSC_VER < 1300 && !defined (__PTW32_HAVE_DWORD_PTR) typedef unsigned long ULONG_PTR; typedef ULONG_PTR DWORD_PTR; #endif @@ -166,16 +166,16 @@ typedef union __PTW32_BEGIN_C_DECLS -PTW32_DLLPORT int PTW32_CDECL sched_yield (void); +__PTW32_DLLPORT int __PTW32_CDECL sched_yield (void); -PTW32_DLLPORT int PTW32_CDECL sched_get_priority_min (int policy); +__PTW32_DLLPORT int __PTW32_CDECL sched_get_priority_min (int policy); -PTW32_DLLPORT int PTW32_CDECL sched_get_priority_max (int policy); +__PTW32_DLLPORT int __PTW32_CDECL sched_get_priority_max (int policy); /* FIXME: this declaration of sched_setscheduler() is NOT as prescribed * by POSIX; it lacks const struct sched_param * as third argument. */ -PTW32_DLLPORT int PTW32_CDECL sched_setscheduler (pid_t pid, int policy); +__PTW32_DLLPORT int __PTW32_CDECL sched_setscheduler (pid_t pid, int policy); /* FIXME: In addition to the above five functions, POSIX also requires: * @@ -188,30 +188,30 @@ PTW32_DLLPORT int PTW32_CDECL sched_setscheduler (pid_t pid, int policy); /* Compatibility with Linux - not standard in POSIX * FIXME: consider occluding within a _GNU_SOURCE (or similar) feature test. */ -PTW32_DLLPORT int PTW32_CDECL sched_setaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *mask); +__PTW32_DLLPORT int __PTW32_CDECL sched_setaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *mask); -PTW32_DLLPORT int PTW32_CDECL sched_getaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *mask); +__PTW32_DLLPORT int __PTW32_CDECL sched_getaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *mask); /* * Support routines and macros for cpu_set_t */ -PTW32_DLLPORT int PTW32_CDECL _sched_affinitycpucount (const cpu_set_t *set); +__PTW32_DLLPORT int __PTW32_CDECL _sched_affinitycpucount (const cpu_set_t *set); -PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuzero (cpu_set_t *pset); +__PTW32_DLLPORT void __PTW32_CDECL _sched_affinitycpuzero (cpu_set_t *pset); -PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuset (int cpu, cpu_set_t *pset); +__PTW32_DLLPORT void __PTW32_CDECL _sched_affinitycpuset (int cpu, cpu_set_t *pset); -PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuclr (int cpu, cpu_set_t *pset); +__PTW32_DLLPORT void __PTW32_CDECL _sched_affinitycpuclr (int cpu, cpu_set_t *pset); -PTW32_DLLPORT int PTW32_CDECL _sched_affinitycpuisset (int cpu, const cpu_set_t *pset); +__PTW32_DLLPORT int __PTW32_CDECL _sched_affinitycpuisset (int cpu, const cpu_set_t *pset); -PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuand(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2); +__PTW32_DLLPORT void __PTW32_CDECL _sched_affinitycpuand(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2); -PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuor(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2); +__PTW32_DLLPORT void __PTW32_CDECL _sched_affinitycpuor(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2); -PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuxor(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2); +__PTW32_DLLPORT void __PTW32_CDECL _sched_affinitycpuxor(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2); -PTW32_DLLPORT int PTW32_CDECL _sched_affinitycpuequal (const cpu_set_t *pset1, const cpu_set_t *pset2); +__PTW32_DLLPORT int __PTW32_CDECL _sched_affinitycpuequal (const cpu_set_t *pset1, const cpu_set_t *pset2); /* Note that this macro returns ENOTSUP rather than ENOSYS, as * might be expected. However, returning ENOSYS should mean that diff --git a/sched_get_priority_max.c b/sched_get_priority_max.c index e05867b7..456a7adf 100644 --- a/sched_get_priority_max.c +++ b/sched_get_priority_max.c @@ -125,15 +125,15 @@ sched_get_priority_max (int policy) { if (policy < SCHED_MIN || policy > SCHED_MAX) { - PTW32_SET_ERRNO(EINVAL); + __PTW32_SET_ERRNO(EINVAL); return -1; } #if (THREAD_PRIORITY_LOWEST > THREAD_PRIORITY_NORMAL) /* WinCE? */ - return PTW32_MAX (THREAD_PRIORITY_IDLE, THREAD_PRIORITY_TIME_CRITICAL); + return __PTW32_MAX (THREAD_PRIORITY_IDLE, THREAD_PRIORITY_TIME_CRITICAL); #else /* This is independent of scheduling policy in Win32. */ - return PTW32_MAX (THREAD_PRIORITY_IDLE, THREAD_PRIORITY_TIME_CRITICAL); + return __PTW32_MAX (THREAD_PRIORITY_IDLE, THREAD_PRIORITY_TIME_CRITICAL); #endif } diff --git a/sched_get_priority_min.c b/sched_get_priority_min.c index 2c8a6560..9d7e367c 100644 --- a/sched_get_priority_min.c +++ b/sched_get_priority_min.c @@ -126,15 +126,15 @@ sched_get_priority_min (int policy) { if (policy < SCHED_MIN || policy > SCHED_MAX) { - PTW32_SET_ERRNO(EINVAL); + __PTW32_SET_ERRNO(EINVAL); return -1; } #if (THREAD_PRIORITY_LOWEST > THREAD_PRIORITY_NORMAL) /* WinCE? */ - return PTW32_MIN (THREAD_PRIORITY_IDLE, THREAD_PRIORITY_TIME_CRITICAL); + return __PTW32_MIN (THREAD_PRIORITY_IDLE, THREAD_PRIORITY_TIME_CRITICAL); #else /* This is independent of scheduling policy in Win32. */ - return PTW32_MIN (THREAD_PRIORITY_IDLE, THREAD_PRIORITY_TIME_CRITICAL); + return __PTW32_MIN (THREAD_PRIORITY_IDLE, THREAD_PRIORITY_TIME_CRITICAL); #endif } diff --git a/sched_getscheduler.c b/sched_getscheduler.c index cac3f77e..e61830c5 100644 --- a/sched_getscheduler.c +++ b/sched_getscheduler.c @@ -58,11 +58,11 @@ sched_getscheduler (pid_t pid) if (pid != selfPid) { HANDLE h = - OpenProcess (PROCESS_QUERY_INFORMATION, PTW32_FALSE, (DWORD) pid); + OpenProcess (PROCESS_QUERY_INFORMATION, __PTW32_FALSE, (DWORD) pid); if (NULL == h) { - PTW32_SET_ERRNO(((0xFF & ERROR_ACCESS_DENIED) == GetLastError()) ? EPERM : ESRCH); + __PTW32_SET_ERRNO(((0xFF & ERROR_ACCESS_DENIED) == GetLastError()) ? EPERM : ESRCH); return -1; } else diff --git a/sched_setaffinity.c b/sched_setaffinity.c index 07b0fb4f..cf944c9d 100644 --- a/sched_setaffinity.c +++ b/sched_setaffinity.c @@ -115,7 +115,7 @@ sched_setaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *set) targetPid = (int) GetCurrentProcessId (); } - h = OpenProcess (PROCESS_QUERY_INFORMATION|PROCESS_SET_INFORMATION, PTW32_FALSE, (DWORD) targetPid); + h = OpenProcess (PROCESS_QUERY_INFORMATION|PROCESS_SET_INFORMATION, __PTW32_FALSE, (DWORD) targetPid); if (NULL == h) { @@ -166,7 +166,7 @@ sched_setaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *set) if (result != 0) { - PTW32_SET_ERRNO(result); + __PTW32_SET_ERRNO(result); return -1; } else @@ -176,7 +176,7 @@ sched_setaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *set) #else - PTW32_SET_ERRNO(ENOSYS); + __PTW32_SET_ERRNO(ENOSYS); return -1; #endif @@ -245,7 +245,7 @@ sched_getaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *set) targetPid = (int) GetCurrentProcessId (); } - h = OpenProcess (PROCESS_QUERY_INFORMATION, PTW32_FALSE, (DWORD) targetPid); + h = OpenProcess (PROCESS_QUERY_INFORMATION, __PTW32_FALSE, (DWORD) targetPid); if (NULL == h) { @@ -272,7 +272,7 @@ sched_getaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *set) if (result != 0) { - PTW32_SET_ERRNO(result); + __PTW32_SET_ERRNO(result); return -1; } else diff --git a/sched_setscheduler.c b/sched_setscheduler.c index 3a3df912..1f166fb9 100644 --- a/sched_setscheduler.c +++ b/sched_setscheduler.c @@ -60,11 +60,11 @@ sched_setscheduler (pid_t pid, int policy) if (pid != selfPid) { HANDLE h = - OpenProcess (PROCESS_SET_INFORMATION, PTW32_FALSE, (DWORD) pid); + OpenProcess (PROCESS_SET_INFORMATION, __PTW32_FALSE, (DWORD) pid); if (NULL == h) { - PTW32_SET_ERRNO((GetLastError () == (0xFF & ERROR_ACCESS_DENIED)) ? EPERM : ESRCH); + __PTW32_SET_ERRNO((GetLastError () == (0xFF & ERROR_ACCESS_DENIED)) ? EPERM : ESRCH); return -1; } else @@ -74,7 +74,7 @@ sched_setscheduler (pid_t pid, int policy) if (SCHED_OTHER != policy) { - PTW32_SET_ERRNO(ENOSYS); + __PTW32_SET_ERRNO(ENOSYS); return -1; } diff --git a/sem_close.c b/sem_close.c index 5e86ae82..6b317861 100644 --- a/sem_close.c +++ b/sem_close.c @@ -58,6 +58,6 @@ int sem_close (sem_t * sem) { - PTW32_SET_ERRNO(ENOSYS); + __PTW32_SET_ERRNO(ENOSYS); return -1; } /* sem_close */ diff --git a/sem_destroy.c b/sem_destroy.c index 22f9f281..e1f35b73 100644 --- a/sem_destroy.c +++ b/sem_destroy.c @@ -86,10 +86,10 @@ sem_destroy (sem_t * sem) } else { - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; s = *sem; - if ((result = ptw32_mcs_lock_try_acquire(&s->lock, &node)) == 0) + if ((result = __ptw32_mcs_lock_try_acquire(&s->lock, &node)) == 0) { if (s->value < 0) { @@ -107,13 +107,13 @@ sem_destroy (sem_t * sem) result = EINVAL; } } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); } } if (result != 0) { - PTW32_SET_ERRNO(result); + __PTW32_SET_ERRNO(result); return -1; } diff --git a/sem_getvalue.c b/sem_getvalue.c index 82528cc1..8c6c0b44 100644 --- a/sem_getvalue.c +++ b/sem_getvalue.c @@ -84,16 +84,16 @@ sem_getvalue (sem_t * sem, int *sval) { int result = 0; - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; register sem_t s = *sem; - ptw32_mcs_lock_acquire(&s->lock, &node); + __ptw32_mcs_lock_acquire(&s->lock, &node); *sval = s->value; - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); if (result != 0) { - PTW32_SET_ERRNO(result); + __PTW32_SET_ERRNO(result); return -1; } diff --git a/sem_init.c b/sem_init.c index 030450b5..3e088d61 100644 --- a/sem_init.c +++ b/sem_init.c @@ -119,8 +119,8 @@ sem_init (sem_t * sem, int pshared, unsigned int value) #if defined(NEED_SEM) s->sem = CreateEvent (NULL, - PTW32_FALSE, /* auto (not manual) reset */ - PTW32_FALSE, /* initial state is unset */ + __PTW32_FALSE, /* auto (not manual) reset */ + __PTW32_FALSE, /* initial state is unset */ NULL); if (0 == s->sem) @@ -153,7 +153,7 @@ sem_init (sem_t * sem, int pshared, unsigned int value) if (result != 0) { - PTW32_SET_ERRNO(result); + __PTW32_SET_ERRNO(result); return -1; } diff --git a/sem_open.c b/sem_open.c index 54c34eb1..84f37aab 100644 --- a/sem_open.c +++ b/sem_open.c @@ -63,6 +63,6 @@ sem_t * of ENOSYS as a resultant errno state; nevertheless, it makes sense * to retain the POSIX.1b-1993 conforming behaviour here. */ - PTW32_SET_ERRNO(ENOSYS); + __PTW32_SET_ERRNO(ENOSYS); return SEM_FAILED; } /* sem_open */ diff --git a/sem_post.c b/sem_post.c index 52a2e20f..37423fae 100644 --- a/sem_post.c +++ b/sem_post.c @@ -80,10 +80,10 @@ sem_post (sem_t * sem) { int result = 0; - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; sem_t s = *sem; - ptw32_mcs_lock_acquire(&s->lock, &node); + __ptw32_mcs_lock_acquire(&s->lock, &node); if (s->value < SEM_VALUE_MAX) { #if defined(NEED_SEM) @@ -106,11 +106,11 @@ sem_post (sem_t * sem) { result = ERANGE; } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); if (result != 0) { - PTW32_SET_ERRNO(result); + __PTW32_SET_ERRNO(result); return -1; } diff --git a/sem_post_multiple.c b/sem_post_multiple.c index c6dfb34d..e14bc8d1 100644 --- a/sem_post_multiple.c +++ b/sem_post_multiple.c @@ -81,12 +81,12 @@ sem_post_multiple (sem_t * sem, int count) * ------------------------------------------------------ */ { - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; int result = 0; long waiters; sem_t s = *sem; - ptw32_mcs_lock_acquire(&s->lock, &node); + __ptw32_mcs_lock_acquire(&s->lock, &node); if (s->value <= (SEM_VALUE_MAX - count)) { @@ -121,11 +121,11 @@ sem_post_multiple (sem_t * sem, int count) { result = ERANGE; } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); if (result != 0) { - PTW32_SET_ERRNO(result); + __PTW32_SET_ERRNO(result); return -1; } diff --git a/sem_timedwait.c b/sem_timedwait.c index 922b773f..50581b96 100644 --- a/sem_timedwait.c +++ b/sem_timedwait.c @@ -57,14 +57,14 @@ typedef struct { } sem_timedwait_cleanup_args_t; -static void PTW32_CDECL -ptw32_sem_timedwait_cleanup (void * args) +static void __PTW32_CDECL +__ptw32_sem_timedwait_cleanup (void * args) { - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; sem_timedwait_cleanup_args_t * a = (sem_timedwait_cleanup_args_t *)args; sem_t s = a->sem; - ptw32_mcs_lock_acquire(&s->lock, &node); + __ptw32_mcs_lock_acquire(&s->lock, &node); /* * We either timed out or were cancelled. * If someone has posted between then and now we try to take the semaphore. @@ -94,7 +94,7 @@ ptw32_sem_timedwait_cleanup (void * args) */ #endif } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); } @@ -138,7 +138,7 @@ sem_timedwait (sem_t * sem, const struct timespec *abstime) * ------------------------------------------------------ */ { - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; DWORD milliseconds; int v; int result = 0; @@ -155,12 +155,12 @@ sem_timedwait (sem_t * sem, const struct timespec *abstime) /* * Calculate timeout as milliseconds from current system time. */ - milliseconds = ptw32_relmillisecs (abstime); + milliseconds = __ptw32_relmillisecs (abstime); } - ptw32_mcs_lock_acquire(&s->lock, &node); + __ptw32_mcs_lock_acquire(&s->lock, &node); v = --s->value; - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); if (v < 0) { @@ -172,17 +172,17 @@ sem_timedwait (sem_t * sem, const struct timespec *abstime) cleanup_args.sem = s; cleanup_args.resultPtr = &result; -#if defined(PTW32_CONFIG_MSVC7) +#if defined (__PTW32_CONFIG_MSVC7) #pragma inline_depth(0) #endif /* Must wait */ - pthread_cleanup_push(ptw32_sem_timedwait_cleanup, (void *) &cleanup_args); + pthread_cleanup_push(__ptw32_sem_timedwait_cleanup, (void *) &cleanup_args); #if defined(NEED_SEM) timedout = #endif result = pthreadCancelableTimedWait (s->sem, milliseconds); pthread_cleanup_pop(result); -#if defined(PTW32_CONFIG_MSVC7) +#if defined (__PTW32_CONFIG_MSVC7) #pragma inline_depth() #endif @@ -190,13 +190,13 @@ sem_timedwait (sem_t * sem, const struct timespec *abstime) if (!timedout) { - ptw32_mcs_lock_acquire(&s->lock, &node); + __ptw32_mcs_lock_acquire(&s->lock, &node); if (s->leftToUnblock > 0) { --s->leftToUnblock; SetEvent(s->sem); } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); } #endif /* NEED_SEM */ @@ -206,7 +206,7 @@ sem_timedwait (sem_t * sem, const struct timespec *abstime) if (result != 0) { - PTW32_SET_ERRNO(result); + __PTW32_SET_ERRNO(result); return -1; } diff --git a/sem_trywait.c b/sem_trywait.c index 5250665a..40c8ec8c 100644 --- a/sem_trywait.c +++ b/sem_trywait.c @@ -83,9 +83,9 @@ sem_trywait (sem_t * sem) { int result = 0; sem_t s = *sem; - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; - ptw32_mcs_lock_acquire(&s->lock, &node); + __ptw32_mcs_lock_acquire(&s->lock, &node); if (s->value > 0) { @@ -96,11 +96,11 @@ sem_trywait (sem_t * sem) result = EAGAIN; } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); if (result != 0) { - PTW32_SET_ERRNO(result); + __PTW32_SET_ERRNO(result); return -1; } diff --git a/sem_unlink.c b/sem_unlink.c index 26bc442c..e5559d37 100644 --- a/sem_unlink.c +++ b/sem_unlink.c @@ -58,6 +58,6 @@ int sem_unlink (const char *name) { - PTW32_SET_ERRNO(ENOSYS); + __PTW32_SET_ERRNO(ENOSYS); return -1; } /* sem_unlink */ diff --git a/sem_wait.c b/sem_wait.c index 6a29d0e5..710040e4 100644 --- a/sem_wait.c +++ b/sem_wait.c @@ -51,13 +51,13 @@ #include "implement.h" -static void PTW32_CDECL -ptw32_sem_wait_cleanup(void * sem) +static void __PTW32_CDECL +__ptw32_sem_wait_cleanup(void * sem) { sem_t s = (sem_t) sem; - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; - ptw32_mcs_lock_acquire(&s->lock, &node); + __ptw32_mcs_lock_acquire(&s->lock, &node); /* * If sema is destroyed do nothing, otherwise:- * If the sema is posted between us being canceled and us locking @@ -80,7 +80,7 @@ ptw32_sem_wait_cleanup(void * sem) */ #endif /* NEED_SEM */ } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); } int @@ -114,28 +114,28 @@ sem_wait (sem_t * sem) * ------------------------------------------------------ */ { - ptw32_mcs_local_node_t node; + __ptw32_mcs_local_node_t node; int v; int result = 0; sem_t s = *sem; pthread_testcancel(); - ptw32_mcs_lock_acquire(&s->lock, &node); + __ptw32_mcs_lock_acquire(&s->lock, &node); v = --s->value; - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); if (v < 0) { -#if defined(PTW32_CONFIG_MSVC7) +#if defined (__PTW32_CONFIG_MSVC7) #pragma inline_depth(0) #endif /* Must wait */ - pthread_cleanup_push(ptw32_sem_wait_cleanup, (void *) s); + pthread_cleanup_push(__ptw32_sem_wait_cleanup, (void *) s); result = pthreadCancelableWait (s->sem); /* Cleanup if we're canceled or on any other error */ pthread_cleanup_pop(result); -#if defined(PTW32_CONFIG_MSVC7) +#if defined (__PTW32_CONFIG_MSVC7) #pragma inline_depth() #endif } @@ -143,21 +143,21 @@ sem_wait (sem_t * sem) if (!result) { - ptw32_mcs_lock_acquire(&s->lock, &node); + __ptw32_mcs_lock_acquire(&s->lock, &node); if (s->leftToUnblock > 0) { --s->leftToUnblock; SetEvent(s->sem); } - ptw32_mcs_lock_release(&node); + __ptw32_mcs_lock_release(&node); } #endif /* NEED_SEM */ if (result != 0) { - PTW32_SET_ERRNO(result); + __PTW32_SET_ERRNO(result); return -1; } diff --git a/semaphore.h b/semaphore.h index 79a0ec7d..4f1c237d 100644 --- a/semaphore.h +++ b/semaphore.h @@ -87,31 +87,31 @@ __PTW32_BEGIN_C_DECLS /* Function prototypes: some are implemented as stubs, which * always fail; (FIXME: identify them). */ -PTW32_DLLPORT int PTW32_CDECL sem_init (sem_t * sem, +__PTW32_DLLPORT int __PTW32_CDECL sem_init (sem_t * sem, int pshared, unsigned int value); -PTW32_DLLPORT int PTW32_CDECL sem_destroy (sem_t * sem); +__PTW32_DLLPORT int __PTW32_CDECL sem_destroy (sem_t * sem); -PTW32_DLLPORT int PTW32_CDECL sem_trywait (sem_t * sem); +__PTW32_DLLPORT int __PTW32_CDECL sem_trywait (sem_t * sem); -PTW32_DLLPORT int PTW32_CDECL sem_wait (sem_t * sem); +__PTW32_DLLPORT int __PTW32_CDECL sem_wait (sem_t * sem); -PTW32_DLLPORT int PTW32_CDECL sem_timedwait (sem_t * sem, +__PTW32_DLLPORT int __PTW32_CDECL sem_timedwait (sem_t * sem, const struct timespec * abstime); -PTW32_DLLPORT int PTW32_CDECL sem_post (sem_t * sem); +__PTW32_DLLPORT int __PTW32_CDECL sem_post (sem_t * sem); -PTW32_DLLPORT int PTW32_CDECL sem_post_multiple (sem_t * sem, +__PTW32_DLLPORT int __PTW32_CDECL sem_post_multiple (sem_t * sem, int count); -PTW32_DLLPORT sem_t * PTW32_CDECL sem_open (const char *, int, ...); +__PTW32_DLLPORT sem_t * __PTW32_CDECL sem_open (const char *, int, ...); -PTW32_DLLPORT int PTW32_CDECL sem_close (sem_t * sem); +__PTW32_DLLPORT int __PTW32_CDECL sem_close (sem_t * sem); -PTW32_DLLPORT int PTW32_CDECL sem_unlink (const char * name); +__PTW32_DLLPORT int __PTW32_CDECL sem_unlink (const char * name); -PTW32_DLLPORT int PTW32_CDECL sem_getvalue (sem_t * sem, +__PTW32_DLLPORT int __PTW32_CDECL sem_getvalue (sem_t * sem, int * sval); __PTW32_END_C_DECLS diff --git a/signal.c b/signal.c index 845019d3..b677b5ac 100644 --- a/signal.c +++ b/signal.c @@ -69,7 +69,7 @@ * structures. * * pthread_kill() eventually calls a routine similar to - * ptw32_cancel_thread() which manipulates the target + * __ptw32_cancel_thread() which manipulates the target * threads processor context to cause the thread to * run the handler launcher routine. pthread_kill() must * save the target threads current context so that the @@ -92,12 +92,12 @@ #if defined(HAVE_SIGSET_T) static void -ptw32_signal_thread () +__ptw32_signal_thread () { } static void -ptw32_signal_callhandler () +__ptw32_signal_callhandler () { } diff --git a/tests/Bmakefile b/tests/Bmakefile index f4bdd9cc..04291245 100644 --- a/tests/Bmakefile +++ b/tests/Bmakefile @@ -50,15 +50,15 @@ OPTIM = -O2 XXLIBS = cw32mti.lib ws2_32.lib # C++ Exceptions -BCEFLAGS = -P -DPtW32NoCatchWarn -D__CLEANUP_CXX +BCEFLAGS = -P -D__PtW32NoCatchWarn -D__PTW32_CLEANUP_CXX BCELIB = pthreadBCE$(DLL_VER).lib BCEDLL = pthreadBCE$(DLL_VER).dll # C cleanup code -BCFLAGS = -D__CLEANUP_C +BCFLAGS = -D__PTW32_CLEANUP_C BCLIB = pthreadBC$(DLL_VER).lib BCDLL = pthreadBC$(DLL_VER).dll # C++ Exceptions in application - using VC version of pthreads dll -BCXFLAGS = -D__CLEANUP_C +BCXFLAGS = -D__PTW32_CLEANUP_C # Defaults CPLIB = $(BCLIB) diff --git a/tests/ChangeLog b/tests/ChangeLog index 862ad8bb..3daf0cf3 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,4 @@ +<<<<<<< Upstream, based on master 2016-12-21 Ross Johnson * mutex6.c: fix random failures by using a polling loop to replace @@ -11,10 +12,20 @@ * semaphore5.c: don't fail on expected sem_destroy EBUSY. 2016-124-18 Ross Johnson +======= +2016-12-20 Ross Johnson +>>>>>>> d1c1032 Initial version 3 commit; see the ChangeLogs - * test.c (PTW32_TEST_SNEAK_PEEK): #define this to prevent some + * all (PTW32_*): rename to __PTW32_*. + (ptw32_*): rename to __ptw32_*. + (PtW32*): rename to __PtW32*. + * GNUmakefile: removed; must now configure from GNUmakefile.in. + +2016-12-18 Ross Johnson + + * test.c (__PTW32_TEST_SNEAK_PEEK): #define this to prevent some tests from failing (specifically "make GCX-small-static") with - undefined ptw32_autostatic_anchor. Checked in ../implament.h. + undefined __ptw32_autostatic_anchor. Checked in ../implement.h. * GNUMakfile.in: Rename testsuite log to test-specific name and do not remove. * GNUMakfile.in: Add realclean target @@ -200,7 +211,7 @@ 2012-09-22 Ross Johnson * pthread_win32_attach_detach_np.c (pthread_win32_detach_thread_np): - Check for NULL ptw32_selfThreadKey before call to TlsSetKey(). Need + Check for NULL __ptw32_selfThreadKey before call to TlsSetKey(). Need to find where this is being set to NULL before this point. Was consistently failing tests/seamphore3.c in all GC static builds and never seen in GC DLL builds. May also be responsible for @@ -936,7 +947,7 @@ * rwlock6.c: Fix casts. - * exception1.c (PtW32CatchAll): Had the wrong name; + * exception1.c (__PtW32CatchAll): Had the wrong name; fix casts. * cancel3.c: Remove unused waitLock variable. @@ -1008,9 +1019,9 @@ 2000-08-05 Ross Johnson - * cancel2.c: Use PtW32CatchAll macro if defined. + * cancel2.c: Use __PtW32CatchAll macro if defined. - * exception1.c: Use PtW32CatchAll macro if defined. + * exception1.c: Use __PtW32CatchAll macro if defined. 2000-08-02 Ross Johnson diff --git a/tests/GNUmakefile b/tests/GNUmakefile deleted file mode 100644 index 43b147d7..00000000 --- a/tests/GNUmakefile +++ /dev/null @@ -1,258 +0,0 @@ -# Makefile for the pthreads test suite. -# If all of the .pass files can be created, the test suite has passed. -# -# -------------------------------------------------------------------------- -# -# 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 -# - -LOGFILE = testsuite.log - -DLL_VER = 2$(EXTRAVERSION) - -CP = cp -f -MV = mv -f -RM = rm -f -CAT = cat -MKDIR = mkdir -GREP = grep -WC = wc -TEE = tee -ECHO = echo -TOUCH = $(ECHO) Passed > -TESTFILE = test -f -TESTDIR = test -d -AND = && - -# For cross compiling use e.g. -# # make CROSS=i386-mingw32msvc- clean GC -CROSS = - -# Override the builtin default C and C++ standards -#CSTD = -std=c90 -#CXXSTD = -std=c++90 - -# For cross testing use e.g. -# # make RUN=wine CROSS=i386-mingw32msvc- clean GC -RUN = - -AR = $(CROSS)ar -DLLTOOL = $(CROSS)dlltool -CC = $(CROSS)gcc $(CSTD) -CXX = $(CROSS)g++ $(CXXSTD) -RANLIB = $(CROSS)ranlib - -# -# Mingw -# -XLIBS = -XXCFLAGS = -XXLIBS = -OPT = -O3 -DOPT = -g -O0 -CFLAGS = ${OPT} $(ARCH) -UNDEBUG -Wall -Wno-missing-braces $(XXCFLAGS) -LFLAGS = $(ARCH) $(XXLFLAGS) -# -# Uncomment this next to link the GCC/C++ runtime libraries statically -# (Be sure to read about these options and their associated caveats -# at http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html) -# -# NOTE 1: Doing this appears to break GCE:pthread_cleanup_*(), which -# relies on C++ class destructors being called when leaving scope. -# -# NOTE 2: If you do this DO NOT distribute your pthreads DLLs with -# the official filenaming, i.e. pthreadVC2.dll, etc. Instead, change DLL_VER -# above to "2slgcc" for example, to build "pthreadGC2slgcc.dll", etc. -# -#LFLAGS += -static-libgcc -static-libstdc++ -BUILD_DIR = .. -INCLUDES = -I. - -TEST = GC - -# Default lib version -GCX = GC$(DLL_VER) - -# Files we need to run the tests -# - paths are relative to pthreads build dir. -HDR = _ptw32.h pthread.h semaphore.h sched.h -LIB = libpthread$(GCX).a -DLL = pthread$(GCX).dll -# The next path is relative to $BUILD_DIR -QAPC = # ../QueueUserAPCEx/User/quserex.dll - -include common.mk - -.INTERMEDIATE: $(ALL_KNOWN_TESTS:%=%.exe) $(BENCHTESTS:%=%.exe) -.SECONDARY: $(ALL_KNOWN_TESTS:%=%.exe) $(ALL_KNOWN_TESTS:%=%.pass) $(BENCHTESTS:%=%.exe) $(BENCHTESTS:%=%.bench) -.PRECIOUS: $(ALL_KNOWN_TESTS:%=%.exe) $(ALL_KNOWN_TESTS:%=%.pass) $(BENCHTESTS:%=%.exe) $(BENCHTESTS:%=%.bench) - -ASM = $(ALL_KNOWN_TESTS:%=%.s) -TESTS = $(ALL_KNOWN_TESTS) -BENCHRESULTS = $(BENCHTESTS:%=%.bench) - -# -# To build and run "foo.exe" and "bar.exe" only use, e.g.: -# make clean GC NO_DEPS=1 TESTS="foo bar" -# -# To build and run "foo.exe" and "bar.exe" and run all prerequisite tests -# use, e.g.: -# make clean GC TESTS="foo bar" -# -# Set TESTS to one or more tests. -# -ifndef NO_DEPS -include runorder.mk -endif - -help: - @ $(ECHO) "Run one of the following command lines:" - @ $(ECHO) "$(MAKE) clean GC (to test using GC dll with C (no EH) applications)" - @ $(ECHO) "$(MAKE) clean GCX (to test using GC dll with C++ (EH) applications)" - @ $(ECHO) "$(MAKE) clean GCE (to test using GCE dll with C++ (EH) applications)" - @ $(ECHO) "$(MAKE) clean GC-bench (to benchtest using GNU C dll with C cleanup code)" - @ $(ECHO) "$(MAKE) clean GC-debug (to test using GC dll with C (no EH) applications)" - @ $(ECHO) "$(MAKE) clean GC-static (to test using GC static lib with C (no EH) applications)" - @ $(ECHO) "$(MAKE) clean GC-static-debug (to test using GC static lib with C (no EH) applications)" - @ $(ECHO) "$(MAKE) clean GCE-static (to test using GC static lib with C (no EH) applications)" - @ $(ECHO) "$(MAKE) clean GCE-static-debug (to test using GC static lib with C (no EH) applications)" - @ $(ECHO) "$(MAKE) clean GCE-debug (to test using GCE dll with C++ (EH) applications)" - @ $(ECHO) "$(MAKE) clean GCX-static (to test using GC static lib with C++ applications)" - @ $(ECHO) "$(MAKE) clean GCX-static-debug (to test using GC static lib with C++ applications)" - @ $(ECHO) "$(MAKE) clean GCX-debug (to test using GCE dll with C++ (EH) applications)" - @ $(ECHO) "$(MAKE) clean GC TESTS="foo bar" (to build individual tests \"foo.c and bar.c\" with C and run using GC dll)" - -GC: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" allpassed - -GC-asm: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" all-asm - -GC-bench: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" all-bench - -GC-bench-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" OPT="${DOPT}" all-bench - -GC-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed - -GC-static GC-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" DLL="" allpassed - -GC-static-debug GC-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" OPT="$(DOPT)" DLL="" allpassed - -GCE: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC="$(CXX)" XXCFLAGS="-mthreads -D__CLEANUP_CXX" allpassed - -GCE-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_CXX" OPT="${DOPT}" allpassed - -GCE-static GCE-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB" DLL="" allpassed - -GCE-static-debug GCE-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB" OPT="$(DOPT)" DLL="" allpassed - -GCX: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CXX)" XXCFLAGS="-mthreads -D__CLEANUP_C" allpassed - -GCX-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed - -GCX-static GCX-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" DLL="" allpassed - -GCX-static-debug GCX-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" OPT="$(DOPT)" DLL="" allpassed - -all-asm: $(ASM) - @ $(ECHO) "ALL TESTS PASSED! Congratulations!" - -allpassed: $(HDR) $(LIB) $(DLL) $(QAPC) $(TESTS:%=%.pass) - @ $(ECHO) "ALL TESTS COMPLETED. Check the logfile: $(LOGFILE)" - @ $(ECHO) "FAILURES: $$( $(GREP) FAILED $(LOGFILE) | $(WC) -l )" - @ - ! $(GREP) FAILED $(LOGFILE) - @ $(MV) $(LOGFILE) $(TEST)-$(LOGFILE) - -all-bench: $(HDR) $(LIB) $(DLL) $(QAPC) $(XXLIBS) $(BENCHRESULTS) - @ $(ECHO) "ALL BENCH TESTS COMPLETED. Check the logfile: $(LOGFILE)" - @ $(ECHO) "FAILURES: $$( $(GREP) FAILED $(LOGFILE) | $(WC) -l ) " - @ - ! $(GREP) FAILED $(LOGFILE) - @ $(MV) $(LOGFILE) $(TEST)-$(LOGFILE) - -cancel9.exe: XLIBS = -lws2_32 - -%.pass: %.exe - @ $(ECHO) Running $(TEST) test \"$*\" | $(TEE) -a $(LOGFILE) - @ $(RUN) ./$* && { $(ECHO) Passed; $(TOUCH) $@; } || { $(ECHO) FAILED: $* ; $(ECHO) ; } \ - 2>&1 | $(TEE) -a $(LOGFILE) - -%.bench: %.exe - @ $(ECHO) Running $(TEST) test \"$*\" | $(TEE) -a $(LOGFILE) - @ $(RUN) ./$* && { $(ECHO) Done; $(TOUCH) $@; } || { $(ECHO) FAILED ; $(ECHO) ; } \ - 2>&1 | $(TEE) -a $(LOGFILE) - -%.exe: %.c - $(CC) $(CFLAGS) $(LFLAGS) -o $@ $< $(INCLUDES) -L. -lpthread$(GCX) $(XLIBS) $(XXLIBS) - -%.pre: %.c $(HDR) - $(CC) -E $(CFLAGS) -o $@ $< $(INCLUDES) - -%.s: %.c $(HDR) - @ $(ECHO) Compiling $@ - $(CC) -S $(CFLAGS) -o $@ $< $(INCLUDES) - -$(HDR) $(LIB) $(DLL) $(QAPC): - @ $(ECHO) Copying $(BUILD_DIR)/$@ - @ $(TESTFILE) $(BUILD_DIR)/$@ $(AND) $(CP) $(BUILD_DIR)/$@ . - -benchlib.o: benchlib.c - @ $(ECHO) Compiling $@ - $(CC) -c $(CFLAGS) $< $(INCLUDES) - -clean: - - $(RM) *.dll - - $(RM) *.lib - - $(RM) _ptw32.h - - $(RM) pthread.h - - $(RM) semaphore.h - - $(RM) sched.h - - $(RM) *.a - - $(RM) *.e - - $(RM) *.i - - $(RM) *.o - - $(RM) *.s - - $(RM) *.so - - $(RM) *.obj - - $(RM) *.pdb - - $(RM) *.exe - - $(RM) *.manifest - - $(RM) *.pass - - $(RM) *.bench -# - $(RM) *.log - \ No newline at end of file diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index 1deb8e13..94f6dbdb 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -149,49 +149,49 @@ help: @ $(ECHO) "$(MAKE) clean GC TESTS="foo bar" (to build individual tests \"foo.c and bar.c\" with C and run using GC dll)" GC: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" allpassed GC-asm: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" all-asm + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" all-asm GC-bench: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" all-bench + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" XXLIBS="benchlib.o" all-bench GC-bench-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" OPT="${DOPT}" all-bench + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" XXLIBS="benchlib.o" OPT="${DOPT}" all-bench GC-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" OPT="${DOPT}" allpassed GC-static GC-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed GC-static-debug GC-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed GCE: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__CLEANUP_CXX" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__PTW32_CLEANUP_CXX" allpassed GCE-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_CXX" OPT="${DOPT}" allpassed GCE-static GCE-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_CXX -D__PTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed GCE-static-debug GCE-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_CXX -D__PTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed GCX: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__CLEANUP_C" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__PTW32_CLEANUP_C" allpassed GCX-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_C" OPT="${DOPT}" allpassed GCX-static GCX-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed GCX-static-debug GCX-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed all-asm: $(ASM) @ $(ECHO) "ALL TESTS COMPILED TO ASSEMBLER CODE" diff --git a/tests/Makefile b/tests/Makefile index 6d79ff35..5f941b42 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -49,25 +49,25 @@ OPTIM = /O2 /Ob0 XXLIBS = ws2_32.lib # C++ Exceptions -VCEFLAGS = /EHs /TP /DPtW32NoCatchWarn /D__CLEANUP_CXX +VCEFLAGS = /EHs /TP /D__PtW32NoCatchWarn /D__PTW32_CLEANUP_CXX VCELIB = pthreadVCE$(DLL_VER).lib VCEDLL = pthreadVCE$(DLL_VER).dll VCELIBD = pthreadVCE$(DLL_VER)d.lib VCEDLLD = pthreadVCE$(DLL_VER)d.dll # Structured Exceptions -VSEFLAGS = /D__CLEANUP_SEH +VSEFLAGS = /D__PTW32_CLEANUP_SEH VSELIB = pthreadVSE$(DLL_VER).lib VSEDLL = pthreadVSE$(DLL_VER).dll VSELIBD = pthreadVSE$(DLL_VER)d.lib VSEDLLD = pthreadVSE$(DLL_VER)d.dll # C cleanup code -VCFLAGS = /D__CLEANUP_C +VCFLAGS = /D__PTW32_CLEANUP_C VCLIB = pthreadVC$(DLL_VER).lib VCDLL = pthreadVC$(DLL_VER).dll VCLIBD = pthreadVC$(DLL_VER)d.lib VCDLLD = pthreadVC$(DLL_VER)d.dll # C++ Exceptions in application - using VC version of pthreads dll -VCXFLAGS = /EHs /TP /D__CLEANUP_C +VCXFLAGS = /EHs /TP /D__PTW32_CLEANUP_C # Defaults CPLIB = $(VCLIB) @@ -155,52 +155,52 @@ VCX-bench: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCXFLAGS)" $(BENCHTESTS) VC-static VC-small-static: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB" allpassed VCE-static VCE-small-static: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB" allpassed VSE-static VSE-small-static: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB" allpassed VCX-static VCX-small-static: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCXFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCXFLAGS) /D__PTW32_STATIC_LIB" allpassed VC-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB" $(BENCHTESTS) VCE-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB" $(BENCHTESTS) VSE-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB" $(BENCHTESTS) VCX-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCXFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCXFLAGS) /D__PTW32_STATIC_LIB" $(BENCHTESTS) VC-debug: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCFLAGS)" allpassed VC-static-debug VC-small-static-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB" allpassed VCE-debug: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIBD)" CPDLL="$(VCEDLLD)" EHFLAGS="$(VCEFLAGS)" allpassed VCE-static-debug VCE-small-static-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIBD)" CPDLL="" EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIBD)" CPDLL="" EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB" allpassed VSE-debug: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIBD)" CPDLL="$(VSEDLLD)" EHFLAGS="$(VSEFLAGS)" allpassed VSE-static-debug VSE-small-static-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIBD)" CPDLL="" EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIBD)" CPDLL="" EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB" allpassed VCX-debug: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCXFLAGS)" allpassed VCX-static-debug VCX-small-static-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCXFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCXFLAGS) /D__PTW32_STATIC_LIB" allpassed clean: if exist *.dll $(RM) *.dll diff --git a/tests/Wmakefile b/tests/Wmakefile index 284f326c..fceeda47 100644 --- a/tests/Wmakefile +++ b/tests/Wmakefile @@ -52,15 +52,15 @@ OPTIM = -od XXLIBS = # C++ Exceptions -WCEFLAGS = -xs -dPtW32NoCatchWarn -d__CLEANUP_CXX +WCEFLAGS = -xs -d__PtW32NoCatchWarn -d__PTW32_CLEANUP_CXX WCELIB = pthreadWCE$(DLL_VER).lib WCEDLL = pthreadWCE$(DLL_VER).dll # C cleanup code -WCFLAGS = -d__CLEANUP_C +WCFLAGS = -d__PTW32_CLEANUP_C WCLIB = pthreadWC$(DLL_VER).lib WCDLL = pthreadWC$(DLL_VER).dll # C++ Exceptions in application - using WC version of pthreads dll -WCXFLAGS = -xs -d__CLEANUP_C +WCXFLAGS = -xs -d__PTW32_CLEANUP_C CFLAGS= -w4 -e25 -d_REENTRANT -zq -bm $(OPTIM) -5r -bt=nt -mf -d2 diff --git a/tests/affinity2.c b/tests/affinity2.c index e3f06c7d..29963eac 100644 --- a/tests/affinity2.c +++ b/tests/affinity2.c @@ -72,7 +72,7 @@ main() if (result != 0) { int err = -#if defined(PTW32_USES_SEPARATE_CRT) +#if defined (__PTW32_USES_SEPARATE_CRT) GetLastError(); #else errno; diff --git a/tests/benchlib.c b/tests/benchlib.c index d8f31ebd..259c2aec 100644 --- a/tests/benchlib.c +++ b/tests/benchlib.c @@ -49,8 +49,8 @@ int old_mutex_use = OLD_WIN32CS; -BOOL (WINAPI *ptw32_try_enter_critical_section)(LPCRITICAL_SECTION) = NULL; -HINSTANCE ptw32_h_kernel32; +BOOL (WINAPI *__ptw32_try_enter_critical_section)(LPCRITICAL_SECTION) = NULL; +HINSTANCE __ptw32_h_kernel32; void dummy_call(int * a) @@ -112,21 +112,21 @@ old_mutex_init(old_mutex_t *mutex, const old_mutexattr_t *attr) /* * Load KERNEL32 and try to get address of TryEnterCriticalSection */ - ptw32_h_kernel32 = LoadLibrary(TEXT("KERNEL32.DLL")); - ptw32_try_enter_critical_section = (BOOL (WINAPI *)(LPCRITICAL_SECTION)) + __ptw32_h_kernel32 = LoadLibrary(TEXT("KERNEL32.DLL")); + __ptw32_try_enter_critical_section = (BOOL (WINAPI *)(LPCRITICAL_SECTION)) #if defined(NEED_UNICODE_CONSTS) - GetProcAddress(ptw32_h_kernel32, + GetProcAddress(__ptw32_h_kernel32, (const TCHAR *)TEXT("TryEnterCriticalSection")); #else - GetProcAddress(ptw32_h_kernel32, + GetProcAddress(__ptw32_h_kernel32, (LPCSTR) "TryEnterCriticalSection"); #endif - if (ptw32_try_enter_critical_section != NULL) + if (__ptw32_try_enter_critical_section != NULL) { InitializeCriticalSection(&cs); - if ((*ptw32_try_enter_critical_section)(&cs)) + if ((*__ptw32_try_enter_critical_section)(&cs)) { LeaveCriticalSection(&cs); } @@ -135,15 +135,15 @@ old_mutex_init(old_mutex_t *mutex, const old_mutexattr_t *attr) /* * Not really supported (Win98?). */ - ptw32_try_enter_critical_section = NULL; + __ptw32_try_enter_critical_section = NULL; } DeleteCriticalSection(&cs); } - if (ptw32_try_enter_critical_section == NULL) + if (__ptw32_try_enter_critical_section == NULL) { - (void) FreeLibrary(ptw32_h_kernel32); - ptw32_h_kernel32 = 0; + (void) FreeLibrary(__ptw32_h_kernel32); + __ptw32_h_kernel32 = 0; } if (old_mutex_use == OLD_WIN32CS) @@ -191,7 +191,7 @@ old_mutex_lock(old_mutex_t *mutex) return EINVAL; } - if (*mutex == (old_mutex_t) PTW32_OBJECT_AUTO_INIT) + if (*mutex == (old_mutex_t) __PTW32_OBJECT_AUTO_INIT) { /* * Don't use initialisers when benchtesting. @@ -232,7 +232,7 @@ old_mutex_unlock(old_mutex_t *mutex) mx = *mutex; - if (mx != (old_mutex_t) PTW32_OBJECT_AUTO_INIT) + if (mx != (old_mutex_t) __PTW32_OBJECT_AUTO_INIT) { if (mx->mutex == 0) { @@ -263,7 +263,7 @@ old_mutex_trylock(old_mutex_t *mutex) return EINVAL; } - if (*mutex == (old_mutex_t) PTW32_OBJECT_AUTO_INIT) + if (*mutex == (old_mutex_t) __PTW32_OBJECT_AUTO_INIT) { /* * Don't use initialisers when benchtesting. @@ -277,11 +277,11 @@ old_mutex_trylock(old_mutex_t *mutex) { if (mx->mutex == 0) { - if (ptw32_try_enter_critical_section == NULL) + if (__ptw32_try_enter_critical_section == NULL) { result = 0; } - else if ((*ptw32_try_enter_critical_section)(&mx->cs) != TRUE) + else if ((*__ptw32_try_enter_critical_section)(&mx->cs) != TRUE) { result = EBUSY; } @@ -317,7 +317,7 @@ old_mutex_destroy(old_mutex_t *mutex) return EINVAL; } - if (*mutex != (old_mutex_t) PTW32_OBJECT_AUTO_INIT) + if (*mutex != (old_mutex_t) __PTW32_OBJECT_AUTO_INIT) { mx = *mutex; @@ -352,10 +352,10 @@ old_mutex_destroy(old_mutex_t *mutex) result = EINVAL; } - if (ptw32_try_enter_critical_section != NULL) + if (__ptw32_try_enter_critical_section != NULL) { - (void) FreeLibrary(ptw32_h_kernel32); - ptw32_h_kernel32 = 0; + (void) FreeLibrary(__ptw32_h_kernel32); + __ptw32_h_kernel32 = 0; } return(result); diff --git a/tests/benchtest.h b/tests/benchtest.h index 81f132c8..5c798452 100644 --- a/tests/benchtest.h +++ b/tests/benchtest.h @@ -55,10 +55,10 @@ struct old_mutexattr_t_ { typedef struct old_mutexattr_t_ * old_mutexattr_t; -extern BOOL (WINAPI *ptw32_try_enter_critical_section)(LPCRITICAL_SECTION); -extern HINSTANCE ptw32_h_kernel32; +extern BOOL (WINAPI *__ptw32_try_enter_critical_section)(LPCRITICAL_SECTION); +extern HINSTANCE __ptw32_h_kernel32; -#define PTW32_OBJECT_AUTO_INIT ((void *) -1) +#define __PTW32_OBJECT_AUTO_INIT ((void *) -1) void dummy_call(int * a); void interlocked_inc_with_conditionals(int *a); diff --git a/tests/benchtest1.c b/tests/benchtest1.c index ea581043..193d3c76 100644 --- a/tests/benchtest1.c +++ b/tests/benchtest1.c @@ -48,13 +48,13 @@ #include "benchtest.h" -#define PTW32_MUTEX_TYPES +#define __PTW32_MUTEX_TYPES #define ITERATIONS 10000000L pthread_mutex_t mx; pthread_mutexattr_t ma; -PTW32_STRUCT_TIMEB currSysTimeStart; -PTW32_STRUCT_TIMEB currSysTimeStop; +__PTW32_STRUCT_TIMEB currSysTimeStart; +__PTW32_STRUCT_TIMEB currSysTimeStop; long durationMilliSecs; long overHeadMilliSecs = 0; int two = 2; @@ -70,16 +70,16 @@ int iter; * when doing the overhead timing with an empty loop. */ #define TESTSTART \ - { int i, j = 0, k = 0; PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; + { int i, j = 0, k = 0; __PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; #define TESTSTOP \ - }; PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } + }; __PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } void runTest (char * testNameString, int mType) { -#ifdef PTW32_MUTEX_TYPES +#ifdef __PTW32_MUTEX_TYPES assert(pthread_mutexattr_settype(&ma, mType) == 0); #endif assert(pthread_mutex_init(&mx, &ma) == 0); @@ -225,7 +225,7 @@ main (int argc, char *argv[]) /* * Now we can start the actual tests */ -#ifdef PTW32_MUTEX_TYPES +#ifdef __PTW32_MUTEX_TYPES runTest("PTHREAD_MUTEX_DEFAULT", PTHREAD_MUTEX_DEFAULT); runTest("PTHREAD_MUTEX_NORMAL", PTHREAD_MUTEX_NORMAL); @@ -241,7 +241,7 @@ main (int argc, char *argv[]) pthread_mutexattr_setrobust(&ma, PTHREAD_MUTEX_ROBUST); -#ifdef PTW32_MUTEX_TYPES +#ifdef __PTW32_MUTEX_TYPES runTest("PTHREAD_MUTEX_DEFAULT (Robust)", PTHREAD_MUTEX_DEFAULT); runTest("PTHREAD_MUTEX_NORMAL (Robust)", PTHREAD_MUTEX_NORMAL); diff --git a/tests/benchtest2.c b/tests/benchtest2.c index bab680db..fd25a3df 100644 --- a/tests/benchtest2.c +++ b/tests/benchtest2.c @@ -51,7 +51,7 @@ #include "benchtest.h" -#define PTW32_MUTEX_TYPES +#define __PTW32_MUTEX_TYPES #define ITERATIONS 100000L pthread_mutex_t gate1, gate2; @@ -60,8 +60,8 @@ CRITICAL_SECTION cs1, cs2; pthread_mutexattr_t ma; long durationMilliSecs; long overHeadMilliSecs = 0; -PTW32_STRUCT_TIMEB currSysTimeStart; -PTW32_STRUCT_TIMEB currSysTimeStop; +__PTW32_STRUCT_TIMEB currSysTimeStart; +__PTW32_STRUCT_TIMEB currSysTimeStop; pthread_t worker; int running = 0; @@ -73,10 +73,10 @@ int running = 0; * when doing the overhead timing with an empty loop. */ #define TESTSTART \ - { int i, j = 0, k = 0; PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; + { int i, j = 0, k = 0; __PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; #define TESTSTOP \ - }; PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } + }; __PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } void * @@ -143,7 +143,7 @@ CSThread(void * arg) void runTest (char * testNameString, int mType) { -#ifdef PTW32_MUTEX_TYPES +#ifdef __PTW32_MUTEX_TYPES assert(pthread_mutexattr_settype(&ma, mType) == 0); #endif assert(pthread_mutex_init(&gate1, &ma) == 0); @@ -288,7 +288,7 @@ main (int argc, char *argv[]) /* * Now we can start the actual tests */ -#ifdef PTW32_MUTEX_TYPES +#ifdef __PTW32_MUTEX_TYPES runTest("PTHREAD_MUTEX_DEFAULT", PTHREAD_MUTEX_DEFAULT); runTest("PTHREAD_MUTEX_NORMAL", PTHREAD_MUTEX_NORMAL); @@ -304,7 +304,7 @@ main (int argc, char *argv[]) pthread_mutexattr_setrobust(&ma, PTHREAD_MUTEX_ROBUST); -#ifdef PTW32_MUTEX_TYPES +#ifdef __PTW32_MUTEX_TYPES runTest("PTHREAD_MUTEX_DEFAULT (Robust)", PTHREAD_MUTEX_DEFAULT); runTest("PTHREAD_MUTEX_NORMAL (Robust)", PTHREAD_MUTEX_NORMAL); diff --git a/tests/benchtest3.c b/tests/benchtest3.c index fc0e261d..824c407a 100644 --- a/tests/benchtest3.c +++ b/tests/benchtest3.c @@ -48,14 +48,14 @@ #include "benchtest.h" -#define PTW32_MUTEX_TYPES +#define __PTW32_MUTEX_TYPES #define ITERATIONS 10000000L pthread_mutex_t mx; old_mutex_t ox; pthread_mutexattr_t ma; -PTW32_STRUCT_TIMEB currSysTimeStart; -PTW32_STRUCT_TIMEB currSysTimeStop; +__PTW32_STRUCT_TIMEB currSysTimeStart; +__PTW32_STRUCT_TIMEB currSysTimeStop; long durationMilliSecs; long overHeadMilliSecs = 0; @@ -67,10 +67,10 @@ long overHeadMilliSecs = 0; * when doing the overhead timing with an empty loop. */ #define TESTSTART \ - { int i, j = 0, k = 0; PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; + { int i, j = 0, k = 0; __PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; #define TESTSTOP \ - }; PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } + }; __PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } void * @@ -100,7 +100,7 @@ runTest (char * testNameString, int mType) { pthread_t t; -#ifdef PTW32_MUTEX_TYPES +#ifdef __PTW32_MUTEX_TYPES (void) pthread_mutexattr_settype(&ma, mType); #endif assert(pthread_mutex_init(&mx, &ma) == 0); @@ -177,7 +177,7 @@ main (int argc, char *argv[]) /* * Now we can start the actual tests */ -#ifdef PTW32_MUTEX_TYPES +#ifdef __PTW32_MUTEX_TYPES runTest("PTHREAD_MUTEX_DEFAULT", PTHREAD_MUTEX_DEFAULT); runTest("PTHREAD_MUTEX_NORMAL", PTHREAD_MUTEX_NORMAL); @@ -193,7 +193,7 @@ main (int argc, char *argv[]) pthread_mutexattr_setrobust(&ma, PTHREAD_MUTEX_ROBUST); -#ifdef PTW32_MUTEX_TYPES +#ifdef __PTW32_MUTEX_TYPES runTest("PTHREAD_MUTEX_DEFAULT (Robust)", PTHREAD_MUTEX_DEFAULT); runTest("PTHREAD_MUTEX_NORMAL (Robust)", PTHREAD_MUTEX_NORMAL); diff --git a/tests/benchtest4.c b/tests/benchtest4.c index 0f59537f..9e303532 100644 --- a/tests/benchtest4.c +++ b/tests/benchtest4.c @@ -48,14 +48,14 @@ #include "benchtest.h" -#define PTW32_MUTEX_TYPES +#define __PTW32_MUTEX_TYPES #define ITERATIONS 10000000L pthread_mutex_t mx; old_mutex_t ox; pthread_mutexattr_t ma; -PTW32_STRUCT_TIMEB currSysTimeStart; -PTW32_STRUCT_TIMEB currSysTimeStop; +__PTW32_STRUCT_TIMEB currSysTimeStart; +__PTW32_STRUCT_TIMEB currSysTimeStop; long durationMilliSecs; long overHeadMilliSecs = 0; @@ -67,10 +67,10 @@ long overHeadMilliSecs = 0; * when doing the overhead timing with an empty loop. */ #define TESTSTART \ - { int i, j = 0, k = 0; PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; + { int i, j = 0, k = 0; __PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; #define TESTSTOP \ - }; PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } + }; __PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } void @@ -82,7 +82,7 @@ oldRunTest (char * testNameString, int mType) void runTest (char * testNameString, int mType) { -#ifdef PTW32_MUTEX_TYPES +#ifdef __PTW32_MUTEX_TYPES pthread_mutexattr_settype(&ma, mType); #endif pthread_mutex_init(&mx, &ma); @@ -158,7 +158,7 @@ main (int argc, char *argv[]) /* * Now we can start the actual tests */ -#ifdef PTW32_MUTEX_TYPES +#ifdef __PTW32_MUTEX_TYPES runTest("PTHREAD_MUTEX_DEFAULT", PTHREAD_MUTEX_DEFAULT); runTest("PTHREAD_MUTEX_NORMAL", PTHREAD_MUTEX_NORMAL); @@ -174,7 +174,7 @@ main (int argc, char *argv[]) pthread_mutexattr_setrobust(&ma, PTHREAD_MUTEX_ROBUST); -#ifdef PTW32_MUTEX_TYPES +#ifdef __PTW32_MUTEX_TYPES runTest("PTHREAD_MUTEX_DEFAULT (Robust)", PTHREAD_MUTEX_DEFAULT); runTest("PTHREAD_MUTEX_NORMAL (Robust)", PTHREAD_MUTEX_NORMAL); diff --git a/tests/benchtest5.c b/tests/benchtest5.c index 9371ec5e..beda4726 100644 --- a/tests/benchtest5.c +++ b/tests/benchtest5.c @@ -53,8 +53,8 @@ sem_t sema; HANDLE w32sema; -PTW32_STRUCT_TIMEB currSysTimeStart; -PTW32_STRUCT_TIMEB currSysTimeStop; +__PTW32_STRUCT_TIMEB currSysTimeStart; +__PTW32_STRUCT_TIMEB currSysTimeStop; long durationMilliSecs; long overHeadMilliSecs = 0; int one = 1; @@ -68,10 +68,10 @@ int zero = 0; * when doing the overhead timing with an empty loop. */ #define TESTSTART \ - { int i, j = 0, k = 0; PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; + { int i, j = 0, k = 0; __PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; #define TESTSTOP \ - }; PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } + }; __PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } void diff --git a/tests/cancel2.c b/tests/cancel2.c index 94106136..1e80e668 100644 --- a/tests/cancel2.c +++ b/tests/cancel2.c @@ -129,8 +129,8 @@ mythread(void * arg) #if !defined(__cplusplus) __except(EXCEPTION_EXECUTE_HANDLER) #else -#if defined(PtW32CatchAll) - PtW32CatchAll +#if defined(__PtW32CatchAll) + __PtW32CatchAll #else catch(...) #endif diff --git a/tests/cancel9.c b/tests/cancel9.c index 472a371b..d9bab65a 100644 --- a/tests/cancel9.c +++ b/tests/cancel9.c @@ -163,7 +163,7 @@ main () pthread_t t; void *result; - if (pthread_win32_test_features_np (PTW32_ALERTABLE_ASYNC_CANCEL)) + if (pthread_win32_test_features_np (__PTW32_ALERTABLE_ASYNC_CANCEL)) { printf ("Cancel sleeping thread.\n"); assert (pthread_create (&t, NULL, test_sleep, NULL) == 0); diff --git a/tests/cleanup1.c b/tests/cleanup1.c index 72a43386..08c63bdd 100644 --- a/tests/cleanup1.c +++ b/tests/cleanup1.c @@ -101,7 +101,7 @@ typedef struct { static sharedInt_t pop_count; static void -#ifdef __CLEANUP_C +#ifdef __PTW32_CLEANUP_C __cdecl #endif increment_pop_count(void * arg) diff --git a/tests/context1.c b/tests/context1.c index 6d330d18..22b0609c 100644 --- a/tests/context1.c +++ b/tests/context1.c @@ -112,7 +112,7 @@ main() assert(pthread_create(&t, NULL, func, NULL) == 0); - hThread = ((ptw32_thread_t *)t.p)->threadH; + hThread = ((__ptw32_thread_t *)t.p)->threadH; Sleep(500); @@ -128,7 +128,7 @@ main() context.ContextFlags = CONTEXT_CONTROL; GetThreadContext(hThread, &context); - PTW32_PROGCTR (context) = (DWORD_PTR) anotherEnding; + __PTW32_PROGCTR (context) = (DWORD_PTR) anotherEnding; SetThreadContext(hThread, &context); ResumeThread(hThread); } diff --git a/tests/context2.c b/tests/context2.c index 41299b53..caca5a60 100644 --- a/tests/context2.c +++ b/tests/context2.c @@ -125,7 +125,7 @@ main() assert(pthread_create(&t, NULL, func, NULL) == 0); - hThread = ((ptw32_thread_t *)t.p)->threadH; + hThread = ((__ptw32_thread_t *)t.p)->threadH; Sleep(500); @@ -141,7 +141,7 @@ main() context.ContextFlags = CONTEXT_CONTROL; GetThreadContext(hThread, &context); - PTW32_PROGCTR (context) = (DWORD_PTR) anotherEnding; + __PTW32_PROGCTR (context) = (DWORD_PTR) anotherEnding; SetThreadContext(hThread, &context); ResumeThread(hThread); } diff --git a/tests/exception1.c b/tests/exception1.c index 2ba4849c..100af205 100644 --- a/tests/exception1.c +++ b/tests/exception1.c @@ -123,8 +123,8 @@ exceptionedThread(void * arg) */ throw dummy; } -#if defined(PtW32CatchAll) - PtW32CatchAll +#if defined(__PtW32CatchAll) + __PtW32CatchAll #else catch (...) #endif @@ -174,8 +174,8 @@ canceledThread(void * arg) for (count = 0; count < 100; count++) Sleep(100); } -#if defined(PtW32CatchAll) - PtW32CatchAll +#if defined(__PtW32CatchAll) + __PtW32CatchAll #else catch (...) #endif diff --git a/tests/exception3.c b/tests/exception3.c index 50778ec8..2665bcc7 100644 --- a/tests/exception3.c +++ b/tests/exception3.c @@ -152,7 +152,7 @@ exceptionedThread(void * arg) { int dummy = 0x1; -#if defined(PTW32_USES_SEPARATE_CRT) && (defined(__CLEANUP_CXX) || defined(__CLEANUP_SEH)) +#if defined (__PTW32_USES_SEPARATE_CRT) && (defined(__PTW32_CLEANUP_CXX) || defined(__PTW32_CLEANUP_SEH)) printf("PTW32_USES_SEPARATE_CRT is defined\n"); pthread_win32_set_terminate_np(&terminateFunction); set_terminate(&wrongTerminateFunction); diff --git a/tests/name_np1.c b/tests/name_np1.c index c6129fc0..b9c33224 100644 --- a/tests/name_np1.c +++ b/tests/name_np1.c @@ -58,7 +58,7 @@ static int washere = 0; static pthread_barrier_t sync; -#if defined(PTW32_COMPATIBILITY_BSD) +#if defined (__PTW32_COMPATIBILITY_BSD) static int seqno = 0; #endif @@ -84,10 +84,10 @@ main() assert(pthread_barrier_init(&sync, NULL, 2) == 0); assert(pthread_create(&t, NULL, func, NULL) == 0); -#if defined(PTW32_COMPATIBILITY_BSD) +#if defined (__PTW32_COMPATIBILITY_BSD) seqno++; assert(pthread_setname_np(t, "MyThread%d", (void *)&seqno) == 0); -#elif defined(PTW32_COMPATIBILITY_TRU64) +#elif defined (__PTW32_COMPATIBILITY_TRU64) assert(pthread_setname_np(t, "MyThread1", NULL) == 0); #else assert(pthread_setname_np(t, "MyThread1") == 0); diff --git a/tests/name_np2.c b/tests/name_np2.c index 601d97f1..ae6c9ec7 100644 --- a/tests/name_np2.c +++ b/tests/name_np2.c @@ -60,7 +60,7 @@ static int washere = 0; static pthread_attr_t attr; static pthread_barrier_t sync; -#if defined(PTW32_COMPATIBILITY_BSD) +#if defined (__PTW32_COMPATIBILITY_BSD) static int seqno = 0; #endif @@ -84,10 +84,10 @@ main() pthread_t t; assert(pthread_attr_init(&attr) == 0); -#if defined(PTW32_COMPATIBILITY_BSD) +#if defined (__PTW32_COMPATIBILITY_BSD) seqno++; assert(pthread_attr_setname_np(&attr, "MyThread%d", (void *)&seqno) == 0); -#elif defined(PTW32_COMPATIBILITY_TRU64) +#elif defined (__PTW32_COMPATIBILITY_TRU64) assert(pthread_attr_setname_np(&attr, "MyThread1", NULL) == 0); #else assert(pthread_attr_setname_np(&attr, "MyThread1") == 0); diff --git a/tests/once3.c b/tests/once3.c index 6c772860..4486f34f 100644 --- a/tests/once3.c +++ b/tests/once3.c @@ -106,7 +106,7 @@ main() pthread_t t[NUM_THREADS][NUM_ONCE]; int i, j; -#if defined(PTW32_CONFIG_MSVC6) && defined(__CLEANUP_CXX) +#if defined (__PTW32_CONFIG_MSVC6) && defined(__PTW32_CLEANUP_CXX) puts("If this test fails or hangs, rebuild the library with /EHa instead of /EHs."); puts("(This is a known issue with Microsoft VC++6.0.)"); fflush(stdout); diff --git a/tests/once4.c b/tests/once4.c index b708aae6..39feea94 100644 --- a/tests/once4.c +++ b/tests/once4.c @@ -141,7 +141,7 @@ main() pthread_t t[NUM_THREADS][NUM_ONCE]; int i, j; -#if defined(PTW32_CONFIG_MSVC6) && defined(__CLEANUP_CXX) +#if defined (__PTW32_CONFIG_MSVC6) && defined(__PTW32_CLEANUP_CXX) puts("If this test fails or hangs, rebuild the library with /EHa instead of /EHs."); puts("(This is a known issue with Microsoft VC++6.0.)"); fflush(stdout); diff --git a/tests/rwlock7.c b/tests/rwlock7.c index 69d1a73f..9d58f6e9 100644 --- a/tests/rwlock7.c +++ b/tests/rwlock7.c @@ -108,8 +108,8 @@ main (int argc, char *argv[]) int data_updates = 0; int seed = 1; - PTW32_STRUCT_TIMEB currSysTime1; - PTW32_STRUCT_TIMEB currSysTime2; + __PTW32_STRUCT_TIMEB currSysTime1; + __PTW32_STRUCT_TIMEB currSysTime2; /* * Initialize the shared data. @@ -122,7 +122,7 @@ main (int argc, char *argv[]) assert(pthread_rwlock_init (&data[data_count].lock, NULL) == 0); } - PTW32_FTIME(&currSysTime1); + __PTW32_FTIME(&currSysTime1); /* * Create THREADS threads to access shared data. @@ -187,7 +187,7 @@ main (int argc, char *argv[]) printf ("%d thread updates, %d data updates\n", thread_updates, data_updates); - PTW32_FTIME(&currSysTime2); + __PTW32_FTIME(&currSysTime2); printf( "\nstart: %ld/%d, stop: %ld/%d, duration:%ld\n", (long)currSysTime1.time,currSysTime1.millitm, diff --git a/tests/rwlock8.c b/tests/rwlock8.c index 99c357aa..301e1ec6 100644 --- a/tests/rwlock8.c +++ b/tests/rwlock8.c @@ -114,8 +114,8 @@ main (int argc, char *argv[]) int data_updates = 0; int seed = 1; - PTW32_STRUCT_TIMEB currSysTime1; - PTW32_STRUCT_TIMEB currSysTime2; + __PTW32_STRUCT_TIMEB currSysTime1; + __PTW32_STRUCT_TIMEB currSysTime2; /* * Initialize the shared data. @@ -128,7 +128,7 @@ main (int argc, char *argv[]) assert(pthread_rwlock_init (&data[data_count].lock, NULL) == 0); } - PTW32_FTIME(&currSysTime1); + __PTW32_FTIME(&currSysTime1); /* * Create THREADS threads to access shared data. @@ -193,7 +193,7 @@ main (int argc, char *argv[]) printf ("%d thread updates, %d data updates\n", thread_updates, data_updates); - PTW32_FTIME(&currSysTime2); + __PTW32_FTIME(&currSysTime2); printf( "\nstart: %ld/%d, stop: %ld/%d, duration:%ld\n", (long)currSysTime1.time,currSysTime1.millitm, diff --git a/tests/self1.c b/tests/self1.c index 8893f6e6..3278dc02 100644 --- a/tests/self1.c +++ b/tests/self1.c @@ -55,7 +55,7 @@ main(int argc, char * argv[]) */ pthread_t self; -#if defined(PTW32_STATIC_LIB) && !(defined(_MSC_VER) || defined(__MINGW32__)) +#if defined (__PTW32_STATIC_LIB) && !(defined(_MSC_VER) || defined(__MINGW32__)) pthread_win32_process_attach_np(); #endif @@ -63,7 +63,7 @@ main(int argc, char * argv[]) assert(self.p != NULL); -#if defined(PTW32_STATIC_LIB) && !(defined(_MSC_VER) || defined(__MINGW32__)) +#if defined (__PTW32_STATIC_LIB) && !(defined(_MSC_VER) || defined(__MINGW32__)) pthread_win32_process_detach_np(); #endif return 0; diff --git a/tests/semaphore1.c b/tests/semaphore1.c index 938f0b59..91d875f1 100644 --- a/tests/semaphore1.c +++ b/tests/semaphore1.c @@ -87,7 +87,7 @@ thr(void * arg) if ( result == -1 ) { int err = -#if defined(PTW32_USES_SEPARATE_CRT) +#if defined (__PTW32_USES_SEPARATE_CRT) GetLastError(); #else errno; @@ -133,7 +133,7 @@ main() if (result2 == -1) { int err = -#if defined(PTW32_USES_SEPARATE_CRT) +#if defined (__PTW32_USES_SEPARATE_CRT) GetLastError(); #else errno; diff --git a/tests/sizes.c b/tests/sizes.c index 30ab601a..31a146d2 100644 --- a/tests/sizes.c +++ b/tests/sizes.c @@ -11,7 +11,7 @@ main() printf("Sizes of pthreads-win32 structs\n"); printf("-------------------------------\n"); printf("%30s %4d\n", "pthread_t", (int)sizeof(pthread_t)); - printf("%30s %4d\n", "ptw32_thread_t", (int)sizeof(ptw32_thread_t)); + printf("%30s %4d\n", "__ptw32_thread_t", (int)sizeof(__ptw32_thread_t)); printf("%30s %4d\n", "pthread_attr_t_", (int)sizeof(struct pthread_attr_t_)); printf("%30s %4d\n", "sem_t_", (int)sizeof(struct sem_t_)); printf("%30s %4d\n", "pthread_mutex_t_", (int)sizeof(struct pthread_mutex_t_)); @@ -25,8 +25,8 @@ main() printf("%30s %4d\n", "pthread_rwlock_t_", (int)sizeof(struct pthread_rwlock_t_)); printf("%30s %4d\n", "pthread_rwlockattr_t_", (int)sizeof(struct pthread_rwlockattr_t_)); printf("%30s %4d\n", "pthread_once_t_", (int)sizeof(struct pthread_once_t_)); - printf("%30s %4d\n", "ptw32_cleanup_t", (int)sizeof(struct ptw32_cleanup_t)); - printf("%30s %4d\n", "ptw32_mcs_node_t_", (int)sizeof(struct ptw32_mcs_node_t_)); + printf("%30s %4d\n", "__ptw32_cleanup_t", (int)sizeof(struct __ptw32_cleanup_t)); + printf("%30s %4d\n", "__ptw32_mcs_node_t_", (int)sizeof(struct __ptw32_mcs_node_t_)); printf("%30s %4d\n", "sched_param", (int)sizeof(struct sched_param)); printf("-------------------------------\n"); diff --git a/tests/spin4.c b/tests/spin4.c index 91710479..f602810d 100644 --- a/tests/spin4.c +++ b/tests/spin4.c @@ -42,8 +42,8 @@ #include pthread_spinlock_t lock = PTHREAD_SPINLOCK_INITIALIZER; -PTW32_STRUCT_TIMEB currSysTimeStart; -PTW32_STRUCT_TIMEB currSysTimeStop; +__PTW32_STRUCT_TIMEB currSysTimeStart; +__PTW32_STRUCT_TIMEB currSysTimeStop; #define GetDurationMilliSecs(_TStart, _TStop) ((_TStop.time*1000+_TStop.millitm) \ - (_TStart.time*1000+_TStart.millitm)) @@ -52,11 +52,11 @@ static int washere = 0; void * func(void * arg) { - PTW32_FTIME(&currSysTimeStart); + __PTW32_FTIME(&currSysTimeStart); washere = 1; assert(pthread_spin_lock(&lock) == 0); assert(pthread_spin_unlock(&lock) == 0); - PTW32_FTIME(&currSysTimeStop); + __PTW32_FTIME(&currSysTimeStop); return (void *)(size_t)GetDurationMilliSecs(currSysTimeStart, currSysTimeStop); } @@ -67,7 +67,7 @@ main() void* result = (void*)0; pthread_t t; int CPUs; - PTW32_STRUCT_TIMEB sysTime; + __PTW32_STRUCT_TIMEB sysTime; if ((CPUs = pthread_num_processors_np()) == 1) { @@ -87,7 +87,7 @@ main() do { sched_yield(); - PTW32_FTIME(&sysTime); + __PTW32_FTIME(&sysTime); } while (GetDurationMilliSecs(currSysTimeStart, sysTime) <= 1000); diff --git a/tests/test.h b/tests/test.h index bced8fb3..2df922e8 100644 --- a/tests/test.h +++ b/tests/test.h @@ -44,7 +44,7 @@ * This is used inside ../implement.h to control * what these test apps see and don't see. */ -#define PTW32_TEST_SNEAK_PEEK +#define __PTW32_TEST_SNEAK_PEEK #include "pthread.h" #include "sched.h" @@ -58,7 +58,7 @@ */ #include -#define PTW32_THREAD_NULL_ID {NULL,0} +#define __PTW32_THREAD_NULL_ID {NULL,0} /* * Some non-thread POSIX API substitutes @@ -77,15 +77,15 @@ #endif #if defined(_MSC_VER) && _MSC_VER >= 1400 -# define PTW32_FTIME(x) _ftime64_s(x) -# define PTW32_STRUCT_TIMEB struct __timeb64 +# define __PTW32_FTIME(x) _ftime64_s(x) +# define __PTW32_STRUCT_TIMEB struct __timeb64 #elif ( defined(_MSC_VER) && _MSC_VER >= 1300 ) || \ ( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0601 ) -# define PTW32_FTIME(x) _ftime64(x) -# define PTW32_STRUCT_TIMEB struct __timeb64 +# define __PTW32_FTIME(x) _ftime64(x) +# define __PTW32_STRUCT_TIMEB struct __timeb64 #else -# define PTW32_FTIME(x) _ftime(x) -# define PTW32_STRUCT_TIMEB struct _timeb +# define __PTW32_FTIME(x) _ftime(x) +# define __PTW32_STRUCT_TIMEB struct _timeb #endif @@ -132,7 +132,7 @@ const char * error_string[] = { "ENOLCK", "ENOSYS", "ENOTEMPTY", -#if PTW32_VERSION_MAJOR > 2 +#if __PTW32_VERSION_MAJOR > 2 "EILSEQ", #else "EILSEQ_or_EOWNERDEAD", diff --git a/tests/valid2.c b/tests/valid2.c index 5b04fa6b..ea07d238 100644 --- a/tests/valid2.c +++ b/tests/valid2.c @@ -77,7 +77,7 @@ int main() { - pthread_t NullThread = PTW32_THREAD_NULL_ID; + pthread_t NullThread = __PTW32_THREAD_NULL_ID; assert(pthread_kill(NullThread, 0) == ESRCH); diff --git a/version.rc b/version.rc index 23d265d3..479f518a 100644 --- a/version.rc +++ b/version.rc @@ -35,80 +35,80 @@ #include "pthread.h" /* - * Note: the correct __CLEANUP_* macro must be defined corresponding to + * Note: the correct __PTW32_CLEANUP_* macro must be defined corresponding to * the definition used for the object file builds. This is done in the * relevent makefiles for the command line builds, but users should ensure * that their resource compiler knows what it is too. - * If using the default (no __CLEANUP_* defined), pthread.h will define it - * as __CLEANUP_C. + * If using the default (no __PTW32_CLEANUP_* defined), pthread.h will define it + * as __PTW32_CLEANUP_C. */ -#if defined(PTW32_RC_MSC) -# if defined(PTW32_ARCHx64) || defined(PTW32_ARCHX64) || defined(PTW32_ARCHAMD64) -# if defined(__CLEANUP_C) -# define PTW32_VERSIONINFO_NAME "pthreadVC2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "MS C x64\0" -# elif defined(__CLEANUP_CXX) -# define PTW32_VERSIONINFO_NAME "pthreadVCE2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "MS C++ x64\0" -# elif defined(__CLEANUP_SEH) -# define PTW32_VERSIONINFO_NAME "pthreadVSE2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "MS C SEH x64\0" +#if defined (__PTW32_RC_MSC) +# if defined (__PTW32_ARCHx64) || defined (__PTW32_ARCHX64) || defined (__PTW32_ARCHAMD64) +# if defined(__PTW32_CLEANUP_C) +# define __PTW32_VERSIONINFO_NAME "pthreadVC2.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C x64\0" +# elif defined(__PTW32_CLEANUP_CXX) +# define __PTW32_VERSIONINFO_NAME "pthreadVCE2.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C++ x64\0" +# elif defined(__PTW32_CLEANUP_SEH) +# define __PTW32_VERSIONINFO_NAME "pthreadVSE2.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH x64\0" # endif -# elif defined(PTW32_ARCHx86) || defined(PTW32_ARCHX86) -# if defined(__CLEANUP_C) -# define PTW32_VERSIONINFO_NAME "pthreadVC2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "MS C x86\0" -# elif defined(__CLEANUP_CXX) -# define PTW32_VERSIONINFO_NAME "pthreadVCE2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "MS C++ x86\0" -# elif defined(__CLEANUP_SEH) -# define PTW32_VERSIONINFO_NAME "pthreadVSE2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "MS C SEH x86\0" +# elif defined (__PTW32_ARCHx86) || defined (__PTW32_ARCHX86) +# if defined(__PTW32_CLEANUP_C) +# define __PTW32_VERSIONINFO_NAME "pthreadVC2.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C x86\0" +# elif defined(__PTW32_CLEANUP_CXX) +# define __PTW32_VERSIONINFO_NAME "pthreadVCE2.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C++ x86\0" +# elif defined(__PTW32_CLEANUP_SEH) +# define __PTW32_VERSIONINFO_NAME "pthreadVSE2.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH x86\0" # endif # endif #elif defined(__GNUC__) # if defined(_M_X64) -# define PTW32_ARCH "x64 (mingw64)" +# define __PTW32_ARCH "x64 (mingw64)" # else -# define PTW32_ARCH "x86 (mingw32)" +# define __PTW32_ARCH "x86 (mingw32)" # endif -# if defined(__CLEANUP_C) -# define PTW32_VERSIONINFO_NAME "pthreadGC2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "GNU C " PTW32_ARCH "\0" -# elif defined(__CLEANUP_CXX) -# define PTW32_VERSIONINFO_NAME "pthreadGCE2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "GNU C++ " PTW32_ARCH "\0" +# if defined(__PTW32_CLEANUP_C) +# define __PTW32_VERSIONINFO_NAME "pthreadGC2.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "GNU C " __PTW32_ARCH "\0" +# elif defined(__PTW32_CLEANUP_CXX) +# define __PTW32_VERSIONINFO_NAME "pthreadGCE2.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "GNU C++ " __PTW32_ARCH "\0" # else # error Resource compiler doesn't know which cleanup style you're using - see version.rc # endif #elif defined(__BORLANDC__) # if defined(_M_X64) -# define PTW32_ARCH "x64 (Borland)" +# define __PTW32_ARCH "x64 (Borland)" # else -# define PTW32_ARCH "x86 (Borland)" +# define __PTW32_ARCH "x86 (Borland)" # endif -# if defined(__CLEANUP_C) -# define PTW32_VERSIONINFO_NAME "pthreadBC2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "BORLAND C " PTW32_ARCH "\0" -# elif defined(__CLEANUP_CXX) -# define PTW32_VERSIONINFO_NAME "pthreadBCE2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "BORLAND C++ " PTW32_ARCH "\0" +# if defined(__PTW32_CLEANUP_C) +# define __PTW32_VERSIONINFO_NAME "pthreadBC2.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "BORLAND C " __PTW32_ARCH "\0" +# elif defined(__PTW32_CLEANUP_CXX) +# define __PTW32_VERSIONINFO_NAME "pthreadBCE2.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "BORLAND C++ " __PTW32_ARCH "\0" # else # error Resource compiler doesn't know which cleanup style you're using - see version.rc # endif #elif defined(__WATCOMC__) # if defined(_M_X64) -# define PTW32_ARCH "x64 (Watcom)" +# define __PTW32_ARCH "x64 (Watcom)" # else -# define PTW32_ARCH "x86 (Watcom)" +# define __PTW32_ARCH "x86 (Watcom)" # endif -# if defined(__CLEANUP_C) -# define PTW32_VERSIONINFO_NAME "pthreadWC2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "WATCOM C " PTW32_ARCH "\0" -# elif defined(__CLEANUP_CXX) -# define PTW32_VERSIONINFO_NAME "pthreadWCE2.DLL\0" -# define PTW32_VERSIONINFO_DESCRIPTION "WATCOM C++ " PTW32_ARCH "\0" +# if defined(__PTW32_CLEANUP_C) +# define __PTW32_VERSIONINFO_NAME "pthreadWC2.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "WATCOM C " __PTW32_ARCH "\0" +# elif defined(__PTW32_CLEANUP_CXX) +# define __PTW32_VERSIONINFO_NAME "pthreadWCE2.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "WATCOM C++ " __PTW32_ARCH "\0" # else # error Resource compiler doesn't know which cleanup style you're using - see version.rc # endif @@ -118,8 +118,8 @@ VS_VERSION_INFO VERSIONINFO - FILEVERSION PTW32_VERSION - PRODUCTVERSION PTW32_VERSION + FILEVERSION __PTW32_VERSION + PRODUCTVERSION __PTW32_VERSION FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS 0 FILEOS VOS__WINDOWS32 @@ -130,11 +130,11 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "ProductName", "POSIX Threads for Windows LPGL\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 "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" diff --git a/w32_CancelableWait.c b/w32_CancelableWait.c index dcf28e20..068affaf 100644 --- a/w32_CancelableWait.c +++ b/w32_CancelableWait.c @@ -44,7 +44,7 @@ static INLINE int -ptw32_cancelable_wait (HANDLE waitHandle, DWORD timeout) +__ptw32_cancelable_wait (HANDLE waitHandle, DWORD timeout) /* * ------------------------------------------------------------------- * This provides an extra hook into the pthread_cancel @@ -61,7 +61,7 @@ ptw32_cancelable_wait (HANDLE waitHandle, DWORD timeout) { int result; pthread_t self; - ptw32_thread_t * sp; + __ptw32_thread_t * sp; HANDLE handles[2]; DWORD nHandles = 1; DWORD status; @@ -69,7 +69,7 @@ ptw32_cancelable_wait (HANDLE waitHandle, DWORD timeout) handles[0] = waitHandle; self = pthread_self(); - sp = (ptw32_thread_t *) self.p; + sp = (__ptw32_thread_t *) self.p; if (sp != NULL) { @@ -90,7 +90,7 @@ ptw32_cancelable_wait (HANDLE waitHandle, DWORD timeout) handles[1] = NULL; } - status = WaitForMultipleObjects (nHandles, handles, PTW32_FALSE, timeout); + status = WaitForMultipleObjects (nHandles, handles, __PTW32_FALSE, timeout); switch (status - WAIT_OBJECT_0) { @@ -115,22 +115,22 @@ ptw32_cancelable_wait (HANDLE waitHandle, DWORD timeout) if (sp != NULL) { - ptw32_mcs_local_node_t stateLock; + __ptw32_mcs_local_node_t stateLock; /* * Should handle POSIX and implicit POSIX threads. * Make sure we haven't been async-cancelled in the meantime. */ - ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); + __ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); if (sp->state < PThreadStateCanceling) { sp->state = PThreadStateCanceling; sp->cancelState = PTHREAD_CANCEL_DISABLE; - ptw32_mcs_lock_release (&stateLock); - ptw32_throw (PTW32_EPS_CANCEL); + __ptw32_mcs_lock_release (&stateLock); + __ptw32_throw (__PTW32_EPS_CANCEL); /* Never reached */ } - ptw32_mcs_lock_release (&stateLock); + __ptw32_mcs_lock_release (&stateLock); } /* Should never get to here. */ @@ -156,11 +156,11 @@ ptw32_cancelable_wait (HANDLE waitHandle, DWORD timeout) int pthreadCancelableWait (HANDLE waitHandle) { - return (ptw32_cancelable_wait (waitHandle, INFINITE)); + return (__ptw32_cancelable_wait (waitHandle, INFINITE)); } int pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout) { - return (ptw32_cancelable_wait (waitHandle, timeout)); + return (__ptw32_cancelable_wait (waitHandle, timeout)); } From 694a9288bae7de3f02ae14a956f0940a00a1be50 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 20 Dec 2016 20:18:43 +1100 Subject: [PATCH 100/207] Remove TODOs for version 3 (they are done) --- TODO | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/TODO b/TODO index 2932a919..6fc172e7 100644 --- a/TODO +++ b/TODO @@ -6,21 +6,4 @@ IMO, to do this in a source code compatible way requires implementation of POSIX shared memory functions, etc. - -2. For version 3 onwards: the following types need to change, resulting in an ABI - change. These have been written conditional on __PTW32_VERSION_MAJOR > 2 - - a) __ptw32_handle_t (a.k.a. pthread_t) - Change the reuse counter from unsigned int to size_t. Type "int" on 32 bit - and 64 bit Windows is 32 bits wide. - - To give an indication of relative effectiveness of the current "unsigned int", - consider an application that creates and detaches a single thread every - millisecond. At this rate the reuse counter will max out after 49 days. - - After changing to "size_t" an application compiled for x64 and creating and - detaching a single thread every nanosecond would max out after 584 years. - - b) pthread_once_t - Remove elements no longer required after switching to use of MCS lock. \ No newline at end of file From 0979818281140fa32c0a586585384ff5a25882c6 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 21 Dec 2016 08:30:48 +1100 Subject: [PATCH 101/207] PThreadStateReuse changes --- ChangeLog | 9 +++++++++ implement.h | 6 +++--- pthread_kill.c | 2 +- ptw32_threadDestroy.c | 18 ++++++++++-------- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 809e65fb..d11273ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2016-12-20 Ross Johnson + + * implement.h (PThreadStateReuse): this thread state enum value + must be less than PThreadStateRunning to reflect an invalid thread + handle. + * pthread_kill.c: changed conditions for return of ESRCH. + * ptw32_destroy.c: copy HANDLEs rather than whole thread struct; + edit comment. + 2016-12-20 Ross Johnson * all (PTW32_*): rename to __PTW32_*. diff --git a/implement.h b/implement.h index bed4a806..fe8d2bb6 100644 --- a/implement.h +++ b/implement.h @@ -151,10 +151,11 @@ typedef enum { /* * This enumeration represents the state of the thread; - * The thread is still "alive" if the numeric value of the + * The thread is still valid if the numeric value of the * state is greater or equal "PThreadStateRunning". */ PThreadStateInitial = 0, /* Thread not running */ + PThreadStateReuse, /* In reuse pool. */ PThreadStateRunning, /* Thread alive & kicking */ PThreadStateSuspended, /* Thread alive but suspended */ PThreadStateCancelPending, /* Thread alive but */ @@ -164,9 +165,8 @@ typedef enum /* due to a cancellation request */ PThreadStateExiting, /* Thread alive but exiting */ /* due to an exception */ - PThreadStateLast, /* All handlers have been run and now */ + PThreadStateLast /* All handlers have been run and now */ /* final cleanup can be done. */ - PThreadStateReuse /* In reuse pool. */ } PThreadState; diff --git a/pthread_kill.c b/pthread_kill.c index f4a6cc53..6a6bdfee 100644 --- a/pthread_kill.c +++ b/pthread_kill.c @@ -90,7 +90,7 @@ pthread_kill (pthread_t thread, int sig) if (NULL == tp || thread.x != tp->ptHandle.x - || NULL == tp->threadH) + || tp->state < PThreadStateRunning) { result = ESRCH; } diff --git a/ptw32_threadDestroy.c b/ptw32_threadDestroy.c index cdfe2145..065b2dd9 100644 --- a/ptw32_threadDestroy.c +++ b/ptw32_threadDestroy.c @@ -48,34 +48,36 @@ void __ptw32_threadDestroy (pthread_t thread) { __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; - __ptw32_thread_t threadCopy; if (tp != NULL) { /* * Copy thread state so that the thread can be atomically NULLed. */ - memcpy (&threadCopy, tp, sizeof (threadCopy)); +#if ! defined(__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__) + HANDLE threadH = tp->threadH; +#endif + HANDLE cancelEvent = tp->cancelEvent; /* * Thread ID structs are never freed. They're NULLed and reused. - * This also sets the thread to PThreadStateInitial (invalid). + * This also sets the thread state to PThreadStateInitial before + * it is finally set to PThreadStateReuse. */ __ptw32_threadReusePush (thread); - /* Now work on the copy. */ - if (threadCopy.cancelEvent != NULL) + if (cancelEvent != NULL) { - CloseHandle (threadCopy.cancelEvent); + CloseHandle (cancelEvent); } #if ! defined(__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__) /* * See documentation for endthread vs endthreadex. */ - if (threadCopy.threadH != 0) + if (threadH != 0) { - CloseHandle (threadCopy.threadH); + CloseHandle (threadH); } #endif From f3dfb538b08dcd93d2a2fa11bcff58a5732b0888 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 21 Dec 2016 10:14:21 +1100 Subject: [PATCH 102/207] New tests adding cpu affinity to namesake tests, for comparison. --- tests/common.mk | 2 +- tests/runorder.mk | 2 + tests/rwlock7_1.c | 222 ++++++++++++++++++++++++++++++++++++++++++++ tests/rwlock8_1.c | 228 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 453 insertions(+), 1 deletion(-) create mode 100644 tests/rwlock7_1.c create mode 100644 tests/rwlock8_1.c diff --git a/tests/common.mk b/tests/common.mk index 61a49505..4552b058 100644 --- a/tests/common.mk +++ b/tests/common.mk @@ -39,7 +39,7 @@ ALL_KNOWN_TESTS = \ robust1 robust2 robust3 robust4 robust5 \ rwlock1 rwlock2 rwlock3 rwlock4 \ rwlock2_t rwlock3_t rwlock4_t rwlock5_t rwlock6_t rwlock6_t2 \ - rwlock5 rwlock6 rwlock7 rwlock8 \ + rwlock5 rwlock6 rwlock7 rwlock7_1 rwlock8 rwlock8_1 \ self1 self2 \ semaphore1 semaphore2 semaphore3 \ semaphore4 semaphore4t semaphore5 \ diff --git a/tests/runorder.mk b/tests/runorder.mk index b16be2e0..37f6e988 100644 --- a/tests/runorder.mk +++ b/tests/runorder.mk @@ -126,7 +126,9 @@ 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 diff --git a/tests/rwlock7_1.c b/tests/rwlock7_1.c new file mode 100644 index 00000000..4e2ea491 --- /dev/null +++ b/tests/rwlock7_1.c @@ -0,0 +1,222 @@ +/* + * rwlock7_1.c + * + * Hammer on a bunch of rwlocks to test robustness and fairness. + * Printed stats should be roughly even for each thread. + * + * Use CPU affinity to compare against non-affinity rwlock7.c + */ + +#include "test.h" +#include + +#ifdef __GNUC__ +#include +#endif + +#define THREADS 5 +#define DATASIZE 7 +#define ITERATIONS 1000000 + +/* + * Keep statistics for each thread. + */ +typedef struct thread_tag { + int thread_num; + pthread_t thread_id; + cpu_set_t threadCpus; + int updates; + int reads; + int changed; + int seed; +} thread_t; + +/* + * Read-write lock and shared data + */ +typedef struct data_tag { + pthread_rwlock_t lock; + int data; + int updates; +} data_t; + +static thread_t threads[THREADS]; +static data_t data[DATASIZE]; +static cpu_set_t processCpus; +static int cpu_count; + +/* + * Thread start routine that uses read-write locks + */ +void *thread_routine (void *arg) +{ + thread_t *self = (thread_t*)arg; + int iteration; + int element = 0; + int seed = self->seed; + int interval = 1 + rand_r (&seed) % 71; + + /* + * Set each thread to a fixed (different if possible) cpu. + */ + CPU_ZERO(&self->threadCpus); + CPU_SET(self->thread_num%cpu_count, &self->threadCpus); + assert(pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &self->threadCpus) == 0); + + self->changed = 0; + + for (iteration = 0; iteration < ITERATIONS; iteration++) + { + if (iteration % (ITERATIONS / 10) == 0) + { + putchar('.'); + fflush(stdout); + } + /* + * Each "self->interval" iterations, perform an + * update operation (write lock instead of read + * lock). + */ + if ((iteration % interval) == 0) + { + assert(pthread_rwlock_wrlock (&data[element].lock) == 0); + data[element].data = self->thread_num; + data[element].updates++; + self->updates++; + interval = 1 + rand_r (&seed) % 71; + assert(pthread_rwlock_unlock (&data[element].lock) == 0); + } else { + /* + * Look at the current data element to see whether + * the current thread last updated it. Count the + * times, to report later. + */ + assert(pthread_rwlock_rdlock (&data[element].lock) == 0); + + self->reads++; + + if (data[element].data != self->thread_num) + { + self->changed++; + interval = 1 + self->changed % 71; + } + + assert(pthread_rwlock_unlock (&data[element].lock) == 0); + } + + element = (element + 1) % DATASIZE; + + } + + return NULL; +} + +int +main (int argc, char *argv[]) +{ + int count; + int data_count; + int thread_updates = 0; + int data_updates = 0; + int seed = 1; + pthread_t self = pthread_self(); + __PTW32_STRUCT_TIMEB currSysTime1; + __PTW32_STRUCT_TIMEB currSysTime2; + + 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); + assert((cpu_count = CPU_COUNT(&processCpus)) > 0); + printf("CPUs: %d\n", cpu_count); + + /* + * Initialize the shared data. + */ + for (data_count = 0; data_count < DATASIZE; data_count++) + { + data[data_count].data = 0; + data[data_count].updates = 0; + + assert(pthread_rwlock_init (&data[data_count].lock, NULL) == 0); + } + + __PTW32_FTIME(&currSysTime1); + + /* + * Create THREADS threads to access shared data. + */ + for (count = 0; count < THREADS; count++) + { + threads[count].thread_num = count; + threads[count].updates = 0; + threads[count].reads = 0; + threads[count].seed = 1 + rand_r (&seed) % 71; + + assert(pthread_create (&threads[count].thread_id, + NULL, thread_routine, (void*)(size_t)&threads[count]) == 0); + } + + /* + * Wait for all threads to complete, and collect + * statistics. + */ + for (count = 0; count < THREADS; count++) + { + assert(pthread_join (threads[count].thread_id, NULL) == 0); + } + + putchar('\n'); + fflush(stdout); + + for (count = 0; count < THREADS; count++) + { + if (threads[count].changed > 0) + { + printf ("Thread %d found changed elements %d times\n", + count, threads[count].changed); + } + } + + putchar('\n'); + fflush(stdout); + + for (count = 0; count < THREADS; count++) + { + thread_updates += threads[count].updates; + printf ("%02d: seed %d, updates %d, reads %d, cpu %d\n", + count, threads[count].seed, + threads[count].updates, threads[count].reads, + threads[count].thread_num%cpu_count); + } + + putchar('\n'); + fflush(stdout); + + /* + * Collect statistics for the data. + */ + for (data_count = 0; data_count < DATASIZE; data_count++) + { + data_updates += data[data_count].updates; + printf ("data %02d: value %d, %d updates\n", + data_count, data[data_count].data, data[data_count].updates); + assert(pthread_rwlock_destroy (&data[data_count].lock) == 0); + } + + printf ("%d thread updates, %d data updates\n", + thread_updates, data_updates); + + __PTW32_FTIME(&currSysTime2); + + printf( "\nstart: %ld/%d, stop: %ld/%d, duration:%ld\n", + (long)currSysTime1.time,currSysTime1.millitm, + (long)currSysTime2.time,currSysTime2.millitm, + ((long)((currSysTime2.time*1000+currSysTime2.millitm) - + (currSysTime1.time*1000+currSysTime1.millitm)))); + + return 0; +} diff --git a/tests/rwlock8_1.c b/tests/rwlock8_1.c new file mode 100644 index 00000000..a85f37fb --- /dev/null +++ b/tests/rwlock8_1.c @@ -0,0 +1,228 @@ +/* + * rwlock8.c + * + * Hammer on a bunch of rwlocks to test robustness and fairness. + * Printed stats should be roughly even for each thread. + * + * Yield during each access to exercise lock contention code paths + * more than rwlock7.c does (particularly on uni-processor systems). + * + * Use CPU affinity to compare against non-affinity rwlock8.c + */ + +#include "test.h" +#include + +#ifdef __GNUC__ +#include +#endif + +#define THREADS 5 +#define DATASIZE 7 +#define ITERATIONS 100000 + +/* + * Keep statistics for each thread. + */ +typedef struct thread_tag { + int thread_num; + pthread_t thread_id; + cpu_set_t threadCpus; + int updates; + int reads; + int changed; + int seed; +} thread_t; + +/* + * Read-write lock and shared data + */ +typedef struct data_tag { + pthread_rwlock_t lock; + int data; + int updates; +} data_t; + +static thread_t threads[THREADS]; +static data_t data[DATASIZE]; +static cpu_set_t processCpus; +static int cpu_count; + +/* + * Thread start routine that uses read-write locks + */ +void *thread_routine (void *arg) +{ + thread_t *self = (thread_t*)arg; + int iteration; + int element = 0; + int seed = self->seed; + int interval = 1 + rand_r (&seed) % 71; + + /* + * Set each thread to a fixed (different if possible) cpu. + */ + CPU_ZERO(&self->threadCpus); + CPU_SET(self->thread_num%cpu_count, &self->threadCpus); + assert(pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &self->threadCpus) == 0); + + self->changed = 0; + + for (iteration = 0; iteration < ITERATIONS; iteration++) + { + if (iteration % (ITERATIONS / 10) == 0) + { + putchar('.'); + fflush(stdout); + } + /* + * Each "self->interval" iterations, perform an + * update operation (write lock instead of read + * lock). + */ + if ((iteration % interval) == 0) + { + assert(pthread_rwlock_wrlock (&data[element].lock) == 0); + data[element].data = self->thread_num; + data[element].updates++; + self->updates++; + interval = 1 + rand_r (&seed) % 71; + sched_yield(); + assert(pthread_rwlock_unlock (&data[element].lock) == 0); + } else { + /* + * Look at the current data element to see whether + * the current thread last updated it. Count the + * times, to report later. + */ + assert(pthread_rwlock_rdlock (&data[element].lock) == 0); + + self->reads++; + + if (data[element].data != self->thread_num) + { + self->changed++; + interval = 1 + self->changed % 71; + } + + sched_yield(); + + assert(pthread_rwlock_unlock (&data[element].lock) == 0); + } + + element = (element + 1) % DATASIZE; + + } + + return NULL; +} + +int +main (int argc, char *argv[]) +{ + int count; + int data_count; + int thread_updates = 0; + int data_updates = 0; + int seed = 1; + pthread_t self = pthread_self(); + __PTW32_STRUCT_TIMEB currSysTime1; + __PTW32_STRUCT_TIMEB currSysTime2; + + 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); + assert((cpu_count = CPU_COUNT(&processCpus)) > 0); + printf("CPUs: %d\n", cpu_count); + + /* + * Initialize the shared data. + */ + for (data_count = 0; data_count < DATASIZE; data_count++) + { + data[data_count].data = 0; + data[data_count].updates = 0; + + assert(pthread_rwlock_init (&data[data_count].lock, NULL) == 0); + } + + __PTW32_FTIME(&currSysTime1); + + /* + * Create THREADS threads to access shared data. + */ + for (count = 0; count < THREADS; count++) + { + threads[count].thread_num = count; + threads[count].updates = 0; + threads[count].reads = 0; + threads[count].seed = 1 + rand_r (&seed) % 71; + + assert(pthread_create (&threads[count].thread_id, + NULL, thread_routine, (void*)(size_t)&threads[count]) == 0); + } + + /* + * Wait for all threads to complete, and collect + * statistics. + */ + for (count = 0; count < THREADS; count++) + { + assert(pthread_join (threads[count].thread_id, NULL) == 0); + } + + putchar('\n'); + fflush(stdout); + + for (count = 0; count < THREADS; count++) + { + if (threads[count].changed > 0) + { + printf ("Thread %d found changed elements %d times\n", + count, threads[count].changed); + } + } + + putchar('\n'); + fflush(stdout); + + for (count = 0; count < THREADS; count++) + { + thread_updates += threads[count].updates; + printf ("%02d: seed %d, updates %d, reads %d, cpu %d\n", + count, threads[count].seed, + threads[count].updates, threads[count].reads, + threads[count].thread_num%cpu_count); + } + + putchar('\n'); + fflush(stdout); + + /* + * Collect statistics for the data. + */ + for (data_count = 0; data_count < DATASIZE; data_count++) + { + data_updates += data[data_count].updates; + printf ("data %02d: value %d, %d updates\n", + data_count, data[data_count].data, data[data_count].updates); + assert(pthread_rwlock_destroy (&data[data_count].lock) == 0); + } + + printf ("%d thread updates, %d data updates\n", + thread_updates, data_updates); + + __PTW32_FTIME(&currSysTime2); + + printf( "\nstart: %ld/%d, stop: %ld/%d, duration:%ld\n", + (long)currSysTime1.time,currSysTime1.millitm, + (long)currSysTime2.time,currSysTime2.millitm, + ((long)((currSysTime2.time*1000+currSysTime2.millitm) - + (currSysTime1.time*1000+currSysTime1.millitm)))); + + return 0; +} From 4b5ca5b581721f5f014c1f48113b13b3172134b0 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 21 Dec 2016 14:16:06 +1100 Subject: [PATCH 103/207] Changes supporting pthread_kill() changes. --- ChangeLog | 3 +++ create.c | 6 +++++- pthread_kill.c | 35 +++++++++++++++++++---------------- pthread_self.c | 17 ++++++++++++----- 4 files changed, 39 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index d11273ae..bcac4f58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,9 @@ * pthread_kill.c: changed conditions for return of ESRCH. * ptw32_destroy.c: copy HANDLEs rather than whole thread struct; edit comment. + * pthread_self.c: set implicit thread handle state to PThreadStateRunning. + * pthread_create.c: set thread state to PThreadStateSuspended + regardless because it must have state >= PThreadStateRunning on return. 2016-12-20 Ross Johnson diff --git a/create.c b/create.c index 737734bb..1747f5b1 100644 --- a/create.c +++ b/create.c @@ -207,7 +207,11 @@ pthread_create (pthread_t * tid, stackSize = PTHREAD_STACK_MIN; } - tp->state = run ? PThreadStateInitial : PThreadStateSuspended; + /* + * State must be >= PThreadStateRunning before we return to the caller. + * __ptw32_threadStart will set state to PThreadStateRunning. + */ + tp->state = PThreadStateSuspended; tp->keys = NULL; diff --git a/pthread_kill.c b/pthread_kill.c index 6a6bdfee..860d0558 100644 --- a/pthread_kill.c +++ b/pthread_kill.c @@ -81,29 +81,32 @@ pthread_kill (pthread_t thread, int sig) */ { 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 - || tp->state < PThreadStateRunning) - { - result = ESRCH; - } - - __ptw32_mcs_lock_release(&node); - - if (0 == result && 0 != sig) + if (0 != sig) { /* * Currently does not support any signals. */ result = EINVAL; } + else + { + __ptw32_mcs_local_node_t node; + __ptw32_thread_t * tp; + + __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); + + tp = (__ptw32_thread_t *) thread.p; + + if (NULL == tp + || thread.x != tp->ptHandle.x + || tp->state < PThreadStateRunning) + { + result = ESRCH; + } + + __ptw32_mcs_lock_release(&node); + } return result; diff --git a/pthread_self.c b/pthread_self.c index 27efa192..6b960f16 100644 --- a/pthread_self.c +++ b/pthread_self.c @@ -81,7 +81,8 @@ pthread_self (void) } else { - int fail = __PTW32_FALSE; + int fail = __PTW32_FALSE; + /* * Need to create an implicit 'self' for the currently * executing thread. @@ -151,10 +152,6 @@ pthread_self (void) #endif - /* - * No need to explicitly serialise access to sched_priority - * because the new handle is not yet public. - */ sp->sched_priority = GetThreadPriority (sp->threadH); pthread_setspecific (__ptw32_selfThreadKey, (void *) sp); } @@ -173,6 +170,16 @@ pthread_self (void) */ return nil; } + else + { + /* + * This implicit POSIX thread is running (it called us). + * No other thread can reference us yet because all API calls + * passing a pthread_t should recognise an invalid thread id + * through the reuse counter inequality. + */ + sp->state = PThreadStateRunning; + } } return (self); From 067c3ad352a3d14cc51429725b9c15b8be14e424 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 21 Dec 2016 19:16:44 +1100 Subject: [PATCH 104/207] Change to clean and realclean targets --- GNUmakefile.in | 1 + Makefile | 3 ++- tests/Makefile | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/GNUmakefile.in b/GNUmakefile.in index ec769dd3..94129d10 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -371,6 +371,7 @@ clean: -$(RM) *.exe -$(RM) *.manifest -$(RM) $(PTHREAD_DEF) + -cd tests && $(MAKE) clean realclean: clean -$(RM) lib*.a diff --git a/Makefile b/Makefile index 36a8f483..2482459a 100644 --- a/Makefile +++ b/Makefile @@ -188,7 +188,7 @@ realclean: clean if exist *.manifest del *.manifest if exist *_stamp del *_stamp if exist make.log.txt del make.log.txt - cd tests && $(MAKE) clean + cd tests && $(MAKE) realclean clean: if exist *.obj del *.obj @@ -200,6 +200,7 @@ clean: if exist *.o del *.o if exist *.i del *.i if exist *.res del *.res + cd tests && $(MAKE) clean # Very basic install. It assumes "realclean" was done just prior to build target if # you want the installed $(DEVDEST_LIB_NAME) to match that build. diff --git a/tests/Makefile b/tests/Makefile index 5f941b42..511f65c2 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -219,6 +219,8 @@ clean: if exist *.manifest $(RM) *.manifest if exist *.pass $(RM) *.pass if exist *.bench $(RM) *.bench + +realclean: clean if exist *.log $(RM) *.log .c.pass: From a4ff55195120e666ad43044a2f3e833aeedebc95 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 22 Dec 2016 09:24:20 +1100 Subject: [PATCH 105/207] Update --- .gitignore | 3 ++- tests/ChangeLog | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index c795622c..0fa70b68 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,5 @@ tests/sched.h tests/semaphore.h tests/benchlib.o tests/SIZES.* -tests/*.log \ No newline at end of file +tests/*.log +/.project diff --git a/tests/ChangeLog b/tests/ChangeLog index 3daf0cf3..0abe865d 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,4 +1,3 @@ -<<<<<<< Upstream, based on master 2016-12-21 Ross Johnson * mutex6.c: fix random failures by using a polling loop to replace @@ -11,10 +10,7 @@ * mutex8n.c: Likewise. * semaphore5.c: don't fail on expected sem_destroy EBUSY. -2016-124-18 Ross Johnson -======= 2016-12-20 Ross Johnson ->>>>>>> d1c1032 Initial version 3 commit; see the ChangeLogs * all (PTW32_*): rename to __PTW32_*. (ptw32_*): rename to __ptw32_*. From 1b45b8e7fe7bcc3498c52c487260928a725bdc0f Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 22 Dec 2016 09:32:19 +1100 Subject: [PATCH 106/207] Merge after rebase --- NEWS | 103 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 51 insertions(+), 52 deletions(-) diff --git a/NEWS b/NEWS index 3f0381f5..27958a30 100644 --- a/NEWS +++ b/NEWS @@ -1,54 +1,3 @@ -<<<<<<< Upstream, based on master -RELEASE 2.11.0 --------------- -(Upcoming release) - -General -------- -New bug fixes in all releases since 2.8.0 have NOT been applied to the -1.x.x series. - -Some changes from 2011-02-26 onward may not be compatible with -pre Windows 2000 systems. - -Testing and verification ------------------------- -This version has been tested on SMP architecture (Intel x64 Hex Core) -by completing the included test suite, as well as the stress and bench -tests. - -Be sure to run your builds against the test suite. If you see failures -then please consider how your toolchains might be contributing to the -failure. See the README file for more detailed descriptions of the -toolchains and test systems that we have used to get the tests to pass -successfully. We recommend MinGW64 over MinGW32 for both 64 and 32 bit -GNU CC builds. MinGW64 also includes its own independent pthreads -implementation, which you may prefer to use. - -New Features ------------- -The autoconf configuration added in 2.10.0 should be used for all GNU -builds (MinGW, MinGW64, etc). The redundant GNUmakefiles have been -removed. - -Bug Fixes ---------- -Various corrections to GNUmakefile. Although this file has been removed, -for completeness the changes have been recorded as commits to the -repository. -- Kyle Schwarz - -MinGW64-w64 defines pid_t as __int64. sched.h now reflects that. -- Kyle Schwarz - -Several tests have been fixed that were seen to fail on machines under -load. Other tests that used similar crude mechanisms to synchronise -threads (these are unit tests) had the same improvements applied: -semaphore5.c recognises that sem_destroy can legitimately return -EBUSY; mutex6*.c, mutex7*.c and mutex8*.c all replaced a single -Sleep() with a polling loop. -- Ross Johnson -======= RELEASE 3.0.0 -------------- (2016-12-20) @@ -105,7 +54,57 @@ zero. The 64 bit reuse counter extends risk-free run time from months average thread lifetime of 1ns). pthread_once_t: removes two long-obsoleted elements and reduces it's size. ->>>>>>> d1c1032 Initial version 3 commit; see the ChangeLogs + + +RELEASE 2.11.0 +-------------- +(Upcoming release) + +General +------- +New bug fixes in all releases since 2.8.0 have NOT been applied to the +1.x.x series. + +Some changes from 2011-02-26 onward may not be compatible with +pre Windows 2000 systems. + +Testing and verification +------------------------ +This version has been tested on SMP architecture (Intel x64 Hex Core) +by completing the included test suite, as well as the stress and bench +tests. + +Be sure to run your builds against the test suite. If you see failures +then please consider how your toolchains might be contributing to the +failure. See the README file for more detailed descriptions of the +toolchains and test systems that we have used to get the tests to pass +successfully. We recommend MinGW64 over MinGW32 for both 64 and 32 bit +GNU CC builds. MinGW64 also includes its own independent pthreads +implementation, which you may prefer to use. + +New Features +------------ +The autoconf configuration added in 2.10.0 should be used for all GNU +builds (MinGW, MinGW64, etc). The redundant GNUmakefiles have been +removed. + +Bug Fixes +--------- +Various corrections to GNUmakefile. Although this file has been removed, +for completeness the changes have been recorded as commits to the +repository. +- Kyle Schwarz + +MinGW64-w64 defines pid_t as __int64. sched.h now reflects that. +- Kyle Schwarz + +Several tests have been fixed that were seen to fail on machines under +load. Other tests that used similar crude mechanisms to synchronise +threads (these are unit tests) had the same improvements applied: +semaphore5.c recognises that sem_destroy can legitimately return +EBUSY; mutex6*.c, mutex7*.c and mutex8*.c all replaced a single +Sleep() with a polling loop. +- Ross Johnson RELEASE 2.10.0 From 69fc8ea751bc5329e3b9449736c2ccdf47b8fa37 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 22 Dec 2016 09:33:39 +1100 Subject: [PATCH 107/207] Removed --- GNUmakefile | 355 ---------------------------------------------------- 1 file changed, 355 deletions(-) delete mode 100644 GNUmakefile diff --git a/GNUmakefile b/GNUmakefile deleted file mode 100644 index 31fb5d3c..00000000 --- a/GNUmakefile +++ /dev/null @@ -1,355 +0,0 @@ -# -# -------------------------------------------------------------------------- -# -# 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 -# - -DLL_VER = 2$(EXTRAVERSION) - -# See pthread.h and README for the description of version numbering. -DLL_VERD= $(DLL_VER)d - -DESTROOT = ../PTHREADS-BUILT -DEST_LIB_NAME = libpthread.a -DLLDEST = $(DESTROOT)/bin -LIBDEST = $(DESTROOT)/lib -HDRDEST = $(DESTROOT)/include - -# If Running MsysDTK -RM = rm -f -MV = mv -f -CP = cp -f -MKDIR = mkdir -p -ECHO = echo -TESTNDIR = test ! -d -TESTFILE = test -f -AND = && - -# If not. -#RM = erase -#MV = rename -#CP = copy -#MKDIR = mkdir -#ECHO = echo -#TESTNDIR = if exist -#TESTFILE = if exist -# AND = - -# For cross compiling use e.g. -# make CROSS=x86_64-w64-mingw32- clean GC-inlined -CROSS = - -# Override the builtin default C and C++ standards -#CSTD = -std=c90 -#CXXSTD = -std=c++90 - -AR = $(CROSS)ar -DLLTOOL = $(CROSS)dlltool -CC = $(CROSS)gcc $(CSTD) -CXX = $(CROSS)g++ $(CXXSTD) -RANLIB = $(CROSS)ranlib -RC = $(CROSS)windres -OD_PRIVATE = $(CROSS)objdump -p - -# Build for non-native architecture. E.g. "-m64" "-m32" etc. -# Not tested fully, needs gcc built with "--enable-multilib" -# Check your "gcc -v" output for the options used to build your gcc. -# You can set this as a shell variable or on the make comand line. -# You don't need to uncomment it here unless you want to hardwire -# a value. -#ARCH = - -# -# Look for targets that $(RC) (usually windres) supports then look at any object -# file just built to see which target the compiler used and set the $(RC) target -# to match it. -# -SUPPORTED_TARGETS = $(filter pe-% pei-% elf32-% elf64-% srec symbolsrec verilog tekhex binary ihex,$(shell $(RC) --help)) -RC_TARGET = --target $(firstword $(filter $(SUPPORTED_TARGETS),$(shell $(OD_PRIVATE) *.$(OBJEXT)))) - -OPT = $(CLEANUP) -O3 # -finline-functions -findirect-inlining -XOPT = - -RCFLAGS = --include-dir=. -LFLAGS = $(ARCH) -# Uncomment this if config.h defines RETAIN_WSALASTERROR -#LFLAGS += -lws2_32 -# -# Uncomment this next to link the GCC/C++ runtime libraries statically -# (Be sure to read about these options and their associated caveats -# at http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html) -# -# NOTE 1: Doing this appears to break GCE:pthread_cleanup_*(), which -# relies on C++ class destructors being called when leaving scope. -# -# NOTE 2: If you do this DO NOT distribute your pthreads DLLs with -# the official filenaming, i.e. pthreadVC2.dll, etc. Instead, change DLL_VER -# above to "2slgcc" for example, to build "pthreadGC2slgcc.dll", etc. -# -#LFLAGS += -static-libgcc -static-libstdc++ - -# ---------------------------------------------------------------------- -# The library can be built with some alternative behaviour to -# facilitate development of applications on Win32 that will be ported -# to other POSIX systems. Nothing definable here will make the library -# non-compliant, but applications that make assumptions that POSIX -# does not garrantee may fail or misbehave under some settings. -# -# PTW32_THREAD_ID_REUSE_INCREMENT -# Purpose: -# POSIX says that applications should assume that thread IDs can be -# recycled. However, Solaris and some other systems use a [very large] -# sequence number as the thread ID, which provides virtual uniqueness. -# Pthreads-win32 provides pseudo-unique IDs when the default increment -# (1) is used, but pthread_t is not a scalar type like Solaris's. -# -# Usage: -# Set to any value in the range: 0 <= value <= 2^wordsize -# -# Examples: -# Set to 0 to emulate non recycle-unique behaviour like Linux or *BSD. -# Set to 1 for recycle-unique thread IDs (this is the default). -# Set to some other +ve value to emulate smaller word size types -# (i.e. will wrap sooner). -# -#PTW32_FLAGS = "-DPTW32_THREAD_ID_REUSE_INCREMENT=0" -# -# ---------------------------------------------------------------------- - -GC_CFLAGS = $(PTW32_FLAGS) -GCE_CFLAGS = $(PTW32_FLAGS) -mthreads - -## Mingw -#MAKE ?= make -CFLAGS = $(OPT) $(XOPT) $(ARCH) -I. -DHAVE_CONFIG_H -Wall - -OBJEXT = o -RESEXT = o - -include common.mk - -DLL_OBJS += $(RESOURCE_OBJS) -STATIC_OBJS += $(RESOURCE_OBJS) - -GCE_DLL = pthreadGCE$(DLL_VER).dll -GCED_DLL= pthreadGCE$(DLL_VERD).dll -GCE_LIB = libpthreadGCE$(DLL_VER).a -GCED_LIB= libpthreadGCE$(DLL_VERD).a - -GC_DLL = pthreadGC$(DLL_VER).dll -GCD_DLL = pthreadGC$(DLL_VERD).dll -GC_LIB = libpthreadGC$(DLL_VER).a -GCD_LIB = libpthreadGC$(DLL_VERD).a -GC_INLINED_STATIC_STAMP = libpthreadGC$(DLL_VER).inlined_static_stamp -GCD_INLINED_STATIC_STAMP = libpthreadGC$(DLL_VERD).inlined_static_stamp -GCE_INLINED_STATIC_STAMP = libpthreadGCE$(DLL_VER).inlined_static_stamp -GCED_INLINED_STATIC_STAMP = libpthreadGCE$(DLL_VERD).inlined_static_stamp -GC_SMALL_STATIC_STAMP = libpthreadGC$(DLL_VER).small_static_stamp -GCD_SMALL_STATIC_STAMP = libpthreadGC$(DLL_VERD).small_static_stamp -GCE_SMALL_STATIC_STAMP = libpthreadGCE$(DLL_VER).small_static_stamp -GCED_SMALL_STATIC_STAMP = libpthreadGCE$(DLL_VERD).small_static_stamp - -PTHREAD_DEF = pthread.def - -help: - @ echo "Run one of the following command lines:" - @ echo "$(MAKE) clean all (build targets GC, GCE, GC-static, GCE-static)" - @ echo "$(MAKE) clean all-tests (build and test all non-debug targets below)" - @ echo "$(MAKE) clean GC (to build the GNU C dll with C cleanup code)" - @ echo "$(MAKE) clean GC-debug (to build the GNU C debug dll with C cleanup code)" - @ echo "$(MAKE) clean GCE (to build the GNU C dll with C++ exception handling)" - @ echo "$(MAKE) clean GCE-debug (to build the GNU C debug dll with C++ exception handling)" - @ echo "$(MAKE) clean GC-static (to build the GNU C static lib with C cleanup code)" - @ echo "$(MAKE) clean GC-static-debug (to build the GNU C static debug lib with C cleanup code)" - @ echo "$(MAKE) clean GCE-static (to build the GNU C++ static lib with C++ cleanup code)" - @ echo "$(MAKE) clean GCE-static-debug (to build the GNU C++ static debug lib with C++ cleanup code)" - @ echo "$(MAKE) clean GC-small-static (to build the GNU C static lib with C cleanup code)" - @ echo "$(MAKE) clean GC-small-static-debug (to build the GNU C static debug lib with C cleanup code)" - @ echo "$(MAKE) clean GCE-small-static (to build the GNU C++ static lib with C++ cleanup code)" - @ echo "$(MAKE) clean GCE-small-static-debug (to build the GNU C++ static debug lib with C++ cleanup code)" - -all: - @ $(MAKE) clean GC - @ $(MAKE) clean GCE - @ $(MAKE) clean GC-static - @ $(MAKE) clean GCE-static - -TEST_ENV = PTW32_FLAGS="$(PTW32_FLAGS) -DNO_ERROR_DIALOGS" DLL_VER=$(DLL_VER) ARCH="$(ARCH)" - -all-tests: - $(MAKE) realclean GC-small-static - cd tests && $(MAKE) clean GC-small-static $(TEST_ENV) && $(MAKE) clean GCX-small-static $(TEST_ENV) - $(MAKE) realclean GCE-small-static - cd tests && $(MAKE) clean GCE-small-static $(TEST_ENV) - @ $(ECHO) "$@ completed successfully." - $(MAKE) realclean GC - cd tests && $(MAKE) clean GC $(TEST_ENV) && $(MAKE) clean GCX $(TEST_ENV) - $(MAKE) realclean GCE - cd tests && $(MAKE) clean GCE $(TEST_ENV) - $(MAKE) realclean GC-static - cd tests && $(MAKE) clean GC-static $(TEST_ENV) && $(MAKE) clean GCX-static $(TEST_ENV) - $(MAKE) realclean GCE-static - cd tests && $(MAKE) clean GCE-static $(TEST_ENV) - $(MAKE) realclean - -all-tests-cflags: - $(MAKE) all-tests PTW32_FLAGS="-Wall -Wextra" - @ $(ECHO) "$@ completed successfully." - -GC: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL) - -GC-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_DLL) - -GCE: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL) - -GCE-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_CXX -g -O0" $(GCED_DLL) - -GC-static: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_INLINED_STATIC_STAMP) - -GC-static-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) - -GC-small-static: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GC_SMALL_STATIC_STAMP) - -GC-small-static-debug: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) - -GCE-static: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_INLINED_STATIC_STAMP) - -GCE-static-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) - -GCE-small-static: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_SMALL_STATIC_STAMP) - -GCE-small-static-debug: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) - -tests: - @ cd tests - @ $(MAKE) auto - -# Very basic install. It assumes "realclean" was done just prior to build target if -# you want the installed $(DEVDEST_LIB_NAME) to match that build. -install: - -$(TESTNDIR) $(DLLDEST) $(AND) $(MKDIR) $(DLLDEST) - -$(TESTNDIR) $(LIBDEST) $(AND) $(MKDIR) $(LIBDEST) - -$(TESTNDIR) $(HDRDEST) $(AND) $(MKDIR) $(HDRDEST) - $(CP) _pth32.h $(HDRDEST) - $(CP) pthread.h $(HDRDEST) - $(CP) sched.h $(HDRDEST) - $(CP) semaphore.h $(HDRDEST) - -$(TESTFILE) pthreadGC$(DLL_VER).dll $(AND) $(CP) pthreadGC$(DLL_VER).dll $(DLLDEST) - -$(TESTFILE) pthreadGC$(DLL_VERD).dll $(AND) $(CP) pthreadGC$(DLL_VERD).dll $(DLLDEST) - -$(TESTFILE) pthreadGCE$(DLL_VER).dll $(AND) $(CP) pthreadGCE$(DLL_VER).dll $(DLLDEST) - -$(TESTFILE) pthreadGCE$(DLL_VERD).dll $(AND) $(CP) pthreadGCE$(DLL_VERD).dll $(DLLDEST) - # Only one of these can be installed, so run e.g. "make realclean GC install". - -$(TESTFILE) libpthreadGC$(DLL_VER).a $(AND) $(CP) libpthreadGC$(DLL_VER).a $(LIBDEST)/$(DEST_LIB_NAME) - -$(TESTFILE) libpthreadGC$(DLL_VERD).a $(AND) $(CP) libpthreadGC$(DLL_VERD).a $(LIBDEST)/$(DEST_LIB_NAME) - -$(TESTFILE) libpthreadGCE$(DLL_VER).a $(AND) $(CP) libpthreadGCE$(DLL_VER).a $(LIBDEST)/$(DEST_LIB_NAME) - -$(TESTFILE) libpthreadGCE$(DLL_VERD).a $(AND) $(CP) libpthreadGCE$(DLL_VERD).a $(LIBDEST)/$(DEST_LIB_NAME) - -%.pre: %.c - $(CC) -E -o $@ $(CFLAGS) $^ - -%.s: %.c - $(CC) -c $(CFLAGS) -DPTW32_BUILD_INLINED -Wa,-ahl $^ > $@ - -%.o: %.rc - $(RC) $(RC_TARGET) $(RCFLAGS) $(CLEANUP) -o $@ -i $< - -.SUFFIXES: .dll .rc .c .o - -.c.o:; $(CC) -c -o $@ $(CFLAGS) $(XC_FLAGS) $< - - -$(GC_DLL) $(GCD_DLL): $(DLL_OBJS) - $(CC) $(OPT) -shared -o $@ $^ $(LFLAGS) - $(DLLTOOL) -z pthread.def $^ - $(DLLTOOL) -k --dllname $@ --output-lib lib$(basename $@).a --def $(PTHREAD_DEF) - -$(GCE_DLL) $(GCED_DLL): $(DLL_OBJS) - $(CC) $(OPT) -mthreads -shared -o $@ $^ $(LFLAGS) - $(DLLTOOL) -z pthread.def $^ - $(DLLTOOL) -k --dllname $@ --output-lib lib$(basename $@).a --def $(PTHREAD_DEF) - -$(GC_INLINED_STATIC_STAMP) $(GCE_INLINED_STATIC_STAMP) $(GCD_INLINED_STATIC_STAMP) $(GCED_INLINED_STATIC_STAMP): $(DLL_OBJS) - $(RM) $(basename $@).a - $(AR) -rsv $(basename $@).a $^ - $(ECHO) touched > $@ - -$(GC_SMALL_STATIC_STAMP) $(GCE_SMALL_STATIC_STAMP) $(GCD_SMALL_STATIC_STAMP) $(GCED_SMALL_STATIC_STAMP): $(STATIC_OBJS) - $(RM) $(basename $@).a - $(AR) -rsv $(basename $@).a $^ - $(ECHO) touched > $@ - -clean: - -$(RM) *~ - -$(RM) *.i - -$(RM) *.s - -$(RM) *.o - -$(RM) *.obj - -$(RM) *.exe - -$(RM) *.manifest - -$(RM) $(PTHREAD_DEF) - -realclean: clean - -$(RM) lib*.a - -$(RM) *.lib - -$(RM) pthread*.dll - -$(RM) *_stamp - -$(RM) make.log.txt - -cd tests && $(MAKE) clean - -var_check_list = - -define var_check_target -var-check-$(1): - @for src in $($(1)); do \ - fgrep -q "\"$$$$src\"" $(2) && continue; \ - echo "$$$$src is in \$$$$($(1)), but not in $(2)"; \ - exit 1; \ - done - @grep '^# *include *".*\.c"' $(2) | cut -d'"' -f2 | while read src; do \ - echo " $($(1)) " | fgrep -q " $$$$src " && continue; \ - echo "$$$$src is in $(2), but not in \$$$$($(1))"; \ - exit 1; \ - done - @echo "$(1) <-> $(2): OK" - -var_check_list += var-check-$(1) -endef - -$(eval $(call var_check_target,PTHREAD_SRCS,pthread.c)) - -srcs-vars-check: $(var_check_list) From 4552455f34d4497b1a653464d3a70bc9d7d230c5 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 22 Dec 2016 09:41:39 +1100 Subject: [PATCH 108/207] Merge changes from version 3 --- GNUmakefile | 355 ------------------------------------------- GNUmakefile.in | 39 ++--- tests/GNUmakefile | 258 ------------------------------- tests/GNUmakefile.in | 30 ++-- 4 files changed, 35 insertions(+), 647 deletions(-) delete mode 100644 GNUmakefile delete mode 100644 tests/GNUmakefile diff --git a/GNUmakefile b/GNUmakefile deleted file mode 100644 index 31fb5d3c..00000000 --- a/GNUmakefile +++ /dev/null @@ -1,355 +0,0 @@ -# -# -------------------------------------------------------------------------- -# -# 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 -# - -DLL_VER = 2$(EXTRAVERSION) - -# See pthread.h and README for the description of version numbering. -DLL_VERD= $(DLL_VER)d - -DESTROOT = ../PTHREADS-BUILT -DEST_LIB_NAME = libpthread.a -DLLDEST = $(DESTROOT)/bin -LIBDEST = $(DESTROOT)/lib -HDRDEST = $(DESTROOT)/include - -# If Running MsysDTK -RM = rm -f -MV = mv -f -CP = cp -f -MKDIR = mkdir -p -ECHO = echo -TESTNDIR = test ! -d -TESTFILE = test -f -AND = && - -# If not. -#RM = erase -#MV = rename -#CP = copy -#MKDIR = mkdir -#ECHO = echo -#TESTNDIR = if exist -#TESTFILE = if exist -# AND = - -# For cross compiling use e.g. -# make CROSS=x86_64-w64-mingw32- clean GC-inlined -CROSS = - -# Override the builtin default C and C++ standards -#CSTD = -std=c90 -#CXXSTD = -std=c++90 - -AR = $(CROSS)ar -DLLTOOL = $(CROSS)dlltool -CC = $(CROSS)gcc $(CSTD) -CXX = $(CROSS)g++ $(CXXSTD) -RANLIB = $(CROSS)ranlib -RC = $(CROSS)windres -OD_PRIVATE = $(CROSS)objdump -p - -# Build for non-native architecture. E.g. "-m64" "-m32" etc. -# Not tested fully, needs gcc built with "--enable-multilib" -# Check your "gcc -v" output for the options used to build your gcc. -# You can set this as a shell variable or on the make comand line. -# You don't need to uncomment it here unless you want to hardwire -# a value. -#ARCH = - -# -# Look for targets that $(RC) (usually windres) supports then look at any object -# file just built to see which target the compiler used and set the $(RC) target -# to match it. -# -SUPPORTED_TARGETS = $(filter pe-% pei-% elf32-% elf64-% srec symbolsrec verilog tekhex binary ihex,$(shell $(RC) --help)) -RC_TARGET = --target $(firstword $(filter $(SUPPORTED_TARGETS),$(shell $(OD_PRIVATE) *.$(OBJEXT)))) - -OPT = $(CLEANUP) -O3 # -finline-functions -findirect-inlining -XOPT = - -RCFLAGS = --include-dir=. -LFLAGS = $(ARCH) -# Uncomment this if config.h defines RETAIN_WSALASTERROR -#LFLAGS += -lws2_32 -# -# Uncomment this next to link the GCC/C++ runtime libraries statically -# (Be sure to read about these options and their associated caveats -# at http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html) -# -# NOTE 1: Doing this appears to break GCE:pthread_cleanup_*(), which -# relies on C++ class destructors being called when leaving scope. -# -# NOTE 2: If you do this DO NOT distribute your pthreads DLLs with -# the official filenaming, i.e. pthreadVC2.dll, etc. Instead, change DLL_VER -# above to "2slgcc" for example, to build "pthreadGC2slgcc.dll", etc. -# -#LFLAGS += -static-libgcc -static-libstdc++ - -# ---------------------------------------------------------------------- -# The library can be built with some alternative behaviour to -# facilitate development of applications on Win32 that will be ported -# to other POSIX systems. Nothing definable here will make the library -# non-compliant, but applications that make assumptions that POSIX -# does not garrantee may fail or misbehave under some settings. -# -# PTW32_THREAD_ID_REUSE_INCREMENT -# Purpose: -# POSIX says that applications should assume that thread IDs can be -# recycled. However, Solaris and some other systems use a [very large] -# sequence number as the thread ID, which provides virtual uniqueness. -# Pthreads-win32 provides pseudo-unique IDs when the default increment -# (1) is used, but pthread_t is not a scalar type like Solaris's. -# -# Usage: -# Set to any value in the range: 0 <= value <= 2^wordsize -# -# Examples: -# Set to 0 to emulate non recycle-unique behaviour like Linux or *BSD. -# Set to 1 for recycle-unique thread IDs (this is the default). -# Set to some other +ve value to emulate smaller word size types -# (i.e. will wrap sooner). -# -#PTW32_FLAGS = "-DPTW32_THREAD_ID_REUSE_INCREMENT=0" -# -# ---------------------------------------------------------------------- - -GC_CFLAGS = $(PTW32_FLAGS) -GCE_CFLAGS = $(PTW32_FLAGS) -mthreads - -## Mingw -#MAKE ?= make -CFLAGS = $(OPT) $(XOPT) $(ARCH) -I. -DHAVE_CONFIG_H -Wall - -OBJEXT = o -RESEXT = o - -include common.mk - -DLL_OBJS += $(RESOURCE_OBJS) -STATIC_OBJS += $(RESOURCE_OBJS) - -GCE_DLL = pthreadGCE$(DLL_VER).dll -GCED_DLL= pthreadGCE$(DLL_VERD).dll -GCE_LIB = libpthreadGCE$(DLL_VER).a -GCED_LIB= libpthreadGCE$(DLL_VERD).a - -GC_DLL = pthreadGC$(DLL_VER).dll -GCD_DLL = pthreadGC$(DLL_VERD).dll -GC_LIB = libpthreadGC$(DLL_VER).a -GCD_LIB = libpthreadGC$(DLL_VERD).a -GC_INLINED_STATIC_STAMP = libpthreadGC$(DLL_VER).inlined_static_stamp -GCD_INLINED_STATIC_STAMP = libpthreadGC$(DLL_VERD).inlined_static_stamp -GCE_INLINED_STATIC_STAMP = libpthreadGCE$(DLL_VER).inlined_static_stamp -GCED_INLINED_STATIC_STAMP = libpthreadGCE$(DLL_VERD).inlined_static_stamp -GC_SMALL_STATIC_STAMP = libpthreadGC$(DLL_VER).small_static_stamp -GCD_SMALL_STATIC_STAMP = libpthreadGC$(DLL_VERD).small_static_stamp -GCE_SMALL_STATIC_STAMP = libpthreadGCE$(DLL_VER).small_static_stamp -GCED_SMALL_STATIC_STAMP = libpthreadGCE$(DLL_VERD).small_static_stamp - -PTHREAD_DEF = pthread.def - -help: - @ echo "Run one of the following command lines:" - @ echo "$(MAKE) clean all (build targets GC, GCE, GC-static, GCE-static)" - @ echo "$(MAKE) clean all-tests (build and test all non-debug targets below)" - @ echo "$(MAKE) clean GC (to build the GNU C dll with C cleanup code)" - @ echo "$(MAKE) clean GC-debug (to build the GNU C debug dll with C cleanup code)" - @ echo "$(MAKE) clean GCE (to build the GNU C dll with C++ exception handling)" - @ echo "$(MAKE) clean GCE-debug (to build the GNU C debug dll with C++ exception handling)" - @ echo "$(MAKE) clean GC-static (to build the GNU C static lib with C cleanup code)" - @ echo "$(MAKE) clean GC-static-debug (to build the GNU C static debug lib with C cleanup code)" - @ echo "$(MAKE) clean GCE-static (to build the GNU C++ static lib with C++ cleanup code)" - @ echo "$(MAKE) clean GCE-static-debug (to build the GNU C++ static debug lib with C++ cleanup code)" - @ echo "$(MAKE) clean GC-small-static (to build the GNU C static lib with C cleanup code)" - @ echo "$(MAKE) clean GC-small-static-debug (to build the GNU C static debug lib with C cleanup code)" - @ echo "$(MAKE) clean GCE-small-static (to build the GNU C++ static lib with C++ cleanup code)" - @ echo "$(MAKE) clean GCE-small-static-debug (to build the GNU C++ static debug lib with C++ cleanup code)" - -all: - @ $(MAKE) clean GC - @ $(MAKE) clean GCE - @ $(MAKE) clean GC-static - @ $(MAKE) clean GCE-static - -TEST_ENV = PTW32_FLAGS="$(PTW32_FLAGS) -DNO_ERROR_DIALOGS" DLL_VER=$(DLL_VER) ARCH="$(ARCH)" - -all-tests: - $(MAKE) realclean GC-small-static - cd tests && $(MAKE) clean GC-small-static $(TEST_ENV) && $(MAKE) clean GCX-small-static $(TEST_ENV) - $(MAKE) realclean GCE-small-static - cd tests && $(MAKE) clean GCE-small-static $(TEST_ENV) - @ $(ECHO) "$@ completed successfully." - $(MAKE) realclean GC - cd tests && $(MAKE) clean GC $(TEST_ENV) && $(MAKE) clean GCX $(TEST_ENV) - $(MAKE) realclean GCE - cd tests && $(MAKE) clean GCE $(TEST_ENV) - $(MAKE) realclean GC-static - cd tests && $(MAKE) clean GC-static $(TEST_ENV) && $(MAKE) clean GCX-static $(TEST_ENV) - $(MAKE) realclean GCE-static - cd tests && $(MAKE) clean GCE-static $(TEST_ENV) - $(MAKE) realclean - -all-tests-cflags: - $(MAKE) all-tests PTW32_FLAGS="-Wall -Wextra" - @ $(ECHO) "$@ completed successfully." - -GC: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL) - -GC-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_DLL) - -GCE: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL) - -GCE-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_CXX -g -O0" $(GCED_DLL) - -GC-static: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_INLINED_STATIC_STAMP) - -GC-static-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) - -GC-small-static: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GC_SMALL_STATIC_STAMP) - -GC-small-static-debug: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) - -GCE-static: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_INLINED_STATIC_STAMP) - -GCE-static-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) - -GCE-small-static: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_SMALL_STATIC_STAMP) - -GCE-small-static-debug: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) - -tests: - @ cd tests - @ $(MAKE) auto - -# Very basic install. It assumes "realclean" was done just prior to build target if -# you want the installed $(DEVDEST_LIB_NAME) to match that build. -install: - -$(TESTNDIR) $(DLLDEST) $(AND) $(MKDIR) $(DLLDEST) - -$(TESTNDIR) $(LIBDEST) $(AND) $(MKDIR) $(LIBDEST) - -$(TESTNDIR) $(HDRDEST) $(AND) $(MKDIR) $(HDRDEST) - $(CP) _pth32.h $(HDRDEST) - $(CP) pthread.h $(HDRDEST) - $(CP) sched.h $(HDRDEST) - $(CP) semaphore.h $(HDRDEST) - -$(TESTFILE) pthreadGC$(DLL_VER).dll $(AND) $(CP) pthreadGC$(DLL_VER).dll $(DLLDEST) - -$(TESTFILE) pthreadGC$(DLL_VERD).dll $(AND) $(CP) pthreadGC$(DLL_VERD).dll $(DLLDEST) - -$(TESTFILE) pthreadGCE$(DLL_VER).dll $(AND) $(CP) pthreadGCE$(DLL_VER).dll $(DLLDEST) - -$(TESTFILE) pthreadGCE$(DLL_VERD).dll $(AND) $(CP) pthreadGCE$(DLL_VERD).dll $(DLLDEST) - # Only one of these can be installed, so run e.g. "make realclean GC install". - -$(TESTFILE) libpthreadGC$(DLL_VER).a $(AND) $(CP) libpthreadGC$(DLL_VER).a $(LIBDEST)/$(DEST_LIB_NAME) - -$(TESTFILE) libpthreadGC$(DLL_VERD).a $(AND) $(CP) libpthreadGC$(DLL_VERD).a $(LIBDEST)/$(DEST_LIB_NAME) - -$(TESTFILE) libpthreadGCE$(DLL_VER).a $(AND) $(CP) libpthreadGCE$(DLL_VER).a $(LIBDEST)/$(DEST_LIB_NAME) - -$(TESTFILE) libpthreadGCE$(DLL_VERD).a $(AND) $(CP) libpthreadGCE$(DLL_VERD).a $(LIBDEST)/$(DEST_LIB_NAME) - -%.pre: %.c - $(CC) -E -o $@ $(CFLAGS) $^ - -%.s: %.c - $(CC) -c $(CFLAGS) -DPTW32_BUILD_INLINED -Wa,-ahl $^ > $@ - -%.o: %.rc - $(RC) $(RC_TARGET) $(RCFLAGS) $(CLEANUP) -o $@ -i $< - -.SUFFIXES: .dll .rc .c .o - -.c.o:; $(CC) -c -o $@ $(CFLAGS) $(XC_FLAGS) $< - - -$(GC_DLL) $(GCD_DLL): $(DLL_OBJS) - $(CC) $(OPT) -shared -o $@ $^ $(LFLAGS) - $(DLLTOOL) -z pthread.def $^ - $(DLLTOOL) -k --dllname $@ --output-lib lib$(basename $@).a --def $(PTHREAD_DEF) - -$(GCE_DLL) $(GCED_DLL): $(DLL_OBJS) - $(CC) $(OPT) -mthreads -shared -o $@ $^ $(LFLAGS) - $(DLLTOOL) -z pthread.def $^ - $(DLLTOOL) -k --dllname $@ --output-lib lib$(basename $@).a --def $(PTHREAD_DEF) - -$(GC_INLINED_STATIC_STAMP) $(GCE_INLINED_STATIC_STAMP) $(GCD_INLINED_STATIC_STAMP) $(GCED_INLINED_STATIC_STAMP): $(DLL_OBJS) - $(RM) $(basename $@).a - $(AR) -rsv $(basename $@).a $^ - $(ECHO) touched > $@ - -$(GC_SMALL_STATIC_STAMP) $(GCE_SMALL_STATIC_STAMP) $(GCD_SMALL_STATIC_STAMP) $(GCED_SMALL_STATIC_STAMP): $(STATIC_OBJS) - $(RM) $(basename $@).a - $(AR) -rsv $(basename $@).a $^ - $(ECHO) touched > $@ - -clean: - -$(RM) *~ - -$(RM) *.i - -$(RM) *.s - -$(RM) *.o - -$(RM) *.obj - -$(RM) *.exe - -$(RM) *.manifest - -$(RM) $(PTHREAD_DEF) - -realclean: clean - -$(RM) lib*.a - -$(RM) *.lib - -$(RM) pthread*.dll - -$(RM) *_stamp - -$(RM) make.log.txt - -cd tests && $(MAKE) clean - -var_check_list = - -define var_check_target -var-check-$(1): - @for src in $($(1)); do \ - fgrep -q "\"$$$$src\"" $(2) && continue; \ - echo "$$$$src is in \$$$$($(1)), but not in $(2)"; \ - exit 1; \ - done - @grep '^# *include *".*\.c"' $(2) | cut -d'"' -f2 | while read src; do \ - echo " $($(1)) " | fgrep -q " $$$$src " && continue; \ - echo "$$$$src is in $(2), but not in \$$$$($(1))"; \ - exit 1; \ - done - @echo "$(1) <-> $(2): OK" - -var_check_list += var-check-$(1) -endef - -$(eval $(call var_check_target,PTHREAD_SRCS,pthread.c)) - -srcs-vars-check: $(var_check_list) diff --git a/GNUmakefile.in b/GNUmakefile.in index a167e799..94129d10 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -158,16 +158,16 @@ LFLAGS = $(ARCH) # Set to some other +ve value to emulate smaller word size types # (i.e. will wrap sooner). # -#PTW32_FLAGS = "-DPTW32_THREAD_ID_REUSE_INCREMENT=0" +#__PTW32_FLAGS = "-D__PTW32_THREAD_ID_REUSE_INCREMENT=0" # # ---------------------------------------------------------------------- -GC_CFLAGS = $(PTW32_FLAGS) -GCE_CFLAGS = $(PTW32_FLAGS) -mthreads +GC_CFLAGS = $(__PTW32_FLAGS) +GCE_CFLAGS = $(__PTW32_FLAGS) -mthreads ## Mingw #MAKE ?= make -DEFS = @DEFS@ -DPTW32_BUILD +DEFS = @DEFS@ -D__PTW32_BUILD CFLAGS = $(OPT) $(XOPT) $(ARCH) -I. -I${srcdir} $(DEFS) -Wall OBJEXT = @OBJEXT@ @@ -221,7 +221,7 @@ all: @ $(MAKE) clean GC-static @ $(MAKE) clean GCE-static -TEST_ENV = __PTW32_FLAGS="$(PTW32_FLAGS) -DNO_ERROR_DIALOGS" DLL_VER=$(DLL_VER) ARCH="$(ARCH)" +TEST_ENV = __PTW32_FLAGS="$(__PTW32_FLAGS) -DNO_ERROR_DIALOGS" DLL_VER=$(DLL_VER) ARCH="$(ARCH)" all-tests: $(MAKE) realclean GC-small-static @@ -239,46 +239,47 @@ all-tests: cd tests && $(MAKE) clean GCE-static $(TEST_ENV) @ $(GREP) FAILED *.log || $(GREP) Passed *.log | $(COUNT_UNIQ) $(MAKE) clean + @ $(RM) *.log all-tests-cflags: $(MAKE) all-tests __PTW32_FLAGS="-Wall -Wextra" @ $(ECHO) "$@ completed." GC: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL) GC-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_DLL) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_DLL) GCE: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL) GCE-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_CXX -g -O0" $(GCED_DLL) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_CXX -g -O0" $(GCED_DLL) GC-static: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_INLINED_STATIC_STAMP) GC-static-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) GC-small-static: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GC_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GC_SMALL_STATIC_STAMP) GC-small-static-debug: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) GCE-static: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_INLINED_STATIC_STAMP) GCE-static-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) GCE-small-static: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_SMALL_STATIC_STAMP) GCE-small-static-debug: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) tests: @ cd tests @@ -331,7 +332,7 @@ install-headers: pthread.h sched.h semaphore.h _ptw32.h $(CC) -E -o $@ $(CFLAGS) $^ %.s: %.c - $(CC) -c $(CFLAGS) -DPTW32_BUILD_INLINED -Wa,-ahl $^ > $@ + $(CC) -c $(CFLAGS) -D__PTW32_BUILD_INLINED -Wa,-ahl $^ > $@ %.o: %.rc $(RC) $(RC_TARGET) $(RCFLAGS) $(CLEANUP) -o $@ -i $< @@ -370,6 +371,7 @@ clean: -$(RM) *.exe -$(RM) *.manifest -$(RM) $(PTHREAD_DEF) + -cd tests && $(MAKE) clean realclean: clean -$(RM) lib*.a @@ -377,7 +379,6 @@ realclean: clean -$(RM) pthread*.dll -$(RM) *_stamp -$(RM) make.log.txt - -$(RM) *.log -cd tests && $(MAKE) realclean var_check_list = diff --git a/tests/GNUmakefile b/tests/GNUmakefile deleted file mode 100644 index 43b147d7..00000000 --- a/tests/GNUmakefile +++ /dev/null @@ -1,258 +0,0 @@ -# Makefile for the pthreads test suite. -# If all of the .pass files can be created, the test suite has passed. -# -# -------------------------------------------------------------------------- -# -# 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 -# - -LOGFILE = testsuite.log - -DLL_VER = 2$(EXTRAVERSION) - -CP = cp -f -MV = mv -f -RM = rm -f -CAT = cat -MKDIR = mkdir -GREP = grep -WC = wc -TEE = tee -ECHO = echo -TOUCH = $(ECHO) Passed > -TESTFILE = test -f -TESTDIR = test -d -AND = && - -# For cross compiling use e.g. -# # make CROSS=i386-mingw32msvc- clean GC -CROSS = - -# Override the builtin default C and C++ standards -#CSTD = -std=c90 -#CXXSTD = -std=c++90 - -# For cross testing use e.g. -# # make RUN=wine CROSS=i386-mingw32msvc- clean GC -RUN = - -AR = $(CROSS)ar -DLLTOOL = $(CROSS)dlltool -CC = $(CROSS)gcc $(CSTD) -CXX = $(CROSS)g++ $(CXXSTD) -RANLIB = $(CROSS)ranlib - -# -# Mingw -# -XLIBS = -XXCFLAGS = -XXLIBS = -OPT = -O3 -DOPT = -g -O0 -CFLAGS = ${OPT} $(ARCH) -UNDEBUG -Wall -Wno-missing-braces $(XXCFLAGS) -LFLAGS = $(ARCH) $(XXLFLAGS) -# -# Uncomment this next to link the GCC/C++ runtime libraries statically -# (Be sure to read about these options and their associated caveats -# at http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html) -# -# NOTE 1: Doing this appears to break GCE:pthread_cleanup_*(), which -# relies on C++ class destructors being called when leaving scope. -# -# NOTE 2: If you do this DO NOT distribute your pthreads DLLs with -# the official filenaming, i.e. pthreadVC2.dll, etc. Instead, change DLL_VER -# above to "2slgcc" for example, to build "pthreadGC2slgcc.dll", etc. -# -#LFLAGS += -static-libgcc -static-libstdc++ -BUILD_DIR = .. -INCLUDES = -I. - -TEST = GC - -# Default lib version -GCX = GC$(DLL_VER) - -# Files we need to run the tests -# - paths are relative to pthreads build dir. -HDR = _ptw32.h pthread.h semaphore.h sched.h -LIB = libpthread$(GCX).a -DLL = pthread$(GCX).dll -# The next path is relative to $BUILD_DIR -QAPC = # ../QueueUserAPCEx/User/quserex.dll - -include common.mk - -.INTERMEDIATE: $(ALL_KNOWN_TESTS:%=%.exe) $(BENCHTESTS:%=%.exe) -.SECONDARY: $(ALL_KNOWN_TESTS:%=%.exe) $(ALL_KNOWN_TESTS:%=%.pass) $(BENCHTESTS:%=%.exe) $(BENCHTESTS:%=%.bench) -.PRECIOUS: $(ALL_KNOWN_TESTS:%=%.exe) $(ALL_KNOWN_TESTS:%=%.pass) $(BENCHTESTS:%=%.exe) $(BENCHTESTS:%=%.bench) - -ASM = $(ALL_KNOWN_TESTS:%=%.s) -TESTS = $(ALL_KNOWN_TESTS) -BENCHRESULTS = $(BENCHTESTS:%=%.bench) - -# -# To build and run "foo.exe" and "bar.exe" only use, e.g.: -# make clean GC NO_DEPS=1 TESTS="foo bar" -# -# To build and run "foo.exe" and "bar.exe" and run all prerequisite tests -# use, e.g.: -# make clean GC TESTS="foo bar" -# -# Set TESTS to one or more tests. -# -ifndef NO_DEPS -include runorder.mk -endif - -help: - @ $(ECHO) "Run one of the following command lines:" - @ $(ECHO) "$(MAKE) clean GC (to test using GC dll with C (no EH) applications)" - @ $(ECHO) "$(MAKE) clean GCX (to test using GC dll with C++ (EH) applications)" - @ $(ECHO) "$(MAKE) clean GCE (to test using GCE dll with C++ (EH) applications)" - @ $(ECHO) "$(MAKE) clean GC-bench (to benchtest using GNU C dll with C cleanup code)" - @ $(ECHO) "$(MAKE) clean GC-debug (to test using GC dll with C (no EH) applications)" - @ $(ECHO) "$(MAKE) clean GC-static (to test using GC static lib with C (no EH) applications)" - @ $(ECHO) "$(MAKE) clean GC-static-debug (to test using GC static lib with C (no EH) applications)" - @ $(ECHO) "$(MAKE) clean GCE-static (to test using GC static lib with C (no EH) applications)" - @ $(ECHO) "$(MAKE) clean GCE-static-debug (to test using GC static lib with C (no EH) applications)" - @ $(ECHO) "$(MAKE) clean GCE-debug (to test using GCE dll with C++ (EH) applications)" - @ $(ECHO) "$(MAKE) clean GCX-static (to test using GC static lib with C++ applications)" - @ $(ECHO) "$(MAKE) clean GCX-static-debug (to test using GC static lib with C++ applications)" - @ $(ECHO) "$(MAKE) clean GCX-debug (to test using GCE dll with C++ (EH) applications)" - @ $(ECHO) "$(MAKE) clean GC TESTS="foo bar" (to build individual tests \"foo.c and bar.c\" with C and run using GC dll)" - -GC: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" allpassed - -GC-asm: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" all-asm - -GC-bench: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" all-bench - -GC-bench-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" OPT="${DOPT}" all-bench - -GC-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed - -GC-static GC-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" DLL="" allpassed - -GC-static-debug GC-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" OPT="$(DOPT)" DLL="" allpassed - -GCE: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC="$(CXX)" XXCFLAGS="-mthreads -D__CLEANUP_CXX" allpassed - -GCE-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_CXX" OPT="${DOPT}" allpassed - -GCE-static GCE-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB" DLL="" allpassed - -GCE-static-debug GCE-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB" OPT="$(DOPT)" DLL="" allpassed - -GCX: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CXX)" XXCFLAGS="-mthreads -D__CLEANUP_C" allpassed - -GCX-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed - -GCX-static GCX-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" DLL="" allpassed - -GCX-static-debug GCX-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" OPT="$(DOPT)" DLL="" allpassed - -all-asm: $(ASM) - @ $(ECHO) "ALL TESTS PASSED! Congratulations!" - -allpassed: $(HDR) $(LIB) $(DLL) $(QAPC) $(TESTS:%=%.pass) - @ $(ECHO) "ALL TESTS COMPLETED. Check the logfile: $(LOGFILE)" - @ $(ECHO) "FAILURES: $$( $(GREP) FAILED $(LOGFILE) | $(WC) -l )" - @ - ! $(GREP) FAILED $(LOGFILE) - @ $(MV) $(LOGFILE) $(TEST)-$(LOGFILE) - -all-bench: $(HDR) $(LIB) $(DLL) $(QAPC) $(XXLIBS) $(BENCHRESULTS) - @ $(ECHO) "ALL BENCH TESTS COMPLETED. Check the logfile: $(LOGFILE)" - @ $(ECHO) "FAILURES: $$( $(GREP) FAILED $(LOGFILE) | $(WC) -l ) " - @ - ! $(GREP) FAILED $(LOGFILE) - @ $(MV) $(LOGFILE) $(TEST)-$(LOGFILE) - -cancel9.exe: XLIBS = -lws2_32 - -%.pass: %.exe - @ $(ECHO) Running $(TEST) test \"$*\" | $(TEE) -a $(LOGFILE) - @ $(RUN) ./$* && { $(ECHO) Passed; $(TOUCH) $@; } || { $(ECHO) FAILED: $* ; $(ECHO) ; } \ - 2>&1 | $(TEE) -a $(LOGFILE) - -%.bench: %.exe - @ $(ECHO) Running $(TEST) test \"$*\" | $(TEE) -a $(LOGFILE) - @ $(RUN) ./$* && { $(ECHO) Done; $(TOUCH) $@; } || { $(ECHO) FAILED ; $(ECHO) ; } \ - 2>&1 | $(TEE) -a $(LOGFILE) - -%.exe: %.c - $(CC) $(CFLAGS) $(LFLAGS) -o $@ $< $(INCLUDES) -L. -lpthread$(GCX) $(XLIBS) $(XXLIBS) - -%.pre: %.c $(HDR) - $(CC) -E $(CFLAGS) -o $@ $< $(INCLUDES) - -%.s: %.c $(HDR) - @ $(ECHO) Compiling $@ - $(CC) -S $(CFLAGS) -o $@ $< $(INCLUDES) - -$(HDR) $(LIB) $(DLL) $(QAPC): - @ $(ECHO) Copying $(BUILD_DIR)/$@ - @ $(TESTFILE) $(BUILD_DIR)/$@ $(AND) $(CP) $(BUILD_DIR)/$@ . - -benchlib.o: benchlib.c - @ $(ECHO) Compiling $@ - $(CC) -c $(CFLAGS) $< $(INCLUDES) - -clean: - - $(RM) *.dll - - $(RM) *.lib - - $(RM) _ptw32.h - - $(RM) pthread.h - - $(RM) semaphore.h - - $(RM) sched.h - - $(RM) *.a - - $(RM) *.e - - $(RM) *.i - - $(RM) *.o - - $(RM) *.s - - $(RM) *.so - - $(RM) *.obj - - $(RM) *.pdb - - $(RM) *.exe - - $(RM) *.manifest - - $(RM) *.pass - - $(RM) *.bench -# - $(RM) *.log - \ No newline at end of file diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index 1deb8e13..94f6dbdb 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -149,49 +149,49 @@ help: @ $(ECHO) "$(MAKE) clean GC TESTS="foo bar" (to build individual tests \"foo.c and bar.c\" with C and run using GC dll)" GC: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" allpassed GC-asm: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" all-asm + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" all-asm GC-bench: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" all-bench + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" XXLIBS="benchlib.o" all-bench GC-bench-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" OPT="${DOPT}" all-bench + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" XXLIBS="benchlib.o" OPT="${DOPT}" all-bench GC-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" OPT="${DOPT}" allpassed GC-static GC-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed GC-static-debug GC-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed GCE: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__CLEANUP_CXX" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__PTW32_CLEANUP_CXX" allpassed GCE-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_CXX" OPT="${DOPT}" allpassed GCE-static GCE-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_CXX -D__PTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed GCE-static-debug GCE-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_CXX -D__PTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed GCX: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__CLEANUP_C" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__PTW32_CLEANUP_C" allpassed GCX-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_C" OPT="${DOPT}" allpassed GCX-static GCX-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed GCX-static-debug GCX-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed all-asm: $(ASM) @ $(ECHO) "ALL TESTS COMPILED TO ASSEMBLER CODE" From ec875533190f1ac668fc2ec30dba83c768b357c5 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 22 Dec 2016 09:43:17 +1100 Subject: [PATCH 109/207] Revert "Merge changes from version 3" This reverts commit 4552455f34d4497b1a653464d3a70bc9d7d230c5. --- GNUmakefile | 355 +++++++++++++++++++++++++++++++++++++++++++ GNUmakefile.in | 39 +++-- tests/GNUmakefile | 258 +++++++++++++++++++++++++++++++ tests/GNUmakefile.in | 30 ++-- 4 files changed, 647 insertions(+), 35 deletions(-) create mode 100644 GNUmakefile create mode 100644 tests/GNUmakefile diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 00000000..31fb5d3c --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,355 @@ +# +# -------------------------------------------------------------------------- +# +# 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 +# + +DLL_VER = 2$(EXTRAVERSION) + +# See pthread.h and README for the description of version numbering. +DLL_VERD= $(DLL_VER)d + +DESTROOT = ../PTHREADS-BUILT +DEST_LIB_NAME = libpthread.a +DLLDEST = $(DESTROOT)/bin +LIBDEST = $(DESTROOT)/lib +HDRDEST = $(DESTROOT)/include + +# If Running MsysDTK +RM = rm -f +MV = mv -f +CP = cp -f +MKDIR = mkdir -p +ECHO = echo +TESTNDIR = test ! -d +TESTFILE = test -f +AND = && + +# If not. +#RM = erase +#MV = rename +#CP = copy +#MKDIR = mkdir +#ECHO = echo +#TESTNDIR = if exist +#TESTFILE = if exist +# AND = + +# For cross compiling use e.g. +# make CROSS=x86_64-w64-mingw32- clean GC-inlined +CROSS = + +# Override the builtin default C and C++ standards +#CSTD = -std=c90 +#CXXSTD = -std=c++90 + +AR = $(CROSS)ar +DLLTOOL = $(CROSS)dlltool +CC = $(CROSS)gcc $(CSTD) +CXX = $(CROSS)g++ $(CXXSTD) +RANLIB = $(CROSS)ranlib +RC = $(CROSS)windres +OD_PRIVATE = $(CROSS)objdump -p + +# Build for non-native architecture. E.g. "-m64" "-m32" etc. +# Not tested fully, needs gcc built with "--enable-multilib" +# Check your "gcc -v" output for the options used to build your gcc. +# You can set this as a shell variable or on the make comand line. +# You don't need to uncomment it here unless you want to hardwire +# a value. +#ARCH = + +# +# Look for targets that $(RC) (usually windres) supports then look at any object +# file just built to see which target the compiler used and set the $(RC) target +# to match it. +# +SUPPORTED_TARGETS = $(filter pe-% pei-% elf32-% elf64-% srec symbolsrec verilog tekhex binary ihex,$(shell $(RC) --help)) +RC_TARGET = --target $(firstword $(filter $(SUPPORTED_TARGETS),$(shell $(OD_PRIVATE) *.$(OBJEXT)))) + +OPT = $(CLEANUP) -O3 # -finline-functions -findirect-inlining +XOPT = + +RCFLAGS = --include-dir=. +LFLAGS = $(ARCH) +# Uncomment this if config.h defines RETAIN_WSALASTERROR +#LFLAGS += -lws2_32 +# +# Uncomment this next to link the GCC/C++ runtime libraries statically +# (Be sure to read about these options and their associated caveats +# at http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html) +# +# NOTE 1: Doing this appears to break GCE:pthread_cleanup_*(), which +# relies on C++ class destructors being called when leaving scope. +# +# NOTE 2: If you do this DO NOT distribute your pthreads DLLs with +# the official filenaming, i.e. pthreadVC2.dll, etc. Instead, change DLL_VER +# above to "2slgcc" for example, to build "pthreadGC2slgcc.dll", etc. +# +#LFLAGS += -static-libgcc -static-libstdc++ + +# ---------------------------------------------------------------------- +# The library can be built with some alternative behaviour to +# facilitate development of applications on Win32 that will be ported +# to other POSIX systems. Nothing definable here will make the library +# non-compliant, but applications that make assumptions that POSIX +# does not garrantee may fail or misbehave under some settings. +# +# PTW32_THREAD_ID_REUSE_INCREMENT +# Purpose: +# POSIX says that applications should assume that thread IDs can be +# recycled. However, Solaris and some other systems use a [very large] +# sequence number as the thread ID, which provides virtual uniqueness. +# Pthreads-win32 provides pseudo-unique IDs when the default increment +# (1) is used, but pthread_t is not a scalar type like Solaris's. +# +# Usage: +# Set to any value in the range: 0 <= value <= 2^wordsize +# +# Examples: +# Set to 0 to emulate non recycle-unique behaviour like Linux or *BSD. +# Set to 1 for recycle-unique thread IDs (this is the default). +# Set to some other +ve value to emulate smaller word size types +# (i.e. will wrap sooner). +# +#PTW32_FLAGS = "-DPTW32_THREAD_ID_REUSE_INCREMENT=0" +# +# ---------------------------------------------------------------------- + +GC_CFLAGS = $(PTW32_FLAGS) +GCE_CFLAGS = $(PTW32_FLAGS) -mthreads + +## Mingw +#MAKE ?= make +CFLAGS = $(OPT) $(XOPT) $(ARCH) -I. -DHAVE_CONFIG_H -Wall + +OBJEXT = o +RESEXT = o + +include common.mk + +DLL_OBJS += $(RESOURCE_OBJS) +STATIC_OBJS += $(RESOURCE_OBJS) + +GCE_DLL = pthreadGCE$(DLL_VER).dll +GCED_DLL= pthreadGCE$(DLL_VERD).dll +GCE_LIB = libpthreadGCE$(DLL_VER).a +GCED_LIB= libpthreadGCE$(DLL_VERD).a + +GC_DLL = pthreadGC$(DLL_VER).dll +GCD_DLL = pthreadGC$(DLL_VERD).dll +GC_LIB = libpthreadGC$(DLL_VER).a +GCD_LIB = libpthreadGC$(DLL_VERD).a +GC_INLINED_STATIC_STAMP = libpthreadGC$(DLL_VER).inlined_static_stamp +GCD_INLINED_STATIC_STAMP = libpthreadGC$(DLL_VERD).inlined_static_stamp +GCE_INLINED_STATIC_STAMP = libpthreadGCE$(DLL_VER).inlined_static_stamp +GCED_INLINED_STATIC_STAMP = libpthreadGCE$(DLL_VERD).inlined_static_stamp +GC_SMALL_STATIC_STAMP = libpthreadGC$(DLL_VER).small_static_stamp +GCD_SMALL_STATIC_STAMP = libpthreadGC$(DLL_VERD).small_static_stamp +GCE_SMALL_STATIC_STAMP = libpthreadGCE$(DLL_VER).small_static_stamp +GCED_SMALL_STATIC_STAMP = libpthreadGCE$(DLL_VERD).small_static_stamp + +PTHREAD_DEF = pthread.def + +help: + @ echo "Run one of the following command lines:" + @ echo "$(MAKE) clean all (build targets GC, GCE, GC-static, GCE-static)" + @ echo "$(MAKE) clean all-tests (build and test all non-debug targets below)" + @ echo "$(MAKE) clean GC (to build the GNU C dll with C cleanup code)" + @ echo "$(MAKE) clean GC-debug (to build the GNU C debug dll with C cleanup code)" + @ echo "$(MAKE) clean GCE (to build the GNU C dll with C++ exception handling)" + @ echo "$(MAKE) clean GCE-debug (to build the GNU C debug dll with C++ exception handling)" + @ echo "$(MAKE) clean GC-static (to build the GNU C static lib with C cleanup code)" + @ echo "$(MAKE) clean GC-static-debug (to build the GNU C static debug lib with C cleanup code)" + @ echo "$(MAKE) clean GCE-static (to build the GNU C++ static lib with C++ cleanup code)" + @ echo "$(MAKE) clean GCE-static-debug (to build the GNU C++ static debug lib with C++ cleanup code)" + @ echo "$(MAKE) clean GC-small-static (to build the GNU C static lib with C cleanup code)" + @ echo "$(MAKE) clean GC-small-static-debug (to build the GNU C static debug lib with C cleanup code)" + @ echo "$(MAKE) clean GCE-small-static (to build the GNU C++ static lib with C++ cleanup code)" + @ echo "$(MAKE) clean GCE-small-static-debug (to build the GNU C++ static debug lib with C++ cleanup code)" + +all: + @ $(MAKE) clean GC + @ $(MAKE) clean GCE + @ $(MAKE) clean GC-static + @ $(MAKE) clean GCE-static + +TEST_ENV = PTW32_FLAGS="$(PTW32_FLAGS) -DNO_ERROR_DIALOGS" DLL_VER=$(DLL_VER) ARCH="$(ARCH)" + +all-tests: + $(MAKE) realclean GC-small-static + cd tests && $(MAKE) clean GC-small-static $(TEST_ENV) && $(MAKE) clean GCX-small-static $(TEST_ENV) + $(MAKE) realclean GCE-small-static + cd tests && $(MAKE) clean GCE-small-static $(TEST_ENV) + @ $(ECHO) "$@ completed successfully." + $(MAKE) realclean GC + cd tests && $(MAKE) clean GC $(TEST_ENV) && $(MAKE) clean GCX $(TEST_ENV) + $(MAKE) realclean GCE + cd tests && $(MAKE) clean GCE $(TEST_ENV) + $(MAKE) realclean GC-static + cd tests && $(MAKE) clean GC-static $(TEST_ENV) && $(MAKE) clean GCX-static $(TEST_ENV) + $(MAKE) realclean GCE-static + cd tests && $(MAKE) clean GCE-static $(TEST_ENV) + $(MAKE) realclean + +all-tests-cflags: + $(MAKE) all-tests PTW32_FLAGS="-Wall -Wextra" + @ $(ECHO) "$@ completed successfully." + +GC: + $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL) + +GC-debug: + $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_DLL) + +GCE: + $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL) + +GCE-debug: + $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_CXX -g -O0" $(GCED_DLL) + +GC-static: + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_INLINED_STATIC_STAMP) + +GC-static-debug: + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) + +GC-small-static: + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GC_SMALL_STATIC_STAMP) + +GC-small-static-debug: + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) + +GCE-static: + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_INLINED_STATIC_STAMP) + +GCE-static-debug: + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) + +GCE-small-static: + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_SMALL_STATIC_STAMP) + +GCE-small-static-debug: + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) + +tests: + @ cd tests + @ $(MAKE) auto + +# Very basic install. It assumes "realclean" was done just prior to build target if +# you want the installed $(DEVDEST_LIB_NAME) to match that build. +install: + -$(TESTNDIR) $(DLLDEST) $(AND) $(MKDIR) $(DLLDEST) + -$(TESTNDIR) $(LIBDEST) $(AND) $(MKDIR) $(LIBDEST) + -$(TESTNDIR) $(HDRDEST) $(AND) $(MKDIR) $(HDRDEST) + $(CP) _pth32.h $(HDRDEST) + $(CP) pthread.h $(HDRDEST) + $(CP) sched.h $(HDRDEST) + $(CP) semaphore.h $(HDRDEST) + -$(TESTFILE) pthreadGC$(DLL_VER).dll $(AND) $(CP) pthreadGC$(DLL_VER).dll $(DLLDEST) + -$(TESTFILE) pthreadGC$(DLL_VERD).dll $(AND) $(CP) pthreadGC$(DLL_VERD).dll $(DLLDEST) + -$(TESTFILE) pthreadGCE$(DLL_VER).dll $(AND) $(CP) pthreadGCE$(DLL_VER).dll $(DLLDEST) + -$(TESTFILE) pthreadGCE$(DLL_VERD).dll $(AND) $(CP) pthreadGCE$(DLL_VERD).dll $(DLLDEST) + # Only one of these can be installed, so run e.g. "make realclean GC install". + -$(TESTFILE) libpthreadGC$(DLL_VER).a $(AND) $(CP) libpthreadGC$(DLL_VER).a $(LIBDEST)/$(DEST_LIB_NAME) + -$(TESTFILE) libpthreadGC$(DLL_VERD).a $(AND) $(CP) libpthreadGC$(DLL_VERD).a $(LIBDEST)/$(DEST_LIB_NAME) + -$(TESTFILE) libpthreadGCE$(DLL_VER).a $(AND) $(CP) libpthreadGCE$(DLL_VER).a $(LIBDEST)/$(DEST_LIB_NAME) + -$(TESTFILE) libpthreadGCE$(DLL_VERD).a $(AND) $(CP) libpthreadGCE$(DLL_VERD).a $(LIBDEST)/$(DEST_LIB_NAME) + +%.pre: %.c + $(CC) -E -o $@ $(CFLAGS) $^ + +%.s: %.c + $(CC) -c $(CFLAGS) -DPTW32_BUILD_INLINED -Wa,-ahl $^ > $@ + +%.o: %.rc + $(RC) $(RC_TARGET) $(RCFLAGS) $(CLEANUP) -o $@ -i $< + +.SUFFIXES: .dll .rc .c .o + +.c.o:; $(CC) -c -o $@ $(CFLAGS) $(XC_FLAGS) $< + + +$(GC_DLL) $(GCD_DLL): $(DLL_OBJS) + $(CC) $(OPT) -shared -o $@ $^ $(LFLAGS) + $(DLLTOOL) -z pthread.def $^ + $(DLLTOOL) -k --dllname $@ --output-lib lib$(basename $@).a --def $(PTHREAD_DEF) + +$(GCE_DLL) $(GCED_DLL): $(DLL_OBJS) + $(CC) $(OPT) -mthreads -shared -o $@ $^ $(LFLAGS) + $(DLLTOOL) -z pthread.def $^ + $(DLLTOOL) -k --dllname $@ --output-lib lib$(basename $@).a --def $(PTHREAD_DEF) + +$(GC_INLINED_STATIC_STAMP) $(GCE_INLINED_STATIC_STAMP) $(GCD_INLINED_STATIC_STAMP) $(GCED_INLINED_STATIC_STAMP): $(DLL_OBJS) + $(RM) $(basename $@).a + $(AR) -rsv $(basename $@).a $^ + $(ECHO) touched > $@ + +$(GC_SMALL_STATIC_STAMP) $(GCE_SMALL_STATIC_STAMP) $(GCD_SMALL_STATIC_STAMP) $(GCED_SMALL_STATIC_STAMP): $(STATIC_OBJS) + $(RM) $(basename $@).a + $(AR) -rsv $(basename $@).a $^ + $(ECHO) touched > $@ + +clean: + -$(RM) *~ + -$(RM) *.i + -$(RM) *.s + -$(RM) *.o + -$(RM) *.obj + -$(RM) *.exe + -$(RM) *.manifest + -$(RM) $(PTHREAD_DEF) + +realclean: clean + -$(RM) lib*.a + -$(RM) *.lib + -$(RM) pthread*.dll + -$(RM) *_stamp + -$(RM) make.log.txt + -cd tests && $(MAKE) clean + +var_check_list = + +define var_check_target +var-check-$(1): + @for src in $($(1)); do \ + fgrep -q "\"$$$$src\"" $(2) && continue; \ + echo "$$$$src is in \$$$$($(1)), but not in $(2)"; \ + exit 1; \ + done + @grep '^# *include *".*\.c"' $(2) | cut -d'"' -f2 | while read src; do \ + echo " $($(1)) " | fgrep -q " $$$$src " && continue; \ + echo "$$$$src is in $(2), but not in \$$$$($(1))"; \ + exit 1; \ + done + @echo "$(1) <-> $(2): OK" + +var_check_list += var-check-$(1) +endef + +$(eval $(call var_check_target,PTHREAD_SRCS,pthread.c)) + +srcs-vars-check: $(var_check_list) diff --git a/GNUmakefile.in b/GNUmakefile.in index 94129d10..a167e799 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -158,16 +158,16 @@ LFLAGS = $(ARCH) # Set to some other +ve value to emulate smaller word size types # (i.e. will wrap sooner). # -#__PTW32_FLAGS = "-D__PTW32_THREAD_ID_REUSE_INCREMENT=0" +#PTW32_FLAGS = "-DPTW32_THREAD_ID_REUSE_INCREMENT=0" # # ---------------------------------------------------------------------- -GC_CFLAGS = $(__PTW32_FLAGS) -GCE_CFLAGS = $(__PTW32_FLAGS) -mthreads +GC_CFLAGS = $(PTW32_FLAGS) +GCE_CFLAGS = $(PTW32_FLAGS) -mthreads ## Mingw #MAKE ?= make -DEFS = @DEFS@ -D__PTW32_BUILD +DEFS = @DEFS@ -DPTW32_BUILD CFLAGS = $(OPT) $(XOPT) $(ARCH) -I. -I${srcdir} $(DEFS) -Wall OBJEXT = @OBJEXT@ @@ -221,7 +221,7 @@ all: @ $(MAKE) clean GC-static @ $(MAKE) clean GCE-static -TEST_ENV = __PTW32_FLAGS="$(__PTW32_FLAGS) -DNO_ERROR_DIALOGS" DLL_VER=$(DLL_VER) ARCH="$(ARCH)" +TEST_ENV = __PTW32_FLAGS="$(PTW32_FLAGS) -DNO_ERROR_DIALOGS" DLL_VER=$(DLL_VER) ARCH="$(ARCH)" all-tests: $(MAKE) realclean GC-small-static @@ -239,47 +239,46 @@ all-tests: cd tests && $(MAKE) clean GCE-static $(TEST_ENV) @ $(GREP) FAILED *.log || $(GREP) Passed *.log | $(COUNT_UNIQ) $(MAKE) clean - @ $(RM) *.log all-tests-cflags: $(MAKE) all-tests __PTW32_FLAGS="-Wall -Wextra" @ $(ECHO) "$@ completed." GC: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL) GC-debug: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_DLL) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_DLL) GCE: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL) GCE-debug: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_CXX -g -O0" $(GCED_DLL) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_CXX -g -O0" $(GCED_DLL) GC-static: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_INLINED_STATIC_STAMP) GC-static-debug: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) GC-small-static: - $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GC_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GC_SMALL_STATIC_STAMP) GC-small-static-debug: - $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) GCE-static: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_INLINED_STATIC_STAMP) GCE-static-debug: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) GCE-small-static: - $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_SMALL_STATIC_STAMP) GCE-small-static-debug: - $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) tests: @ cd tests @@ -332,7 +331,7 @@ install-headers: pthread.h sched.h semaphore.h _ptw32.h $(CC) -E -o $@ $(CFLAGS) $^ %.s: %.c - $(CC) -c $(CFLAGS) -D__PTW32_BUILD_INLINED -Wa,-ahl $^ > $@ + $(CC) -c $(CFLAGS) -DPTW32_BUILD_INLINED -Wa,-ahl $^ > $@ %.o: %.rc $(RC) $(RC_TARGET) $(RCFLAGS) $(CLEANUP) -o $@ -i $< @@ -371,7 +370,6 @@ clean: -$(RM) *.exe -$(RM) *.manifest -$(RM) $(PTHREAD_DEF) - -cd tests && $(MAKE) clean realclean: clean -$(RM) lib*.a @@ -379,6 +377,7 @@ realclean: clean -$(RM) pthread*.dll -$(RM) *_stamp -$(RM) make.log.txt + -$(RM) *.log -cd tests && $(MAKE) realclean var_check_list = diff --git a/tests/GNUmakefile b/tests/GNUmakefile new file mode 100644 index 00000000..43b147d7 --- /dev/null +++ b/tests/GNUmakefile @@ -0,0 +1,258 @@ +# Makefile for the pthreads test suite. +# If all of the .pass files can be created, the test suite has passed. +# +# -------------------------------------------------------------------------- +# +# 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 +# + +LOGFILE = testsuite.log + +DLL_VER = 2$(EXTRAVERSION) + +CP = cp -f +MV = mv -f +RM = rm -f +CAT = cat +MKDIR = mkdir +GREP = grep +WC = wc +TEE = tee +ECHO = echo +TOUCH = $(ECHO) Passed > +TESTFILE = test -f +TESTDIR = test -d +AND = && + +# For cross compiling use e.g. +# # make CROSS=i386-mingw32msvc- clean GC +CROSS = + +# Override the builtin default C and C++ standards +#CSTD = -std=c90 +#CXXSTD = -std=c++90 + +# For cross testing use e.g. +# # make RUN=wine CROSS=i386-mingw32msvc- clean GC +RUN = + +AR = $(CROSS)ar +DLLTOOL = $(CROSS)dlltool +CC = $(CROSS)gcc $(CSTD) +CXX = $(CROSS)g++ $(CXXSTD) +RANLIB = $(CROSS)ranlib + +# +# Mingw +# +XLIBS = +XXCFLAGS = +XXLIBS = +OPT = -O3 +DOPT = -g -O0 +CFLAGS = ${OPT} $(ARCH) -UNDEBUG -Wall -Wno-missing-braces $(XXCFLAGS) +LFLAGS = $(ARCH) $(XXLFLAGS) +# +# Uncomment this next to link the GCC/C++ runtime libraries statically +# (Be sure to read about these options and their associated caveats +# at http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html) +# +# NOTE 1: Doing this appears to break GCE:pthread_cleanup_*(), which +# relies on C++ class destructors being called when leaving scope. +# +# NOTE 2: If you do this DO NOT distribute your pthreads DLLs with +# the official filenaming, i.e. pthreadVC2.dll, etc. Instead, change DLL_VER +# above to "2slgcc" for example, to build "pthreadGC2slgcc.dll", etc. +# +#LFLAGS += -static-libgcc -static-libstdc++ +BUILD_DIR = .. +INCLUDES = -I. + +TEST = GC + +# Default lib version +GCX = GC$(DLL_VER) + +# Files we need to run the tests +# - paths are relative to pthreads build dir. +HDR = _ptw32.h pthread.h semaphore.h sched.h +LIB = libpthread$(GCX).a +DLL = pthread$(GCX).dll +# The next path is relative to $BUILD_DIR +QAPC = # ../QueueUserAPCEx/User/quserex.dll + +include common.mk + +.INTERMEDIATE: $(ALL_KNOWN_TESTS:%=%.exe) $(BENCHTESTS:%=%.exe) +.SECONDARY: $(ALL_KNOWN_TESTS:%=%.exe) $(ALL_KNOWN_TESTS:%=%.pass) $(BENCHTESTS:%=%.exe) $(BENCHTESTS:%=%.bench) +.PRECIOUS: $(ALL_KNOWN_TESTS:%=%.exe) $(ALL_KNOWN_TESTS:%=%.pass) $(BENCHTESTS:%=%.exe) $(BENCHTESTS:%=%.bench) + +ASM = $(ALL_KNOWN_TESTS:%=%.s) +TESTS = $(ALL_KNOWN_TESTS) +BENCHRESULTS = $(BENCHTESTS:%=%.bench) + +# +# To build and run "foo.exe" and "bar.exe" only use, e.g.: +# make clean GC NO_DEPS=1 TESTS="foo bar" +# +# To build and run "foo.exe" and "bar.exe" and run all prerequisite tests +# use, e.g.: +# make clean GC TESTS="foo bar" +# +# Set TESTS to one or more tests. +# +ifndef NO_DEPS +include runorder.mk +endif + +help: + @ $(ECHO) "Run one of the following command lines:" + @ $(ECHO) "$(MAKE) clean GC (to test using GC dll with C (no EH) applications)" + @ $(ECHO) "$(MAKE) clean GCX (to test using GC dll with C++ (EH) applications)" + @ $(ECHO) "$(MAKE) clean GCE (to test using GCE dll with C++ (EH) applications)" + @ $(ECHO) "$(MAKE) clean GC-bench (to benchtest using GNU C dll with C cleanup code)" + @ $(ECHO) "$(MAKE) clean GC-debug (to test using GC dll with C (no EH) applications)" + @ $(ECHO) "$(MAKE) clean GC-static (to test using GC static lib with C (no EH) applications)" + @ $(ECHO) "$(MAKE) clean GC-static-debug (to test using GC static lib with C (no EH) applications)" + @ $(ECHO) "$(MAKE) clean GCE-static (to test using GC static lib with C (no EH) applications)" + @ $(ECHO) "$(MAKE) clean GCE-static-debug (to test using GC static lib with C (no EH) applications)" + @ $(ECHO) "$(MAKE) clean GCE-debug (to test using GCE dll with C++ (EH) applications)" + @ $(ECHO) "$(MAKE) clean GCX-static (to test using GC static lib with C++ applications)" + @ $(ECHO) "$(MAKE) clean GCX-static-debug (to test using GC static lib with C++ applications)" + @ $(ECHO) "$(MAKE) clean GCX-debug (to test using GCE dll with C++ (EH) applications)" + @ $(ECHO) "$(MAKE) clean GC TESTS="foo bar" (to build individual tests \"foo.c and bar.c\" with C and run using GC dll)" + +GC: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" allpassed + +GC-asm: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" all-asm + +GC-bench: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" all-bench + +GC-bench-debug: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" OPT="${DOPT}" all-bench + +GC-debug: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed + +GC-static GC-small-static: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" DLL="" allpassed + +GC-static-debug GC-small-static-debug: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" OPT="$(DOPT)" DLL="" allpassed + +GCE: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC="$(CXX)" XXCFLAGS="-mthreads -D__CLEANUP_CXX" allpassed + +GCE-debug: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_CXX" OPT="${DOPT}" allpassed + +GCE-static GCE-small-static: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB" DLL="" allpassed + +GCE-static-debug GCE-small-static-debug: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB" OPT="$(DOPT)" DLL="" allpassed + +GCX: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CXX)" XXCFLAGS="-mthreads -D__CLEANUP_C" allpassed + +GCX-debug: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed + +GCX-static GCX-small-static: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" DLL="" allpassed + +GCX-static-debug GCX-small-static-debug: + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" OPT="$(DOPT)" DLL="" allpassed + +all-asm: $(ASM) + @ $(ECHO) "ALL TESTS PASSED! Congratulations!" + +allpassed: $(HDR) $(LIB) $(DLL) $(QAPC) $(TESTS:%=%.pass) + @ $(ECHO) "ALL TESTS COMPLETED. Check the logfile: $(LOGFILE)" + @ $(ECHO) "FAILURES: $$( $(GREP) FAILED $(LOGFILE) | $(WC) -l )" + @ - ! $(GREP) FAILED $(LOGFILE) + @ $(MV) $(LOGFILE) $(TEST)-$(LOGFILE) + +all-bench: $(HDR) $(LIB) $(DLL) $(QAPC) $(XXLIBS) $(BENCHRESULTS) + @ $(ECHO) "ALL BENCH TESTS COMPLETED. Check the logfile: $(LOGFILE)" + @ $(ECHO) "FAILURES: $$( $(GREP) FAILED $(LOGFILE) | $(WC) -l ) " + @ - ! $(GREP) FAILED $(LOGFILE) + @ $(MV) $(LOGFILE) $(TEST)-$(LOGFILE) + +cancel9.exe: XLIBS = -lws2_32 + +%.pass: %.exe + @ $(ECHO) Running $(TEST) test \"$*\" | $(TEE) -a $(LOGFILE) + @ $(RUN) ./$* && { $(ECHO) Passed; $(TOUCH) $@; } || { $(ECHO) FAILED: $* ; $(ECHO) ; } \ + 2>&1 | $(TEE) -a $(LOGFILE) + +%.bench: %.exe + @ $(ECHO) Running $(TEST) test \"$*\" | $(TEE) -a $(LOGFILE) + @ $(RUN) ./$* && { $(ECHO) Done; $(TOUCH) $@; } || { $(ECHO) FAILED ; $(ECHO) ; } \ + 2>&1 | $(TEE) -a $(LOGFILE) + +%.exe: %.c + $(CC) $(CFLAGS) $(LFLAGS) -o $@ $< $(INCLUDES) -L. -lpthread$(GCX) $(XLIBS) $(XXLIBS) + +%.pre: %.c $(HDR) + $(CC) -E $(CFLAGS) -o $@ $< $(INCLUDES) + +%.s: %.c $(HDR) + @ $(ECHO) Compiling $@ + $(CC) -S $(CFLAGS) -o $@ $< $(INCLUDES) + +$(HDR) $(LIB) $(DLL) $(QAPC): + @ $(ECHO) Copying $(BUILD_DIR)/$@ + @ $(TESTFILE) $(BUILD_DIR)/$@ $(AND) $(CP) $(BUILD_DIR)/$@ . + +benchlib.o: benchlib.c + @ $(ECHO) Compiling $@ + $(CC) -c $(CFLAGS) $< $(INCLUDES) + +clean: + - $(RM) *.dll + - $(RM) *.lib + - $(RM) _ptw32.h + - $(RM) pthread.h + - $(RM) semaphore.h + - $(RM) sched.h + - $(RM) *.a + - $(RM) *.e + - $(RM) *.i + - $(RM) *.o + - $(RM) *.s + - $(RM) *.so + - $(RM) *.obj + - $(RM) *.pdb + - $(RM) *.exe + - $(RM) *.manifest + - $(RM) *.pass + - $(RM) *.bench +# - $(RM) *.log + \ No newline at end of file diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index 94f6dbdb..1deb8e13 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -149,49 +149,49 @@ help: @ $(ECHO) "$(MAKE) clean GC TESTS="foo bar" (to build individual tests \"foo.c and bar.c\" with C and run using GC dll)" GC: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" allpassed GC-asm: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" all-asm + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" all-asm GC-bench: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" XXLIBS="benchlib.o" all-bench + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" all-bench GC-bench-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" XXLIBS="benchlib.o" OPT="${DOPT}" all-bench + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" OPT="${DOPT}" all-bench GC-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed GC-static GC-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed GC-static-debug GC-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed GCE: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__PTW32_CLEANUP_CXX" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__CLEANUP_CXX" allpassed GCE-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_CXX" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX" OPT="${DOPT}" allpassed GCE-static GCE-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_CXX -D__PTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed GCE-static-debug GCE-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_CXX -D__PTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed GCX: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__PTW32_CLEANUP_C" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__CLEANUP_C" allpassed GCX-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_C" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed GCX-static GCX-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed GCX-static-debug GCX-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed all-asm: $(ASM) @ $(ECHO) "ALL TESTS COMPILED TO ASSEMBLER CODE" From d0cdd2da5e2ae697b59c42862314925588aba25f Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 22 Dec 2016 09:45:48 +1100 Subject: [PATCH 110/207] Remove --- GNUmakefile | 355 ---------------------------------------------- tests/GNUmakefile | 258 --------------------------------- 2 files changed, 613 deletions(-) delete mode 100644 GNUmakefile delete mode 100644 tests/GNUmakefile diff --git a/GNUmakefile b/GNUmakefile deleted file mode 100644 index 31fb5d3c..00000000 --- a/GNUmakefile +++ /dev/null @@ -1,355 +0,0 @@ -# -# -------------------------------------------------------------------------- -# -# 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 -# - -DLL_VER = 2$(EXTRAVERSION) - -# See pthread.h and README for the description of version numbering. -DLL_VERD= $(DLL_VER)d - -DESTROOT = ../PTHREADS-BUILT -DEST_LIB_NAME = libpthread.a -DLLDEST = $(DESTROOT)/bin -LIBDEST = $(DESTROOT)/lib -HDRDEST = $(DESTROOT)/include - -# If Running MsysDTK -RM = rm -f -MV = mv -f -CP = cp -f -MKDIR = mkdir -p -ECHO = echo -TESTNDIR = test ! -d -TESTFILE = test -f -AND = && - -# If not. -#RM = erase -#MV = rename -#CP = copy -#MKDIR = mkdir -#ECHO = echo -#TESTNDIR = if exist -#TESTFILE = if exist -# AND = - -# For cross compiling use e.g. -# make CROSS=x86_64-w64-mingw32- clean GC-inlined -CROSS = - -# Override the builtin default C and C++ standards -#CSTD = -std=c90 -#CXXSTD = -std=c++90 - -AR = $(CROSS)ar -DLLTOOL = $(CROSS)dlltool -CC = $(CROSS)gcc $(CSTD) -CXX = $(CROSS)g++ $(CXXSTD) -RANLIB = $(CROSS)ranlib -RC = $(CROSS)windres -OD_PRIVATE = $(CROSS)objdump -p - -# Build for non-native architecture. E.g. "-m64" "-m32" etc. -# Not tested fully, needs gcc built with "--enable-multilib" -# Check your "gcc -v" output for the options used to build your gcc. -# You can set this as a shell variable or on the make comand line. -# You don't need to uncomment it here unless you want to hardwire -# a value. -#ARCH = - -# -# Look for targets that $(RC) (usually windres) supports then look at any object -# file just built to see which target the compiler used and set the $(RC) target -# to match it. -# -SUPPORTED_TARGETS = $(filter pe-% pei-% elf32-% elf64-% srec symbolsrec verilog tekhex binary ihex,$(shell $(RC) --help)) -RC_TARGET = --target $(firstword $(filter $(SUPPORTED_TARGETS),$(shell $(OD_PRIVATE) *.$(OBJEXT)))) - -OPT = $(CLEANUP) -O3 # -finline-functions -findirect-inlining -XOPT = - -RCFLAGS = --include-dir=. -LFLAGS = $(ARCH) -# Uncomment this if config.h defines RETAIN_WSALASTERROR -#LFLAGS += -lws2_32 -# -# Uncomment this next to link the GCC/C++ runtime libraries statically -# (Be sure to read about these options and their associated caveats -# at http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html) -# -# NOTE 1: Doing this appears to break GCE:pthread_cleanup_*(), which -# relies on C++ class destructors being called when leaving scope. -# -# NOTE 2: If you do this DO NOT distribute your pthreads DLLs with -# the official filenaming, i.e. pthreadVC2.dll, etc. Instead, change DLL_VER -# above to "2slgcc" for example, to build "pthreadGC2slgcc.dll", etc. -# -#LFLAGS += -static-libgcc -static-libstdc++ - -# ---------------------------------------------------------------------- -# The library can be built with some alternative behaviour to -# facilitate development of applications on Win32 that will be ported -# to other POSIX systems. Nothing definable here will make the library -# non-compliant, but applications that make assumptions that POSIX -# does not garrantee may fail or misbehave under some settings. -# -# PTW32_THREAD_ID_REUSE_INCREMENT -# Purpose: -# POSIX says that applications should assume that thread IDs can be -# recycled. However, Solaris and some other systems use a [very large] -# sequence number as the thread ID, which provides virtual uniqueness. -# Pthreads-win32 provides pseudo-unique IDs when the default increment -# (1) is used, but pthread_t is not a scalar type like Solaris's. -# -# Usage: -# Set to any value in the range: 0 <= value <= 2^wordsize -# -# Examples: -# Set to 0 to emulate non recycle-unique behaviour like Linux or *BSD. -# Set to 1 for recycle-unique thread IDs (this is the default). -# Set to some other +ve value to emulate smaller word size types -# (i.e. will wrap sooner). -# -#PTW32_FLAGS = "-DPTW32_THREAD_ID_REUSE_INCREMENT=0" -# -# ---------------------------------------------------------------------- - -GC_CFLAGS = $(PTW32_FLAGS) -GCE_CFLAGS = $(PTW32_FLAGS) -mthreads - -## Mingw -#MAKE ?= make -CFLAGS = $(OPT) $(XOPT) $(ARCH) -I. -DHAVE_CONFIG_H -Wall - -OBJEXT = o -RESEXT = o - -include common.mk - -DLL_OBJS += $(RESOURCE_OBJS) -STATIC_OBJS += $(RESOURCE_OBJS) - -GCE_DLL = pthreadGCE$(DLL_VER).dll -GCED_DLL= pthreadGCE$(DLL_VERD).dll -GCE_LIB = libpthreadGCE$(DLL_VER).a -GCED_LIB= libpthreadGCE$(DLL_VERD).a - -GC_DLL = pthreadGC$(DLL_VER).dll -GCD_DLL = pthreadGC$(DLL_VERD).dll -GC_LIB = libpthreadGC$(DLL_VER).a -GCD_LIB = libpthreadGC$(DLL_VERD).a -GC_INLINED_STATIC_STAMP = libpthreadGC$(DLL_VER).inlined_static_stamp -GCD_INLINED_STATIC_STAMP = libpthreadGC$(DLL_VERD).inlined_static_stamp -GCE_INLINED_STATIC_STAMP = libpthreadGCE$(DLL_VER).inlined_static_stamp -GCED_INLINED_STATIC_STAMP = libpthreadGCE$(DLL_VERD).inlined_static_stamp -GC_SMALL_STATIC_STAMP = libpthreadGC$(DLL_VER).small_static_stamp -GCD_SMALL_STATIC_STAMP = libpthreadGC$(DLL_VERD).small_static_stamp -GCE_SMALL_STATIC_STAMP = libpthreadGCE$(DLL_VER).small_static_stamp -GCED_SMALL_STATIC_STAMP = libpthreadGCE$(DLL_VERD).small_static_stamp - -PTHREAD_DEF = pthread.def - -help: - @ echo "Run one of the following command lines:" - @ echo "$(MAKE) clean all (build targets GC, GCE, GC-static, GCE-static)" - @ echo "$(MAKE) clean all-tests (build and test all non-debug targets below)" - @ echo "$(MAKE) clean GC (to build the GNU C dll with C cleanup code)" - @ echo "$(MAKE) clean GC-debug (to build the GNU C debug dll with C cleanup code)" - @ echo "$(MAKE) clean GCE (to build the GNU C dll with C++ exception handling)" - @ echo "$(MAKE) clean GCE-debug (to build the GNU C debug dll with C++ exception handling)" - @ echo "$(MAKE) clean GC-static (to build the GNU C static lib with C cleanup code)" - @ echo "$(MAKE) clean GC-static-debug (to build the GNU C static debug lib with C cleanup code)" - @ echo "$(MAKE) clean GCE-static (to build the GNU C++ static lib with C++ cleanup code)" - @ echo "$(MAKE) clean GCE-static-debug (to build the GNU C++ static debug lib with C++ cleanup code)" - @ echo "$(MAKE) clean GC-small-static (to build the GNU C static lib with C cleanup code)" - @ echo "$(MAKE) clean GC-small-static-debug (to build the GNU C static debug lib with C cleanup code)" - @ echo "$(MAKE) clean GCE-small-static (to build the GNU C++ static lib with C++ cleanup code)" - @ echo "$(MAKE) clean GCE-small-static-debug (to build the GNU C++ static debug lib with C++ cleanup code)" - -all: - @ $(MAKE) clean GC - @ $(MAKE) clean GCE - @ $(MAKE) clean GC-static - @ $(MAKE) clean GCE-static - -TEST_ENV = PTW32_FLAGS="$(PTW32_FLAGS) -DNO_ERROR_DIALOGS" DLL_VER=$(DLL_VER) ARCH="$(ARCH)" - -all-tests: - $(MAKE) realclean GC-small-static - cd tests && $(MAKE) clean GC-small-static $(TEST_ENV) && $(MAKE) clean GCX-small-static $(TEST_ENV) - $(MAKE) realclean GCE-small-static - cd tests && $(MAKE) clean GCE-small-static $(TEST_ENV) - @ $(ECHO) "$@ completed successfully." - $(MAKE) realclean GC - cd tests && $(MAKE) clean GC $(TEST_ENV) && $(MAKE) clean GCX $(TEST_ENV) - $(MAKE) realclean GCE - cd tests && $(MAKE) clean GCE $(TEST_ENV) - $(MAKE) realclean GC-static - cd tests && $(MAKE) clean GC-static $(TEST_ENV) && $(MAKE) clean GCX-static $(TEST_ENV) - $(MAKE) realclean GCE-static - cd tests && $(MAKE) clean GCE-static $(TEST_ENV) - $(MAKE) realclean - -all-tests-cflags: - $(MAKE) all-tests PTW32_FLAGS="-Wall -Wextra" - @ $(ECHO) "$@ completed successfully." - -GC: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL) - -GC-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_DLL) - -GCE: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL) - -GCE-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_CXX -g -O0" $(GCED_DLL) - -GC-static: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_INLINED_STATIC_STAMP) - -GC-static-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) - -GC-small-static: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GC_SMALL_STATIC_STAMP) - -GC-small-static-debug: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) - -GCE-static: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_INLINED_STATIC_STAMP) - -GCE-static-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) - -GCE-small-static: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_SMALL_STATIC_STAMP) - -GCE-small-static-debug: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC="$(CXX)" CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) - -tests: - @ cd tests - @ $(MAKE) auto - -# Very basic install. It assumes "realclean" was done just prior to build target if -# you want the installed $(DEVDEST_LIB_NAME) to match that build. -install: - -$(TESTNDIR) $(DLLDEST) $(AND) $(MKDIR) $(DLLDEST) - -$(TESTNDIR) $(LIBDEST) $(AND) $(MKDIR) $(LIBDEST) - -$(TESTNDIR) $(HDRDEST) $(AND) $(MKDIR) $(HDRDEST) - $(CP) _pth32.h $(HDRDEST) - $(CP) pthread.h $(HDRDEST) - $(CP) sched.h $(HDRDEST) - $(CP) semaphore.h $(HDRDEST) - -$(TESTFILE) pthreadGC$(DLL_VER).dll $(AND) $(CP) pthreadGC$(DLL_VER).dll $(DLLDEST) - -$(TESTFILE) pthreadGC$(DLL_VERD).dll $(AND) $(CP) pthreadGC$(DLL_VERD).dll $(DLLDEST) - -$(TESTFILE) pthreadGCE$(DLL_VER).dll $(AND) $(CP) pthreadGCE$(DLL_VER).dll $(DLLDEST) - -$(TESTFILE) pthreadGCE$(DLL_VERD).dll $(AND) $(CP) pthreadGCE$(DLL_VERD).dll $(DLLDEST) - # Only one of these can be installed, so run e.g. "make realclean GC install". - -$(TESTFILE) libpthreadGC$(DLL_VER).a $(AND) $(CP) libpthreadGC$(DLL_VER).a $(LIBDEST)/$(DEST_LIB_NAME) - -$(TESTFILE) libpthreadGC$(DLL_VERD).a $(AND) $(CP) libpthreadGC$(DLL_VERD).a $(LIBDEST)/$(DEST_LIB_NAME) - -$(TESTFILE) libpthreadGCE$(DLL_VER).a $(AND) $(CP) libpthreadGCE$(DLL_VER).a $(LIBDEST)/$(DEST_LIB_NAME) - -$(TESTFILE) libpthreadGCE$(DLL_VERD).a $(AND) $(CP) libpthreadGCE$(DLL_VERD).a $(LIBDEST)/$(DEST_LIB_NAME) - -%.pre: %.c - $(CC) -E -o $@ $(CFLAGS) $^ - -%.s: %.c - $(CC) -c $(CFLAGS) -DPTW32_BUILD_INLINED -Wa,-ahl $^ > $@ - -%.o: %.rc - $(RC) $(RC_TARGET) $(RCFLAGS) $(CLEANUP) -o $@ -i $< - -.SUFFIXES: .dll .rc .c .o - -.c.o:; $(CC) -c -o $@ $(CFLAGS) $(XC_FLAGS) $< - - -$(GC_DLL) $(GCD_DLL): $(DLL_OBJS) - $(CC) $(OPT) -shared -o $@ $^ $(LFLAGS) - $(DLLTOOL) -z pthread.def $^ - $(DLLTOOL) -k --dllname $@ --output-lib lib$(basename $@).a --def $(PTHREAD_DEF) - -$(GCE_DLL) $(GCED_DLL): $(DLL_OBJS) - $(CC) $(OPT) -mthreads -shared -o $@ $^ $(LFLAGS) - $(DLLTOOL) -z pthread.def $^ - $(DLLTOOL) -k --dllname $@ --output-lib lib$(basename $@).a --def $(PTHREAD_DEF) - -$(GC_INLINED_STATIC_STAMP) $(GCE_INLINED_STATIC_STAMP) $(GCD_INLINED_STATIC_STAMP) $(GCED_INLINED_STATIC_STAMP): $(DLL_OBJS) - $(RM) $(basename $@).a - $(AR) -rsv $(basename $@).a $^ - $(ECHO) touched > $@ - -$(GC_SMALL_STATIC_STAMP) $(GCE_SMALL_STATIC_STAMP) $(GCD_SMALL_STATIC_STAMP) $(GCED_SMALL_STATIC_STAMP): $(STATIC_OBJS) - $(RM) $(basename $@).a - $(AR) -rsv $(basename $@).a $^ - $(ECHO) touched > $@ - -clean: - -$(RM) *~ - -$(RM) *.i - -$(RM) *.s - -$(RM) *.o - -$(RM) *.obj - -$(RM) *.exe - -$(RM) *.manifest - -$(RM) $(PTHREAD_DEF) - -realclean: clean - -$(RM) lib*.a - -$(RM) *.lib - -$(RM) pthread*.dll - -$(RM) *_stamp - -$(RM) make.log.txt - -cd tests && $(MAKE) clean - -var_check_list = - -define var_check_target -var-check-$(1): - @for src in $($(1)); do \ - fgrep -q "\"$$$$src\"" $(2) && continue; \ - echo "$$$$src is in \$$$$($(1)), but not in $(2)"; \ - exit 1; \ - done - @grep '^# *include *".*\.c"' $(2) | cut -d'"' -f2 | while read src; do \ - echo " $($(1)) " | fgrep -q " $$$$src " && continue; \ - echo "$$$$src is in $(2), but not in \$$$$($(1))"; \ - exit 1; \ - done - @echo "$(1) <-> $(2): OK" - -var_check_list += var-check-$(1) -endef - -$(eval $(call var_check_target,PTHREAD_SRCS,pthread.c)) - -srcs-vars-check: $(var_check_list) diff --git a/tests/GNUmakefile b/tests/GNUmakefile deleted file mode 100644 index 43b147d7..00000000 --- a/tests/GNUmakefile +++ /dev/null @@ -1,258 +0,0 @@ -# Makefile for the pthreads test suite. -# If all of the .pass files can be created, the test suite has passed. -# -# -------------------------------------------------------------------------- -# -# 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 -# - -LOGFILE = testsuite.log - -DLL_VER = 2$(EXTRAVERSION) - -CP = cp -f -MV = mv -f -RM = rm -f -CAT = cat -MKDIR = mkdir -GREP = grep -WC = wc -TEE = tee -ECHO = echo -TOUCH = $(ECHO) Passed > -TESTFILE = test -f -TESTDIR = test -d -AND = && - -# For cross compiling use e.g. -# # make CROSS=i386-mingw32msvc- clean GC -CROSS = - -# Override the builtin default C and C++ standards -#CSTD = -std=c90 -#CXXSTD = -std=c++90 - -# For cross testing use e.g. -# # make RUN=wine CROSS=i386-mingw32msvc- clean GC -RUN = - -AR = $(CROSS)ar -DLLTOOL = $(CROSS)dlltool -CC = $(CROSS)gcc $(CSTD) -CXX = $(CROSS)g++ $(CXXSTD) -RANLIB = $(CROSS)ranlib - -# -# Mingw -# -XLIBS = -XXCFLAGS = -XXLIBS = -OPT = -O3 -DOPT = -g -O0 -CFLAGS = ${OPT} $(ARCH) -UNDEBUG -Wall -Wno-missing-braces $(XXCFLAGS) -LFLAGS = $(ARCH) $(XXLFLAGS) -# -# Uncomment this next to link the GCC/C++ runtime libraries statically -# (Be sure to read about these options and their associated caveats -# at http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html) -# -# NOTE 1: Doing this appears to break GCE:pthread_cleanup_*(), which -# relies on C++ class destructors being called when leaving scope. -# -# NOTE 2: If you do this DO NOT distribute your pthreads DLLs with -# the official filenaming, i.e. pthreadVC2.dll, etc. Instead, change DLL_VER -# above to "2slgcc" for example, to build "pthreadGC2slgcc.dll", etc. -# -#LFLAGS += -static-libgcc -static-libstdc++ -BUILD_DIR = .. -INCLUDES = -I. - -TEST = GC - -# Default lib version -GCX = GC$(DLL_VER) - -# Files we need to run the tests -# - paths are relative to pthreads build dir. -HDR = _ptw32.h pthread.h semaphore.h sched.h -LIB = libpthread$(GCX).a -DLL = pthread$(GCX).dll -# The next path is relative to $BUILD_DIR -QAPC = # ../QueueUserAPCEx/User/quserex.dll - -include common.mk - -.INTERMEDIATE: $(ALL_KNOWN_TESTS:%=%.exe) $(BENCHTESTS:%=%.exe) -.SECONDARY: $(ALL_KNOWN_TESTS:%=%.exe) $(ALL_KNOWN_TESTS:%=%.pass) $(BENCHTESTS:%=%.exe) $(BENCHTESTS:%=%.bench) -.PRECIOUS: $(ALL_KNOWN_TESTS:%=%.exe) $(ALL_KNOWN_TESTS:%=%.pass) $(BENCHTESTS:%=%.exe) $(BENCHTESTS:%=%.bench) - -ASM = $(ALL_KNOWN_TESTS:%=%.s) -TESTS = $(ALL_KNOWN_TESTS) -BENCHRESULTS = $(BENCHTESTS:%=%.bench) - -# -# To build and run "foo.exe" and "bar.exe" only use, e.g.: -# make clean GC NO_DEPS=1 TESTS="foo bar" -# -# To build and run "foo.exe" and "bar.exe" and run all prerequisite tests -# use, e.g.: -# make clean GC TESTS="foo bar" -# -# Set TESTS to one or more tests. -# -ifndef NO_DEPS -include runorder.mk -endif - -help: - @ $(ECHO) "Run one of the following command lines:" - @ $(ECHO) "$(MAKE) clean GC (to test using GC dll with C (no EH) applications)" - @ $(ECHO) "$(MAKE) clean GCX (to test using GC dll with C++ (EH) applications)" - @ $(ECHO) "$(MAKE) clean GCE (to test using GCE dll with C++ (EH) applications)" - @ $(ECHO) "$(MAKE) clean GC-bench (to benchtest using GNU C dll with C cleanup code)" - @ $(ECHO) "$(MAKE) clean GC-debug (to test using GC dll with C (no EH) applications)" - @ $(ECHO) "$(MAKE) clean GC-static (to test using GC static lib with C (no EH) applications)" - @ $(ECHO) "$(MAKE) clean GC-static-debug (to test using GC static lib with C (no EH) applications)" - @ $(ECHO) "$(MAKE) clean GCE-static (to test using GC static lib with C (no EH) applications)" - @ $(ECHO) "$(MAKE) clean GCE-static-debug (to test using GC static lib with C (no EH) applications)" - @ $(ECHO) "$(MAKE) clean GCE-debug (to test using GCE dll with C++ (EH) applications)" - @ $(ECHO) "$(MAKE) clean GCX-static (to test using GC static lib with C++ applications)" - @ $(ECHO) "$(MAKE) clean GCX-static-debug (to test using GC static lib with C++ applications)" - @ $(ECHO) "$(MAKE) clean GCX-debug (to test using GCE dll with C++ (EH) applications)" - @ $(ECHO) "$(MAKE) clean GC TESTS="foo bar" (to build individual tests \"foo.c and bar.c\" with C and run using GC dll)" - -GC: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" allpassed - -GC-asm: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" all-asm - -GC-bench: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" all-bench - -GC-bench-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" OPT="${DOPT}" all-bench - -GC-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed - -GC-static GC-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" DLL="" allpassed - -GC-static-debug GC-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CC)" XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" OPT="$(DOPT)" DLL="" allpassed - -GCE: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC="$(CXX)" XXCFLAGS="-mthreads -D__CLEANUP_CXX" allpassed - -GCE-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_CXX" OPT="${DOPT}" allpassed - -GCE-static GCE-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB" DLL="" allpassed - -GCE-static-debug GCE-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB" OPT="$(DOPT)" DLL="" allpassed - -GCX: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CXX)" XXCFLAGS="-mthreads -D__CLEANUP_C" allpassed - -GCX-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed - -GCX-static GCX-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" DLL="" allpassed - -GCX-static-debug GCX-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC="$(CXX)" XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB" OPT="$(DOPT)" DLL="" allpassed - -all-asm: $(ASM) - @ $(ECHO) "ALL TESTS PASSED! Congratulations!" - -allpassed: $(HDR) $(LIB) $(DLL) $(QAPC) $(TESTS:%=%.pass) - @ $(ECHO) "ALL TESTS COMPLETED. Check the logfile: $(LOGFILE)" - @ $(ECHO) "FAILURES: $$( $(GREP) FAILED $(LOGFILE) | $(WC) -l )" - @ - ! $(GREP) FAILED $(LOGFILE) - @ $(MV) $(LOGFILE) $(TEST)-$(LOGFILE) - -all-bench: $(HDR) $(LIB) $(DLL) $(QAPC) $(XXLIBS) $(BENCHRESULTS) - @ $(ECHO) "ALL BENCH TESTS COMPLETED. Check the logfile: $(LOGFILE)" - @ $(ECHO) "FAILURES: $$( $(GREP) FAILED $(LOGFILE) | $(WC) -l ) " - @ - ! $(GREP) FAILED $(LOGFILE) - @ $(MV) $(LOGFILE) $(TEST)-$(LOGFILE) - -cancel9.exe: XLIBS = -lws2_32 - -%.pass: %.exe - @ $(ECHO) Running $(TEST) test \"$*\" | $(TEE) -a $(LOGFILE) - @ $(RUN) ./$* && { $(ECHO) Passed; $(TOUCH) $@; } || { $(ECHO) FAILED: $* ; $(ECHO) ; } \ - 2>&1 | $(TEE) -a $(LOGFILE) - -%.bench: %.exe - @ $(ECHO) Running $(TEST) test \"$*\" | $(TEE) -a $(LOGFILE) - @ $(RUN) ./$* && { $(ECHO) Done; $(TOUCH) $@; } || { $(ECHO) FAILED ; $(ECHO) ; } \ - 2>&1 | $(TEE) -a $(LOGFILE) - -%.exe: %.c - $(CC) $(CFLAGS) $(LFLAGS) -o $@ $< $(INCLUDES) -L. -lpthread$(GCX) $(XLIBS) $(XXLIBS) - -%.pre: %.c $(HDR) - $(CC) -E $(CFLAGS) -o $@ $< $(INCLUDES) - -%.s: %.c $(HDR) - @ $(ECHO) Compiling $@ - $(CC) -S $(CFLAGS) -o $@ $< $(INCLUDES) - -$(HDR) $(LIB) $(DLL) $(QAPC): - @ $(ECHO) Copying $(BUILD_DIR)/$@ - @ $(TESTFILE) $(BUILD_DIR)/$@ $(AND) $(CP) $(BUILD_DIR)/$@ . - -benchlib.o: benchlib.c - @ $(ECHO) Compiling $@ - $(CC) -c $(CFLAGS) $< $(INCLUDES) - -clean: - - $(RM) *.dll - - $(RM) *.lib - - $(RM) _ptw32.h - - $(RM) pthread.h - - $(RM) semaphore.h - - $(RM) sched.h - - $(RM) *.a - - $(RM) *.e - - $(RM) *.i - - $(RM) *.o - - $(RM) *.s - - $(RM) *.so - - $(RM) *.obj - - $(RM) *.pdb - - $(RM) *.exe - - $(RM) *.manifest - - $(RM) *.pass - - $(RM) *.bench -# - $(RM) *.log - \ No newline at end of file From c637fd176767bbecf57d7d1e59e7d0066351592d Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 22 Dec 2016 12:40:45 +1100 Subject: [PATCH 111/207] Updates and minor reworking --- GNUmakefile.in | 6 +++--- README | 20 ++++++++++++++------ tests/GNUmakefile.in | 2 +- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/GNUmakefile.in b/GNUmakefile.in index a167e799..35a959f1 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -237,8 +237,9 @@ all-tests: cd tests && $(MAKE) clean GC-static $(TEST_ENV) && $(MAKE) clean GCX-static $(TEST_ENV) $(MAKE) realclean GCE-static cd tests && $(MAKE) clean GCE-static $(TEST_ENV) - @ $(GREP) FAILED *.log || $(GREP) Passed *.log | $(COUNT_UNIQ) - $(MAKE) clean + $(MAKE) realclean + @ $(GREP) Passed *.log | $(COUNT_UNIQ) + @ $(GREP) FAILED *.log all-tests-cflags: $(MAKE) all-tests __PTW32_FLAGS="-Wall -Wextra" @@ -377,7 +378,6 @@ realclean: clean -$(RM) pthread*.dll -$(RM) *_stamp -$(RM) make.log.txt - -$(RM) *.log -cd tests && $(MAKE) realclean var_check_list = diff --git a/README b/README index 05b1353c..958f645e 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ -PTHREADS-WIN32 -============== +PTHREADS-WIN32 (A.K.A. PTHREADS4W) +================================== Pthreads-win32 is free software, distributed under the GNU Lesser General Public License (LGPL). See the file 'COPYING.LIB' for terms @@ -26,7 +26,7 @@ routines. Prerequisites ------------- -MSVC or GNU C (MinGW32 or MinGW64 MSys development kit) +MSVC or GNU C (MinGW or MinGW64 with AutoConf Tools) To build from source. QueueUserAPCEx by Panagiotis E. Hadjidoukas @@ -417,16 +417,24 @@ Building with MinGW NOTE: All building and testing is done using makefiles. We use the native make system for each toolchain, which is 'make' in this case. -We have found that Mingw32 builds of the GCE library variants fail when run -on 64 bit systems. The GC variants are fine. +We have found that Mingw builds of the GCE library variants can fail when +run on 64 bit systems, believed to be due to the DWARF2 exception handling +being a 32 bit mechanism. The GC variants are fine. MinGW64 offers +SJLJ or SEH exception handling so choose one of those. From the source directory: run 'autoheader' to rewrite the config.h file run 'autoconf' to rewrite the GNUmakefiles (library and tests) +run './configure' to create config.h and GNUmakefile. run 'make' without arguments to list possible targets. -$ make +E.g. + +$ autoheader +$ autoconf +$ ./configure +$ make realclean all-tests With MinGW64 multilib installed the following variables can be defined either on the make command line or in the shell environment: diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index 1deb8e13..afce9fd2 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -206,7 +206,7 @@ all-bench: $(HDR) $(LIB) $(DLL) $(QAPC) $(XXLIBS) $(BENCHRESULTS) @ $(ECHO) "ALL BENCH TESTS COMPLETED. Check the logfile: $(LOGFILE)" @ $(ECHO) "FAILURES: $$( $(GREP) FAILED $(LOGFILE) | $(WC) -l ) " @ - ! $(GREP) FAILED $(LOGFILE) - @ $(MV) $(LOGFILE) $(TEST)-$(LOGFILE) + @ $(MV) $(LOGFILE) ../$(TEST)-$(LOGFILE) cancel9.exe: XLIBS = -lws2_32 From 1b259b40b41567874f3c32d4e63d0c6cbe836e0a Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 22 Dec 2016 16:42:17 +1100 Subject: [PATCH 112/207] Apply selected changes from version 2.11 --- GNUmakefile.in | 6 +++--- README | 22 +++++++++++++++------- tests/GNUmakefile.in | 2 +- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/GNUmakefile.in b/GNUmakefile.in index 94129d10..498ce45d 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -237,9 +237,9 @@ all-tests: cd tests && $(MAKE) clean GC-static $(TEST_ENV) && $(MAKE) clean GCX-static $(TEST_ENV) $(MAKE) realclean GCE-static cd tests && $(MAKE) clean GCE-static $(TEST_ENV) - @ $(GREP) FAILED *.log || $(GREP) Passed *.log | $(COUNT_UNIQ) - $(MAKE) clean - @ $(RM) *.log + $(MAKE) realclean + @ $(GREP) Passed *.log | $(COUNT_UNIQ) + @ $(GREP) FAILED *.log all-tests-cflags: $(MAKE) all-tests __PTW32_FLAGS="-Wall -Wextra" diff --git a/README b/README index e700c2da..132e173a 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ -PTHREADS-WIN32 -============== +PTHREADS-WIN32 (A.K.A. PTHREADS4W) +================================== Pthreads-win32 is free software, distributed under the GNU Lesser General Public License (LGPL). See the file 'COPYING.LIB' for terms @@ -26,7 +26,7 @@ routines. Prerequisites ------------- -MSVC or GNU C (MinGW32 or MinGW64 MSys development kit) +MSVC or GNU C (MinGW or MinGW64 with AutoConf Tools) To build from source. QueueUserAPCEx by Panagiotis E. Hadjidoukas @@ -242,7 +242,7 @@ Other name changes All snapshots prior to and including snapshot 2000-08-13 used "_pthread_" as the prefix to library internal functions, and "_PTHREAD_" to many library internal -macros. These have now been changed to "__ptw32_" and "PTW32_" +macros. These have now been changed to "__ptw32_" and "__PTW32_" respectively so as to not conflict with the ANSI standard's reservation of identifiers beginning with "_" and "__" for use by compiler implementations only. @@ -417,16 +417,24 @@ Building with MinGW NOTE: All building and testing is done using makefiles. We use the native make system for each toolchain, which is 'make' in this case. -We have found that Mingw32 builds of the GCE library variants fail when run -on 64 bit systems. The GC variants are fine. +We have found that Mingw builds of the GCE library variants can fail when +run on 64 bit systems, believed to be due to the DWARF2 exception handling +being a 32 bit mechanism. The GC variants are fine. MinGW64 offers +SJLJ or SEH exception handling so choose one of those. From the source directory: run 'autoheader' to rewrite the config.h file run 'autoconf' to rewrite the GNUmakefiles (library and tests) +run './configure' to create config.h and GNUmakefile. run 'make' without arguments to list possible targets. -$ make +E.g. + +$ autoheader +$ autoconf +$ ./configure +$ make realclean all-tests With MinGW64 multilib installed the following variables can be defined either on the make command line or in the shell environment: diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index 94f6dbdb..66f85170 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -206,7 +206,7 @@ all-bench: $(HDR) $(LIB) $(DLL) $(QAPC) $(XXLIBS) $(BENCHRESULTS) @ $(ECHO) "ALL BENCH TESTS COMPLETED. Check the logfile: $(LOGFILE)" @ $(ECHO) "FAILURES: $$( $(GREP) FAILED $(LOGFILE) | $(WC) -l ) " @ - ! $(GREP) FAILED $(LOGFILE) - @ $(MV) $(LOGFILE) $(TEST)-$(LOGFILE) + @ $(MV) $(LOGFILE) ../$(TEST)-$(LOGFILE) cancel9.exe: XLIBS = -lws2_32 From 9c9fca91fa2eeba508843b7b643c8a720bf0613f Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 22 Dec 2016 19:34:07 +1100 Subject: [PATCH 113/207] Ignore errors when grep does not match anything --- GNUmakefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GNUmakefile.in b/GNUmakefile.in index 498ce45d..1b31d68f 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -238,8 +238,8 @@ all-tests: $(MAKE) realclean GCE-static cd tests && $(MAKE) clean GCE-static $(TEST_ENV) $(MAKE) realclean - @ $(GREP) Passed *.log | $(COUNT_UNIQ) - @ $(GREP) FAILED *.log + @ - $(GREP) Passed *.log | $(COUNT_UNIQ) + @ - $(GREP) FAILED *.log all-tests-cflags: $(MAKE) all-tests __PTW32_FLAGS="-Wall -Wextra" From 062c8e135da004df6bbfe574fd4e0689b2a15e7e Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 22 Dec 2016 19:36:07 +1100 Subject: [PATCH 114/207] Ignore grep errors --- GNUmakefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GNUmakefile.in b/GNUmakefile.in index 35a959f1..a1692d9b 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -238,8 +238,8 @@ all-tests: $(MAKE) realclean GCE-static cd tests && $(MAKE) clean GCE-static $(TEST_ENV) $(MAKE) realclean - @ $(GREP) Passed *.log | $(COUNT_UNIQ) - @ $(GREP) FAILED *.log + @ - $(GREP) Passed *.log | $(COUNT_UNIQ) + @ - $(GREP) FAILED *.log all-tests-cflags: $(MAKE) all-tests __PTW32_FLAGS="-Wall -Wextra" From 4ee3af1d50f1fcc046155a18f41fd3c65b0d91ee Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 26 Dec 2016 11:47:04 +1100 Subject: [PATCH 115/207] Change to LGPLv3 - initial --- COPYING | 27 ++- COPYING.FSF | 657 +++++++++++++--------------------------------------- _ptw32.h | 30 ++- 3 files changed, 186 insertions(+), 528 deletions(-) diff --git a/COPYING b/COPYING index b63ae7dd..a186f3de 100644 --- a/COPYING +++ b/COPYING @@ -6,7 +6,7 @@ This file is Copyrighted This file is covered under the following Copyright: - Copyright (C) 2001,2012 Ross P. Johnson + Copyright (C) 2001-2017 Ross P. Johnson All rights reserved. Everyone is permitted to copy and distribute verbatim copies @@ -17,7 +17,7 @@ Pthreads-win32 is covered by the GNU Lesser General Public License Pthreads-win32 is open software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License - as published by the Free Software Foundation version 2.1 of the + as published by the Free Software Foundation version 3 of the License. Pthreads-win32 is several binary link libraries, several modules, @@ -34,7 +34,7 @@ Pthreads-win32 is covered by the GNU Lesser General Public License COPYING.FSF - You should have received a copy of the version 2.1 GNU Lesser General + You should have received a copy of the version 3 GNU Lesser General Public License with pthreads-win32; if not, write to: Free Software Foundation, Inc. @@ -45,8 +45,7 @@ Pthreads-win32 is covered by the GNU Lesser General Public License The contact addresses for pthreads-win32 is as follows: - Homepage1: http://sourceware.org/pthreads-win32/ - Homepage2: http://sourceforge.net/projects/pthreads4w/ + Homepage: http://sourceforge.net/projects/pthreads4w/ Email: Ross Johnson Please use: Firstname.Lastname@homemail.com.au @@ -61,7 +60,7 @@ Pthreads-win32 copyrights and exception files Pthreads-win32 - POSIX Threads Library for Win32 Copyright(C) 1998 John E. Bossom - Copyright(C) 1999,2006 Pthreads-win32 contributors + Copyright(C) 1999,2017 Pthreads-win32 contributors The current list of contributors is contained in the file CONTRIBUTORS included with the source @@ -75,22 +74,23 @@ Pthreads-win32 copyrights and exception files These files are not covered under one of the Copyrights listed above: COPYING - COPYING.LIB + COPYING.FSF tests/rwlock7.c + tests/rwlock8.c tests/threestage.c This file, COPYING, is distributed under the Copyright found at the top of this file. It is important to note that you may distribute verbatim copies of this file but you may not modify this file. - The file COPYING.LIB, which contains a copy of the version 2.1 + The file COPYING.FSF, which contains a copy of the version 3 GNU Lesser General Public License, is itself copyrighted by the Free Software Foundation, Inc. Please note that the Free Software Foundation, Inc. does NOT have a copyright over Pthreads-win32, - only the COPYING.LIB that is supplied with pthreads-win32. + only the COPYING.FSF that is supplied with pthreads-win32. - The file tests/rwlock7.c is derived from code written by - Dave Butenhof for his book 'Programming With POSIX(R) Threads'. + The file tests/rwlock7.c and tests/rwlock8.c are derived from code + written by Dave Butenhof for his book 'Programming With POSIX(R) Threads'. The original code was obtained by free download from his website http://home.earthlink.net/~anneart/family/Threads/source.html and did not contain a copyright or author notice. It is assumed to @@ -101,7 +101,6 @@ Pthreads-win32 copyrights and exception files entire pthreads-win32 source may be freely used and distributed. - General Copyleft and License info --------------------------------- @@ -115,8 +114,8 @@ General Copyleft and License info http://www.gnu.org/copyleft/lesser.txt -Why pthreads-win32 did not use the GNU General Public License -------------------------------------------------------------- +Why pthreads-win32 did not use the GNU Lesser General Public License +-------------------------------------------------------------------- The goal of the pthreads-win32 project has been to provide a quality and complete implementation of the POSIX diff --git a/COPYING.FSF b/COPYING.FSF index b1e3f5a2..02bbb60b 100644 --- a/COPYING.FSF +++ b/COPYING.FSF @@ -1,504 +1,165 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it 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. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - 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 - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. \ No newline at end of file diff --git a/_ptw32.h b/_ptw32.h index 86f3e506..c82741aa 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -9,32 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2012, 2016, Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifndef __PTW32_H #define __PTW32_H From 708784c391d3e2fa91fe0c0bdef3f7063159ca81 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 26 Dec 2016 19:16:51 +1100 Subject: [PATCH 116/207] LGPLv3 changes --- ANNOUNCE | 88 -- GNUmakefile.in | 38 +- NEWS | 10 + README.NONPORTABLE | 1720 +++++++++++++++--------------- _ptw32.h | 199 ---- aclocal.m4 | 38 +- cleanup.c | 37 +- configure.ac | 50 +- context.h | 37 +- create.c | 31 +- dll.c | 31 +- errno.c | 31 +- global.c | 31 +- implement.h | 30 +- pthread.c | 31 +- pthread.h | 37 +- pthread_attr_destroy.c | 37 +- pthread_attr_getaffinity_np.c | 37 +- pthread_attr_getdetachstate.c | 37 +- pthread_attr_getinheritsched.c | 37 +- pthread_attr_getname_np.c | 107 +- pthread_attr_getschedparam.c | 37 +- pthread_attr_getschedpolicy.c | 37 +- pthread_attr_getscope.c | 37 +- pthread_attr_getstackaddr.c | 31 +- pthread_attr_getstacksize.c | 31 +- pthread_attr_init.c | 31 +- pthread_attr_setaffinity_np.c | 37 +- pthread_attr_setdetachstate.c | 37 +- pthread_attr_setinheritsched.c | 37 +- pthread_attr_setname_np.c | 197 ++-- pthread_attr_setschedparam.c | 37 +- pthread_attr_setschedpolicy.c | 37 +- pthread_attr_setscope.c | 37 +- pthread_attr_setstackaddr.c | 31 +- pthread_attr_setstacksize.c | 31 +- pthread_barrier_destroy.c | 37 +- pthread_barrier_init.c | 37 +- pthread_barrier_wait.c | 37 +- pthread_barrierattr_destroy.c | 37 +- pthread_barrierattr_getpshared.c | 37 +- pthread_barrierattr_init.c | 37 +- pthread_barrierattr_setpshared.c | 37 +- pthread_cancel.c | 31 +- pthread_cond_destroy.c | 37 +- pthread_cond_init.c | 37 +- pthread_cond_signal.c | 37 +- pthread_cond_wait.c | 37 +- pthread_condattr_destroy.c | 37 +- pthread_condattr_getpshared.c | 37 +- pthread_condattr_init.c | 37 +- pthread_condattr_setpshared.c | 37 +- pthread_delay_np.c | 37 +- pthread_detach.c | 37 +- pthread_equal.c | 37 +- pthread_exit.c | 37 +- pthread_getconcurrency.c | 37 +- pthread_getname_np.c | 31 +- pthread_getschedparam.c | 31 +- pthread_getspecific.c | 37 +- pthread_getunique_np.c | 37 +- pthread_getw32threadhandle_np.c | 37 +- pthread_join.c | 37 +- pthread_key_create.c | 37 +- pthread_key_delete.c | 31 +- pthread_kill.c | 37 +- pthread_mutex_consistent.c | 37 +- pthread_mutex_destroy.c | 37 +- pthread_mutex_init.c | 31 +- pthread_mutex_lock.c | 37 +- pthread_mutex_timedlock.c | 37 +- pthread_mutex_trylock.c | 37 +- pthread_mutex_unlock.c | 37 +- pthread_mutexattr_destroy.c | 37 +- pthread_mutexattr_getkind_np.c | 37 +- pthread_mutexattr_getpshared.c | 37 +- pthread_mutexattr_getrobust.c | 37 +- pthread_mutexattr_gettype.c | 37 +- pthread_mutexattr_init.c | 37 +- pthread_mutexattr_setkind_np.c | 37 +- pthread_mutexattr_setpshared.c | 37 +- pthread_mutexattr_setrobust.c | 37 +- pthread_mutexattr_settype.c | 37 +- pthread_num_processors_np.c | 37 +- pthread_once.c | 37 +- pthread_rwlock_destroy.c | 37 +- pthread_rwlock_init.c | 37 +- pthread_rwlock_rdlock.c | 37 +- pthread_rwlock_timedrdlock.c | 37 +- pthread_rwlock_timedwrlock.c | 37 +- pthread_rwlock_tryrdlock.c | 37 +- pthread_rwlock_trywrlock.c | 37 +- pthread_rwlock_unlock.c | 37 +- pthread_rwlock_wrlock.c | 37 +- pthread_rwlockattr_destroy.c | 37 +- pthread_rwlockattr_getpshared.c | 37 +- pthread_rwlockattr_init.c | 37 +- pthread_rwlockattr_setpshared.c | 37 +- pthread_self.c | 31 +- pthread_setaffinity.c | 485 +++++---- pthread_setcancelstate.c | 37 +- pthread_setcanceltype.c | 37 +- pthread_setconcurrency.c | 37 +- pthread_setname_np.c | 31 +- pthread_setschedparam.c | 31 +- pthread_setspecific.c | 37 +- pthread_spin_destroy.c | 37 +- pthread_spin_init.c | 37 +- pthread_spin_lock.c | 37 +- pthread_spin_trylock.c | 37 +- pthread_spin_unlock.c | 37 +- pthread_testcancel.c | 37 +- pthread_timechange_handler_np.c | 37 +- pthread_timedjoin_np.c | 375 ++++--- pthread_tryjoin_np.c | 345 +++--- pthread_win32_attach_detach_np.c | 31 +- ptw32_MCS_lock.c | 31 +- ptw32_callUserDestroyRoutines.c | 37 +- ptw32_calloc.c | 37 +- ptw32_cond_check_need_init.c | 37 +- ptw32_getprocessors.c | 37 +- ptw32_is_attr.c | 37 +- ptw32_mutex_check_need_init.c | 37 +- ptw32_new.c | 31 +- ptw32_processInitialize.c | 31 +- ptw32_processTerminate.c | 37 +- ptw32_relmillisecs.c | 31 +- ptw32_reuse.c | 37 +- ptw32_rwlock_cancelwrwait.c | 37 +- ptw32_rwlock_check_need_init.c | 37 +- ptw32_semwait.c | 31 +- ptw32_spinlock_check_need_init.c | 37 +- ptw32_threadDestroy.c | 37 +- ptw32_threadStart.c | 31 +- ptw32_throw.c | 37 +- ptw32_timespec.c | 31 +- ptw32_tkAssocCreate.c | 37 +- ptw32_tkAssocDestroy.c | 37 +- sched.h | 31 +- sched_get_priority_max.c | 37 +- sched_get_priority_min.c | 37 +- sched_getscheduler.c | 37 +- sched_setaffinity.c | 703 ++++++------ sched_setscheduler.c | 37 +- sched_yield.c | 37 +- sem_close.c | 37 +- sem_destroy.c | 37 +- sem_getvalue.c | 37 +- sem_init.c | 37 +- sem_open.c | 37 +- sem_post.c | 37 +- sem_post_multiple.c | 37 +- sem_timedwait.c | 37 +- sem_trywait.c | 37 +- sem_unlink.c | 37 +- sem_wait.c | 37 +- semaphore.h | 31 +- signal.c | 37 +- tests/GNUmakefile.in | 38 +- tests/affinity1.c | 251 +++-- tests/affinity2.c | 233 ++-- tests/affinity3.c | 239 +++-- tests/affinity4.c | 181 ++-- tests/affinity5.c | 247 +++-- tests/affinity6.c | 237 ++-- tests/barrier1.c | 37 +- tests/barrier2.c | 37 +- tests/barrier3.c | 37 +- tests/barrier4.c | 37 +- tests/barrier5.c | 37 +- tests/barrier6.c | 37 +- tests/benchlib.c | 37 +- tests/benchtest.h | 37 +- tests/benchtest1.c | 37 +- tests/benchtest2.c | 37 +- tests/benchtest3.c | 37 +- tests/benchtest4.c | 37 +- tests/benchtest5.c | 37 +- tests/cancel1.c | 37 +- tests/cancel2.c | 37 +- tests/cancel3.c | 37 +- tests/cancel4.c | 37 +- tests/cancel5.c | 37 +- tests/cancel6a.c | 37 +- tests/cancel6d.c | 37 +- tests/cancel7.c | 37 +- tests/cancel8.c | 37 +- tests/cancel9.c | 37 +- tests/cleanup0.c | 37 +- tests/cleanup1.c | 37 +- tests/cleanup2.c | 37 +- tests/cleanup3.c | 37 +- tests/condvar1.c | 37 +- tests/condvar1_1.c | 37 +- tests/condvar1_2.c | 37 +- tests/condvar2.c | 37 +- tests/condvar2_1.c | 37 +- tests/condvar3.c | 37 +- tests/condvar3_1.c | 37 +- tests/condvar3_2.c | 37 +- tests/condvar3_3.c | 37 +- tests/condvar4.c | 37 +- tests/condvar5.c | 37 +- tests/condvar6.c | 37 +- tests/condvar7.c | 37 +- tests/condvar8.c | 37 +- tests/condvar9.c | 37 +- tests/context1.c | 37 +- tests/context2.c | 318 +++--- tests/count1.c | 37 +- tests/create1.c | 37 +- tests/create2.c | 37 +- tests/create3.c | 37 +- tests/delay1.c | 37 +- tests/delay2.c | 37 +- tests/detach1.c | 37 +- tests/equal1.c | 37 +- tests/errno1.c | 37 +- tests/exception1.c | 31 +- tests/exception2.c | 37 +- tests/exception3.c | 37 +- tests/exception3_0.c | 379 ++++--- tests/exit1.c | 37 +- tests/exit2.c | 37 +- tests/exit3.c | 37 +- tests/exit4.c | 37 +- tests/exit5.c | 37 +- tests/eyal1.c | 37 +- tests/inherit1.c | 37 +- tests/join0.c | 37 +- tests/join1.c | 37 +- tests/join2.c | 37 +- tests/join3.c | 37 +- tests/join4.c | 161 ++- tests/kill1.c | 37 +- tests/mutex1.c | 37 +- tests/mutex1e.c | 37 +- tests/mutex1n.c | 37 +- tests/mutex1r.c | 37 +- tests/mutex2.c | 37 +- tests/mutex2e.c | 37 +- tests/mutex2r.c | 37 +- tests/mutex3.c | 37 +- tests/mutex3e.c | 37 +- tests/mutex3r.c | 37 +- tests/mutex4.c | 37 +- tests/mutex5.c | 37 +- tests/mutex6.c | 37 +- tests/mutex6e.c | 37 +- tests/mutex6es.c | 37 +- tests/mutex6n.c | 37 +- tests/mutex6r.c | 37 +- tests/mutex6rs.c | 37 +- tests/mutex6s.c | 37 +- tests/mutex7.c | 37 +- tests/mutex7e.c | 37 +- tests/mutex7n.c | 37 +- tests/mutex7r.c | 37 +- tests/mutex8.c | 37 +- tests/mutex8e.c | 37 +- tests/mutex8n.c | 37 +- tests/mutex8r.c | 37 +- tests/name_np1.c | 31 +- tests/name_np2.c | 219 ++-- tests/once1.c | 37 +- tests/once2.c | 37 +- tests/once3.c | 37 +- tests/once4.c | 37 +- tests/priority1.c | 37 +- tests/priority2.c | 37 +- tests/reuse1.c | 37 +- tests/reuse2.c | 37 +- tests/robust1.c | 37 +- tests/robust2.c | 37 +- tests/robust3.c | 37 +- tests/robust4.c | 37 +- tests/robust5.c | 37 +- tests/rwlock1.c | 37 +- tests/rwlock2.c | 37 +- tests/rwlock2_t.c | 37 +- tests/rwlock3.c | 37 +- tests/rwlock3_t.c | 37 +- tests/rwlock4.c | 37 +- tests/rwlock4_t.c | 37 +- tests/rwlock5.c | 37 +- tests/rwlock5_t.c | 37 +- tests/rwlock6.c | 37 +- tests/rwlock6_t.c | 37 +- tests/rwlock6_t2.c | 37 +- tests/self1.c | 37 +- tests/self2.c | 37 +- tests/semaphore1.c | 37 +- tests/semaphore2.c | 37 +- tests/semaphore3.c | 37 +- tests/semaphore4.c | 37 +- tests/semaphore4t.c | 37 +- tests/semaphore5.c | 37 +- tests/sequence1.c | 37 +- tests/spin1.c | 37 +- tests/spin2.c | 37 +- tests/spin3.c | 37 +- tests/spin4.c | 37 +- tests/stress1.c | 37 +- tests/test.h | 31 +- tests/threestage.c | 1166 ++++++++++---------- tests/timeouts.c | 503 +++++---- tests/tryentercs.c | 37 +- tests/tryentercs2.c | 37 +- tests/tsd1.c | 37 +- tests/tsd2.c | 37 +- tests/tsd3.c | 37 +- tests/valid1.c | 37 +- tests/valid2.c | 37 +- version.rc | 37 +- w32_CancelableWait.c | 37 +- 315 files changed, 9251 insertions(+), 9776 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 5e7ab174..611fea67 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,11 +1,8 @@ PTHREADS4W RELEASE 2.10.0 (2016-09-18) -------------------------------------- Web Site: http://sourceforge.net/projects/pthreads4w/ - http://sourceware.org/pthreads-win32/ Repository: http://sourceforge.net/p/pthreads4w/code - https://sourceware.org/cgi-bin/cvsweb.cgi/pthreads/?cvsroot=pthreads-win32 Releases: http://sourceforge.net/projects/pthreads4w/files - ftp://sourceware.org/pub/pthreads-win32 Maintainer: Ross Johnson @@ -408,88 +405,11 @@ The following functions are not implemented: rand_r -Availability ------------- - -The prebuilt DLL, export libs (for both MSVC and Mingw32), and the header -files (pthread.h, semaphore.h, sched.h) are available along with the -complete source code. - -The source code can be found at: - - ftp://sources.redhat.com/pub/pthreads-win32 - -and as individual source code files at - - ftp://sources.redhat.com/pub/pthreads-win32/source - -The pre-built DLL, export libraries and include files can be found at: - - ftp://sources.redhat.com/pub/pthreads-win32/dll-latest - - - -Mailing List ------------- - -There is a mailing list for discussing pthreads on Win32. To join, -send email to: - - pthreads-win32-subscribe@sourceware.cygnus.com - - Application Development Environments ------------------------------------ See the README file for more information. -MSVC: -MSVC using SEH works. Distribute pthreadVSE.dll with your application. -MSVC using C++ EH works. Distribute pthreadVCE.dll with your application. -MSVC using C setjmp/longjmp works. Distribute pthreadVC.dll with your application. - - -Mingw32: -See the FAQ, Questions 6 and 10. - -Mingw using C++ EH works. Distribute pthreadGCE.dll with your application. -Mingw using C setjmp/longjmp works. Distribute pthreadGC.dll with your application. - - -Cygwin: (http://sourceware.cygnus.com/cygwin/) -Developers using Cygwin do not need pthreads-win32 since it has POSIX threads -support. Refer to its documentation for details and extent. - - -UWIN: -UWIN is a complete Unix-like environment for Windows from AT&T. Pthreads-win32 -doesn't currently support UWIN (and vice versa), but that may change in the -future. - -Generally: -For convenience, the following pre-built files are available on the FTP site -(see Availability above): - - pthread.h - for POSIX threads - semaphore.h - for POSIX semaphores - sched.h - for POSIX scheduling - pthreadVCE.dll - built with MSVC++ compiler using C++ EH - pthreadVCE.lib - pthreadVC.dll - built with MSVC compiler using C setjmp/longjmp - pthreadVC.lib - pthreadVSE.dll - built with MSVC compiler using SEH - pthreadVSE.lib - pthreadGCE.dll - built with Mingw32 G++ 2.95.2-1 - pthreadGC.dll - built with Mingw32 GCC 2.95.2-1 using setjmp/longjmp - libpthreadGCE.a - derived from pthreadGCE.dll - libpthreadGC.a - derived from pthreadGC.dll - gcc.dll - needed if distributing applications that use - pthreadGCE.dll (but see the FAQ Q 10 for the latest - related information) - -These are the only files you need in order to build POSIX threads -applications for Win32 using either MSVC or Mingw32. - See the FAQ file in the source tree for additional information. @@ -512,14 +432,6 @@ available: By Bradford Nichols, Dick Buttlar & Jacqueline Proulx Farrell O'Reilly (pub) -On the web: see the links at the bottom of the pthreads-win32 site: - - http://sources.redhat.com/pthreads-win32/ - - Currently, there is no documentation included in the package apart - from the copious comments in the source code. - - Enjoy! diff --git a/GNUmakefile.in b/GNUmakefile.in index a1692d9b..4f399ee5 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -3,28 +3,30 @@ # # Pthreads-win32 - POSIX Threads Library for Win32 # Copyright(C) 1998 John E. Bossom -# Copyright(C) 1999,2012 Pthreads-win32 contributors -# +# Copyright(C) 1999-2017, Pthreads-win32 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: -# http://sources.redhat.com/pthreads-win32/contributors.html -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library in the file COPYING.LIB; -# if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# https://sourceforge.net/p/pthreads4w/wiki/Contributors/ +# +# This file is part of Pthreads-win32. +# +# Pthreads-win32 is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Pthreads-win32 is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Pthreads-win32. If not, see . * # PACKAGE = @PACKAGE_TARNAME@ VERSION = @PACKAGE_VERSION@ diff --git a/NEWS b/NEWS index f02316a5..25b0cbd5 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,16 @@ New bug fixes in all releases since 2.8.0 have NOT been applied to the Some changes from 2011-02-26 onward may not be compatible with pre Windows 2000 systems. +License Change +-------------- +Pthreads-win32 version 2.11.0 is being release under the Lesser GNU +Public License version 3 (LGPLv3). + +The next major version of this software (version 3) will be released +under the Apache License version 2.0 and this release 2.11 under +LGPLv3 will mean that modifications to version 3 of this software can +also be backported to version 2 going forward. + Testing and verification ------------------------ This version has been tested on SMP architecture (Intel x64 Hex Core) diff --git a/README.NONPORTABLE b/README.NONPORTABLE index 174f3d13..6a72f8f6 100644 --- a/README.NONPORTABLE +++ b/README.NONPORTABLE @@ -1,860 +1,860 @@ -This file documents non-portable functions and other issues. - -Non-portable functions included in pthreads-win32 -------------------------------------------------- - -BOOL -pthread_win32_test_features_np(int mask) - - This routine allows an application to check which - run-time auto-detected features are available within - the library. - - The possible features are: - - PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE - Return TRUE if the native version of - InterlockedCompareExchange() is being used. - This feature is not meaningful in recent - library versions as MSVC builds only support - system implemented ICE. Note that all Mingw - builds use inlined asm versions of all the - Interlocked routines. - PTW32_ALERTABLE_ASYNC_CANCEL - Return TRUE is the QueueUserAPCEx package - QUSEREX.DLL is available and the AlertDrv.sys - driver is loaded into Windows, providing - alertable (pre-emptive) asyncronous threads - cancellation. If this feature returns FALSE - then the default async cancel scheme is in - use, which cannot cancel blocked threads. - - Features may be Or'ed into the mask parameter, in which case - the routine returns TRUE if any of the Or'ed features would - return TRUE. At this stage it doesn't make sense to Or features - but it may some day. - - -void * -pthread_timechange_handler_np(void *) - - To improve tolerance against operator or time service - initiated system clock changes. - - This routine can be called by an application when it - receives a WM_TIMECHANGE message from the system. At - present it broadcasts all condition variables so that - waiting threads can wake up and re-evaluate their - conditions and restart their timed waits if required. - - It has the same return type and argument type as a - thread routine so that it may be called directly - through pthread_create(), i.e. as a separate thread. - - Parameters - - Although a parameter must be supplied, it is ignored. - The value NULL can be used. - - Return values - - It can return an error EAGAIN to indicate that not - all condition variables were broadcast for some reason. - Otherwise, 0 is returned. - - If run as a thread, the return value is returned - through pthread_join(). - - The return value should be cast to an integer. - - -HANDLE -pthread_getw32threadhandle_np(pthread_t thread); - - Returns the win32 thread handle that the POSIX - thread "thread" is running as. - - Applications can use the win32 handle to set - win32 specific attributes of the thread. - -DWORD -pthread_getw32threadid_np (pthread_t thread) - - Returns the Windows native thread ID that the POSIX - thread "thread" is running as. - - Only valid when the library is built where - ! (defined(__MINGW64__) || defined(__MINGW32__)) || defined (__MSVCRT__) || defined (__DMC__) - and otherwise returns 0. - - -int -pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, int kind) - -int -pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, int *kind) - - These two routines are included for Linux compatibility - and are direct equivalents to the standard routines - pthread_mutexattr_settype - pthread_mutexattr_gettype - - pthread_mutexattr_setkind_np accepts the following - mutex kinds: - PTHREAD_MUTEX_FAST_NP - PTHREAD_MUTEX_ERRORCHECK_NP - PTHREAD_MUTEX_RECURSIVE_NP - - These are really just equivalent to (respectively): - PTHREAD_MUTEX_NORMAL - PTHREAD_MUTEX_ERRORCHECK - PTHREAD_MUTEX_RECURSIVE - - -int -pthread_delay_np (const struct timespec *interval) - - This routine causes a thread to delay execution for a specific period of time. - This period ends at the current time plus the specified interval. The routine - will not return before the end of the period is reached, but may return an - arbitrary amount of time after the period has gone by. This can be due to - system load, thread priorities, and system timer granularity. - - Specifying an interval of zero (0) seconds and zero (0) nanoseconds is - allowed and can be used to force the thread to give up the processor or to - deliver a pending cancellation request. - - This routine is a cancellation point. - - The timespec structure contains the following two fields: - - tv_sec is an integer number of seconds. - tv_nsec is an integer number of nanoseconds. - - Return Values - - If an error condition occurs, this routine returns an integer value - indicating the type of error. Possible return values are as follows: - - 0 Successful completion. - [EINVAL] The value specified by interval is invalid. - - -__int64 -pthread_getunique_np (pthread_t thr) - - Returns the unique number associated with thread thr. - The unique numbers are a simple way of positively identifying a thread when - pthread_t cannot be relied upon to identify the true thread instance. I.e. a - pthread_t value may be assigned to different threads throughout the life of a - process. - - Because pthreads4w (pthreads-win32) threads can be uniquely identified by their - pthread_t values this routine is provided only for source code compatibility. - - NOTE: if the library is re-initialised, i.e. by calling pthread_win32_process_detach_np() - followed by pthread_win32_process_attach_np(), then the unique number is reset along with - several other library global values. Library reinitialisation should not be required, - however, some older applications may still call these routines as they were once required to - do when statically linking the library. - -int -pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec *abstime) - -int -pthread_tryjoin_np (pthread_t thread, void **value_ptr) - - These function is added for compatibility with Linux. - - -int -pthread_num_processors_np (void) - - This routine (found on HPUX systems) returns the number of processors - in the system. This implementation actually returns the number of - processors available to the process, which can be a lower number - than the system's number, depending on the process's affinity mask. - - -BOOL -pthread_win32_process_attach_np (void); - -BOOL -pthread_win32_process_detach_np (void); - -BOOL -pthread_win32_thread_attach_np (void); - -BOOL -pthread_win32_thread_detach_np (void); - - These functions contain the code normally run via DllMain - when the library is used as a dll. As of version 2.9.0 of the - library, static builds using either MSC or GCC will call - pthread_win32_process_* automatically at application startup and - exit respectively. - - pthread_win32_thread_attach_np() is currently a no-op. - - pthread_win32_thread_detach_np() is not a no-op. It cleans up the - implicit pthread handle that is allocated to any thread not started - via pthread_create(). Such non-posix threads should call this routine - when they exit, or call pthread_exit() to both cleanup and exit. - - These functions invariably return TRUE except for - pthread_win32_process_attach_np() which will return FALSE - if pthreads-win32 initialisation fails. - - -int -pthread_attr_getaffinity_np (pthread_attr_t * attr, size_t cpusetsize, cpu_set_t * cpuset); - -int -pthread_attr_setaffinity_np (pthread_attr_t * attr, size_t cpusetsize, const cpu_set_t * cpuset); - -int -pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t * cpuset); - -int -pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, const cpu_set_t * cpuset); - - Manipulate the CPU affinity of threads. Compatibility with libgcc-based pthreads - implementations. - - -int -pthreadCancelableWait (HANDLE waitHandle); - -int -pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout); - - These two functions provide hooks into the pthread_cancel - mechanism that will allow you to wait on a Windows handle - and make it a cancellation point. Both functions block - until either the given w32 handle is signaled, or - pthread_cancel has been called. It is implemented using - WaitForMultipleObjects on 'waitHandle' and a manually - reset w32 event used to implement pthread_cancel. - -int -pthread_getname_np(pthread_t thr, char *name, int len); - -If PTW32_COMPATIBILITY_BSD or PTW32_COMPATIBILITY_TRU64 defined -int -pthread_setname_np(pthread_t thr, const char *name, void *arg); - -Otherwise: -int -pthread_setname_np(pthread_t thr, const char *name); - - Set and get thread names. Compatibility. - - -struct timespec * -pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * relative); - - Primarily to facilitate writing unit tests but exported for convenience. - The struct timespec pointed to by the first parameter is modified to represent the - time 'now' plus an optional offset value timespec in a platform optimal way. - Returns the first parameter so is compatible as the struct timespec * parameter in - POSIX timed function calls, e.g. - - struct timespec abstime, reltime = { 0, 5000000 } /* 5 ms */; - pthread_mutex_timedwait(&mtx, pthread_win32_getabstime_np(&abstime, &reltime)); - - -Non-portable issues -------------------- - -Thread priority - - POSIX defines a single contiguous range of numbers that determine a - thread's priority. Win32 defines priority classes and priority - levels relative to these classes. Classes are simply priority base - levels that the defined priority levels are relative to such that, - changing a process's priority class will change the priority of all - of it's threads, while the threads retain the same relativity to each - other. - - A Win32 system defines a single contiguous monotonic range of values - that define system priority levels, just like POSIX. However, Win32 - restricts individual threads to a subset of this range on a - per-process basis. - - The following table shows the base priority levels for combinations - of priority class and priority value in Win32. - - Process Priority Class Thread Priority Level - ----------------------------------------------------------------- - 1 IDLE_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 HIGH_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 2 IDLE_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 3 IDLE_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 4 IDLE_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 4 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 5 IDLE_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 5 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 5 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 6 IDLE_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 6 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 6 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 7 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 7 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 7 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 8 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 8 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 8 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 8 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 9 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 9 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 9 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 10 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 10 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 11 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 11 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 11 HIGH_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 12 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 12 HIGH_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 13 HIGH_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 14 HIGH_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 IDLE_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 16 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 17 REALTIME_PRIORITY_CLASS -7 - 18 REALTIME_PRIORITY_CLASS -6 - 19 REALTIME_PRIORITY_CLASS -5 - 20 REALTIME_PRIORITY_CLASS -4 - 21 REALTIME_PRIORITY_CLASS -3 - 22 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 23 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 24 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 25 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 26 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 27 REALTIME_PRIORITY_CLASS 3 - 28 REALTIME_PRIORITY_CLASS 4 - 29 REALTIME_PRIORITY_CLASS 5 - 30 REALTIME_PRIORITY_CLASS 6 - 31 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - - Windows NT: Values -7, -6, -5, -4, -3, 3, 4, 5, and 6 are not supported. - - - As you can see, the real priority levels available to any individual - Win32 thread are non-contiguous. - - An application using pthreads-win32 should not make assumptions about - the numbers used to represent thread priority levels, except that they - are monotonic between the values returned by sched_get_priority_min() - and sched_get_priority_max(). E.g. Windows 95, 98, NT, 2000, XP make - available a non-contiguous range of numbers between -15 and 15, while - at least one version of WinCE (3.0) defines the minimum priority - (THREAD_PRIORITY_LOWEST) as 5, and the maximum priority - (THREAD_PRIORITY_HIGHEST) as 1. - - Internally, pthreads-win32 maps any priority levels between - THREAD_PRIORITY_IDLE and THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, - or between THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to - THREAD_PRIORITY_HIGHEST. Currently, this also applies to - REALTIME_PRIORITY_CLASSi even if levels -7, -6, -5, -4, -3, 3, 4, 5, and 6 - are supported. - - If it wishes, a Win32 application using pthreads-win32 can use the Win32 - defined priority macros THREAD_PRIORITY_IDLE through - THREAD_PRIORITY_TIME_CRITICAL. - - -The opacity of the pthread_t datatype -------------------------------------- -and possible solutions for portable null/compare/hash, etc ----------------------------------------------------------- - -Because pthread_t is an opague datatype an implementation is permitted to define -pthread_t in any way it wishes. That includes defining some bits, if it is -scalar, or members, if it is an aggregate, to store information that may be -extra to the unique identifying value of the ID. As a result, pthread_t values -may not be directly comparable. - -If you want your code to be portable you must adhere to the following contraints: - -1) Don't assume it is a scalar data type, e.g. an integer or pointer value. There -are several other implementations where pthread_t is also a struct. See our FAQ -Question 11 for our reasons for defining pthread_t as a struct. - -2) You must not compare them using relational or equality operators. You must use -the API function pthread_equal() to test for equality. - -3) Never attempt to reference individual members. - - -The problem - -Certain applications would like to be able to access a scalar pthread_t, -primarily to use as keys into data structures to manage threads or -thread-related data, but this is not possible in a maximally portable and -standards compliant way for current POSIX threads implementations. - -This use is often required because pthread_t values are not unique through -the life of the process and so it is necessary for the application to keep -track of a threads status itself, and ironically this is because they are -scalar types in the first place. - -To my knowledge the only platform that provides a scalar pthread_t that is -unique through the life of a process is Solaris. Other platforms, including -HPUX, will not provide support to applications that do this. - -For implementations that define pthread_t as a scalar, programmers often -employ direct relational and equality operators with pthread_t. This code -will break when ported to a standard-comforming implementation that defines -pthread_t as an aggregate type. - -For implementations that define pthread_t as an aggregate, e.g. a struct, -programmers can use memcmp etc., but then face the prospect that the struct may -include alignment padding bytes or bits as well as extra implementation-specific -members that are not part of the unique identifying value. - -Opacity also means that an implementation is free to change the definition, -which should generally only require that applications be recompiled and relinked, -not rewritten. - - -Doesn't the compiler take care of padding? - -The C89 and later standards only effectively guarantee element-by-element -equivalence following an assignment or pass by value of a struct or union, -therefore undefined areas of any two otherwise equivalent pthread_t instances -can still compare differently, e.g. attempting to compare two such pthread_t -variables byte-by-byte, e.g. memcmp(&t1, &t2, sizeof(pthread_t) may give an -incorrect result. In practice I'm reasonably confident that compilers routinely -also copy the padding bytes, mainly because assignment of unions would be far -too complicated otherwise. But it just isn't guarranteed by the standard. - -Illustration: - -We have two thread IDs t1 and t2 - -pthread_t t1, t2; - -In an application we create the threads and intend to store the thread IDs in an -ordered data structure (linked list, tree, etc) so we need to be able to compare -them in order to insert them initially and also to traverse. - -Suppose pthread_t contains undefined padding bits and our compiler copies our -pthread_t [struct] element-by-element, then for the assignment: - -pthread_t temp = t1; - -temp and t1 will be equivalent and correct but a byte-for-byte comparison such as -memcmp(&temp, &t1, sizeof(pthread_t)) == 0 may not return true as we expect because -the undefined bits may not have the same values in the two variable instances. - -Similarly if passing by value under the same conditions. - -If, on the other hand, the undefined bits are at least constant through every -assignment and pass-by-value then the byte-for-byte comparison -memcmp(&temp, &t1, sizeof(pthread_t)) == 0 will always return the expected result. -How can we force the behaviour we need? - - -Solutions - -Adding new functions to the standard API or as non-portable extentions is -the only reliable to provide the necessary operations. Remember also that -POSIX is not tied to the C language. The most common functions that have -been suggested are: - -pthread_null() -pthread_compare() -pthread_hash() - -A single more general purpose function could also be defined as a -basis for at least the last two of the above functions. - -First we need to list the freedoms and constraints with respect -to pthread_t so that we can be sure our solution is compatible with the -standard. - -What is known or may be deduced from the standard: -1) pthread_t must be able to be passed by value, so it must be a single object. -2) from (1) it must be copyable so cannot embed thread-state information, locks -or other volatile objects required to manage the thread it associates with. -3) pthread_t may carry additional information, e.g. for debugging or to manage -itself. -4) there is an implicit requirement that the size of pthread_t is determinable -at compile-time and size-invariant, because it must be able to copy the object -(i.e. through assignment and pass-by-value). Such copies must be genuine -duplicates, not merely a copy of a pointer to a common instance such as -would be the case if pthread_t were defined as an array. - - -Suppose we define the following function: - -/* This function shall return it's argument */ -pthread_t* pthread_normalize(pthread_t* thread); - -For scalar or aggregate pthread_t types this function would simply zero any bits -within the pthread_t that don't uniquely identify the thread, including padding, -such that client code can return consistent results from operations done on the -result. If the additional bits are a pointer to an associate structure then -this function would ensure that the memory used to store that associate -structure does not leak. With normalization the following compare would be -valid and repeatable: - -memcmp(pthread_normalize(&t1),pthread_normalize(&t2),sizeof(pthread_t)) - -Note 1: such comparisons are intended merely to order and sort pthread_t values -and allow them to index various data structures. They are not intended to reveal -anything about the relationships between threads, like startup order. - -Note 2: the normalized pthread_t is also a valid pthread_t that uniquely -identifies the same thread. - -Advantages: -1) In most existing implementations this function would reduce to a no-op that -emits no additional instructions, i.e after in-lining or optimisation, or if -defined as a macro: -#define pthread_normalise(tptr) (tptr) - -2) This single function allows an application to portably derive -application-level versions of any of the other required functions. - -3) It is a generic function that could enable unanticipated uses. - -Disadvantages: -1) Less efficient than dedicated compare or hash functions for implementations -that include significant extra non-id elements in pthread_t. - -2) Still need to be concerned about padding if copying normalized pthread_t. -See the later section on defining pthread_t to neutralise padding issues. - -Generally a pthread_t may need to be normalized every time it is used, -which could have a significant impact. However, this is a design decision -for the implementor in a competitive environment. An implementation is free -to define a pthread_t in a way that minimises or eliminates padding or -renders this function a no-op. - -Hazards: -1) Pass-by-reference directly modifies 'thread' so the application must -synchronise access or ensure that the pointer refers to a copy. The alternative -of pass-by-value/return-by-value was considered but then this requires two copy -operations, disadvantaging implementations where this function is not a no-op -in terms of speed of execution. This function is intended to be used in high -frequency situations and needs to be efficient, or at least not unnecessarily -inefficient. The alternative also sits awkwardly with functions like memcmp. - -2) [Non-compliant] code that uses relational and equality operators on -arithmetic or pointer style pthread_t types would need to be rewritten, but it -should be rewritten anyway. - - -C implementation of null/compare/hash functions using pthread_normalize(): - -/* In pthread.h */ -pthread_t* pthread_normalize(pthread_t* thread); - -/* In user code */ -/* User-level bitclear function - clear bits in loc corresponding to mask */ -void* bitclear (void* loc, void* mask, size_t count); - -typedef unsigned int hash_t; - -/* User-level hash function */ -hash_t hash(void* ptr, size_t count); - -/* - * User-level pthr_null function - modifies the origin thread handle. - * The concept of a null pthread_t is highly implementation dependent - * and this design may be far from the mark. For example, in an - * implementation "null" may mean setting a special value inside one - * element of pthread_t to mean "INVALID". However, if that value was zero and - * formed part of the id component then we may get away with this design. - */ -pthread_t* pthr_null(pthread_t* tp) -{ - /* - * This should have the same effect as memset(tp, 0, sizeof(pthread_t)) - * We're just showing that we can do it. - */ - void* p = (void*) pthread_normalize(tp); - return (pthread_t*) bitclear(p, p, sizeof(pthread_t)); -} - -/* - * Safe user-level pthr_compare function - modifies temporary thread handle copies - */ -int pthr_compare_safe(pthread_t thread1, pthread_t thread2) -{ - return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); -} - -/* - * Fast user-level pthr_compare function - modifies origin thread handles - */ -int pthr_compare_fast(pthread_t* thread1, pthread_t* thread2) -{ - return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); -} - -/* - * Safe user-level pthr_hash function - modifies temporary thread handle copy - */ -hash_t pthr_hash_safe(pthread_t thread) -{ - return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); -} - -/* - * Fast user-level pthr_hash function - modifies origin thread handle - */ -hash_t pthr_hash_fast(pthread_t thread) -{ - return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); -} - -/* User-level bitclear function - modifies the origin array */ -void* bitclear(void* loc, void* mask, size_t count) -{ - int i; - for (i=0; i < count; i++) { - (unsigned char) *loc++ &= ~((unsigned char) *mask++); - } -} - -/* Donald Knuth hash */ -hash_t hash(void* str, size_t count) -{ - hash_t hash = (hash_t) count; - unsigned int i = 0; - - for(i = 0; i < len; str++, i++) - { - hash = ((hash << 5) ^ (hash >> 27)) ^ (*str); - } - return hash; -} - -/* Example of advantage point (3) - split a thread handle into its id and non-id values */ -pthread_t id = thread, non-id = thread; -bitclear((void*) &non-id, (void*) pthread_normalize(&id), sizeof(pthread_t)); - - -A pthread_t type change proposal to neutralise the effects of padding - -Even if pthread_normalize() is available, padding is still a problem because -the standard only garrantees element-by-element equivalence through -copy operations (assignment and pass-by-value). So padding bit values can -still change randomly after calls to pthread_normalize(). - -[I suspect that most compilers take the easy path and always byte-copy anyway, -partly because it becomes too complex to do (e.g. unions that contain sub-aggregates) -but also because programmers can easily design their aggregates to minimise and -often eliminate padding]. - -How can we eliminate the problem of padding bytes in structs? Could -defining pthread_t as a union rather than a struct provide a solution? - -In fact, the Linux pthread.h defines most of it's pthread_*_t objects (but not -pthread_t itself) as unions, possibly for this and/or other reasons. We'll -borrow some element naming from there but the ideas themselves are well known -- the __align element used to force alignment of the union comes from K&R's -storage allocator example. - -/* Essentially our current pthread_t renamed */ -typedef struct { - struct thread_state_t * __p; - long __x; /* sequence counter */ -} thread_id_t; - -Ensuring that the last element in the above struct is a long ensures that the -overall struct size is a multiple of sizeof(long), so there should be no trailing -padding in this struct or the union we define below. -(Later we'll see that we can handle internal but not trailing padding.) - -/* New pthread_t */ -typedef union { - char __size[sizeof(thread_id_t)]; /* array as the first element */ - thread_id_t __tid; - long __align; /* Ensure that the union starts on long boundary */ -} pthread_t; - -This guarrantees that, during an assignment or pass-by-value, the compiler copies -every byte in our thread_id_t because the compiler guarrantees that the __size -array, which we have ensured is the equal-largest element in the union, retains -equivalence. - -This means that pthread_t values stored, assigned and passed by value will at least -carry the value of any undefined padding bytes along and therefore ensure that -those values remain consistent. Our comparisons will return consistent results and -our hashes of [zero initialised] pthread_t values will also return consistent -results. - -We have also removed the need for a pthread_null() function; we can initialise -at declaration time or easily create our own const pthread_t to use in assignments -later: - -const pthread_t null_tid = {0}; /* braces are required */ - -pthread_t t; -... -t = null_tid; - - -Note that we don't have to explicitly make use of the __size array at all. It's -there just to force the compiler behaviour we want. - - -Partial solutions without a pthread_normalize function - - -An application-level pthread_null and pthread_compare proposal -(and pthread_hash proposal by extention) - -In order to deal with the problem of scalar/aggregate pthread_t type disparity in -portable code I suggest using an old-fashioned union, e.g.: - -Contraints: -- there is no padding, or padding values are preserved through assignment and - pass-by-value (see above); -- there are no extra non-id values in the pthread_t. - - -Example 1: A null initialiser for pthread_t variables... - -typedef union { - unsigned char b[sizeof(pthread_t)]; - pthread_t t; -} init_t; - -const init_t initial = {0}; - -pthread_t tid = initial.t; /* init tid to all zeroes */ - - -Example 2: A comparison function for pthread_t values - -typedef union { - unsigned char b[sizeof(pthread_t)]; - pthread_t t; -} pthcmp_t; - -int pthcmp(pthread_t left, pthread_t right) -{ - /* - * Compare two pthread handles in a way that imposes a repeatable but arbitrary - * ordering on them. - * I.e. given the same set of pthread_t handles the ordering should be the same - * each time but the order has no particular meaning other than that. E.g. - * the ordering does not imply the thread start sequence, or any other - * relationship between threads. - * - * Return values are: - * 1 : left is greater than right - * 0 : left is equal to right - * -1 : left is less than right - */ - int i; - pthcmp_t L, R; - L.t = left; - R.t = right; - for (i = 0; i < sizeof(pthread_t); i++) - { - if (L.b[i] > R.b[i]) - return 1; - else if (L.b[i] < R.b[i]) - return -1; - } - return 0; -} - -It has been pointed out that the C99 standard allows for the possibility that -integer types also may include padding bits, which could invalidate the above -method. This addition to C99 was specifically included after it was pointed -out that there was one, presumably not particularly well known, architecture -that included a padding bit in it's 32 bit integer type. See section 6.2.6.2 -of both the standard and the rationale, specifically the paragraph starting at -line 16 on page 43 of the rationale. - - -An aside - -Certain compilers, e.g. gcc and one of the IBM compilers, include a feature -extention: provided the union contains a member of the same type as the -object then the object may be cast to the union itself. - -We could use this feature to speed up the pthrcmp() function from example 2 -above by directly referencing rather than copying the pthread_t arguments to -the local union variables, e.g.: - -int pthcmp(pthread_t left, pthread_t right) -{ - /* - * Compare two pthread handles in a way that imposes a repeatable but arbitrary - * ordering on them. - * I.e. given the same set of pthread_t handles the ordering should be the same - * each time but the order has no particular meaning other than that. E.g. - * the ordering does not imply the thread start sequence, or any other - * relationship between threads. - * - * Return values are: - * 1 : left is greater than right - * 0 : left is equal to right - * -1 : left is less than right - */ - int i; - for (i = 0; i < sizeof(pthread_t); i++) - { - if (((pthcmp_t)left).b[i] > ((pthcmp_t)right).b[i]) - return 1; - else if (((pthcmp_t)left).b[i] < ((pthcmp_t)right).b[i]) - return -1; - } - return 0; -} - - -Result thus far - -We can't remove undefined bits if they are there in pthread_t already, but we have -attempted to render them inert for comparison and hashing functions by making them -consistent through assignment, copy and pass-by-value. - -Note: Hashing pthread_t values requires that all pthread_t variables be initialised -to the same value (usually all zeros) before being assigned a proper thread ID, i.e. -to ensure that any padding bits are zero, or at least the same value for all -pthread_t. Since all pthread_t values are generated by the library in the first -instance this need not be an application-level operation. - - -Conclusion - -I've attempted to resolve the multiple issues of type opacity and the possible -presence of undefined bits and bytes in pthread_t values, which prevent -applications from comparing or hashing pthread handles. - -Two complimentary partial solutions have been proposed, one an application-level -scheme to handle both scalar and aggregate pthread_t types equally, plus a -definition of pthread_t itself that neutralises padding bits and bytes by -coercing semantics out of the compiler to eliminate variations in the values of -padding bits. - -I have not provided any solution to the problem of handling extra values embedded -in pthread_t, e.g. debugging or trap information that an implementation is entitled -to include. Therefore none of this replaces the portability and flexibility of API -functions but what functions are needed? The threads standard is unlikely to -include new functions that can be implemented by a combination of existing features -and more generic functions (several references in the threads rationale suggest this). -Therefore I propose that the following function could replace the several functions -that have been suggested in conversations: - -pthread_t * pthread_normalize(pthread_t * handle); - -For most existing pthreads implementations this function, or macro, would reduce to -a no-op with zero call overhead. Most of the other desired operations on pthread_t -values (null, compare, hash, etc.) can be trivially derived from this and other -standard functions. +This file documents non-portable functions and other issues. + +Non-portable functions included in pthreads-win32 +------------------------------------------------- + +BOOL +pthread_win32_test_features_np(int mask) + + This routine allows an application to check which + run-time auto-detected features are available within + the library. + + The possible features are: + + PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE + Return TRUE if the native version of + InterlockedCompareExchange() is being used. + This feature is not meaningful in recent + library versions as MSVC builds only support + system implemented ICE. Note that all Mingw + builds use inlined asm versions of all the + Interlocked routines. + PTW32_ALERTABLE_ASYNC_CANCEL + Return TRUE is the QueueUserAPCEx package + QUSEREX.DLL is available and the AlertDrv.sys + driver is loaded into Windows, providing + alertable (pre-emptive) asyncronous threads + cancellation. If this feature returns FALSE + then the default async cancel scheme is in + use, which cannot cancel blocked threads. + + Features may be Or'ed into the mask parameter, in which case + the routine returns TRUE if any of the Or'ed features would + return TRUE. At this stage it doesn't make sense to Or features + but it may some day. + + +void * +pthread_timechange_handler_np(void *) + + To improve tolerance against operator or time service + initiated system clock changes. + + This routine can be called by an application when it + receives a WM_TIMECHANGE message from the system. At + present it broadcasts all condition variables so that + waiting threads can wake up and re-evaluate their + conditions and restart their timed waits if required. + + It has the same return type and argument type as a + thread routine so that it may be called directly + through pthread_create(), i.e. as a separate thread. + + Parameters + + Although a parameter must be supplied, it is ignored. + The value NULL can be used. + + Return values + + It can return an error EAGAIN to indicate that not + all condition variables were broadcast for some reason. + Otherwise, 0 is returned. + + If run as a thread, the return value is returned + through pthread_join(). + + The return value should be cast to an integer. + + +HANDLE +pthread_getw32threadhandle_np(pthread_t thread); + + Returns the win32 thread handle that the POSIX + thread "thread" is running as. + + Applications can use the win32 handle to set + win32 specific attributes of the thread. + +DWORD +pthread_getw32threadid_np (pthread_t thread) + + Returns the Windows native thread ID that the POSIX + thread "thread" is running as. + + Only valid when the library is built where + ! (defined(__MINGW64__) || defined(__MINGW32__)) || defined (__MSVCRT__) || defined (__DMC__) + and otherwise returns 0. + + +int +pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, int kind) + +int +pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, int *kind) + + These two routines are included for Linux compatibility + and are direct equivalents to the standard routines + pthread_mutexattr_settype + pthread_mutexattr_gettype + + pthread_mutexattr_setkind_np accepts the following + mutex kinds: + PTHREAD_MUTEX_FAST_NP + PTHREAD_MUTEX_ERRORCHECK_NP + PTHREAD_MUTEX_RECURSIVE_NP + + These are really just equivalent to (respectively): + PTHREAD_MUTEX_NORMAL + PTHREAD_MUTEX_ERRORCHECK + PTHREAD_MUTEX_RECURSIVE + + +int +pthread_delay_np (const struct timespec *interval) + + This routine causes a thread to delay execution for a specific period of time. + This period ends at the current time plus the specified interval. The routine + will not return before the end of the period is reached, but may return an + arbitrary amount of time after the period has gone by. This can be due to + system load, thread priorities, and system timer granularity. + + Specifying an interval of zero (0) seconds and zero (0) nanoseconds is + allowed and can be used to force the thread to give up the processor or to + deliver a pending cancellation request. + + This routine is a cancellation point. + + The timespec structure contains the following two fields: + + tv_sec is an integer number of seconds. + tv_nsec is an integer number of nanoseconds. + + Return Values + + If an error condition occurs, this routine returns an integer value + indicating the type of error. Possible return values are as follows: + + 0 Successful completion. + [EINVAL] The value specified by interval is invalid. + + +__int64 +pthread_getunique_np (pthread_t thr) + + Returns the unique number associated with thread thr. + The unique numbers are a simple way of positively identifying a thread when + pthread_t cannot be relied upon to identify the true thread instance. I.e. a + pthread_t value may be assigned to different threads throughout the life of a + process. + + Because pthreads4w (pthreads-win32) threads can be uniquely identified by their + pthread_t values this routine is provided only for source code compatibility. + + NOTE: if the library is re-initialised, i.e. by calling pthread_win32_process_detach_np() + followed by pthread_win32_process_attach_np(), then the unique number is reset along with + several other library global values. Library reinitialisation should not be required, + however, some older applications may still call these routines as they were once required to + do when statically linking the library. + +int +pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec *abstime) + +int +pthread_tryjoin_np (pthread_t thread, void **value_ptr) + + These function is added for compatibility with Linux. + + +int +pthread_num_processors_np (void) + + This routine (found on HPUX systems) returns the number of processors + in the system. This implementation actually returns the number of + processors available to the process, which can be a lower number + than the system's number, depending on the process's affinity mask. + + +BOOL +pthread_win32_process_attach_np (void); + +BOOL +pthread_win32_process_detach_np (void); + +BOOL +pthread_win32_thread_attach_np (void); + +BOOL +pthread_win32_thread_detach_np (void); + + These functions contain the code normally run via DllMain + when the library is used as a dll. As of version 2.9.0 of the + library, static builds using either MSC or GCC will call + pthread_win32_process_* automatically at application startup and + exit respectively. + + pthread_win32_thread_attach_np() is currently a no-op. + + pthread_win32_thread_detach_np() is not a no-op. It cleans up the + implicit pthread handle that is allocated to any thread not started + via pthread_create(). Such non-posix threads should call this routine + when they exit, or call pthread_exit() to both cleanup and exit. + + These functions invariably return TRUE except for + pthread_win32_process_attach_np() which will return FALSE + if pthreads-win32 initialisation fails. + + +int +pthread_attr_getaffinity_np (pthread_attr_t * attr, size_t cpusetsize, cpu_set_t * cpuset); + +int +pthread_attr_setaffinity_np (pthread_attr_t * attr, size_t cpusetsize, const cpu_set_t * cpuset); + +int +pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t * cpuset); + +int +pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, const cpu_set_t * cpuset); + + Manipulate the CPU affinity of threads. Compatibility with libgcc-based pthreads + implementations. + + +int +pthreadCancelableWait (HANDLE waitHandle); + +int +pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout); + + These two functions provide hooks into the pthread_cancel + mechanism that will allow you to wait on a Windows handle + and make it a cancellation point. Both functions block + until either the given w32 handle is signaled, or + pthread_cancel has been called. It is implemented using + WaitForMultipleObjects on 'waitHandle' and a manually + reset w32 event used to implement pthread_cancel. + +int +pthread_getname_np(pthread_t thr, char *name, int len); + +If PTW32_COMPATIBILITY_BSD or PTW32_COMPATIBILITY_TRU64 defined +int +pthread_setname_np(pthread_t thr, const char *name, void *arg); + +Otherwise: +int +pthread_setname_np(pthread_t thr, const char *name); + + Set and get thread names. Compatibility. + + +struct timespec * +pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * relative); + + Primarily to facilitate writing unit tests but exported for convenience. + The struct timespec pointed to by the first parameter is modified to represent the + time 'now' plus an optional offset value timespec in a platform optimal way. + Returns the first parameter so is compatible as the struct timespec * parameter in + POSIX timed function calls, e.g. + + struct timespec abstime, reltime = { 0, 5000000 } /* 5 ms */; + pthread_mutex_timedwait(&mtx, pthread_win32_getabstime_np(&abstime, &reltime)); + + +Non-portable issues +------------------- + +Thread priority + + POSIX defines a single contiguous range of numbers that determine a + thread's priority. Win32 defines priority classes and priority + levels relative to these classes. Classes are simply priority base + levels that the defined priority levels are relative to such that, + changing a process's priority class will change the priority of all + of it's threads, while the threads retain the same relativity to each + other. + + A Win32 system defines a single contiguous monotonic range of values + that define system priority levels, just like POSIX. However, Win32 + restricts individual threads to a subset of this range on a + per-process basis. + + The following table shows the base priority levels for combinations + of priority class and priority value in Win32. + + Process Priority Class Thread Priority Level + ----------------------------------------------------------------- + 1 IDLE_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 HIGH_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 2 IDLE_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 3 IDLE_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 4 IDLE_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 4 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 5 IDLE_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 5 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 5 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 6 IDLE_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 6 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 6 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 7 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 7 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 7 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 8 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 8 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 8 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 8 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 9 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 9 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 9 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 10 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 10 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 11 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 11 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 11 HIGH_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 12 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 12 HIGH_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 13 HIGH_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 14 HIGH_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 IDLE_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 16 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 17 REALTIME_PRIORITY_CLASS -7 + 18 REALTIME_PRIORITY_CLASS -6 + 19 REALTIME_PRIORITY_CLASS -5 + 20 REALTIME_PRIORITY_CLASS -4 + 21 REALTIME_PRIORITY_CLASS -3 + 22 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 23 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 24 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 25 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 26 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 27 REALTIME_PRIORITY_CLASS 3 + 28 REALTIME_PRIORITY_CLASS 4 + 29 REALTIME_PRIORITY_CLASS 5 + 30 REALTIME_PRIORITY_CLASS 6 + 31 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + + Windows NT: Values -7, -6, -5, -4, -3, 3, 4, 5, and 6 are not supported. + + + As you can see, the real priority levels available to any individual + Win32 thread are non-contiguous. + + An application using pthreads-win32 should not make assumptions about + the numbers used to represent thread priority levels, except that they + are monotonic between the values returned by sched_get_priority_min() + and sched_get_priority_max(). E.g. Windows 95, 98, NT, 2000, XP make + available a non-contiguous range of numbers between -15 and 15, while + at least one version of WinCE (3.0) defines the minimum priority + (THREAD_PRIORITY_LOWEST) as 5, and the maximum priority + (THREAD_PRIORITY_HIGHEST) as 1. + + Internally, pthreads-win32 maps any priority levels between + THREAD_PRIORITY_IDLE and THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, + or between THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to + THREAD_PRIORITY_HIGHEST. Currently, this also applies to + REALTIME_PRIORITY_CLASSi even if levels -7, -6, -5, -4, -3, 3, 4, 5, and 6 + are supported. + + If it wishes, a Win32 application using pthreads-win32 can use the Win32 + defined priority macros THREAD_PRIORITY_IDLE through + THREAD_PRIORITY_TIME_CRITICAL. + + +The opacity of the pthread_t datatype +------------------------------------- +and possible solutions for portable null/compare/hash, etc +---------------------------------------------------------- + +Because pthread_t is an opague datatype an implementation is permitted to define +pthread_t in any way it wishes. That includes defining some bits, if it is +scalar, or members, if it is an aggregate, to store information that may be +extra to the unique identifying value of the ID. As a result, pthread_t values +may not be directly comparable. + +If you want your code to be portable you must adhere to the following contraints: + +1) Don't assume it is a scalar data type, e.g. an integer or pointer value. There +are several other implementations where pthread_t is also a struct. See our FAQ +Question 11 for our reasons for defining pthread_t as a struct. + +2) You must not compare them using relational or equality operators. You must use +the API function pthread_equal() to test for equality. + +3) Never attempt to reference individual members. + + +The problem + +Certain applications would like to be able to access a scalar pthread_t, +primarily to use as keys into data structures to manage threads or +thread-related data, but this is not possible in a maximally portable and +standards compliant way for current POSIX threads implementations. + +This use is often required because pthread_t values are not unique through +the life of the process and so it is necessary for the application to keep +track of a threads status itself, and ironically this is because they are +scalar types in the first place. + +To my knowledge the only platform that provides a scalar pthread_t that is +unique through the life of a process is Solaris. Other platforms, including +HPUX, will not provide support to applications that do this. + +For implementations that define pthread_t as a scalar, programmers often +employ direct relational and equality operators with pthread_t. This code +will break when ported to a standard-comforming implementation that defines +pthread_t as an aggregate type. + +For implementations that define pthread_t as an aggregate, e.g. a struct, +programmers can use memcmp etc., but then face the prospect that the struct may +include alignment padding bytes or bits as well as extra implementation-specific +members that are not part of the unique identifying value. + +Opacity also means that an implementation is free to change the definition, +which should generally only require that applications be recompiled and relinked, +not rewritten. + + +Doesn't the compiler take care of padding? + +The C89 and later standards only effectively guarantee element-by-element +equivalence following an assignment or pass by value of a struct or union, +therefore undefined areas of any two otherwise equivalent pthread_t instances +can still compare differently, e.g. attempting to compare two such pthread_t +variables byte-by-byte, e.g. memcmp(&t1, &t2, sizeof(pthread_t) may give an +incorrect result. In practice I'm reasonably confident that compilers routinely +also copy the padding bytes, mainly because assignment of unions would be far +too complicated otherwise. But it just isn't guarranteed by the standard. + +Illustration: + +We have two thread IDs t1 and t2 + +pthread_t t1, t2; + +In an application we create the threads and intend to store the thread IDs in an +ordered data structure (linked list, tree, etc) so we need to be able to compare +them in order to insert them initially and also to traverse. + +Suppose pthread_t contains undefined padding bits and our compiler copies our +pthread_t [struct] element-by-element, then for the assignment: + +pthread_t temp = t1; + +temp and t1 will be equivalent and correct but a byte-for-byte comparison such as +memcmp(&temp, &t1, sizeof(pthread_t)) == 0 may not return true as we expect because +the undefined bits may not have the same values in the two variable instances. + +Similarly if passing by value under the same conditions. + +If, on the other hand, the undefined bits are at least constant through every +assignment and pass-by-value then the byte-for-byte comparison +memcmp(&temp, &t1, sizeof(pthread_t)) == 0 will always return the expected result. +How can we force the behaviour we need? + + +Solutions + +Adding new functions to the standard API or as non-portable extentions is +the only reliable to provide the necessary operations. Remember also that +POSIX is not tied to the C language. The most common functions that have +been suggested are: + +pthread_null() +pthread_compare() +pthread_hash() + +A single more general purpose function could also be defined as a +basis for at least the last two of the above functions. + +First we need to list the freedoms and constraints with respect +to pthread_t so that we can be sure our solution is compatible with the +standard. + +What is known or may be deduced from the standard: +1) pthread_t must be able to be passed by value, so it must be a single object. +2) from (1) it must be copyable so cannot embed thread-state information, locks +or other volatile objects required to manage the thread it associates with. +3) pthread_t may carry additional information, e.g. for debugging or to manage +itself. +4) there is an implicit requirement that the size of pthread_t is determinable +at compile-time and size-invariant, because it must be able to copy the object +(i.e. through assignment and pass-by-value). Such copies must be genuine +duplicates, not merely a copy of a pointer to a common instance such as +would be the case if pthread_t were defined as an array. + + +Suppose we define the following function: + +/* This function shall return it's argument */ +pthread_t* pthread_normalize(pthread_t* thread); + +For scalar or aggregate pthread_t types this function would simply zero any bits +within the pthread_t that don't uniquely identify the thread, including padding, +such that client code can return consistent results from operations done on the +result. If the additional bits are a pointer to an associate structure then +this function would ensure that the memory used to store that associate +structure does not leak. With normalization the following compare would be +valid and repeatable: + +memcmp(pthread_normalize(&t1),pthread_normalize(&t2),sizeof(pthread_t)) + +Note 1: such comparisons are intended merely to order and sort pthread_t values +and allow them to index various data structures. They are not intended to reveal +anything about the relationships between threads, like startup order. + +Note 2: the normalized pthread_t is also a valid pthread_t that uniquely +identifies the same thread. + +Advantages: +1) In most existing implementations this function would reduce to a no-op that +emits no additional instructions, i.e after in-lining or optimisation, or if +defined as a macro: +#define pthread_normalise(tptr) (tptr) + +2) This single function allows an application to portably derive +application-level versions of any of the other required functions. + +3) It is a generic function that could enable unanticipated uses. + +Disadvantages: +1) Less efficient than dedicated compare or hash functions for implementations +that include significant extra non-id elements in pthread_t. + +2) Still need to be concerned about padding if copying normalized pthread_t. +See the later section on defining pthread_t to neutralise padding issues. + +Generally a pthread_t may need to be normalized every time it is used, +which could have a significant impact. However, this is a design decision +for the implementor in a competitive environment. An implementation is free +to define a pthread_t in a way that minimises or eliminates padding or +renders this function a no-op. + +Hazards: +1) Pass-by-reference directly modifies 'thread' so the application must +synchronise access or ensure that the pointer refers to a copy. The alternative +of pass-by-value/return-by-value was considered but then this requires two copy +operations, disadvantaging implementations where this function is not a no-op +in terms of speed of execution. This function is intended to be used in high +frequency situations and needs to be efficient, or at least not unnecessarily +inefficient. The alternative also sits awkwardly with functions like memcmp. + +2) [Non-compliant] code that uses relational and equality operators on +arithmetic or pointer style pthread_t types would need to be rewritten, but it +should be rewritten anyway. + + +C implementation of null/compare/hash functions using pthread_normalize(): + +/* In pthread.h */ +pthread_t* pthread_normalize(pthread_t* thread); + +/* In user code */ +/* User-level bitclear function - clear bits in loc corresponding to mask */ +void* bitclear (void* loc, void* mask, size_t count); + +typedef unsigned int hash_t; + +/* User-level hash function */ +hash_t hash(void* ptr, size_t count); + +/* + * User-level pthr_null function - modifies the origin thread handle. + * The concept of a null pthread_t is highly implementation dependent + * and this design may be far from the mark. For example, in an + * implementation "null" may mean setting a special value inside one + * element of pthread_t to mean "INVALID". However, if that value was zero and + * formed part of the id component then we may get away with this design. + */ +pthread_t* pthr_null(pthread_t* tp) +{ + /* + * This should have the same effect as memset(tp, 0, sizeof(pthread_t)) + * We're just showing that we can do it. + */ + void* p = (void*) pthread_normalize(tp); + return (pthread_t*) bitclear(p, p, sizeof(pthread_t)); +} + +/* + * Safe user-level pthr_compare function - modifies temporary thread handle copies + */ +int pthr_compare_safe(pthread_t thread1, pthread_t thread2) +{ + return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); +} + +/* + * Fast user-level pthr_compare function - modifies origin thread handles + */ +int pthr_compare_fast(pthread_t* thread1, pthread_t* thread2) +{ + return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); +} + +/* + * Safe user-level pthr_hash function - modifies temporary thread handle copy + */ +hash_t pthr_hash_safe(pthread_t thread) +{ + return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); +} + +/* + * Fast user-level pthr_hash function - modifies origin thread handle + */ +hash_t pthr_hash_fast(pthread_t thread) +{ + return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); +} + +/* User-level bitclear function - modifies the origin array */ +void* bitclear(void* loc, void* mask, size_t count) +{ + int i; + for (i=0; i < count; i++) { + (unsigned char) *loc++ &= ~((unsigned char) *mask++); + } +} + +/* Donald Knuth hash */ +hash_t hash(void* str, size_t count) +{ + hash_t hash = (hash_t) count; + unsigned int i = 0; + + for(i = 0; i < len; str++, i++) + { + hash = ((hash << 5) ^ (hash >> 27)) ^ (*str); + } + return hash; +} + +/* Example of advantage point (3) - split a thread handle into its id and non-id values */ +pthread_t id = thread, non-id = thread; +bitclear((void*) &non-id, (void*) pthread_normalize(&id), sizeof(pthread_t)); + + +A pthread_t type change proposal to neutralise the effects of padding + +Even if pthread_normalize() is available, padding is still a problem because +the standard only garrantees element-by-element equivalence through +copy operations (assignment and pass-by-value). So padding bit values can +still change randomly after calls to pthread_normalize(). + +[I suspect that most compilers take the easy path and always byte-copy anyway, +partly because it becomes too complex to do (e.g. unions that contain sub-aggregates) +but also because programmers can easily design their aggregates to minimise and +often eliminate padding]. + +How can we eliminate the problem of padding bytes in structs? Could +defining pthread_t as a union rather than a struct provide a solution? + +In fact, the Linux pthread.h defines most of it's pthread_*_t objects (but not +pthread_t itself) as unions, possibly for this and/or other reasons. We'll +borrow some element naming from there but the ideas themselves are well known +- the __align element used to force alignment of the union comes from K&R's +storage allocator example. + +/* Essentially our current pthread_t renamed */ +typedef struct { + struct thread_state_t * __p; + long __x; /* sequence counter */ +} thread_id_t; + +Ensuring that the last element in the above struct is a long ensures that the +overall struct size is a multiple of sizeof(long), so there should be no trailing +padding in this struct or the union we define below. +(Later we'll see that we can handle internal but not trailing padding.) + +/* New pthread_t */ +typedef union { + char __size[sizeof(thread_id_t)]; /* array as the first element */ + thread_id_t __tid; + long __align; /* Ensure that the union starts on long boundary */ +} pthread_t; + +This guarrantees that, during an assignment or pass-by-value, the compiler copies +every byte in our thread_id_t because the compiler guarrantees that the __size +array, which we have ensured is the equal-largest element in the union, retains +equivalence. + +This means that pthread_t values stored, assigned and passed by value will at least +carry the value of any undefined padding bytes along and therefore ensure that +those values remain consistent. Our comparisons will return consistent results and +our hashes of [zero initialised] pthread_t values will also return consistent +results. + +We have also removed the need for a pthread_null() function; we can initialise +at declaration time or easily create our own const pthread_t to use in assignments +later: + +const pthread_t null_tid = {0}; /* braces are required */ + +pthread_t t; +... +t = null_tid; + + +Note that we don't have to explicitly make use of the __size array at all. It's +there just to force the compiler behaviour we want. + + +Partial solutions without a pthread_normalize function + + +An application-level pthread_null and pthread_compare proposal +(and pthread_hash proposal by extention) + +In order to deal with the problem of scalar/aggregate pthread_t type disparity in +portable code I suggest using an old-fashioned union, e.g.: + +Contraints: +- there is no padding, or padding values are preserved through assignment and + pass-by-value (see above); +- there are no extra non-id values in the pthread_t. + + +Example 1: A null initialiser for pthread_t variables... + +typedef union { + unsigned char b[sizeof(pthread_t)]; + pthread_t t; +} init_t; + +const init_t initial = {0}; + +pthread_t tid = initial.t; /* init tid to all zeroes */ + + +Example 2: A comparison function for pthread_t values + +typedef union { + unsigned char b[sizeof(pthread_t)]; + pthread_t t; +} pthcmp_t; + +int pthcmp(pthread_t left, pthread_t right) +{ + /* + * Compare two pthread handles in a way that imposes a repeatable but arbitrary + * ordering on them. + * I.e. given the same set of pthread_t handles the ordering should be the same + * each time but the order has no particular meaning other than that. E.g. + * the ordering does not imply the thread start sequence, or any other + * relationship between threads. + * + * Return values are: + * 1 : left is greater than right + * 0 : left is equal to right + * -1 : left is less than right + */ + int i; + pthcmp_t L, R; + L.t = left; + R.t = right; + for (i = 0; i < sizeof(pthread_t); i++) + { + if (L.b[i] > R.b[i]) + return 1; + else if (L.b[i] < R.b[i]) + return -1; + } + return 0; +} + +It has been pointed out that the C99 standard allows for the possibility that +integer types also may include padding bits, which could invalidate the above +method. This addition to C99 was specifically included after it was pointed +out that there was one, presumably not particularly well known, architecture +that included a padding bit in it's 32 bit integer type. See section 6.2.6.2 +of both the standard and the rationale, specifically the paragraph starting at +line 16 on page 43 of the rationale. + + +An aside + +Certain compilers, e.g. gcc and one of the IBM compilers, include a feature +extention: provided the union contains a member of the same type as the +object then the object may be cast to the union itself. + +We could use this feature to speed up the pthrcmp() function from example 2 +above by directly referencing rather than copying the pthread_t arguments to +the local union variables, e.g.: + +int pthcmp(pthread_t left, pthread_t right) +{ + /* + * Compare two pthread handles in a way that imposes a repeatable but arbitrary + * ordering on them. + * I.e. given the same set of pthread_t handles the ordering should be the same + * each time but the order has no particular meaning other than that. E.g. + * the ordering does not imply the thread start sequence, or any other + * relationship between threads. + * + * Return values are: + * 1 : left is greater than right + * 0 : left is equal to right + * -1 : left is less than right + */ + int i; + for (i = 0; i < sizeof(pthread_t); i++) + { + if (((pthcmp_t)left).b[i] > ((pthcmp_t)right).b[i]) + return 1; + else if (((pthcmp_t)left).b[i] < ((pthcmp_t)right).b[i]) + return -1; + } + return 0; +} + + +Result thus far + +We can't remove undefined bits if they are there in pthread_t already, but we have +attempted to render them inert for comparison and hashing functions by making them +consistent through assignment, copy and pass-by-value. + +Note: Hashing pthread_t values requires that all pthread_t variables be initialised +to the same value (usually all zeros) before being assigned a proper thread ID, i.e. +to ensure that any padding bits are zero, or at least the same value for all +pthread_t. Since all pthread_t values are generated by the library in the first +instance this need not be an application-level operation. + + +Conclusion + +I've attempted to resolve the multiple issues of type opacity and the possible +presence of undefined bits and bytes in pthread_t values, which prevent +applications from comparing or hashing pthread handles. + +Two complimentary partial solutions have been proposed, one an application-level +scheme to handle both scalar and aggregate pthread_t types equally, plus a +definition of pthread_t itself that neutralises padding bits and bytes by +coercing semantics out of the compiler to eliminate variations in the values of +padding bits. + +I have not provided any solution to the problem of handling extra values embedded +in pthread_t, e.g. debugging or trap information that an implementation is entitled +to include. Therefore none of this replaces the portability and flexibility of API +functions but what functions are needed? The threads standard is unlikely to +include new functions that can be implemented by a combination of existing features +and more generic functions (several references in the threads rationale suggest this). +Therefore I propose that the following function could replace the several functions +that have been suggested in conversations: + +pthread_t * pthread_normalize(pthread_t * handle); + +For most existing pthreads implementations this function, or macro, would reduce to +a no-op with zero call overhead. Most of the other desired operations on pthread_t +values (null, compare, hash, etc.) can be trivially derived from this and other +standard functions. diff --git a/_ptw32.h b/_ptw32.h index c82741aa..43bdd9c5 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -33,202 +33,3 @@ * * You should have received a copy of the GNU General Public License * along with Pthreads-win32. If not, see . * - */ -#ifndef __PTW32_H -#define __PTW32_H - -/* See the README file for an explanation of the pthreads-win32 - * version numbering scheme and how the DLL is named etc. - * - * FIXME: consider moving this to <_ptw32.h>; maybe also add a - * leading underscore to the macro names. - */ -#define PTW32_VERSION_MAJOR 2 -#define PTW32_VERSION_MINOR 10 -#define PTW32_VERSION_MICRO 0 -#define PTW32_VERION_BUILD 0 -#define PTW32_VERSION 2,10,0,0 -#define PTW32_VERSION_STRING "2, 10, 0, 0\0" - -#if defined(__GNUC__) -# pragma GCC system_header -# if ! defined __declspec -# error "Please upgrade your GNU compiler to one that supports __declspec." -# endif -#endif - -#if defined (__cplusplus) -# define __PTW32_BEGIN_C_DECLS extern "C" { -# define __PTW32_END_C_DECLS } -#else -# define __PTW32_BEGIN_C_DECLS -# define __PTW32_END_C_DECLS -#endif - -#if defined (PTW32_STATIC_LIB) && _MSC_VER >= 1400 -# undef PTW32_STATIC_LIB -# define PTW32_STATIC_TLSLIB -#endif - -/* When building the library, you should define PTW32_BUILD so that - * the variables/functions are exported correctly. When using the library, - * do NOT define PTW32_BUILD, and then the variables/functions will - * be imported correctly. - * - * FIXME: Used defined feature test macros, such as PTW32_STATIC_LIB, (and - * maybe even PTW32_BUILD), should be renamed with one initial underscore; - * internally defined macros, such as PTW32_DLLPORT, should be renamed with - * two initial underscores ... perhaps __PTW32_DECLSPEC is nicer anyway? - */ -#if defined PTW32_STATIC_LIB || defined PTW32_STATIC_TLSLIB -# define PTW32_DLLPORT - -#elif defined PTW32_BUILD -# define PTW32_DLLPORT __declspec (dllexport) -#else -# define PTW32_DLLPORT /*__declspec (dllimport)*/ -#endif - -#ifndef PTW32_CDECL -/* FIXME: another internal macro; should have two initial underscores; - * Nominally, we prefer to use __cdecl calling convention for all our - * functions, but we map it through this macro alias to facilitate the - * possible choice of alternatives; for example: - */ -# ifdef _OPEN_WATCOM_SOURCE - /* The Open Watcom C/C++ compiler uses a non-standard default calling - * convention, (similar to __fastcall), which passes function arguments - * in registers, unless the __cdecl convention is explicitly specified - * in exposed function prototypes. - * - * Our preference is to specify the __cdecl convention for all calls, - * even though this could slow Watcom code down slightly. If you know - * that the Watcom compiler will be used to build both the DLL and your - * application, then you may #define _OPEN_WATCOM_SOURCE, so disabling - * the forced specification of __cdecl for all function declarations; - * remember that this must be defined consistently, for both the DLL - * build, and the application build. - */ -# define PTW32_CDECL -# else -# define PTW32_CDECL __cdecl -# endif -#endif - -/* - * This is more or less a duplicate of what is in the autoconf config.h, - * which is only used when building the pthread-win32 libraries. They - */ - -#if !defined(PTW32_CONFIG_H) && !defined(__PTW32_PSEUDO_CONFIG_H_SOURCED) -# define __PTW32_PSEUDO_CONFIG_H_SOURCED -# if defined(WINCE) -# undef HAVE_CPU_AFFINITY -# define NEED_DUPLICATEHANDLE -# define NEED_CREATETHREAD -# define NEED_ERRNO -# define NEED_CALLOC -# define NEED_FTIME -# define NEED_UNICODE_CONSTS -# define NEED_PROCESS_AFFINITY_MASK -/* This may not be needed */ -# define RETAIN_WSALASTERROR -# elif defined(_MSC_VER) -# if _MSC_VER >= 1900 -# define HAVE_STRUCT_TIMESPEC -# elif _MSC_VER < 1300 -# define PTW32_CONFIG_MSVC6 -# elif _MSC_VER < 1400 -# define PTW32_CONFIG_MSVC7 -# endif -# elif defined(_UWIN) -# define HAVE_MODE_T -# define HAVE_STRUCT_TIMESPEC -# define HAVE_SIGNAL_H -# endif -#endif - -/* - * If HAVE_ERRNO_H is defined then assume that autoconf has been used - * to overwrite config.h, otherwise the original config.h is in use - * at build-time or the above block of defines is in use otherwise - * and NEED_ERRNO is either defined or not defined. - */ -#if defined(HAVE_ERRNO_H) || !defined(NEED_ERRNO) -# include -#else -# include "need_errno.h" -#endif - -#if defined(__BORLANDC__) -# define int64_t LONGLONG -# define uint64_t ULONGLONG -#elif !defined(__MINGW32__) -# define int64_t _int64 -# define uint64_t unsigned _int64 -# if defined(PTW32_CONFIG_MSVC6) - typedef long intptr_t; -# endif -#elif defined(HAVE_STDINT_H) && HAVE_STDINT_H == 1 -# include -#endif - -/* - * In case ETIMEDOUT hasn't been defined above somehow. - */ -#if !defined(ETIMEDOUT) - /* - * note: ETIMEDOUT is no longer defined in winsock.h - * WSAETIMEDOUT is so use its value. - */ -# include -# if defined(WSAETIMEDOUT) -# define ETIMEDOUT WSAETIMEDOUT -# else -# define ETIMEDOUT 10060 /* This is the value of WSAETIMEDOUT in winsock.h. */ -# endif -#endif - -/* - * Several systems may not define some error numbers; - * defining those which are likely to be missing here will let - * us complete the library builds. - */ -#if !defined(ENOTSUP) -# define ENOTSUP 48 /* This is the value in Solaris. */ -#endif - -#if !defined(ENOSYS) -# define ENOSYS 140 /* Semi-arbitrary value */ -#endif - -#if !defined(EDEADLK) -# if defined(EDEADLOCK) -# define EDEADLK EDEADLOCK -# else -# define EDEADLK 36 /* This is the value in MSVC. */ -# endif -#endif - -/* POSIX 2008 - related to robust mutexes */ -/* - * FIXME: These should be changed for version 3.0.0 onward. - * 42 clashes with EILSEQ. - */ -#if PTW32_VERSION_MAJOR > 2 -# if !defined(EOWNERDEAD) -# define EOWNERDEAD 1000 -# endif -# if !defined(ENOTRECOVERABLE) -# define ENOTRECOVERABLE 1001 -# endif -#else -# if !defined(EOWNERDEAD) -# define EOWNERDEAD 42 -# endif -# if !defined(ENOTRECOVERABLE) -# define ENOTRECOVERABLE 43 -# endif -#endif - -#endif /* !__PTW32_H */ diff --git a/aclocal.m4 b/aclocal.m4 index 8561e862..57cc2233 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -3,28 +3,30 @@ ## ## Pthreads-win32 - POSIX Threads Library for Win32 ## Copyright(C) 1998 John E. Bossom -## Copyright(C) 1999-2012, 2016, Pthreads-win32 contributors -## +## Copyright(C) 1999-2017, Pthreads-win32 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: -## http://sources.redhat.com/pthreads-win32/contributors.html -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library in the file COPYING.LIB; -## if not, write to the Free Software Foundation, Inc., -## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +## https://sourceforge.net/p/pthreads4w/wiki/Contributors/ +## +## This file is part of Pthreads-win32. +## +## Pthreads-win32 is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## Pthreads-win32 is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Pthreads-win32. If not, see . * ## # # PTW32_AC_CHECK_TYPEDEF( TYPENAME, [HEADER] ) diff --git a/cleanup.c b/cleanup.c index ae8ae418..c0a509cc 100644 --- a/cleanup.c +++ b/cleanup.c @@ -10,31 +10,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/configure.ac b/configure.ac index 3c201b2d..36f4f217 100644 --- a/configure.ac +++ b/configure.ac @@ -1,30 +1,32 @@ # configure.ac # -------------------------------------------------------------------------- # -# Pthreads-win32 - POSIX Threads Library for Win32 -# Copyright(C) 1998 John E. Bossom -# Copyright(C) 1999-2012, 2016, Pthreads-win32 contributors -# -# The current list of contributors is contained -# in the file CONTRIBUTORS included with the source -# code distribution. The list can also be seen at the -# following World Wide Web location: -# http://sources.redhat.com/pthreads-win32/contributors.html -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library in the file COPYING.LIB; -# if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * # AC_INIT([pthreads-win32],[git]) AC_CONFIG_HEADERS([config.h]) diff --git a/context.h b/context.h index b7140019..20181467 100644 --- a/context.h +++ b/context.h @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifndef PTW32_CONTEXT_H diff --git a/create.c b/create.c index 5557dec7..ffc41eca 100644 --- a/create.c +++ b/create.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/dll.c b/dll.c index b38581b1..0e8f1da4 100644 --- a/dll.c +++ b/dll.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/errno.c b/errno.c index f9340c4a..d839fe47 100644 --- a/errno.c +++ b/errno.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/global.c b/global.c index 548455f0..f7b1b36c 100644 --- a/global.c +++ b/global.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/implement.h b/implement.h index 12184c1e..b85c3c37 100644 --- a/implement.h +++ b/implement.h @@ -9,30 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Contact Email: Ross.Johnson@homemail.com.au + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #if !defined(_IMPLEMENT_H) diff --git a/pthread.c b/pthread.c index 775988f6..45b158bc 100644 --- a/pthread.c +++ b/pthread.c @@ -10,31 +10,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread.h b/pthread.h index 7a2cd921..cf596ac2 100644 --- a/pthread.h +++ b/pthread.h @@ -4,31 +4,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #if !defined( PTHREAD_H ) diff --git a/pthread_attr_destroy.c b/pthread_attr_destroy.c index 7bb0e320..41bc556c 100644 --- a/pthread_attr_destroy.c +++ b/pthread_attr_destroy.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getaffinity_np.c b/pthread_attr_getaffinity_np.c index 80e05af7..c86a7072 100644 --- a/pthread_attr_getaffinity_np.c +++ b/pthread_attr_getaffinity_np.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getdetachstate.c b/pthread_attr_getdetachstate.c index 93d61335..ea5c4d41 100644 --- a/pthread_attr_getdetachstate.c +++ b/pthread_attr_getdetachstate.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getinheritsched.c b/pthread_attr_getinheritsched.c index 657624cc..b28a7a0e 100644 --- a/pthread_attr_getinheritsched.c +++ b/pthread_attr_getinheritsched.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getname_np.c b/pthread_attr_getname_np.c index b21c3326..1a3811a1 100644 --- a/pthread_attr_getname_np.c +++ b/pthread_attr_getname_np.c @@ -1,54 +1,53 @@ -/* - * 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 + * + * -------------------------------------------------------------------------- + * + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * + */ + +#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 b7be1cba..26bf4104 100644 --- a/pthread_attr_getschedparam.c +++ b/pthread_attr_getschedparam.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getschedpolicy.c b/pthread_attr_getschedpolicy.c index f27f5ee3..e714c3cb 100644 --- a/pthread_attr_getschedpolicy.c +++ b/pthread_attr_getschedpolicy.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getscope.c b/pthread_attr_getscope.c index c5c5f064..9e5a4c07 100644 --- a/pthread_attr_getscope.c +++ b/pthread_attr_getscope.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getstackaddr.c b/pthread_attr_getstackaddr.c index 6e4c73ef..a65ef79f 100644 --- a/pthread_attr_getstackaddr.c +++ b/pthread_attr_getstackaddr.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getstacksize.c b/pthread_attr_getstacksize.c index 827a37a3..5156d55e 100644 --- a/pthread_attr_getstacksize.c +++ b/pthread_attr_getstacksize.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_init.c b/pthread_attr_init.c index 1cbe2e9c..f5e944aa 100644 --- a/pthread_attr_init.c +++ b/pthread_attr_init.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setaffinity_np.c b/pthread_attr_setaffinity_np.c index 53f68fcc..bdfcac3a 100644 --- a/pthread_attr_setaffinity_np.c +++ b/pthread_attr_setaffinity_np.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setdetachstate.c b/pthread_attr_setdetachstate.c index 02dd88bf..63c219cb 100644 --- a/pthread_attr_setdetachstate.c +++ b/pthread_attr_setdetachstate.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setinheritsched.c b/pthread_attr_setinheritsched.c index d551190c..13b854ca 100644 --- a/pthread_attr_setinheritsched.c +++ b/pthread_attr_setinheritsched.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setname_np.c b/pthread_attr_setname_np.c index 78114428..9217756e 100644 --- a/pthread_attr_setname_np.c +++ b/pthread_attr_setname_np.c @@ -1,99 +1,98 @@ -/* - * 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 + * + * -------------------------------------------------------------------------- + * + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * + */ + +#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 3505c9a5..23ecaa19 100644 --- a/pthread_attr_setschedparam.c +++ b/pthread_attr_setschedparam.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setschedpolicy.c b/pthread_attr_setschedpolicy.c index 5fe0c0c7..0b0874e2 100644 --- a/pthread_attr_setschedpolicy.c +++ b/pthread_attr_setschedpolicy.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setscope.c b/pthread_attr_setscope.c index 96bc4941..c3621008 100644 --- a/pthread_attr_setscope.c +++ b/pthread_attr_setscope.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setstackaddr.c b/pthread_attr_setstackaddr.c index 5228d588..cfdd152d 100644 --- a/pthread_attr_setstackaddr.c +++ b/pthread_attr_setstackaddr.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setstacksize.c b/pthread_attr_setstacksize.c index 728a634f..ee13d21d 100644 --- a/pthread_attr_setstacksize.c +++ b/pthread_attr_setstacksize.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrier_destroy.c b/pthread_barrier_destroy.c index 61cd0cda..82584d14 100644 --- a/pthread_barrier_destroy.c +++ b/pthread_barrier_destroy.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrier_init.c b/pthread_barrier_init.c index bc76fcd7..8f81053e 100644 --- a/pthread_barrier_init.c +++ b/pthread_barrier_init.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrier_wait.c b/pthread_barrier_wait.c index 9d573afe..d4b17882 100644 --- a/pthread_barrier_wait.c +++ b/pthread_barrier_wait.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrierattr_destroy.c b/pthread_barrierattr_destroy.c index d8953a9b..d132a523 100644 --- a/pthread_barrierattr_destroy.c +++ b/pthread_barrierattr_destroy.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrierattr_getpshared.c b/pthread_barrierattr_getpshared.c index 7d9736c0..149fb843 100644 --- a/pthread_barrierattr_getpshared.c +++ b/pthread_barrierattr_getpshared.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrierattr_init.c b/pthread_barrierattr_init.c index aef72b4f..187b4fff 100644 --- a/pthread_barrierattr_init.c +++ b/pthread_barrierattr_init.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrierattr_setpshared.c b/pthread_barrierattr_setpshared.c index 7f5dc549..e0226dc7 100644 --- a/pthread_barrierattr_setpshared.c +++ b/pthread_barrierattr_setpshared.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_cancel.c b/pthread_cancel.c index 3c453c49..ec10e585 100644 --- a/pthread_cancel.c +++ b/pthread_cancel.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_cond_destroy.c b/pthread_cond_destroy.c index 12e76330..e3146261 100644 --- a/pthread_cond_destroy.c +++ b/pthread_cond_destroy.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_cond_init.c b/pthread_cond_init.c index b9379a37..970a2cdf 100644 --- a/pthread_cond_init.c +++ b/pthread_cond_init.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_cond_signal.c b/pthread_cond_signal.c index 6c9a1c1c..b5ef5d0e 100644 --- a/pthread_cond_signal.c +++ b/pthread_cond_signal.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * ------------------------------------------------------------- * Algorithm: diff --git a/pthread_cond_wait.c b/pthread_cond_wait.c index 0dd695cb..fc42b013 100644 --- a/pthread_cond_wait.c +++ b/pthread_cond_wait.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * ------------------------------------------------------------- * Algorithm: diff --git a/pthread_condattr_destroy.c b/pthread_condattr_destroy.c index 696065ef..e5af8ea2 100644 --- a/pthread_condattr_destroy.c +++ b/pthread_condattr_destroy.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_condattr_getpshared.c b/pthread_condattr_getpshared.c index dc161a9d..4543bb7e 100644 --- a/pthread_condattr_getpshared.c +++ b/pthread_condattr_getpshared.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_condattr_init.c b/pthread_condattr_init.c index aa32cc6d..b247d2f0 100644 --- a/pthread_condattr_init.c +++ b/pthread_condattr_init.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_condattr_setpshared.c b/pthread_condattr_setpshared.c index 977b5a5c..4fceb2af 100644 --- a/pthread_condattr_setpshared.c +++ b/pthread_condattr_setpshared.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_delay_np.c b/pthread_delay_np.c index 76a54b65..ee725025 100644 --- a/pthread_delay_np.c +++ b/pthread_delay_np.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_detach.c b/pthread_detach.c index 412fd92a..ffe577ca 100644 --- a/pthread_detach.c +++ b/pthread_detach.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_equal.c b/pthread_equal.c index 48da7e20..5033db62 100644 --- a/pthread_equal.c +++ b/pthread_equal.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_exit.c b/pthread_exit.c index bd458c34..e2cf8f15 100644 --- a/pthread_exit.c +++ b/pthread_exit.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getconcurrency.c b/pthread_getconcurrency.c index de46fe7c..3a7360b1 100644 --- a/pthread_getconcurrency.c +++ b/pthread_getconcurrency.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getname_np.c b/pthread_getname_np.c index b56434e5..10ed2d5d 100644 --- a/pthread_getname_np.c +++ b/pthread_getname_np.c @@ -5,31 +5,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getschedparam.c b/pthread_getschedparam.c index 25c7659e..d6f254a4 100644 --- a/pthread_getschedparam.c +++ b/pthread_getschedparam.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getspecific.c b/pthread_getspecific.c index 77caa6b1..a13e0953 100644 --- a/pthread_getspecific.c +++ b/pthread_getspecific.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getunique_np.c b/pthread_getunique_np.c index 55031f04..8bf1bbd9 100755 --- a/pthread_getunique_np.c +++ b/pthread_getunique_np.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getw32threadhandle_np.c b/pthread_getw32threadhandle_np.c index b6ab544d..6377d125 100644 --- a/pthread_getw32threadhandle_np.c +++ b/pthread_getw32threadhandle_np.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_join.c b/pthread_join.c index 96372551..ff3fc11a 100644 --- a/pthread_join.c +++ b/pthread_join.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_key_create.c b/pthread_key_create.c index 6839d88b..2a0bcb95 100644 --- a/pthread_key_create.c +++ b/pthread_key_create.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_key_delete.c b/pthread_key_delete.c index 5c9dfcb5..c6c44802 100644 --- a/pthread_key_delete.c +++ b/pthread_key_delete.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_kill.c b/pthread_kill.c index 9bfa9fa9..d8da0aa0 100644 --- a/pthread_kill.c +++ b/pthread_kill.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_consistent.c b/pthread_mutex_consistent.c index 053a5a6c..fddd6a73 100755 --- a/pthread_mutex_consistent.c +++ b/pthread_mutex_consistent.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_destroy.c b/pthread_mutex_destroy.c index 545d0839..ad6d2f3e 100644 --- a/pthread_mutex_destroy.c +++ b/pthread_mutex_destroy.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_init.c b/pthread_mutex_init.c index 401b5673..9805af28 100644 --- a/pthread_mutex_init.c +++ b/pthread_mutex_init.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_lock.c b/pthread_mutex_lock.c index 5a7cb3ba..995a1483 100644 --- a/pthread_mutex_lock.c +++ b/pthread_mutex_lock.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_timedlock.c b/pthread_mutex_timedlock.c index d1091e98..5f7e8a18 100644 --- a/pthread_mutex_timedlock.c +++ b/pthread_mutex_timedlock.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_trylock.c b/pthread_mutex_trylock.c index 840ec421..75bb27d2 100644 --- a/pthread_mutex_trylock.c +++ b/pthread_mutex_trylock.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_unlock.c b/pthread_mutex_unlock.c index aa5850a1..f9639851 100644 --- a/pthread_mutex_unlock.c +++ b/pthread_mutex_unlock.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_destroy.c b/pthread_mutexattr_destroy.c index ae8428cc..48a231ee 100644 --- a/pthread_mutexattr_destroy.c +++ b/pthread_mutexattr_destroy.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_getkind_np.c b/pthread_mutexattr_getkind_np.c index 13903b87..6f54aaca 100644 --- a/pthread_mutexattr_getkind_np.c +++ b/pthread_mutexattr_getkind_np.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_getpshared.c b/pthread_mutexattr_getpshared.c index b285d2d2..9350d36c 100644 --- a/pthread_mutexattr_getpshared.c +++ b/pthread_mutexattr_getpshared.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_getrobust.c b/pthread_mutexattr_getrobust.c index 28c28657..cfa1fca0 100755 --- a/pthread_mutexattr_getrobust.c +++ b/pthread_mutexattr_getrobust.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_gettype.c b/pthread_mutexattr_gettype.c index a6e4cdb8..5ca487f0 100644 --- a/pthread_mutexattr_gettype.c +++ b/pthread_mutexattr_gettype.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_init.c b/pthread_mutexattr_init.c index 037b88b3..71652bf5 100644 --- a/pthread_mutexattr_init.c +++ b/pthread_mutexattr_init.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_setkind_np.c b/pthread_mutexattr_setkind_np.c index 3d55d821..44a05961 100644 --- a/pthread_mutexattr_setkind_np.c +++ b/pthread_mutexattr_setkind_np.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_setpshared.c b/pthread_mutexattr_setpshared.c index 997f469a..0d0759c9 100644 --- a/pthread_mutexattr_setpshared.c +++ b/pthread_mutexattr_setpshared.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_setrobust.c b/pthread_mutexattr_setrobust.c index 4f18b489..e635194f 100755 --- a/pthread_mutexattr_setrobust.c +++ b/pthread_mutexattr_setrobust.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_settype.c b/pthread_mutexattr_settype.c index bb650eb4..cd69a60f 100644 --- a/pthread_mutexattr_settype.c +++ b/pthread_mutexattr_settype.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_num_processors_np.c b/pthread_num_processors_np.c index f94b074d..1912672b 100644 --- a/pthread_num_processors_np.c +++ b/pthread_num_processors_np.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_once.c b/pthread_once.c index c8098372..48214e6f 100644 --- a/pthread_once.c +++ b/pthread_once.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_destroy.c b/pthread_rwlock_destroy.c index edb6338b..0b519c99 100644 --- a/pthread_rwlock_destroy.c +++ b/pthread_rwlock_destroy.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_init.c b/pthread_rwlock_init.c index 90a66946..57b9967b 100644 --- a/pthread_rwlock_init.c +++ b/pthread_rwlock_init.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_rdlock.c b/pthread_rwlock_rdlock.c index 4d0d393c..33037243 100644 --- a/pthread_rwlock_rdlock.c +++ b/pthread_rwlock_rdlock.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_timedrdlock.c b/pthread_rwlock_timedrdlock.c index ed281f3d..d025206e 100644 --- a/pthread_rwlock_timedrdlock.c +++ b/pthread_rwlock_timedrdlock.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_timedwrlock.c b/pthread_rwlock_timedwrlock.c index 7622d97f..9a1297e4 100644 --- a/pthread_rwlock_timedwrlock.c +++ b/pthread_rwlock_timedwrlock.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_tryrdlock.c b/pthread_rwlock_tryrdlock.c index 5660b5ad..b0b46fdc 100644 --- a/pthread_rwlock_tryrdlock.c +++ b/pthread_rwlock_tryrdlock.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_trywrlock.c b/pthread_rwlock_trywrlock.c index f12df055..b052add9 100644 --- a/pthread_rwlock_trywrlock.c +++ b/pthread_rwlock_trywrlock.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_unlock.c b/pthread_rwlock_unlock.c index 63feac3e..fd1b357b 100644 --- a/pthread_rwlock_unlock.c +++ b/pthread_rwlock_unlock.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_wrlock.c b/pthread_rwlock_wrlock.c index 722a673f..a6c5b9bf 100644 --- a/pthread_rwlock_wrlock.c +++ b/pthread_rwlock_wrlock.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlockattr_destroy.c b/pthread_rwlockattr_destroy.c index e9e3407b..8c5e2f83 100644 --- a/pthread_rwlockattr_destroy.c +++ b/pthread_rwlockattr_destroy.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlockattr_getpshared.c b/pthread_rwlockattr_getpshared.c index 4de7d30e..68f34de0 100644 --- a/pthread_rwlockattr_getpshared.c +++ b/pthread_rwlockattr_getpshared.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlockattr_init.c b/pthread_rwlockattr_init.c index 994b7ec0..58f9fc56 100644 --- a/pthread_rwlockattr_init.c +++ b/pthread_rwlockattr_init.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlockattr_setpshared.c b/pthread_rwlockattr_setpshared.c index 0263c11f..dbd64f29 100644 --- a/pthread_rwlockattr_setpshared.c +++ b/pthread_rwlockattr_setpshared.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_self.c b/pthread_self.c index 71c4f542..2b582ebc 100644 --- a/pthread_self.c +++ b/pthread_self.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setaffinity.c b/pthread_setaffinity.c index fd3a30c0..9f33999a 100644 --- a/pthread_setaffinity.c +++ b/pthread_setaffinity.c @@ -1,243 +1,242 @@ -/* - * 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. + * + * -------------------------------------------------------------------------- + * + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * + */ + +#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 15268257..a3e9acd2 100644 --- a/pthread_setcancelstate.c +++ b/pthread_setcancelstate.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setcanceltype.c b/pthread_setcanceltype.c index 41ecfe0d..65550c82 100644 --- a/pthread_setcanceltype.c +++ b/pthread_setcanceltype.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setconcurrency.c b/pthread_setconcurrency.c index 1861f96e..83dfe078 100644 --- a/pthread_setconcurrency.c +++ b/pthread_setconcurrency.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setname_np.c b/pthread_setname_np.c index 6fb8197d..f0a80753 100644 --- a/pthread_setname_np.c +++ b/pthread_setname_np.c @@ -5,31 +5,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setschedparam.c b/pthread_setschedparam.c index 4e8a0d94..57b23e92 100644 --- a/pthread_setschedparam.c +++ b/pthread_setschedparam.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setspecific.c b/pthread_setspecific.c index 044308b8..7dd420c9 100644 --- a/pthread_setspecific.c +++ b/pthread_setspecific.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_spin_destroy.c b/pthread_spin_destroy.c index 8309a090..c2a0acbb 100644 --- a/pthread_spin_destroy.c +++ b/pthread_spin_destroy.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_spin_init.c b/pthread_spin_init.c index ae3406f6..95c9f299 100644 --- a/pthread_spin_init.c +++ b/pthread_spin_init.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_spin_lock.c b/pthread_spin_lock.c index 300ce97c..df1ef0bc 100644 --- a/pthread_spin_lock.c +++ b/pthread_spin_lock.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_spin_trylock.c b/pthread_spin_trylock.c index 51fc879e..3387e0f3 100644 --- a/pthread_spin_trylock.c +++ b/pthread_spin_trylock.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_spin_unlock.c b/pthread_spin_unlock.c index 762584ce..8e018866 100644 --- a/pthread_spin_unlock.c +++ b/pthread_spin_unlock.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_testcancel.c b/pthread_testcancel.c index f6958563..5c4e25b7 100644 --- a/pthread_testcancel.c +++ b/pthread_testcancel.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_timechange_handler_np.c b/pthread_timechange_handler_np.c index 98934e3c..7b197327 100644 --- a/pthread_timechange_handler_np.c +++ b/pthread_timechange_handler_np.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_timedjoin_np.c b/pthread_timedjoin_np.c index 827b6f67..6727bc4b 100644 --- a/pthread_timedjoin_np.c +++ b/pthread_timedjoin_np.c @@ -1,188 +1,187 @@ -/* - * 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. + * + * -------------------------------------------------------------------------- + * + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * + */ + +#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 e9fe1dae..ad01915f 100644 --- a/pthread_tryjoin_np.c +++ b/pthread_tryjoin_np.c @@ -1,173 +1,172 @@ -/* - * 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. + * + * -------------------------------------------------------------------------- + * + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * + */ + +#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 e61ac4b7..9e3b884f 100644 --- a/pthread_win32_attach_detach_np.c +++ b/pthread_win32_attach_detach_np.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_MCS_lock.c b/ptw32_MCS_lock.c index ad89b2b2..cb60eb25 100644 --- a/ptw32_MCS_lock.c +++ b/ptw32_MCS_lock.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ /* diff --git a/ptw32_callUserDestroyRoutines.c b/ptw32_callUserDestroyRoutines.c index 88325dc9..4e986303 100644 --- a/ptw32_callUserDestroyRoutines.c +++ b/ptw32_callUserDestroyRoutines.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_calloc.c b/ptw32_calloc.c index b01c335e..086a33c2 100644 --- a/ptw32_calloc.c +++ b/ptw32_calloc.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_cond_check_need_init.c b/ptw32_cond_check_need_init.c index 251678cc..afc9e936 100644 --- a/ptw32_cond_check_need_init.c +++ b/ptw32_cond_check_need_init.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_getprocessors.c b/ptw32_getprocessors.c index 4ac3cce9..788d619d 100644 --- a/ptw32_getprocessors.c +++ b/ptw32_getprocessors.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_is_attr.c b/ptw32_is_attr.c index 80917cfb..e7b4865b 100644 --- a/ptw32_is_attr.c +++ b/ptw32_is_attr.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_mutex_check_need_init.c b/ptw32_mutex_check_need_init.c index 846a4b7c..dea73fe2 100644 --- a/ptw32_mutex_check_need_init.c +++ b/ptw32_mutex_check_need_init.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_new.c b/ptw32_new.c index 9fa460bf..0934f3e3 100644 --- a/ptw32_new.c +++ b/ptw32_new.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_processInitialize.c b/ptw32_processInitialize.c index 31b96630..3e3022a7 100644 --- a/ptw32_processInitialize.c +++ b/ptw32_processInitialize.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_processTerminate.c b/ptw32_processTerminate.c index 035bac6d..d6db0355 100644 --- a/ptw32_processTerminate.c +++ b/ptw32_processTerminate.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_relmillisecs.c b/ptw32_relmillisecs.c index 13a3c9f2..dd4d8eaf 100644 --- a/ptw32_relmillisecs.c +++ b/ptw32_relmillisecs.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_reuse.c b/ptw32_reuse.c index 9dbf8bff..b1879fea 100644 --- a/ptw32_reuse.c +++ b/ptw32_reuse.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_rwlock_cancelwrwait.c b/ptw32_rwlock_cancelwrwait.c index 9d5630c3..464181fc 100644 --- a/ptw32_rwlock_cancelwrwait.c +++ b/ptw32_rwlock_cancelwrwait.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_rwlock_check_need_init.c b/ptw32_rwlock_check_need_init.c index 8e24da88..9601e93a 100644 --- a/ptw32_rwlock_check_need_init.c +++ b/ptw32_rwlock_check_need_init.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_semwait.c b/ptw32_semwait.c index 9c76b6b9..ab0c2551 100644 --- a/ptw32_semwait.c +++ b/ptw32_semwait.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_spinlock_check_need_init.c b/ptw32_spinlock_check_need_init.c index 1cd0ff3f..ba6c3424 100644 --- a/ptw32_spinlock_check_need_init.c +++ b/ptw32_spinlock_check_need_init.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_threadDestroy.c b/ptw32_threadDestroy.c index a39dacd3..fbd638ac 100644 --- a/ptw32_threadDestroy.c +++ b/ptw32_threadDestroy.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_threadStart.c b/ptw32_threadStart.c index 1fabca2e..4263e091 100644 --- a/ptw32_threadStart.c +++ b/ptw32_threadStart.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_throw.c b/ptw32_throw.c index 05e1fdb1..c488b2e5 100644 --- a/ptw32_throw.c +++ b/ptw32_throw.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_timespec.c b/ptw32_timespec.c index c9098ec8..65766728 100644 --- a/ptw32_timespec.c +++ b/ptw32_timespec.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_tkAssocCreate.c b/ptw32_tkAssocCreate.c index 85569be3..27751d78 100644 --- a/ptw32_tkAssocCreate.c +++ b/ptw32_tkAssocCreate.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_tkAssocDestroy.c b/ptw32_tkAssocDestroy.c index 87f78abe..95de1952 100644 --- a/ptw32_tkAssocDestroy.c +++ b/ptw32_tkAssocDestroy.c @@ -9,31 +9,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sched.h b/sched.h index 9d6e9b28..06100b66 100644 --- a/sched.h +++ b/sched.h @@ -11,31 +11,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #if !defined(_SCHED_H) #define _SCHED_H diff --git a/sched_get_priority_max.c b/sched_get_priority_max.c index e05867b7..2a34bb07 100644 --- a/sched_get_priority_max.c +++ b/sched_get_priority_max.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sched_get_priority_min.c b/sched_get_priority_min.c index 2c8a6560..4b67ade3 100644 --- a/sched_get_priority_min.c +++ b/sched_get_priority_min.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sched_getscheduler.c b/sched_getscheduler.c index cac3f77e..954a7902 100644 --- a/sched_getscheduler.c +++ b/sched_getscheduler.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sched_setaffinity.c b/sched_setaffinity.c index 07b0fb4f..1bbdf144 100644 --- a/sched_setaffinity.c +++ b/sched_setaffinity.c @@ -1,352 +1,351 @@ -/* - * 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. + * + * -------------------------------------------------------------------------- + * + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * + */ + +#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 3a3df912..8d0e32ea 100644 --- a/sched_setscheduler.c +++ b/sched_setscheduler.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sched_yield.c b/sched_yield.c index 30de449b..b986703f 100644 --- a/sched_yield.c +++ b/sched_yield.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_close.c b/sem_close.c index 5e86ae82..ec9a58f3 100644 --- a/sem_close.c +++ b/sem_close.c @@ -15,31 +15,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_destroy.c b/sem_destroy.c index 22f9f281..1c38d90f 100644 --- a/sem_destroy.c +++ b/sem_destroy.c @@ -15,31 +15,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_getvalue.c b/sem_getvalue.c index 82528cc1..6896f0ad 100644 --- a/sem_getvalue.c +++ b/sem_getvalue.c @@ -15,31 +15,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_init.c b/sem_init.c index 030450b5..07fd3fcc 100644 --- a/sem_init.c +++ b/sem_init.c @@ -13,31 +13,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_open.c b/sem_open.c index 54c34eb1..bf5c6488 100644 --- a/sem_open.c +++ b/sem_open.c @@ -15,31 +15,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_post.c b/sem_post.c index 52a2e20f..b6588a81 100644 --- a/sem_post.c +++ b/sem_post.c @@ -15,31 +15,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_post_multiple.c b/sem_post_multiple.c index c6dfb34d..365da4f7 100644 --- a/sem_post_multiple.c +++ b/sem_post_multiple.c @@ -15,31 +15,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_timedwait.c b/sem_timedwait.c index 922b773f..83dc0f36 100644 --- a/sem_timedwait.c +++ b/sem_timedwait.c @@ -15,31 +15,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_trywait.c b/sem_trywait.c index 5250665a..7d24cb6b 100644 --- a/sem_trywait.c +++ b/sem_trywait.c @@ -15,31 +15,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_unlink.c b/sem_unlink.c index 26bc442c..b71a5528 100644 --- a/sem_unlink.c +++ b/sem_unlink.c @@ -15,31 +15,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_wait.c b/sem_wait.c index 6a29d0e5..cf4ea5df 100644 --- a/sem_wait.c +++ b/sem_wait.c @@ -15,31 +15,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/semaphore.h b/semaphore.h index 79a0ec7d..1a2334a9 100644 --- a/semaphore.h +++ b/semaphore.h @@ -11,31 +11,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2012, 2016, Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #if !defined( SEMAPHORE_H ) #define SEMAPHORE_H diff --git a/signal.c b/signal.c index 845019d3..74eb1ff8 100644 --- a/signal.c +++ b/signal.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ /* diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index afce9fd2..0841d356 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -5,28 +5,30 @@ # # Pthreads-win32 - POSIX Threads Library for Win32 # Copyright(C) 1998 John E. Bossom -# Copyright(C) 1999,2012 Pthreads-win32 contributors -# +# Copyright(C) 1999-2017, Pthreads-win32 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: -# http://sources.redhat.com/pthreads-win32/contributors.html -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library in the file COPYING.LIB; -# if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# https://sourceforge.net/p/pthreads4w/wiki/Contributors/ +# +# This file is part of Pthreads-win32. +# +# Pthreads-win32 is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Pthreads-win32 is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Pthreads-win32. If not, see . * # srcdir = @srcdir@ top_srcdir = @top_srcdir@ diff --git a/tests/affinity1.c b/tests/affinity1.c index 3a80eeae..f74f3b00 100644 --- a/tests/affinity1.c +++ b/tests/affinity1.c @@ -1,126 +1,125 @@ -/* - * 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 + * + * + * -------------------------------------------------------------------------- + * + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * + * + * -------------------------------------------------------------------------- + * + * 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 e3f06c7d..b4f455f6 100644 --- a/tests/affinity2.c +++ b/tests/affinity2.c @@ -1,117 +1,116 @@ -/* - * 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 + * + * + * -------------------------------------------------------------------------- + * + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * + * + * -------------------------------------------------------------------------- + * + * 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..809aaecc 100644 --- a/tests/affinity3.c +++ b/tests/affinity3.c @@ -1,120 +1,119 @@ -/* - * 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 + * + * + * -------------------------------------------------------------------------- + * + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * + * + * -------------------------------------------------------------------------- + * + * 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..a65c5a8a 100644 --- a/tests/affinity4.c +++ b/tests/affinity4.c @@ -1,91 +1,90 @@ -/* - * 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 + * + * + * -------------------------------------------------------------------------- + * + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * + * + * -------------------------------------------------------------------------- + * + * 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..ec651692 100644 --- a/tests/affinity5.c +++ b/tests/affinity5.c @@ -1,124 +1,123 @@ -/* - * 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 + * + * + * -------------------------------------------------------------------------- + * + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * + * + * -------------------------------------------------------------------------- + * + * 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..a69f88da 100644 --- a/tests/affinity6.c +++ b/tests/affinity6.c @@ -1,119 +1,118 @@ -/* - * 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 + * + * + * -------------------------------------------------------------------------- + * + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * + * + * -------------------------------------------------------------------------- + * + * 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..98eb3b0f 100644 --- a/tests/barrier1.c +++ b/tests/barrier1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/barrier2.c b/tests/barrier2.c index 1afd8d07..ea883df2 100644 --- a/tests/barrier2.c +++ b/tests/barrier2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/barrier3.c b/tests/barrier3.c index a3145519..65ebdbef 100644 --- a/tests/barrier3.c +++ b/tests/barrier3.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/barrier4.c b/tests/barrier4.c index 7c427e58..20e4a519 100644 --- a/tests/barrier4.c +++ b/tests/barrier4.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/barrier5.c b/tests/barrier5.c index 86e69838..86731868 100644 --- a/tests/barrier5.c +++ b/tests/barrier5.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/barrier6.c b/tests/barrier6.c index d4d82145..e912ceca 100755 --- a/tests/barrier6.c +++ b/tests/barrier6.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/benchlib.c b/tests/benchlib.c index d8f31ebd..252da1dc 100644 --- a/tests/benchlib.c +++ b/tests/benchlib.c @@ -5,31 +5,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * */ diff --git a/tests/benchtest.h b/tests/benchtest.h index 81f132c8..b3fc6a08 100644 --- a/tests/benchtest.h +++ b/tests/benchtest.h @@ -5,31 +5,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * */ diff --git a/tests/benchtest1.c b/tests/benchtest1.c index ea581043..0a714879 100644 --- a/tests/benchtest1.c +++ b/tests/benchtest1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/benchtest2.c b/tests/benchtest2.c index bab680db..168fc813 100644 --- a/tests/benchtest2.c +++ b/tests/benchtest2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/benchtest3.c b/tests/benchtest3.c index fc0e261d..ed19e5c7 100644 --- a/tests/benchtest3.c +++ b/tests/benchtest3.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/benchtest4.c b/tests/benchtest4.c index 0f59537f..5ed98385 100644 --- a/tests/benchtest4.c +++ b/tests/benchtest4.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/benchtest5.c b/tests/benchtest5.c index 9371ec5e..2eaab7bd 100644 --- a/tests/benchtest5.c +++ b/tests/benchtest5.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cancel1.c b/tests/cancel1.c index f93c497b..2dfe58b6 100644 --- a/tests/cancel1.c +++ b/tests/cancel1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cancel2.c b/tests/cancel2.c index 94106136..85400366 100644 --- a/tests/cancel2.c +++ b/tests/cancel2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cancel3.c b/tests/cancel3.c index 9ccd490a..f94d59f2 100644 --- a/tests/cancel3.c +++ b/tests/cancel3.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cancel4.c b/tests/cancel4.c index 4267f172..f5400f63 100644 --- a/tests/cancel4.c +++ b/tests/cancel4.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cancel5.c b/tests/cancel5.c index 033ecf10..a5a360da 100644 --- a/tests/cancel5.c +++ b/tests/cancel5.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cancel6a.c b/tests/cancel6a.c index e5da0789..59fa6dc3 100644 --- a/tests/cancel6a.c +++ b/tests/cancel6a.c @@ -2,25 +2,32 @@ * 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 + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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: + * 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. + * This file is part of Pthreads-win32. * - * 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 + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cancel6d.c b/tests/cancel6d.c index f94ed5ac..b1dfc077 100644 --- a/tests/cancel6d.c +++ b/tests/cancel6d.c @@ -2,25 +2,32 @@ * 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 + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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: + * 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. + * This file is part of Pthreads-win32. * - * 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 + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cancel7.c b/tests/cancel7.c index cdd8b156..5178d0b8 100644 --- a/tests/cancel7.c +++ b/tests/cancel7.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cancel8.c b/tests/cancel8.c index 697593f6..668ca02d 100644 --- a/tests/cancel8.c +++ b/tests/cancel8.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cancel9.c b/tests/cancel9.c index 472a371b..dde26899 100644 --- a/tests/cancel9.c +++ b/tests/cancel9.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cleanup0.c b/tests/cleanup0.c index 888640b7..4635658b 100644 --- a/tests/cleanup0.c +++ b/tests/cleanup0.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cleanup1.c b/tests/cleanup1.c index 72a43386..c6ca10ea 100644 --- a/tests/cleanup1.c +++ b/tests/cleanup1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cleanup2.c b/tests/cleanup2.c index 52a804e6..19a21162 100644 --- a/tests/cleanup2.c +++ b/tests/cleanup2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cleanup3.c b/tests/cleanup3.c index 7d6a4b96..dbd3351e 100644 --- a/tests/cleanup3.c +++ b/tests/cleanup3.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar1.c b/tests/condvar1.c index 303a87b8..9cffb8bb 100644 --- a/tests/condvar1.c +++ b/tests/condvar1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar1_1.c b/tests/condvar1_1.c index 565697e5..49604494 100644 --- a/tests/condvar1_1.c +++ b/tests/condvar1_1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar1_2.c b/tests/condvar1_2.c index 61185518..916bd188 100644 --- a/tests/condvar1_2.c +++ b/tests/condvar1_2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar2.c b/tests/condvar2.c index 2ca309f1..2ea45985 100644 --- a/tests/condvar2.c +++ b/tests/condvar2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar2_1.c b/tests/condvar2_1.c index bf8170ca..81b7e6d9 100644 --- a/tests/condvar2_1.c +++ b/tests/condvar2_1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar3.c b/tests/condvar3.c index c9943ff8..0a28848a 100644 --- a/tests/condvar3.c +++ b/tests/condvar3.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar3_1.c b/tests/condvar3_1.c index 16f0a64a..3d10a39d 100644 --- a/tests/condvar3_1.c +++ b/tests/condvar3_1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar3_2.c b/tests/condvar3_2.c index 909f6a19..ad895f05 100644 --- a/tests/condvar3_2.c +++ b/tests/condvar3_2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar3_3.c b/tests/condvar3_3.c index 54702847..af4167eb 100644 --- a/tests/condvar3_3.c +++ b/tests/condvar3_3.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar4.c b/tests/condvar4.c index a63104fd..a49a6348 100644 --- a/tests/condvar4.c +++ b/tests/condvar4.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar5.c b/tests/condvar5.c index feeefbcd..daeb2ddf 100644 --- a/tests/condvar5.c +++ b/tests/condvar5.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar6.c b/tests/condvar6.c index 1e4baf2c..efaa21f5 100644 --- a/tests/condvar6.c +++ b/tests/condvar6.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar7.c b/tests/condvar7.c index f1fc30ee..5617b32e 100644 --- a/tests/condvar7.c +++ b/tests/condvar7.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar8.c b/tests/condvar8.c index a2e0931a..03202efa 100644 --- a/tests/condvar8.c +++ b/tests/condvar8.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar9.c b/tests/condvar9.c index d928fc1e..ec8b67a8 100644 --- a/tests/condvar9.c +++ b/tests/condvar9.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/context1.c b/tests/context1.c index 6d330d18..b9eb805c 100644 --- a/tests/context1.c +++ b/tests/context1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/context2.c b/tests/context2.c index 41299b53..0de6f3f7 100644 --- a/tests/context2.c +++ b/tests/context2.c @@ -1,159 +1,159 @@ -/* - * 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 + * + * + * -------------------------------------------------------------------------- + * + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * + * + * -------------------------------------------------------------------------- + * + * 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..3a2fbcbc 100644 --- a/tests/count1.c +++ b/tests/count1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/create1.c b/tests/create1.c index 63b1bf6e..f3a99471 100644 --- a/tests/create1.c +++ b/tests/create1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/create2.c b/tests/create2.c index 9e56d9d4..7ff484e0 100644 --- a/tests/create2.c +++ b/tests/create2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/create3.c b/tests/create3.c index 5063d0ba..e6a32529 100644 --- a/tests/create3.c +++ b/tests/create3.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/delay1.c b/tests/delay1.c index 9c5293e8..d4738de0 100644 --- a/tests/delay1.c +++ b/tests/delay1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/delay2.c b/tests/delay2.c index 5ff6c1de..141c9a60 100644 --- a/tests/delay2.c +++ b/tests/delay2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/detach1.c b/tests/detach1.c index 4eb8cb73..4aa318d5 100644 --- a/tests/detach1.c +++ b/tests/detach1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/equal1.c b/tests/equal1.c index 2dfa7942..18796cb4 100644 --- a/tests/equal1.c +++ b/tests/equal1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/errno1.c b/tests/errno1.c index 14e8150a..c0b1a855 100644 --- a/tests/errno1.c +++ b/tests/errno1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/exception1.c b/tests/exception1.c index 2ba4849c..05639d82 100644 --- a/tests/exception1.c +++ b/tests/exception1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/exception2.c b/tests/exception2.c index 7842b842..13ae0a10 100644 --- a/tests/exception2.c +++ b/tests/exception2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/exception3.c b/tests/exception3.c index 50778ec8..dbcd7d9b 100644 --- a/tests/exception3.c +++ b/tests/exception3.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/exception3_0.c b/tests/exception3_0.c index ab25c460..bb6fa102 100644 --- a/tests/exception3_0.c +++ b/tests/exception3_0.c @@ -1,190 +1,189 @@ -/* - * 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 + * + * + * -------------------------------------------------------------------------- + * + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * + * + * -------------------------------------------------------------------------- + * + * 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..7e5350e1 100644 --- a/tests/exit1.c +++ b/tests/exit1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/exit2.c b/tests/exit2.c index a534d477..f8370ab5 100644 --- a/tests/exit2.c +++ b/tests/exit2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/exit3.c b/tests/exit3.c index 13397200..d94d8945 100644 --- a/tests/exit3.c +++ b/tests/exit3.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/exit4.c b/tests/exit4.c index e4138389..8f3eee27 100644 --- a/tests/exit4.c +++ b/tests/exit4.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/exit5.c b/tests/exit5.c index b7b8ad7a..648bb7ab 100644 --- a/tests/exit5.c +++ b/tests/exit5.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/eyal1.c b/tests/eyal1.c index 5da95ff5..411e6231 100644 --- a/tests/eyal1.c +++ b/tests/eyal1.c @@ -5,31 +5,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/inherit1.c b/tests/inherit1.c index d09cfc77..515f7ab5 100644 --- a/tests/inherit1.c +++ b/tests/inherit1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/join0.c b/tests/join0.c index f5c040eb..5a432828 100644 --- a/tests/join0.c +++ b/tests/join0.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/join1.c b/tests/join1.c index a0412791..53993341 100644 --- a/tests/join1.c +++ b/tests/join1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/join2.c b/tests/join2.c index 8864f221..340970cf 100644 --- a/tests/join2.c +++ b/tests/join2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/join3.c b/tests/join3.c index 35368667..64ddb4d7 100644 --- a/tests/join3.c +++ b/tests/join3.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/join4.c b/tests/join4.c index 3961dfeb..aa80c887 100644 --- a/tests/join4.c +++ b/tests/join4.c @@ -1,81 +1,80 @@ -/* - * 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. + * + * + * -------------------------------------------------------------------------- + * + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * + * + * -------------------------------------------------------------------------- + * + * 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..217488cb 100644 --- a/tests/kill1.c +++ b/tests/kill1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex1.c b/tests/mutex1.c index 6d9beaf8..e3b64cc1 100644 --- a/tests/mutex1.c +++ b/tests/mutex1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex1e.c b/tests/mutex1e.c index 9d0a32ec..b49454b7 100644 --- a/tests/mutex1e.c +++ b/tests/mutex1e.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex1n.c b/tests/mutex1n.c index 7e306cfa..a8b666f2 100644 --- a/tests/mutex1n.c +++ b/tests/mutex1n.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex1r.c b/tests/mutex1r.c index fb2de7ea..a800ed40 100644 --- a/tests/mutex1r.c +++ b/tests/mutex1r.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex2.c b/tests/mutex2.c index 8bd490f3..42bb66d5 100644 --- a/tests/mutex2.c +++ b/tests/mutex2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex2e.c b/tests/mutex2e.c index dd17ccd8..8d3ac9de 100644 --- a/tests/mutex2e.c +++ b/tests/mutex2e.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex2r.c b/tests/mutex2r.c index 740d6073..da3852bb 100644 --- a/tests/mutex2r.c +++ b/tests/mutex2r.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex3.c b/tests/mutex3.c index 94ca2dae..3f327419 100644 --- a/tests/mutex3.c +++ b/tests/mutex3.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex3e.c b/tests/mutex3e.c index 40911fc8..ed0b1cd8 100644 --- a/tests/mutex3e.c +++ b/tests/mutex3e.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex3r.c b/tests/mutex3r.c index 891692b4..18fae5a6 100644 --- a/tests/mutex3r.c +++ b/tests/mutex3r.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex4.c b/tests/mutex4.c index 220c2601..dadf50f5 100644 --- a/tests/mutex4.c +++ b/tests/mutex4.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex5.c b/tests/mutex5.c index 6d123793..06522d38 100644 --- a/tests/mutex5.c +++ b/tests/mutex5.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6.c b/tests/mutex6.c index 08081010..59ed0ea8 100644 --- a/tests/mutex6.c +++ b/tests/mutex6.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6e.c b/tests/mutex6e.c index d6f69546..6d54ff9a 100644 --- a/tests/mutex6e.c +++ b/tests/mutex6e.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6es.c b/tests/mutex6es.c index 6fa2424f..3a29826e 100644 --- a/tests/mutex6es.c +++ b/tests/mutex6es.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6n.c b/tests/mutex6n.c index e4681a5c..e066ebe3 100644 --- a/tests/mutex6n.c +++ b/tests/mutex6n.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6r.c b/tests/mutex6r.c index 41fc6914..a149ed6f 100644 --- a/tests/mutex6r.c +++ b/tests/mutex6r.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6rs.c b/tests/mutex6rs.c index d17566d7..0662e3f0 100644 --- a/tests/mutex6rs.c +++ b/tests/mutex6rs.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6s.c b/tests/mutex6s.c index 26dc0215..bebd22f7 100644 --- a/tests/mutex6s.c +++ b/tests/mutex6s.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex7.c b/tests/mutex7.c index ee3fe5c1..5ea4126f 100644 --- a/tests/mutex7.c +++ b/tests/mutex7.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex7e.c b/tests/mutex7e.c index 1fc1a15f..d2015331 100644 --- a/tests/mutex7e.c +++ b/tests/mutex7e.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex7n.c b/tests/mutex7n.c index feca8ee2..302c26d0 100644 --- a/tests/mutex7n.c +++ b/tests/mutex7n.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex7r.c b/tests/mutex7r.c index 3e0ae135..f07c12c8 100644 --- a/tests/mutex7r.c +++ b/tests/mutex7r.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex8.c b/tests/mutex8.c index d2ed686f..576d8089 100644 --- a/tests/mutex8.c +++ b/tests/mutex8.c @@ -2,25 +2,32 @@ * mutex8.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright (C) 1998 Ben Elliston and Ross Johnson - * Copyright (C) 1999,2000,2001 Ross Johnson + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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: + * 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. + * This file is part of Pthreads-win32. * - * 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 + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex8e.c b/tests/mutex8e.c index 5cf2de68..c35a1748 100644 --- a/tests/mutex8e.c +++ b/tests/mutex8e.c @@ -2,25 +2,32 @@ * mutex8e.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright (C) 1998 Ben Elliston and Ross Johnson - * Copyright (C) 1999,2000,2001 Ross Johnson + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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: + * 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. + * This file is part of Pthreads-win32. * - * 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 + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex8n.c b/tests/mutex8n.c index 0ea3cf32..d8d982fb 100644 --- a/tests/mutex8n.c +++ b/tests/mutex8n.c @@ -2,25 +2,32 @@ * mutex8n.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright (C) 1998 Ben Elliston and Ross Johnson - * Copyright (C) 1999,2000,2001 Ross Johnson + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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: + * 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. + * This file is part of Pthreads-win32. * - * 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 + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex8r.c b/tests/mutex8r.c index 83673c1c..d688872f 100644 --- a/tests/mutex8r.c +++ b/tests/mutex8r.c @@ -2,25 +2,32 @@ * mutex8r.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright (C) 1998 Ben Elliston and Ross Johnson - * Copyright (C) 1999,2000,2001 Ross Johnson + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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: + * 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. + * This file is part of Pthreads-win32. * - * 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 + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/name_np1.c b/tests/name_np1.c index c6129fc0..93186741 100644 --- a/tests/name_np1.c +++ b/tests/name_np1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/name_np2.c b/tests/name_np2.c index 601d97f1..f5a8bc29 100644 --- a/tests/name_np2.c +++ b/tests/name_np2.c @@ -1,110 +1,109 @@ -/* - * 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 + * + * + * -------------------------------------------------------------------------- + * + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * + * + * -------------------------------------------------------------------------- + * + * 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..214e0936 100644 --- a/tests/once1.c +++ b/tests/once1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/once2.c b/tests/once2.c index ffd6bfe1..72cc0f97 100644 --- a/tests/once2.c +++ b/tests/once2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/once3.c b/tests/once3.c index 6c772860..7ce6de52 100644 --- a/tests/once3.c +++ b/tests/once3.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/once4.c b/tests/once4.c index b708aae6..7006c126 100644 --- a/tests/once4.c +++ b/tests/once4.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/priority1.c b/tests/priority1.c index d77420f8..9de3d1b4 100644 --- a/tests/priority1.c +++ b/tests/priority1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/priority2.c b/tests/priority2.c index c4552e62..fdc16a8e 100644 --- a/tests/priority2.c +++ b/tests/priority2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/reuse1.c b/tests/reuse1.c index bcf8571c..4394cca9 100644 --- a/tests/reuse1.c +++ b/tests/reuse1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/reuse2.c b/tests/reuse2.c index 93643b90..c27312e9 100644 --- a/tests/reuse2.c +++ b/tests/reuse2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/robust1.c b/tests/robust1.c index 4bb479ac..127deb29 100755 --- a/tests/robust1.c +++ b/tests/robust1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/robust2.c b/tests/robust2.c index 795a17ff..083547d2 100755 --- a/tests/robust2.c +++ b/tests/robust2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/robust3.c b/tests/robust3.c index e9d05c7d..1d80e2d7 100755 --- a/tests/robust3.c +++ b/tests/robust3.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/robust4.c b/tests/robust4.c index 35d5b84f..e27fcf07 100755 --- a/tests/robust4.c +++ b/tests/robust4.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/robust5.c b/tests/robust5.c index 82e592e9..531fb034 100755 --- a/tests/robust5.c +++ b/tests/robust5.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock1.c b/tests/rwlock1.c index e76e920e..cca45c8d 100644 --- a/tests/rwlock1.c +++ b/tests/rwlock1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock2.c b/tests/rwlock2.c index e9aff324..b6d9b07a 100644 --- a/tests/rwlock2.c +++ b/tests/rwlock2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock2_t.c b/tests/rwlock2_t.c index d6a96713..d7a4342c 100644 --- a/tests/rwlock2_t.c +++ b/tests/rwlock2_t.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock3.c b/tests/rwlock3.c index 08bda6e2..c8451c50 100644 --- a/tests/rwlock3.c +++ b/tests/rwlock3.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock3_t.c b/tests/rwlock3_t.c index 9076496e..1fe0d0f2 100644 --- a/tests/rwlock3_t.c +++ b/tests/rwlock3_t.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock4.c b/tests/rwlock4.c index b1ff7e0e..a5a62d54 100644 --- a/tests/rwlock4.c +++ b/tests/rwlock4.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock4_t.c b/tests/rwlock4_t.c index bc871b83..5e13903b 100644 --- a/tests/rwlock4_t.c +++ b/tests/rwlock4_t.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock5.c b/tests/rwlock5.c index 2d6e80cc..b9329feb 100644 --- a/tests/rwlock5.c +++ b/tests/rwlock5.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock5_t.c b/tests/rwlock5_t.c index 03e6c295..ecb099cc 100644 --- a/tests/rwlock5_t.c +++ b/tests/rwlock5_t.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock6.c b/tests/rwlock6.c index af523b44..22b50557 100644 --- a/tests/rwlock6.c +++ b/tests/rwlock6.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock6_t.c b/tests/rwlock6_t.c index b33cd480..3c7ff959 100644 --- a/tests/rwlock6_t.c +++ b/tests/rwlock6_t.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock6_t2.c b/tests/rwlock6_t2.c index 279ca770..9d4095ad 100644 --- a/tests/rwlock6_t2.c +++ b/tests/rwlock6_t2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/self1.c b/tests/self1.c index 8893f6e6..b91843d1 100644 --- a/tests/self1.c +++ b/tests/self1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/self2.c b/tests/self2.c index 3fff003d..01b593db 100644 --- a/tests/self2.c +++ b/tests/self2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore1.c b/tests/semaphore1.c index 938f0b59..9622a86b 100644 --- a/tests/semaphore1.c +++ b/tests/semaphore1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore2.c b/tests/semaphore2.c index de56cb31..33dbcebc 100644 --- a/tests/semaphore2.c +++ b/tests/semaphore2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore3.c b/tests/semaphore3.c index 810d6777..edce9f43 100644 --- a/tests/semaphore3.c +++ b/tests/semaphore3.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore4.c b/tests/semaphore4.c index eab1d890..6fcee5cc 100644 --- a/tests/semaphore4.c +++ b/tests/semaphore4.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore4t.c b/tests/semaphore4t.c index acc7985d..0cca292d 100644 --- a/tests/semaphore4t.c +++ b/tests/semaphore4t.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore5.c b/tests/semaphore5.c index 5ebcb35c..a8bf4353 100644 --- a/tests/semaphore5.c +++ b/tests/semaphore5.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/sequence1.c b/tests/sequence1.c index 51c3da7c..41f19a26 100755 --- a/tests/sequence1.c +++ b/tests/sequence1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/spin1.c b/tests/spin1.c index 82af2ca7..542c5a02 100644 --- a/tests/spin1.c +++ b/tests/spin1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/spin2.c b/tests/spin2.c index 267cd5c3..53c8ac49 100644 --- a/tests/spin2.c +++ b/tests/spin2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/spin3.c b/tests/spin3.c index e5a89cf5..6e674d78 100644 --- a/tests/spin3.c +++ b/tests/spin3.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/spin4.c b/tests/spin4.c index 91710479..fc95eb29 100644 --- a/tests/spin4.c +++ b/tests/spin4.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/stress1.c b/tests/stress1.c index 333b5d7f..79ebc272 100644 --- a/tests/stress1.c +++ b/tests/stress1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/test.h b/tests/test.h index bced8fb3..6da1f148 100644 --- a/tests/test.h +++ b/tests/test.h @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the 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/p/pthreads4w/wiki/Contributors/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * This file is part of Pthreads-win32. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * */ 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..7b198734 100644 --- a/tests/timeouts.c +++ b/tests/timeouts.c @@ -1,252 +1,251 @@ -/* - * 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 + * + * + * -------------------------------------------------------------------------- + * + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2017, Pthreads-win32 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/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * + * + * -------------------------------------------------------------------------- + * + * 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..b95eafd3 100644 --- a/tests/tryentercs.c +++ b/tests/tryentercs.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/tryentercs2.c b/tests/tryentercs2.c index 2df8cd82..0fdb42ac 100644 --- a/tests/tryentercs2.c +++ b/tests/tryentercs2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/tsd1.c b/tests/tsd1.c index 4a5ade2c..34e28ad6 100644 --- a/tests/tsd1.c +++ b/tests/tsd1.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * * -------------------------------------------------------------------------- diff --git a/tests/tsd2.c b/tests/tsd2.c index 471026a9..fd97edb6 100644 --- a/tests/tsd2.c +++ b/tests/tsd2.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * * -------------------------------------------------------------------------- diff --git a/tests/tsd3.c b/tests/tsd3.c index af88f989..600a3581 100644 --- a/tests/tsd3.c +++ b/tests/tsd3.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * * -------------------------------------------------------------------------- diff --git a/tests/valid1.c b/tests/valid1.c index 13266795..df913f4e 100644 --- a/tests/valid1.c +++ b/tests/valid1.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/valid2.c b/tests/valid2.c index 5b04fa6b..f88b9bd8 100644 --- a/tests/valid2.c +++ b/tests/valid2.c @@ -6,31 +6,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/version.rc b/version.rc index 23d265d3..285c84d7 100644 --- a/version.rc +++ b/version.rc @@ -4,31 +4,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #include diff --git a/w32_CancelableWait.c b/w32_CancelableWait.c index dcf28e20..4649219e 100644 --- a/w32_CancelableWait.c +++ b/w32_CancelableWait.c @@ -8,31 +8,30 @@ * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2017, Pthreads-win32 contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * This file is part of Pthreads-win32. + * + * Pthreads-win32 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads-win32 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads-win32. If not, see . * */ #ifdef HAVE_CONFIG_H From c961eb76baa21222a4707e17140c175ae4b1debb Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 26 Dec 2016 19:19:40 +1100 Subject: [PATCH 117/207] LGPLv3 changes --- NEWS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 25b0cbd5..2e902800 100644 --- a/NEWS +++ b/NEWS @@ -12,13 +12,13 @@ pre Windows 2000 systems. License Change -------------- -Pthreads-win32 version 2.11.0 is being release under the Lesser GNU +Pthreads-win32 version 2.11.0 is being released under the Lesser GNU Public License version 3 (LGPLv3). The next major version of this software (version 3) will be released -under the Apache License version 2.0 and this release 2.11 under -LGPLv3 will mean that modifications to version 3 of this software can -also be backported to version 2 going forward. +under the Apache License version 2.0 and releasing 2.11 under +LGPLv3 will allow modifications to version 3 of this software to be +backported to version 2 going forward. Testing and verification ------------------------ From 7dc92558a469a800045a25a22b94cb74edd95f2e Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sat, 7 Jan 2017 07:52:41 +1100 Subject: [PATCH 118/207] Cast to quell lost precision warning from gcc x86_64 --- ANNOUNCE | 12 ++++++------ tests/exit2.c | 4 ++-- tests/exit3.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 611fea67..270bef36 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,14 +1,14 @@ PTHREADS4W RELEASE 2.10.0 (2016-09-18) -------------------------------------- -Web Site: http://sourceforge.net/projects/pthreads4w/ -Repository: http://sourceforge.net/p/pthreads4w/code -Releases: http://sourceforge.net/projects/pthreads4w/files +Web Site: https://sourceforge.net/projects/pthreads4w/ +Repository: https://sourceforge.net/p/pthreads4w/code +Releases: https://sourceforge.net/projects/pthreads4w/files Maintainer: Ross Johnson We are pleased to announce the availability of a new release of -Pthreads4w (a.k.a. Pthreads-win32), an Open Source Software implementation of the -Threads component of the SUSV3 Standard for Microsoft's +Pthreads4w (a.k.a. Pthreads-win32), an Open Source Software implementation +of the Threads component of the SUSV3 Standard for Microsoft's Windows (x86 and x64). Some relevant functions from other sections of SUSV3 are also supported including semaphores and scheduling functions. See the Conformance section below for details. @@ -28,7 +28,7 @@ Release 2.9.1 was probably the last to provide pre-built libraries. The supporte compilers are now all available free for personal use. The MSVS version should build out of the box using nmake. The GCC versions now make use of GNU autoconf to generate a configure script which in turn creates a custom config.h for the -environment you use: MinGW or MinGW64, etc. +environment you use: MinGW or MinGW64, etc. and the GNUmakefiles. Acknowledgements diff --git a/tests/exit2.c b/tests/exit2.c index f8370ab5..c3ab08b8 100644 --- a/tests/exit2.c +++ b/tests/exit2.c @@ -43,7 +43,7 @@ void * func(void * arg) { - int failed = (int) arg; + int failed = (int)(size_t) arg; pthread_exit(arg); @@ -51,7 +51,7 @@ func(void * arg) /* * Trick gcc compiler into not issuing a warning here */ - assert(failed - (int)arg); + assert(failed - (int)(size_t)arg); return NULL; } diff --git a/tests/exit3.c b/tests/exit3.c index d94d8945..db6b4f5b 100644 --- a/tests/exit3.c +++ b/tests/exit3.c @@ -41,7 +41,7 @@ void * func(void * arg) { - int failed = (int) arg; + int failed = (int)(size_t) arg; pthread_exit(arg); @@ -49,7 +49,7 @@ func(void * arg) /* * assert(0) in a way to prevent warning or optimising away. */ - assert(failed - (int) arg); + assert(failed - (int)(size_t) arg); return NULL; } From 86ed26f1b875334c2bdd3d998b88fe6b10b96317 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sat, 7 Jan 2017 08:31:54 +1100 Subject: [PATCH 119/207] Update license changes --- NEWS | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index 2e902800..5d8a8666 100644 --- a/NEWS +++ b/NEWS @@ -10,15 +10,29 @@ New bug fixes in all releases since 2.8.0 have NOT been applied to the Some changes from 2011-02-26 onward may not be compatible with pre Windows 2000 systems. -License Change --------------- -Pthreads-win32 version 2.11.0 is being released under the Lesser GNU -Public License version 3 (LGPLv3). +License Change to LGPL v3 +------------------------- +Pthreads-win32 version 2.11 and all future 2.x versions will be released +under the Lesser GNU Public License version 3 (LGPLv3). +Planned Release Under the Apache License v2 +------------------------------------------- The next major version of this software (version 3) will be released -under the Apache License version 2.0 and releasing 2.11 under -LGPLv3 will allow modifications to version 3 of this software to be -backported to version 2 going forward. +under the Apache License version 2.0 (ALv2). Releasing 2.11 under LGPLv3 +will allow modifications to version 3 of this software to be backported +to version 2 going forward. Further to this, any GPL projects currently +using this library will be able to continue to use either version 2 or 3 +of this code in their projects. + +For more information please see: +https://www.apache.org/licenses/GPL-compatibility.html + +In order to remain consistent with this change, from this point on +modifications to this library will only be accepted against version 3 +of this software under the terms of the ALv2. They will then, where +appropriate, be backported to version 2. + +We hope to release version 3 at the same time as we release version 2.11. Testing and verification ------------------------ From 9bee0860555dc00e8fc3b6fcac71870899c1a512 Mon Sep 17 00:00:00 2001 From: Nicholas Twerdochlib Date: Thu, 30 Mar 2017 12:17:18 -0400 Subject: [PATCH 120/207] changed _pth32.h to _ptw32.h for install --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3f6bfdfb..cf3cac47 100644 --- a/Makefile +++ b/Makefile @@ -209,7 +209,7 @@ install: if not exist $(HDRDEST) mkdir $(HDRDEST) if exist pthreadV*.dll copy pthreadV*.dll $(DLLDEST) copy pthreadV*.lib $(LIBDEST) - copy _pth32.h $(HDRDEST) + copy _ptw32.h $(HDRDEST) copy pthread.h $(HDRDEST) copy sched.h $(HDRDEST) copy semaphore.h $(HDRDEST) From 1a0cea6209066012902c9fa107f099140c024fed Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sat, 21 Jul 2018 10:45:28 +1000 Subject: [PATCH 121/207] Revert to previous revision --- _ptw32.h | 199 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 199 insertions(+) diff --git a/_ptw32.h b/_ptw32.h index 43bdd9c5..c82741aa 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -33,3 +33,202 @@ * * You should have received a copy of the GNU General Public License * along with Pthreads-win32. If not, see . * + */ +#ifndef __PTW32_H +#define __PTW32_H + +/* See the README file for an explanation of the pthreads-win32 + * version numbering scheme and how the DLL is named etc. + * + * FIXME: consider moving this to <_ptw32.h>; maybe also add a + * leading underscore to the macro names. + */ +#define PTW32_VERSION_MAJOR 2 +#define PTW32_VERSION_MINOR 10 +#define PTW32_VERSION_MICRO 0 +#define PTW32_VERION_BUILD 0 +#define PTW32_VERSION 2,10,0,0 +#define PTW32_VERSION_STRING "2, 10, 0, 0\0" + +#if defined(__GNUC__) +# pragma GCC system_header +# if ! defined __declspec +# error "Please upgrade your GNU compiler to one that supports __declspec." +# endif +#endif + +#if defined (__cplusplus) +# define __PTW32_BEGIN_C_DECLS extern "C" { +# define __PTW32_END_C_DECLS } +#else +# define __PTW32_BEGIN_C_DECLS +# define __PTW32_END_C_DECLS +#endif + +#if defined (PTW32_STATIC_LIB) && _MSC_VER >= 1400 +# undef PTW32_STATIC_LIB +# define PTW32_STATIC_TLSLIB +#endif + +/* When building the library, you should define PTW32_BUILD so that + * the variables/functions are exported correctly. When using the library, + * do NOT define PTW32_BUILD, and then the variables/functions will + * be imported correctly. + * + * FIXME: Used defined feature test macros, such as PTW32_STATIC_LIB, (and + * maybe even PTW32_BUILD), should be renamed with one initial underscore; + * internally defined macros, such as PTW32_DLLPORT, should be renamed with + * two initial underscores ... perhaps __PTW32_DECLSPEC is nicer anyway? + */ +#if defined PTW32_STATIC_LIB || defined PTW32_STATIC_TLSLIB +# define PTW32_DLLPORT + +#elif defined PTW32_BUILD +# define PTW32_DLLPORT __declspec (dllexport) +#else +# define PTW32_DLLPORT /*__declspec (dllimport)*/ +#endif + +#ifndef PTW32_CDECL +/* FIXME: another internal macro; should have two initial underscores; + * Nominally, we prefer to use __cdecl calling convention for all our + * functions, but we map it through this macro alias to facilitate the + * possible choice of alternatives; for example: + */ +# ifdef _OPEN_WATCOM_SOURCE + /* The Open Watcom C/C++ compiler uses a non-standard default calling + * convention, (similar to __fastcall), which passes function arguments + * in registers, unless the __cdecl convention is explicitly specified + * in exposed function prototypes. + * + * Our preference is to specify the __cdecl convention for all calls, + * even though this could slow Watcom code down slightly. If you know + * that the Watcom compiler will be used to build both the DLL and your + * application, then you may #define _OPEN_WATCOM_SOURCE, so disabling + * the forced specification of __cdecl for all function declarations; + * remember that this must be defined consistently, for both the DLL + * build, and the application build. + */ +# define PTW32_CDECL +# else +# define PTW32_CDECL __cdecl +# endif +#endif + +/* + * This is more or less a duplicate of what is in the autoconf config.h, + * which is only used when building the pthread-win32 libraries. They + */ + +#if !defined(PTW32_CONFIG_H) && !defined(__PTW32_PSEUDO_CONFIG_H_SOURCED) +# define __PTW32_PSEUDO_CONFIG_H_SOURCED +# if defined(WINCE) +# undef HAVE_CPU_AFFINITY +# define NEED_DUPLICATEHANDLE +# define NEED_CREATETHREAD +# define NEED_ERRNO +# define NEED_CALLOC +# define NEED_FTIME +# define NEED_UNICODE_CONSTS +# define NEED_PROCESS_AFFINITY_MASK +/* This may not be needed */ +# define RETAIN_WSALASTERROR +# elif defined(_MSC_VER) +# if _MSC_VER >= 1900 +# define HAVE_STRUCT_TIMESPEC +# elif _MSC_VER < 1300 +# define PTW32_CONFIG_MSVC6 +# elif _MSC_VER < 1400 +# define PTW32_CONFIG_MSVC7 +# endif +# elif defined(_UWIN) +# define HAVE_MODE_T +# define HAVE_STRUCT_TIMESPEC +# define HAVE_SIGNAL_H +# endif +#endif + +/* + * If HAVE_ERRNO_H is defined then assume that autoconf has been used + * to overwrite config.h, otherwise the original config.h is in use + * at build-time or the above block of defines is in use otherwise + * and NEED_ERRNO is either defined or not defined. + */ +#if defined(HAVE_ERRNO_H) || !defined(NEED_ERRNO) +# include +#else +# include "need_errno.h" +#endif + +#if defined(__BORLANDC__) +# define int64_t LONGLONG +# define uint64_t ULONGLONG +#elif !defined(__MINGW32__) +# define int64_t _int64 +# define uint64_t unsigned _int64 +# if defined(PTW32_CONFIG_MSVC6) + typedef long intptr_t; +# endif +#elif defined(HAVE_STDINT_H) && HAVE_STDINT_H == 1 +# include +#endif + +/* + * In case ETIMEDOUT hasn't been defined above somehow. + */ +#if !defined(ETIMEDOUT) + /* + * note: ETIMEDOUT is no longer defined in winsock.h + * WSAETIMEDOUT is so use its value. + */ +# include +# if defined(WSAETIMEDOUT) +# define ETIMEDOUT WSAETIMEDOUT +# else +# define ETIMEDOUT 10060 /* This is the value of WSAETIMEDOUT in winsock.h. */ +# endif +#endif + +/* + * Several systems may not define some error numbers; + * defining those which are likely to be missing here will let + * us complete the library builds. + */ +#if !defined(ENOTSUP) +# define ENOTSUP 48 /* This is the value in Solaris. */ +#endif + +#if !defined(ENOSYS) +# define ENOSYS 140 /* Semi-arbitrary value */ +#endif + +#if !defined(EDEADLK) +# if defined(EDEADLOCK) +# define EDEADLK EDEADLOCK +# else +# define EDEADLK 36 /* This is the value in MSVC. */ +# endif +#endif + +/* POSIX 2008 - related to robust mutexes */ +/* + * FIXME: These should be changed for version 3.0.0 onward. + * 42 clashes with EILSEQ. + */ +#if PTW32_VERSION_MAJOR > 2 +# if !defined(EOWNERDEAD) +# define EOWNERDEAD 1000 +# endif +# if !defined(ENOTRECOVERABLE) +# define ENOTRECOVERABLE 1001 +# endif +#else +# if !defined(EOWNERDEAD) +# define EOWNERDEAD 42 +# endif +# if !defined(ENOTRECOVERABLE) +# define ENOTRECOVERABLE 43 +# endif +#endif + +#endif /* !__PTW32_H */ From 57a84d291189c3e5054ea91e6a90feb9c7cc9a56 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sun, 22 Jul 2018 18:08:29 +1000 Subject: [PATCH 122/207] Attempts to get /MT passing tests --- ChangeLog | 11 +++++++++++ Makefile | 12 +++++++++++- _ptw32.h | 4 ++-- dll.c | 7 +++++++ tests/ChangeLog | 5 +++++ tests/reinit1.c | 8 +++++++- 6 files changed, 43 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index dbdb20f6..c96a0464 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2018-07-22 Ross Johnson + + * Makefile (all-tests-md): New; run the /MD build and tests from + all-tests-cflags. + * Makefile (all-tests-mt): New; run the /MT build and tests from + all-tests-cflags. + * Makefile (all-tests-cflags): retain; require all-tests-md and + all-tests-mt. + * _ptw32.h (int64_t): change from #define to typedef. + * _ptw32.h (uint64_t): Likewise. + 2016-12-18 Ross Johnson * implement.h (PTW32_TEST_SNEAK_PEEK): Defined in tests/test.h diff --git a/Makefile b/Makefile index cf3cac47..8e714a55 100644 --- a/Makefile +++ b/Makefile @@ -114,11 +114,21 @@ all-tests: @ echo $@ completed successfully. all-tests-cflags: + $(MAKE) all-tests-md all-tests-mt + @ echo $@ completed successfully. + +all-tests-md: @ -$(SETENV) $(MAKE) all-tests XCFLAGS="/W3 /WX /MD /nologo" - $(MAKE) all-tests XCFLAGS="/W3 /WX /MT /nologo" !IF DEFINED(MORE_EXHAUSTIVE) $(MAKE) all-tests XCFLAGS="/W3 /WX /MDd /nologo" XDBG="-debug" +!ENDIF + @ echo $@ completed successfully. + +all-tests-mt: + @ -$(SETENV) + $(MAKE) all-tests XCFLAGS="/W3 /WX /MT /nologo" +!IF DEFINED(MORE_EXHAUSTIVE) $(MAKE) all-tests XCFLAGS="/W3 /WX /MTd /nologo" XDBG="-debug" !ENDIF @ echo $@ completed successfully. diff --git a/_ptw32.h b/_ptw32.h index c82741aa..f3d1b868 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -164,8 +164,8 @@ # define int64_t LONGLONG # define uint64_t ULONGLONG #elif !defined(__MINGW32__) -# define int64_t _int64 -# define uint64_t unsigned _int64 +typedef _int64 int64_t; +typedef unsigned _int64 uint64_t; # if defined(PTW32_CONFIG_MSVC6) typedef long intptr_t; # endif diff --git a/dll.c b/dll.c index 0e8f1da4..82022264 100644 --- a/dll.c +++ b/dll.c @@ -165,6 +165,13 @@ EXTERN_C PIMAGE_TLS_CALLBACK _xl_b = TlsMain; static int on_process_init(void) { +#if defined(_MSC_VER) && !defined(_DLL) + extern int __cdecl _heap_init (void); + extern int __cdecl _mtinit (void); + + _heap_init(); + _mtinit(); +#endif pthread_win32_process_attach_np (); return 0; } diff --git a/tests/ChangeLog b/tests/ChangeLog index 862ad8bb..867f2d1b 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2018-07-22 Ross Johnson + + * reinit1.c: MSVC with /MT flag needs to explicitly call + pthread_win32_thread_detach_np(). + 2016-12-21 Ross Johnson * mutex6.c: fix random failures by using a polling loop to replace diff --git a/tests/reinit1.c b/tests/reinit1.c index b8bfdb40..815ac6d1 100644 --- a/tests/reinit1.c +++ b/tests/reinit1.c @@ -1,7 +1,7 @@ /* * reinit1.c * - * Same test as rwlock7.c but loop two or times reinitialising the library + * Same test as rwlock7.c but loop two or more times reinitialising the library * each time, to test reinitialisation. We use a rwlock test because rw locks * use CVs, mutexes and semaphores internally. * @@ -146,6 +146,12 @@ main (int argc, char *argv[]) assert(pthread_join (threads[count].thread_id, NULL) == 0); } +#if defined(_MSC_VER) && !defined(_DLL) + /* + * We need this when compiling with MSVC and /MT or /MTd flag + */ + pthread_win32_thread_detach_np(); +#endif pthread_win32_process_detach_np(); pthread_win32_process_attach_np(); } From 5998e0c87b54a9d7e8a30451e6d1eaa04148aa19 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 23 Jul 2018 20:54:35 +1000 Subject: [PATCH 123/207] Additiona ARM processor macro checks and ChangeLog attributions --- ChangeLog | 7 +++++++ context.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c96a0464..6ebd0f29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,9 +6,16 @@ all-tests-cflags. * Makefile (all-tests-cflags): retain; require all-tests-md and all-tests-mt. + +2018-07-22 Mark Pizzolato + * _ptw32.h (int64_t): change from #define to typedef. * _ptw32.h (uint64_t): Likewise. +2018-07-22 Carlo Bramini + + * context.h (ARM): Additional macros checked for ARM processors. + 2016-12-18 Ross Johnson * implement.h (PTW32_TEST_SNEAK_PEEK): Defined in tests/test.h diff --git a/context.h b/context.h index 20181467..3d943e66 100644 --- a/context.h +++ b/context.h @@ -63,7 +63,7 @@ #define PTW32_PROGCTR(Context) ((Context).Rip) #endif -#if defined(_ARM_) || defined(ARM) +#if defined(_ARM_) || defined(ARM) || defined(_M_ARM) || defined(_M_ARM64) #define PTW32_PROGCTR(Context) ((Context).Pc) #endif From f176e2f726db2b8bfc16ae5e9e50345fa67ae7e9 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 23 Jul 2018 22:37:04 +1000 Subject: [PATCH 124/207] Typo, targets and a missing macro check --- Makefile | 13 ++++++++++--- pthread.h | 2 +- tests/errno1.c | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 8e714a55..700f94c5 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,9 @@ STATIC_OBJS = $(STATIC_OBJS) $(RESOURCE_OBJS) help: @ echo Run one of the following command lines: @ echo nmake clean all-tests - @ echo nmake -DEXHAUSTIVE clean all-tests + @ echo nmake -DEXHAUSTIVE clean all-tests + @ echo nmake clean all-tests-md + @ echo nmake clean all-tests-mt @ echo nmake clean VC @ echo nmake clean VC-debug @ echo nmake clean VC-static @@ -90,6 +92,9 @@ all: TEST_ENV = CFLAGS="$(CFLAGS) /DNO_ERROR_DIALOGS" all-tests: + $(MAKE) all-tests-dll all-tests-static + +all-tests-dll: # $(MAKE) /E realclean VC-small-static$(XDBG) # cd tests && $(MAKE) /E clean VC-small-static$(XDBG) $(TEST_ENV) && $(MAKE) /E clean VCX-small-static$(XDBG) $(TEST_ENV) # $(MAKE) /E realclean VCE-small-static$(XDBG) @@ -102,6 +107,8 @@ all-tests: cd tests && $(MAKE) /E clean VCE$(XDBG) $(TEST_ENV) $(MAKE) /E realclean VSE$(XDBG) cd tests && $(MAKE) /E clean VSE$(XDBG) $(TEST_ENV) + +all-tests-static: #!IF DEFINED(EXHAUSTIVE) $(MAKE) /E realclean VC-static$(XDBG) cd tests && $(MAKE) /E clean VC-static$(XDBG) $(TEST_ENV) && $(MAKE) /E clean VCX-static$(XDBG) $(TEST_ENV) @@ -127,9 +134,9 @@ all-tests-md: all-tests-mt: @ -$(SETENV) - $(MAKE) all-tests XCFLAGS="/W3 /WX /MT /nologo" + $(MAKE) all-tests-static XCFLAGS="/W3 /WX /MT /nologo" !IF DEFINED(MORE_EXHAUSTIVE) - $(MAKE) all-tests XCFLAGS="/W3 /WX /MTd /nologo" XDBG="-debug" + $(MAKE) all-tests-static XCFLAGS="/W3 /WX /MTd /nologo" XDBG="-debug" !ENDIF @ echo $@ completed successfully. diff --git a/pthread.h b/pthread.h index cf596ac2..a887dc66 100644 --- a/pthread.h +++ b/pthread.h @@ -1161,7 +1161,7 @@ PTW32_DLLPORT int PTW32_CDECL pthreadCancelableTimedWait (void *waitHandle, * * Note: "_DLL" implies the /MD compiler flag. */ -#if defined(_MSC_VER) && !defined(_DLL) && !defined(PTW32_STATIC_LIB) +#if defined(_MSC_VER) && !defined(_DLL) && !defined(PTW32_STATIC_LIB) && !defined(PTW32_STATIC_TLSLIB) # define PTW32_USES_SEPARATE_CRT #endif diff --git a/tests/errno1.c b/tests/errno1.c index c0b1a855..2faaac6a 100644 --- a/tests/errno1.c +++ b/tests/errno1.c @@ -161,7 +161,7 @@ main() assert(!failed); /* - * Check any results here. Set "failed" and only print ouput on failure. + * Check any results here. Set "failed" and only print output on failure. */ for (i = 1; i <= NUMTHREADS; i++) { From 9f0d2b65eea59f732d00280a1654b60615404466 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sun, 29 Jul 2018 19:04:51 +1000 Subject: [PATCH 125/207] Indent --- _ptw32.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_ptw32.h b/_ptw32.h index f3d1b868..1083b339 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -164,8 +164,8 @@ # define int64_t LONGLONG # define uint64_t ULONGLONG #elif !defined(__MINGW32__) -typedef _int64 int64_t; -typedef unsigned _int64 uint64_t; + typedef _int64 int64_t; + typedef unsigned _int64 uint64_t; # if defined(PTW32_CONFIG_MSVC6) typedef long intptr_t; # endif From 40f2c563eac59745d95d9ea06cd9dea64fa49c3b Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 1 Aug 2018 09:39:50 +1000 Subject: [PATCH 126/207] Licence change, references to new name and repository. --- ANNOUNCE | 149 +- BUGS | 20 - ChangeLog | 8 + GNUmakefile.in | 48 +- NEWS | 38 +- PROGRESS | 2 +- README | 41 +- README.NONPORTABLE | 1720 ++++++++++---------- _ptw32.h | 39 +- aclocal.m4 | 48 +- cleanup.c | 41 +- configure.ac | 48 +- context.h | 39 +- create.c | 33 +- dll.c | 33 +- errno.c | 33 +- global.c | 33 +- implement.h | 32 +- manual/ChangeLog | 8 +- manual/PortabilityIssues.html | 10 +- manual/cpu_set.html | 2 +- manual/index.html | 8 +- manual/pthreadCancelableWait.html | 4 +- manual/pthread_attr_init.html | 658 ++++---- manual/pthread_attr_setstackaddr.html | 326 ++-- manual/pthread_attr_setstacksize.html | 8 +- manual/pthread_barrier_init.html | 8 +- manual/pthread_barrier_wait.html | 6 +- manual/pthread_barrierattr_init.html | 6 +- manual/pthread_barrierattr_setpshared.html | 10 +- manual/pthread_cancel.html | 14 +- manual/pthread_cleanup_push.html | 4 +- manual/pthread_cond_init.html | 6 +- manual/pthread_condattr_init.html | 6 +- manual/pthread_condattr_setpshared.html | 10 +- manual/pthread_create.html | 226 +-- manual/pthread_delay_np.html | 4 +- manual/pthread_detach.html | 4 +- manual/pthread_equal.html | 124 +- manual/pthread_exit.html | 140 +- manual/pthread_getunique_np.html | 6 +- manual/pthread_getw32threadhandle_np.html | 4 +- manual/pthread_join.html | 4 +- manual/pthread_key_create.html | 6 +- manual/pthread_kill.html | 14 +- manual/pthread_mutex_init.html | 8 +- manual/pthread_mutexattr_init.html | 10 +- manual/pthread_mutexattr_setpshared.html | 6 +- manual/pthread_num_processors_np.html | 4 +- manual/pthread_once.html | 4 +- manual/pthread_rwlock_init.html | 8 +- manual/pthread_rwlock_rdlock.html | 10 +- manual/pthread_rwlock_timedrdlock.html | 6 +- manual/pthread_rwlock_timedwrlock.html | 6 +- manual/pthread_rwlock_unlock.html | 8 +- manual/pthread_rwlock_wrlock.html | 8 +- manual/pthread_rwlockattr_init.html | 6 +- manual/pthread_rwlockattr_setpshared.html | 8 +- manual/pthread_self.html | 8 +- manual/pthread_setaffinity_np.html | 6 +- manual/pthread_setcancelstate.html | 16 +- manual/pthread_setcanceltype.html | 16 +- manual/pthread_setconcurrency.html | 6 +- manual/pthread_setname_np.html | 2 +- manual/pthread_setschedparam.html | 6 +- manual/pthread_spin_init.html | 10 +- manual/pthread_spin_lock.html | 6 +- manual/pthread_spin_unlock.html | 8 +- manual/pthread_timechange_handler_np.html | 4 +- manual/pthread_win32_attach_detach_np.html | 8 +- manual/pthread_win32_getabstime_np.html | 4 +- manual/pthread_win32_test_features_np.html | 4 +- manual/sched_get_priority_max.html | 4 +- manual/sched_getscheduler.html | 6 +- manual/sched_setaffinity.html | 6 +- manual/sched_setscheduler.html | 6 +- manual/sched_yield.html | 2 +- manual/sem_init.html | 8 +- pthread.c | 33 +- pthread.h | 41 +- pthread_attr_destroy.c | 39 +- pthread_attr_getaffinity_np.c | 39 +- pthread_attr_getdetachstate.c | 39 +- pthread_attr_getinheritsched.c | 39 +- pthread_attr_getname_np.c | 105 +- pthread_attr_getschedparam.c | 39 +- pthread_attr_getschedpolicy.c | 39 +- pthread_attr_getscope.c | 39 +- pthread_attr_getstackaddr.c | 33 +- pthread_attr_getstacksize.c | 33 +- pthread_attr_init.c | 33 +- pthread_attr_setaffinity_np.c | 39 +- pthread_attr_setdetachstate.c | 39 +- pthread_attr_setinheritsched.c | 39 +- pthread_attr_setname_np.c | 195 ++- pthread_attr_setschedparam.c | 39 +- pthread_attr_setschedpolicy.c | 39 +- pthread_attr_setscope.c | 39 +- pthread_attr_setstackaddr.c | 33 +- pthread_attr_setstacksize.c | 33 +- pthread_barrier_destroy.c | 39 +- pthread_barrier_init.c | 39 +- pthread_barrier_wait.c | 39 +- pthread_barrierattr_destroy.c | 39 +- pthread_barrierattr_getpshared.c | 39 +- pthread_barrierattr_init.c | 39 +- pthread_barrierattr_setpshared.c | 39 +- pthread_cancel.c | 33 +- pthread_cond_destroy.c | 39 +- pthread_cond_init.c | 39 +- pthread_cond_signal.c | 39 +- pthread_cond_wait.c | 39 +- pthread_condattr_destroy.c | 39 +- pthread_condattr_getpshared.c | 39 +- pthread_condattr_init.c | 39 +- pthread_condattr_setpshared.c | 39 +- pthread_delay_np.c | 39 +- pthread_detach.c | 39 +- pthread_equal.c | 39 +- pthread_exit.c | 39 +- pthread_getconcurrency.c | 39 +- pthread_getname_np.c | 33 +- pthread_getschedparam.c | 33 +- pthread_getspecific.c | 39 +- pthread_getunique_np.c | 39 +- pthread_getw32threadhandle_np.c | 39 +- pthread_join.c | 39 +- pthread_key_create.c | 39 +- pthread_key_delete.c | 33 +- pthread_kill.c | 39 +- pthread_mutex_consistent.c | 39 +- pthread_mutex_destroy.c | 39 +- pthread_mutex_init.c | 33 +- pthread_mutex_lock.c | 53 +- pthread_mutex_timedlock.c | 55 +- pthread_mutex_trylock.c | 55 +- pthread_mutex_unlock.c | 55 +- pthread_mutexattr_destroy.c | 39 +- pthread_mutexattr_getkind_np.c | 39 +- pthread_mutexattr_getpshared.c | 39 +- pthread_mutexattr_getrobust.c | 39 +- pthread_mutexattr_gettype.c | 39 +- pthread_mutexattr_init.c | 39 +- pthread_mutexattr_setkind_np.c | 39 +- pthread_mutexattr_setpshared.c | 39 +- pthread_mutexattr_setrobust.c | 39 +- pthread_mutexattr_settype.c | 39 +- pthread_num_processors_np.c | 39 +- pthread_once.c | 39 +- pthread_rwlock_destroy.c | 39 +- pthread_rwlock_init.c | 39 +- pthread_rwlock_rdlock.c | 39 +- pthread_rwlock_timedrdlock.c | 39 +- pthread_rwlock_timedwrlock.c | 39 +- pthread_rwlock_tryrdlock.c | 39 +- pthread_rwlock_trywrlock.c | 39 +- pthread_rwlock_unlock.c | 39 +- pthread_rwlock_wrlock.c | 39 +- pthread_rwlockattr_destroy.c | 39 +- pthread_rwlockattr_getpshared.c | 39 +- pthread_rwlockattr_init.c | 39 +- pthread_rwlockattr_setpshared.c | 39 +- pthread_self.c | 33 +- pthread_setaffinity.c | 483 +++--- pthread_setcancelstate.c | 39 +- pthread_setcanceltype.c | 39 +- pthread_setconcurrency.c | 39 +- pthread_setname_np.c | 33 +- pthread_setschedparam.c | 33 +- pthread_setspecific.c | 39 +- pthread_spin_destroy.c | 39 +- pthread_spin_init.c | 39 +- pthread_spin_lock.c | 39 +- pthread_spin_trylock.c | 39 +- pthread_spin_unlock.c | 39 +- pthread_testcancel.c | 39 +- pthread_timechange_handler_np.c | 39 +- pthread_timedjoin_np.c | 373 +++-- pthread_tryjoin_np.c | 343 ++-- pthread_win32_attach_detach_np.c | 33 +- ptw32_MCS_lock.c | 33 +- ptw32_callUserDestroyRoutines.c | 39 +- ptw32_calloc.c | 39 +- ptw32_cond_check_need_init.c | 39 +- ptw32_getprocessors.c | 39 +- ptw32_is_attr.c | 39 +- ptw32_mutex_check_need_init.c | 39 +- ptw32_new.c | 33 +- ptw32_processInitialize.c | 33 +- ptw32_processTerminate.c | 39 +- ptw32_relmillisecs.c | 33 +- ptw32_reuse.c | 39 +- ptw32_rwlock_cancelwrwait.c | 39 +- ptw32_rwlock_check_need_init.c | 39 +- ptw32_semwait.c | 33 +- ptw32_spinlock_check_need_init.c | 39 +- ptw32_threadDestroy.c | 39 +- ptw32_threadStart.c | 33 +- ptw32_throw.c | 39 +- ptw32_timespec.c | 33 +- ptw32_tkAssocCreate.c | 39 +- ptw32_tkAssocDestroy.c | 39 +- sched.h | 33 +- sched_get_priority_max.c | 39 +- sched_get_priority_min.c | 39 +- sched_getscheduler.c | 39 +- sched_setaffinity.c | 701 ++++---- sched_setscheduler.c | 39 +- sched_yield.c | 39 +- sem_close.c | 39 +- sem_destroy.c | 39 +- sem_getvalue.c | 39 +- sem_init.c | 39 +- sem_open.c | 39 +- sem_post.c | 39 +- sem_post_multiple.c | 39 +- sem_timedwait.c | 39 +- sem_trywait.c | 39 +- sem_unlink.c | 39 +- sem_wait.c | 39 +- semaphore.h | 33 +- signal.c | 39 +- tests/Bmakefile | 2 +- tests/ChangeLog | 4 + tests/GNUmakefile.in | 48 +- tests/Makefile | 2 +- tests/Wmakefile | 2 +- tests/affinity1.c | 249 ++- tests/affinity2.c | 231 ++- tests/affinity3.c | 237 ++- tests/affinity4.c | 179 +- tests/affinity5.c | 245 ++- tests/affinity6.c | 235 ++- tests/barrier1.c | 39 +- tests/barrier2.c | 39 +- tests/barrier3.c | 39 +- tests/barrier4.c | 39 +- tests/barrier5.c | 39 +- tests/barrier6.c | 39 +- tests/benchlib.c | 39 +- tests/benchtest.h | 39 +- tests/benchtest1.c | 39 +- tests/benchtest2.c | 39 +- tests/benchtest3.c | 39 +- tests/benchtest4.c | 39 +- tests/benchtest5.c | 39 +- tests/cancel1.c | 39 +- tests/cancel2.c | 39 +- tests/cancel3.c | 39 +- tests/cancel4.c | 39 +- tests/cancel5.c | 39 +- tests/cancel6a.c | 35 +- tests/cancel6d.c | 35 +- tests/cancel7.c | 39 +- tests/cancel8.c | 39 +- tests/cancel9.c | 39 +- tests/cleanup0.c | 39 +- tests/cleanup1.c | 39 +- tests/cleanup2.c | 39 +- tests/cleanup3.c | 39 +- tests/common.mk | 118 +- tests/condvar1.c | 39 +- tests/condvar1_1.c | 39 +- tests/condvar1_2.c | 39 +- tests/condvar2.c | 39 +- tests/condvar2_1.c | 39 +- tests/condvar3.c | 39 +- tests/condvar3_1.c | 39 +- tests/condvar3_2.c | 39 +- tests/condvar3_3.c | 39 +- tests/condvar4.c | 39 +- tests/condvar5.c | 39 +- tests/condvar6.c | 39 +- tests/condvar7.c | 39 +- tests/condvar8.c | 39 +- tests/condvar9.c | 39 +- tests/context1.c | 39 +- tests/context2.c | 316 ++-- tests/count1.c | 39 +- tests/create1.c | 39 +- tests/create2.c | 39 +- tests/create3.c | 39 +- tests/delay1.c | 39 +- tests/delay2.c | 39 +- tests/detach1.c | 39 +- tests/equal1.c | 39 +- tests/errno1.c | 39 +- tests/exception1.c | 33 +- tests/exception2.c | 39 +- tests/exception3.c | 39 +- tests/exception3_0.c | 377 +++-- tests/exit1.c | 39 +- tests/exit2.c | 39 +- tests/exit3.c | 39 +- tests/exit4.c | 39 +- tests/exit5.c | 39 +- tests/eyal1.c | 39 +- tests/inherit1.c | 39 +- tests/join0.c | 39 +- tests/join1.c | 39 +- tests/join2.c | 39 +- tests/join3.c | 39 +- tests/join4.c | 159 +- tests/kill1.c | 39 +- tests/mutex1.c | 39 +- tests/mutex1e.c | 39 +- tests/mutex1n.c | 39 +- tests/mutex1r.c | 39 +- tests/mutex2.c | 39 +- tests/mutex2e.c | 39 +- tests/mutex2r.c | 39 +- tests/mutex3.c | 39 +- tests/mutex3e.c | 39 +- tests/mutex3r.c | 39 +- tests/mutex4.c | 39 +- tests/mutex5.c | 39 +- tests/mutex6.c | 39 +- tests/mutex6e.c | 39 +- tests/mutex6es.c | 39 +- tests/mutex6n.c | 39 +- tests/mutex6r.c | 39 +- tests/mutex6rs.c | 39 +- tests/mutex6s.c | 39 +- tests/mutex7.c | 39 +- tests/mutex7e.c | 39 +- tests/mutex7n.c | 39 +- tests/mutex7r.c | 39 +- tests/mutex8.c | 35 +- tests/mutex8e.c | 35 +- tests/mutex8n.c | 35 +- tests/mutex8r.c | 35 +- tests/name_np1.c | 33 +- tests/name_np2.c | 217 ++- tests/once1.c | 39 +- tests/once2.c | 39 +- tests/once3.c | 39 +- tests/once4.c | 39 +- tests/priority1.c | 39 +- tests/priority2.c | 39 +- tests/reuse1.c | 39 +- tests/reuse2.c | 39 +- tests/robust1.c | 39 +- tests/robust2.c | 39 +- tests/robust3.c | 39 +- tests/robust4.c | 39 +- tests/robust5.c | 39 +- tests/runorder.mk | 318 ++-- tests/rwlock1.c | 39 +- tests/rwlock2.c | 39 +- tests/rwlock2_t.c | 39 +- tests/rwlock3.c | 39 +- tests/rwlock3_t.c | 39 +- tests/rwlock4.c | 39 +- tests/rwlock4_t.c | 39 +- tests/rwlock5.c | 39 +- tests/rwlock5_t.c | 39 +- tests/rwlock6.c | 39 +- tests/rwlock6_t.c | 39 +- tests/rwlock6_t2.c | 39 +- tests/self1.c | 39 +- tests/self2.c | 39 +- tests/semaphore1.c | 39 +- tests/semaphore2.c | 39 +- tests/semaphore3.c | 39 +- tests/semaphore4.c | 39 +- tests/semaphore4t.c | 39 +- tests/semaphore5.c | 39 +- tests/sequence1.c | 39 +- tests/spin1.c | 39 +- tests/spin2.c | 39 +- tests/spin3.c | 39 +- tests/spin4.c | 39 +- tests/stress1.c | 39 +- tests/test.h | 33 +- tests/threestage.c | 1166 ++++++------- tests/timeouts.c | 501 +++--- tests/tryentercs.c | 39 +- tests/tryentercs2.c | 39 +- tests/tsd1.c | 39 +- tests/tsd2.c | 39 +- tests/tsd3.c | 39 +- tests/valid1.c | 39 +- tests/valid2.c | 39 +- version.rc | 47 +- w32_CancelableWait.c | 39 +- 385 files changed, 10507 insertions(+), 11442 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 6ae796e4..2eaee8d9 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,37 +1,44 @@ -PTHREADS4W RELEASE 3.0.0 (2016-12-20) +PTHREADS4W RELEASE 3.0.0 (2017-01-01) -------------------------------------- -Web Site: http://sourceforge.net/projects/pthreads4w/ - http://sourceware.org/pthreads-win32/ -Repository: http://sourceforge.net/p/pthreads4w/code - https://sourceware.org/cgi-bin/cvsweb.cgi/pthreads/?cvsroot=pthreads-win32 -Releases: http://sourceforge.net/projects/pthreads4w/files - ftp://sourceware.org/pub/pthreads-win32 +Web Site: https://sourceforge.net/projects/pthreads4w/ +Repository: https://sourceforge.net/p/pthreads4w/code +Releases: https://sourceforge.net/projects/pthreads4w/files Maintainer: Ross Johnson -We are pleased to announce the availability of a new release of -Pthreads4w (a.k.a. Pthreads-win32), an Open Source Software implementation of the -Threads component of the SUSV3 Standard for Microsoft's -Windows (x86 and x64). Some relevant functions from other sections -of SUSV3 are also supported including semaphores and scheduling -functions. See the Conformance section below for details. +We are pleased to announce the availability of a new release of Pthreads4w +(a.k.a. Pthreads-win32), an Open Source Software implementation of +the Threads component of the SUSV3 Standard for Microsoft's Windows +(x86 and x64). Some relevant functions from other sections of SUSV3 are +also supported including semaphores and scheduling functions. See the +Conformance section below for details. Some common non-portable functions are also implemented for additional compatibility, as are a few functions specific to pthreads4w for easier integration with Windows applications. -Pthreads4w is free software, distributed under the GNU Lesser -General Public License (LGPL). +Pthreads4w is free software. Version 3.0.0 is distributed under the +Apache License version 2.0 (APLv2). The APLv2 is compatible with the GPLv3 +and LGPLv3 licenses and therefore this code may continue to be legally +included within GPLv3 and LGPLv3 projects. -For those who want to try the most recent changes, the SourceForge Git repository -is the one to use. The Sourceware CVS repository is synchronised much less often -and may be abandoned altogether. +All version 1 and 2 releases will remain LGPL but version 2.11 will be +released under v3 of that license so that any modifications to pthreads4w +version 3 code that we backport to v2 will not pollute that code. -Release 2.9.1 was probably the last to provide pre-built libraries. The supported -compilers are now all available free for personal use. The MSVS version should -build out of the box using nmake. The GCC versions now make use of GNU autoconf -to generate a configure script which in turn creates a custom config.h for the -environment you use: MinGW or MinGW64, etc. +Because this license compatibility is not reciprocal, future +modifications to pthreads4w will only be accepted to version 3 (or +later), i.e. the APLv2 code-base. + +For those who want to try the most recent changes, the SourceForge Git +repository is the one to use. The Sourceware CVS repository is synchronised +much less often and may be abandoned altogether. + +Release 2.9.1 was probably the last to provide pre-built libraries. The +supported compilers are now all available free for personal use. The MSVS +version should build out of the box using nmake. The GCC versions now make +use of GNU autoconf to generate a configure script which in turn creates a +custom config.h for the environment you use: MinGW or MinGW64, etc. Acknowledgements @@ -67,7 +74,7 @@ were extracted from it. There is also a separate CONTRIBUTORS file. This file and others are on the web site: - http://sourceware.org/pthreads-win32 + https://sourceforge.net/p/pthreads4w/wiki/Contributors/ As much as possible, the ChangeLog file acknowledges contributions to the code base in more detail. @@ -304,13 +311,9 @@ The following functions are implemented: PTHREAD_MUTEX_TIMED_NP) pthread_num_processors_np pthread_win32_getabstime_np - (The following four routines may be required when linking statically. - The process_* routines should not be needed for MSVC or GCC.) + (The following four routines should no longer be required.) pthread_win32_process_attach_np pthread_win32_process_detach_np - (The following routines should only be needed to manage implicit - POSIX handles i.e. when Win native threads call POSIX thread routines - (other than pthread_create)) pthread_win32_thread_attach_np pthread_win32_thread_detach_np @@ -408,89 +411,10 @@ The following functions are not implemented: rand_r -Availability ------------- - -The prebuilt DLL, export libs (for both MSVC and Mingw32), and the header -files (pthread.h, semaphore.h, sched.h) are available along with the -complete source code. - -The source code can be found at: - - ftp://sources.redhat.com/pub/pthreads-win32 - -and as individual source code files at - - ftp://sources.redhat.com/pub/pthreads-win32/source - -The pre-built DLL, export libraries and include files can be found at: - - ftp://sources.redhat.com/pub/pthreads-win32/dll-latest - - - -Mailing List ------------- - -There is a mailing list for discussing pthreads on Win32. To join, -send email to: - - pthreads-win32-subscribe@sourceware.cygnus.com - - Application Development Environments ------------------------------------ See the README file for more information. - -MSVC: -MSVC using SEH works. Distribute pthreadVSE.dll with your application. -MSVC using C++ EH works. Distribute pthreadVCE.dll with your application. -MSVC using C setjmp/longjmp works. Distribute pthreadVC.dll with your application. - - -Mingw32: -See the FAQ, Questions 6 and 10. - -Mingw using C++ EH works. Distribute pthreadGCE.dll with your application. -Mingw using C setjmp/longjmp works. Distribute pthreadGC.dll with your application. - - -Cygwin: (http://sourceware.cygnus.com/cygwin/) -Developers using Cygwin do not need pthreads-win32 since it has POSIX threads -support. Refer to its documentation for details and extent. - - -UWIN: -UWIN is a complete Unix-like environment for Windows from AT&T. Pthreads-win32 -doesn't currently support UWIN (and vice versa), but that may change in the -future. - -Generally: -For convenience, the following pre-built files are available on the FTP site -(see Availability above): - - pthread.h - for POSIX threads - semaphore.h - for POSIX semaphores - sched.h - for POSIX scheduling - pthreadVCE.dll - built with MSVC++ compiler using C++ EH - pthreadVCE.lib - pthreadVC.dll - built with MSVC compiler using C setjmp/longjmp - pthreadVC.lib - pthreadVSE.dll - built with MSVC compiler using SEH - pthreadVSE.lib - pthreadGCE.dll - built with Mingw32 G++ 2.95.2-1 - pthreadGC.dll - built with Mingw32 GCC 2.95.2-1 using setjmp/longjmp - libpthreadGCE.a - derived from pthreadGCE.dll - libpthreadGC.a - derived from pthreadGC.dll - gcc.dll - needed if distributing applications that use - pthreadGCE.dll (but see the FAQ Q 10 for the latest - related information) - -These are the only files you need in order to build POSIX threads -applications for Win32 using either MSVC or Mingw32. - -See the FAQ file in the source tree for additional information. Documentation @@ -512,15 +436,6 @@ available: By Bradford Nichols, Dick Buttlar & Jacqueline Proulx Farrell O'Reilly (pub) -On the web: see the links at the bottom of the pthreads-win32 site: - - http://sources.redhat.com/pthreads-win32/ - - Currently, there is no documentation included in the package apart - from the copious comments in the source code. - - - Enjoy! Ross Johnson diff --git a/BUGS b/BUGS index 285ba4eb..748e4442 100644 --- a/BUGS +++ b/BUGS @@ -119,23 +119,3 @@ Known bugs in applications relying on cancellation/cleanup AND using optimisations for creation of production code is highly unreliable for the current version of the pthreads library. - -3. The Borland Builder 5.5 version of the library produces memory read exceptions -in some tests. - -4. pthread_barrier_wait() can deadlock if the number of potential calling -threads for a particular barrier is greater than the barrier count parameter -given to pthread_barrier_init() for that barrier. - -This is due to the very lightweight implementation of pthread-win32 barriers. -To cope with more than "count" possible waiters, barriers must effectively -implement all the same safeguards as condition variables, making them much -"heavier" than at present. - -The workaround is to ensure that no more than "count" threads attempt to wait -at the barrier. - -5. Canceling a thread blocked on pthread_once appears not to work in the MSVC++ -version of the library "pthreadVCE.dll". The test case "once3.c" hangs. I have no -clues on this at present. All other versions pass this test ok - pthreadsVC.dll, -pthreadsVSE.dll, pthreadsGC.dll and pthreadsGCE.dll. diff --git a/ChangeLog b/ChangeLog index bcac4f58..2f6822c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2016-12-25 Ross Johnson + + * Change all license notices to the Apache License 2.0 + * LICENCE: New Apache License file + * NOTICE: New file. + * COPYING: Removed. + * COPYING.GPL: Removed. + 2016-12-20 Ross Johnson * implement.h (PThreadStateReuse): this thread state enum value diff --git a/GNUmakefile.in b/GNUmakefile.in index 1b31d68f..e80a3885 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -1,30 +1,30 @@ # @configure_input@ # -------------------------------------------------------------------------- # -# Pthreads-win32 - POSIX Threads Library for Win32 -# Copyright(C) 1998 John E. Bossom -# Copyright(C) 1999,2012 Pthreads-win32 contributors -# -# The current list of contributors is contained -# in the file CONTRIBUTORS included with the source -# code distribution. The list can also be seen at the -# following World Wide Web location: -# http://sources.redhat.com/pthreads-win32/contributors.html -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library in the file COPYING.LIB; -# if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. # PACKAGE = @PACKAGE_TARNAME@ VERSION = @PACKAGE_VERSION@ diff --git a/NEWS b/NEWS index 27958a30..3adcdaf2 100644 --- a/NEWS +++ b/NEWS @@ -1,22 +1,38 @@ RELEASE 3.0.0 -------------- -(2016-12-20) +(2017-01-01) General ------- -Note that this is a new major release and consolidates the already very -stable version 2.10.0. The major version increment introduces two minor -ABI changes along with other naming changes that will require -recompilation of linking applications and possibly some textual changes -to compile-time macro references in configuration and source files, e.g. -PTW32_* to __PTW32_*, etc. +Note that this is a new major release. The major version increment +introduces two ABI changes along with other naming changes that will +require recompilation of linking applications and possibly some textual +changes to compile-time macro references in configuration and source +files, e.g. PTW32_* changes to __PTW32_*, ptw32_* to __ptw32_*, etc. + +License Change +-------------- +Pthreads4w version 3.0.0 is being released under the terms of the Apache +License v2.0. The APLv2 is compatible with the GPLv3 and LGPLv3 licenses +and therefore this code may continue to be legally included within GPLv3 +and LGPLv3 projects. + +Pthreads4w version 2 releases will remain LGPL but version 2.11 will be +released under v3 of that license so that any additions to pthreads4w +version 3 code that we backport to v2 will not pollute that code. + +Because this license compatibility is not reciprocal, future +modifications to pthreads4w will only be accepted to version 3 (or +later), i.e. the APLv2 code-base. + +Backporting and Support of Legacy Windows Releases +-------------------------------------------------- +Some changes from 2011-02-26 onward may not be compatible with pre +Windows 2000 systems. New bug fixes in all releases since 2.8.0 have NOT been applied to the 1.x.x series. -Some changes from 2011-02-26 onward may not be compatible with -pre Windows 2000 systems. - Testing and verification ------------------------ The MSVC, MinGW and MinGW64 builds have been tested on SMP architecture @@ -494,7 +510,7 @@ General The package now includes a reference documentation set consisting of HTML formatted Unix-style manual pages that have been edited for consistency with Pthreads-w32. The set can also be read online at: -http://sources.redhat.com/pthreads-win32/manual/index.html +https://sourceforge.net/projects/pthreads4w/manual/index.html Thanks again to Tim Theisen for running the test suite pre-release on an MP system. diff --git a/PROGRESS b/PROGRESS index 9abf0bca..6a1b4e59 100644 --- a/PROGRESS +++ b/PROGRESS @@ -1,4 +1,4 @@ Please see the ANNOUNCE file "Level of Standards Conformance" or the web page: -http://sources.redhat.com/pthreads-win32/conformance.html +https://sourceforge.net/projects/pthreads4w/conformance.html diff --git a/README b/README index 132e173a..d7c81813 100644 --- a/README +++ b/README @@ -1,23 +1,16 @@ -PTHREADS-WIN32 (A.K.A. PTHREADS4W) +PTHREADS4W (a.k.a. PTHREADS-WIN32) ================================== -Pthreads-win32 is free software, distributed under the GNU Lesser -General Public License (LGPL). See the file 'COPYING.LIB' for terms -and conditions. Also see the file 'COPYING' for information -specific to pthreads-win32, copyrights and the LGPL. - - What is it? ----------- -Pthreads-win32 (a.k.a. pthreads4w) is an Open Source Software -implementation of the Threads component of the POSIX 1003.1c 1995 -Standard (or later) for Microsoft's Windows environment. Some functions -from POSIX 1003.1b are also supported, including semaphores. Other -related functions include the set of read-write lock functions. The -library also supports some of the functionality of the Open -Group's Single Unix specification, namely mutex types, plus some common -and pthreads-win32 specific non-portable routines (see README.NONPORTABLE). +Pthreads4w is an Open Source Software implementation of the Threads +component of the POSIX 1003.1c 1995 Standard (or later) for Microsoft's +Windows environment. Some functions from POSIX 1003.1b are also supported, +including semaphores. Other related functions include the set of read-write +lock functions. The library also supports some of the functionality of the +Open Group's Single Unix specification, namely mutex types, plus some common +and pthreads4w specific non-portable routines (see README.NONPORTABLE). See the file "ANNOUNCE" for more information including standards conformance details and the list of supported and unsupported @@ -37,15 +30,15 @@ QueueUserAPCEx by Panagiotis E. Hadjidoukas For true async cancellation of threads (including blocked threads). This is a DLL and Windows driver that provides pre-emptive APC by forcing threads into an alertable state when the APC is queued. - Both the DLL and driver are provided with the pthreads-win32.exe - self-unpacking ZIP, and on the pthreads-win32 FTP site (in source + Both the DLL and driver are provided with the pthreads4w.exe + self-unpacking ZIP, and on the pthreads4w FTP site (in source and pre-built forms). Currently this is a separate LGPL package to - pthreads-win32. See the README in the QueueUserAPCEx folder for + pthreads4w. See the README in the QueueUserAPCEx folder for installation instructions. - Pthreads-win32 will automatically detect if the QueueUserAPCEx DLL + pthreads4w will automatically detect if the QueueUserAPCEx DLL QuserEx.DLL is available and whether the driver AlertDrv.sys is - loaded. If it is not available, pthreads-win32 will simulate async + loaded. If it is not available, pthreads4w will simulate async cancellation, which means that it can async cancel only threads that are runnable. The simulated async cancellation cannot cancel blocked threads. @@ -139,7 +132,7 @@ Microsoft version numbers use 4 integers: 0.0.0.0 -Pthreads-win32 uses the first 3 following the standard major.minor.micro +Pthreads4w uses the first 3 following the standard major.minor.micro system. We had claimed to follow the Libtool convention but this has not been the case with recent releases. Binary compatibility and consequently library file naming has not changed over this time either @@ -171,14 +164,14 @@ The numbers are changed as follows: DLL compatibility numbering is an attempt to ensure that applications -always load a compatible pthreads-win32 DLL by using a DLL naming system +always load a compatible pthreads4w DLL by using a DLL naming system that is consistent with the version numbering system. It also allows older and newer DLLs to coexist in the same filesystem so that older applications can continue to be used. For pre .NET Windows systems, this inevitably requires incompatible versions of the same DLLs to have different names. -Pthreads-win32 has adopted the Cygwin convention of appending a single +Pthreads4w has adopted the Cygwin convention of appending a single integer number to the DLL name. The number used is simply the library's major version number. @@ -248,7 +241,7 @@ reservation of identifiers beginning with "_" and "__" for use by compiler implementations only. If you have written any applications and you are linking -statically with the pthreads-win32 library then you may have +statically with the pthreads4w library then you may have included a call to _pthread_processInitialize. You will now have to change that to __ptw32_processInitialize. diff --git a/README.NONPORTABLE b/README.NONPORTABLE index cf1c7a13..ea504de5 100644 --- a/README.NONPORTABLE +++ b/README.NONPORTABLE @@ -1,860 +1,860 @@ -This file documents non-portable functions and other issues. - -Non-portable functions included in pthreads-win32 -------------------------------------------------- - -BOOL -pthread_win32_test_features_np(int mask) - - This routine allows an application to check which - run-time auto-detected features are available within - the library. - - The possible features are: - - PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE - Return TRUE if the native version of - InterlockedCompareExchange() is being used. - This feature is not meaningful in recent - library versions as MSVC builds only support - system implemented ICE. Note that all Mingw - builds use inlined asm versions of all the - Interlocked routines. - PTW32_ALERTABLE_ASYNC_CANCEL - Return TRUE is the QueueUserAPCEx package - QUSEREX.DLL is available and the AlertDrv.sys - driver is loaded into Windows, providing - alertable (pre-emptive) asyncronous threads - cancellation. If this feature returns FALSE - then the default async cancel scheme is in - use, which cannot cancel blocked threads. - - Features may be Or'ed into the mask parameter, in which case - the routine returns TRUE if any of the Or'ed features would - return TRUE. At this stage it doesn't make sense to Or features - but it may some day. - - -void * -pthread_timechange_handler_np(void *) - - To improve tolerance against operator or time service - initiated system clock changes. - - This routine can be called by an application when it - receives a WM_TIMECHANGE message from the system. At - present it broadcasts all condition variables so that - waiting threads can wake up and re-evaluate their - conditions and restart their timed waits if required. - - It has the same return type and argument type as a - thread routine so that it may be called directly - through pthread_create(), i.e. as a separate thread. - - Parameters - - Although a parameter must be supplied, it is ignored. - The value NULL can be used. - - Return values - - It can return an error EAGAIN to indicate that not - all condition variables were broadcast for some reason. - Otherwise, 0 is returned. - - If run as a thread, the return value is returned - through pthread_join(). - - The return value should be cast to an integer. - - -HANDLE -pthread_getw32threadhandle_np(pthread_t thread); - - Returns the win32 thread handle that the POSIX - thread "thread" is running as. - - Applications can use the win32 handle to set - win32 specific attributes of the thread. - -DWORD -pthread_getw32threadid_np (pthread_t thread) - - Returns the Windows native thread ID that the POSIX - thread "thread" is running as. - - Only valid when the library is built where - ! (defined(__MINGW64__) || defined(__MINGW32__)) || defined (__MSVCRT__) || defined (__DMC__) - and otherwise returns 0. - - -int -pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, int kind) - -int -pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, int *kind) - - These two routines are included for Linux compatibility - and are direct equivalents to the standard routines - pthread_mutexattr_settype - pthread_mutexattr_gettype - - pthread_mutexattr_setkind_np accepts the following - mutex kinds: - PTHREAD_MUTEX_FAST_NP - PTHREAD_MUTEX_ERRORCHECK_NP - PTHREAD_MUTEX_RECURSIVE_NP - - These are really just equivalent to (respectively): - PTHREAD_MUTEX_NORMAL - PTHREAD_MUTEX_ERRORCHECK - PTHREAD_MUTEX_RECURSIVE - - -int -pthread_delay_np (const struct timespec *interval) - - This routine causes a thread to delay execution for a specific period of time. - This period ends at the current time plus the specified interval. The routine - will not return before the end of the period is reached, but may return an - arbitrary amount of time after the period has gone by. This can be due to - system load, thread priorities, and system timer granularity. - - Specifying an interval of zero (0) seconds and zero (0) nanoseconds is - allowed and can be used to force the thread to give up the processor or to - deliver a pending cancellation request. - - This routine is a cancellation point. - - The timespec structure contains the following two fields: - - tv_sec is an integer number of seconds. - tv_nsec is an integer number of nanoseconds. - - Return Values - - If an error condition occurs, this routine returns an integer value - indicating the type of error. Possible return values are as follows: - - 0 Successful completion. - [EINVAL] The value specified by interval is invalid. - - -__int64 -pthread_getunique_np (pthread_t thr) - - Returns the unique number associated with thread thr. - The unique numbers are a simple way of positively identifying a thread when - pthread_t cannot be relied upon to identify the true thread instance. I.e. a - pthread_t value may be assigned to different threads throughout the life of a - process. - - Because pthreads4w (pthreads-win32) threads can be uniquely identified by their - pthread_t values this routine is provided only for source code compatibility. - - NOTE: if the library is re-initialised, i.e. by calling pthread_win32_process_detach_np() - followed by pthread_win32_process_attach_np(), then the unique number is reset along with - several other library global values. Library reinitialisation should not be required, - however, some older applications may still call these routines as they were once required to - do when statically linking the library. - -int -pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec *abstime) - -int -pthread_tryjoin_np (pthread_t thread, void **value_ptr) - - These function is added for compatibility with Linux. - - -int -pthread_num_processors_np (void) - - This routine (found on HPUX systems) returns the number of processors - in the system. This implementation actually returns the number of - processors available to the process, which can be a lower number - than the system's number, depending on the process's affinity mask. - - -BOOL -pthread_win32_process_attach_np (void); - -BOOL -pthread_win32_process_detach_np (void); - -BOOL -pthread_win32_thread_attach_np (void); - -BOOL -pthread_win32_thread_detach_np (void); - - These functions contain the code normally run via DllMain - when the library is used as a dll. As of version 2.9.0 of the - library, static builds using either MSC or GCC will call - pthread_win32_process_* automatically at application startup and - exit respectively. - - pthread_win32_thread_attach_np() is currently a no-op. - - pthread_win32_thread_detach_np() is not a no-op. It cleans up the - implicit pthread handle that is allocated to any thread not started - via pthread_create(). Such non-posix threads should call this routine - when they exit, or call pthread_exit() to both cleanup and exit. - - These functions invariably return TRUE except for - pthread_win32_process_attach_np() which will return FALSE - if pthreads-win32 initialisation fails. - - -int -pthread_attr_getaffinity_np (pthread_attr_t * attr, size_t cpusetsize, cpu_set_t * cpuset); - -int -pthread_attr_setaffinity_np (pthread_attr_t * attr, size_t cpusetsize, const cpu_set_t * cpuset); - -int -pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t * cpuset); - -int -pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, const cpu_set_t * cpuset); - - Manipulate the CPU affinity of threads. Compatibility with libgcc-based pthreads - implementations. - - -int -pthreadCancelableWait (HANDLE waitHandle); - -int -pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout); - - These two functions provide hooks into the pthread_cancel - mechanism that will allow you to wait on a Windows handle - and make it a cancellation point. Both functions block - until either the given w32 handle is signaled, or - pthread_cancel has been called. It is implemented using - WaitForMultipleObjects on 'waitHandle' and a manually - reset w32 event used to implement pthread_cancel. - -int -pthread_getname_np(pthread_t thr, char *name, int len); - -If __PTW32_COMPATIBILITY_BSD or __PTW32_COMPATIBILITY_TRU64 defined -int -pthread_setname_np(pthread_t thr, const char *name, void *arg); - -Otherwise: -int -pthread_setname_np(pthread_t thr, const char *name); - - Set and get thread names. Compatibility. - - -struct timespec * -pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * relative); - - Primarily to facilitate writing unit tests but exported for convenience. - The struct timespec pointed to by the first parameter is modified to represent the - time 'now' plus an optional offset value timespec in a platform optimal way. - Returns the first parameter so is compatible as the struct timespec * parameter in - POSIX timed function calls, e.g. - - struct timespec abstime, reltime = { 0, 5000000 } /* 5 ms */; - pthread_mutex_timedwait(&mtx, pthread_win32_getabstime_np(&abstime, &reltime)); - - -Non-portable issues -------------------- - -Thread priority - - POSIX defines a single contiguous range of numbers that determine a - thread's priority. Win32 defines priority classes and priority - levels relative to these classes. Classes are simply priority base - levels that the defined priority levels are relative to such that, - changing a process's priority class will change the priority of all - of it's threads, while the threads retain the same relativity to each - other. - - A Win32 system defines a single contiguous monotonic range of values - that define system priority levels, just like POSIX. However, Win32 - restricts individual threads to a subset of this range on a - per-process basis. - - The following table shows the base priority levels for combinations - of priority class and priority value in Win32. - - Process Priority Class Thread Priority Level - ----------------------------------------------------------------- - 1 IDLE_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 HIGH_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 2 IDLE_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 3 IDLE_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 4 IDLE_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 4 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 5 IDLE_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 5 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 5 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 6 IDLE_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 6 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 6 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 7 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 7 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 7 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 8 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 8 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 8 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 8 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 9 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 9 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 9 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 10 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 10 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 11 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 11 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 11 HIGH_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 12 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 12 HIGH_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 13 HIGH_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 14 HIGH_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 IDLE_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 16 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 17 REALTIME_PRIORITY_CLASS -7 - 18 REALTIME_PRIORITY_CLASS -6 - 19 REALTIME_PRIORITY_CLASS -5 - 20 REALTIME_PRIORITY_CLASS -4 - 21 REALTIME_PRIORITY_CLASS -3 - 22 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 23 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 24 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 25 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 26 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 27 REALTIME_PRIORITY_CLASS 3 - 28 REALTIME_PRIORITY_CLASS 4 - 29 REALTIME_PRIORITY_CLASS 5 - 30 REALTIME_PRIORITY_CLASS 6 - 31 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - - Windows NT: Values -7, -6, -5, -4, -3, 3, 4, 5, and 6 are not supported. - - - As you can see, the real priority levels available to any individual - Win32 thread are non-contiguous. - - An application using pthreads-win32 should not make assumptions about - the numbers used to represent thread priority levels, except that they - are monotonic between the values returned by sched_get_priority_min() - and sched_get_priority_max(). E.g. Windows 95, 98, NT, 2000, XP make - available a non-contiguous range of numbers between -15 and 15, while - at least one version of WinCE (3.0) defines the minimum priority - (THREAD_PRIORITY_LOWEST) as 5, and the maximum priority - (THREAD_PRIORITY_HIGHEST) as 1. - - Internally, pthreads-win32 maps any priority levels between - THREAD_PRIORITY_IDLE and THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, - or between THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to - THREAD_PRIORITY_HIGHEST. Currently, this also applies to - REALTIME_PRIORITY_CLASSi even if levels -7, -6, -5, -4, -3, 3, 4, 5, and 6 - are supported. - - If it wishes, a Win32 application using pthreads-win32 can use the Win32 - defined priority macros THREAD_PRIORITY_IDLE through - THREAD_PRIORITY_TIME_CRITICAL. - - -The opacity of the pthread_t datatype -------------------------------------- -and possible solutions for portable null/compare/hash, etc ----------------------------------------------------------- - -Because pthread_t is an opague datatype an implementation is permitted to define -pthread_t in any way it wishes. That includes defining some bits, if it is -scalar, or members, if it is an aggregate, to store information that may be -extra to the unique identifying value of the ID. As a result, pthread_t values -may not be directly comparable. - -If you want your code to be portable you must adhere to the following contraints: - -1) Don't assume it is a scalar data type, e.g. an integer or pointer value. There -are several other implementations where pthread_t is also a struct. See our FAQ -Question 11 for our reasons for defining pthread_t as a struct. - -2) You must not compare them using relational or equality operators. You must use -the API function pthread_equal() to test for equality. - -3) Never attempt to reference individual members. - - -The problem - -Certain applications would like to be able to access a scalar pthread_t, -primarily to use as keys into data structures to manage threads or -thread-related data, but this is not possible in a maximally portable and -standards compliant way for current POSIX threads implementations. - -This use is often required because pthread_t values are not unique through -the life of the process and so it is necessary for the application to keep -track of a threads status itself, and ironically this is because they are -scalar types in the first place. - -To my knowledge the only platform that provides a scalar pthread_t that is -unique through the life of a process is Solaris. Other platforms, including -HPUX, will not provide support to applications that do this. - -For implementations that define pthread_t as a scalar, programmers often -employ direct relational and equality operators with pthread_t. This code -will break when ported to a standard-comforming implementation that defines -pthread_t as an aggregate type. - -For implementations that define pthread_t as an aggregate, e.g. a struct, -programmers can use memcmp etc., but then face the prospect that the struct may -include alignment padding bytes or bits as well as extra implementation-specific -members that are not part of the unique identifying value. - -Opacity also means that an implementation is free to change the definition, -which should generally only require that applications be recompiled and relinked, -not rewritten. - - -Doesn't the compiler take care of padding? - -The C89 and later standards only effectively guarantee element-by-element -equivalence following an assignment or pass by value of a struct or union, -therefore undefined areas of any two otherwise equivalent pthread_t instances -can still compare differently, e.g. attempting to compare two such pthread_t -variables byte-by-byte, e.g. memcmp(&t1, &t2, sizeof(pthread_t) may give an -incorrect result. In practice I'm reasonably confident that compilers routinely -also copy the padding bytes, mainly because assignment of unions would be far -too complicated otherwise. But it just isn't guarranteed by the standard. - -Illustration: - -We have two thread IDs t1 and t2 - -pthread_t t1, t2; - -In an application we create the threads and intend to store the thread IDs in an -ordered data structure (linked list, tree, etc) so we need to be able to compare -them in order to insert them initially and also to traverse. - -Suppose pthread_t contains undefined padding bits and our compiler copies our -pthread_t [struct] element-by-element, then for the assignment: - -pthread_t temp = t1; - -temp and t1 will be equivalent and correct but a byte-for-byte comparison such as -memcmp(&temp, &t1, sizeof(pthread_t)) == 0 may not return true as we expect because -the undefined bits may not have the same values in the two variable instances. - -Similarly if passing by value under the same conditions. - -If, on the other hand, the undefined bits are at least constant through every -assignment and pass-by-value then the byte-for-byte comparison -memcmp(&temp, &t1, sizeof(pthread_t)) == 0 will always return the expected result. -How can we force the behaviour we need? - - -Solutions - -Adding new functions to the standard API or as non-portable extentions is -the only reliable to provide the necessary operations. Remember also that -POSIX is not tied to the C language. The most common functions that have -been suggested are: - -pthread_null() -pthread_compare() -pthread_hash() - -A single more general purpose function could also be defined as a -basis for at least the last two of the above functions. - -First we need to list the freedoms and constraints with respect -to pthread_t so that we can be sure our solution is compatible with the -standard. - -What is known or may be deduced from the standard: -1) pthread_t must be able to be passed by value, so it must be a single object. -2) from (1) it must be copyable so cannot embed thread-state information, locks -or other volatile objects required to manage the thread it associates with. -3) pthread_t may carry additional information, e.g. for debugging or to manage -itself. -4) there is an implicit requirement that the size of pthread_t is determinable -at compile-time and size-invariant, because it must be able to copy the object -(i.e. through assignment and pass-by-value). Such copies must be genuine -duplicates, not merely a copy of a pointer to a common instance such as -would be the case if pthread_t were defined as an array. - - -Suppose we define the following function: - -/* This function shall return it's argument */ -pthread_t* pthread_normalize(pthread_t* thread); - -For scalar or aggregate pthread_t types this function would simply zero any bits -within the pthread_t that don't uniquely identify the thread, including padding, -such that client code can return consistent results from operations done on the -result. If the additional bits are a pointer to an associate structure then -this function would ensure that the memory used to store that associate -structure does not leak. With normalization the following compare would be -valid and repeatable: - -memcmp(pthread_normalize(&t1),pthread_normalize(&t2),sizeof(pthread_t)) - -Note 1: such comparisons are intended merely to order and sort pthread_t values -and allow them to index various data structures. They are not intended to reveal -anything about the relationships between threads, like startup order. - -Note 2: the normalized pthread_t is also a valid pthread_t that uniquely -identifies the same thread. - -Advantages: -1) In most existing implementations this function would reduce to a no-op that -emits no additional instructions, i.e after in-lining or optimisation, or if -defined as a macro: -#define pthread_normalise(tptr) (tptr) - -2) This single function allows an application to portably derive -application-level versions of any of the other required functions. - -3) It is a generic function that could enable unanticipated uses. - -Disadvantages: -1) Less efficient than dedicated compare or hash functions for implementations -that include significant extra non-id elements in pthread_t. - -2) Still need to be concerned about padding if copying normalized pthread_t. -See the later section on defining pthread_t to neutralise padding issues. - -Generally a pthread_t may need to be normalized every time it is used, -which could have a significant impact. However, this is a design decision -for the implementor in a competitive environment. An implementation is free -to define a pthread_t in a way that minimises or eliminates padding or -renders this function a no-op. - -Hazards: -1) Pass-by-reference directly modifies 'thread' so the application must -synchronise access or ensure that the pointer refers to a copy. The alternative -of pass-by-value/return-by-value was considered but then this requires two copy -operations, disadvantaging implementations where this function is not a no-op -in terms of speed of execution. This function is intended to be used in high -frequency situations and needs to be efficient, or at least not unnecessarily -inefficient. The alternative also sits awkwardly with functions like memcmp. - -2) [Non-compliant] code that uses relational and equality operators on -arithmetic or pointer style pthread_t types would need to be rewritten, but it -should be rewritten anyway. - - -C implementation of null/compare/hash functions using pthread_normalize(): - -/* In pthread.h */ -pthread_t* pthread_normalize(pthread_t* thread); - -/* In user code */ -/* User-level bitclear function - clear bits in loc corresponding to mask */ -void* bitclear (void* loc, void* mask, size_t count); - -typedef unsigned int hash_t; - -/* User-level hash function */ -hash_t hash(void* ptr, size_t count); - -/* - * User-level pthr_null function - modifies the origin thread handle. - * The concept of a null pthread_t is highly implementation dependent - * and this design may be far from the mark. For example, in an - * implementation "null" may mean setting a special value inside one - * element of pthread_t to mean "INVALID". However, if that value was zero and - * formed part of the id component then we may get away with this design. - */ -pthread_t* pthr_null(pthread_t* tp) -{ - /* - * This should have the same effect as memset(tp, 0, sizeof(pthread_t)) - * We're just showing that we can do it. - */ - void* p = (void*) pthread_normalize(tp); - return (pthread_t*) bitclear(p, p, sizeof(pthread_t)); -} - -/* - * Safe user-level pthr_compare function - modifies temporary thread handle copies - */ -int pthr_compare_safe(pthread_t thread1, pthread_t thread2) -{ - return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); -} - -/* - * Fast user-level pthr_compare function - modifies origin thread handles - */ -int pthr_compare_fast(pthread_t* thread1, pthread_t* thread2) -{ - return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); -} - -/* - * Safe user-level pthr_hash function - modifies temporary thread handle copy - */ -hash_t pthr_hash_safe(pthread_t thread) -{ - return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); -} - -/* - * Fast user-level pthr_hash function - modifies origin thread handle - */ -hash_t pthr_hash_fast(pthread_t thread) -{ - return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); -} - -/* User-level bitclear function - modifies the origin array */ -void* bitclear(void* loc, void* mask, size_t count) -{ - int i; - for (i=0; i < count; i++) { - (unsigned char) *loc++ &= ~((unsigned char) *mask++); - } -} - -/* Donald Knuth hash */ -hash_t hash(void* str, size_t count) -{ - hash_t hash = (hash_t) count; - unsigned int i = 0; - - for(i = 0; i < len; str++, i++) - { - hash = ((hash << 5) ^ (hash >> 27)) ^ (*str); - } - return hash; -} - -/* Example of advantage point (3) - split a thread handle into its id and non-id values */ -pthread_t id = thread, non-id = thread; -bitclear((void*) &non-id, (void*) pthread_normalize(&id), sizeof(pthread_t)); - - -A pthread_t type change proposal to neutralise the effects of padding - -Even if pthread_normalize() is available, padding is still a problem because -the standard only garrantees element-by-element equivalence through -copy operations (assignment and pass-by-value). So padding bit values can -still change randomly after calls to pthread_normalize(). - -[I suspect that most compilers take the easy path and always byte-copy anyway, -partly because it becomes too complex to do (e.g. unions that contain sub-aggregates) -but also because programmers can easily design their aggregates to minimise and -often eliminate padding]. - -How can we eliminate the problem of padding bytes in structs? Could -defining pthread_t as a union rather than a struct provide a solution? - -In fact, the Linux pthread.h defines most of it's pthread_*_t objects (but not -pthread_t itself) as unions, possibly for this and/or other reasons. We'll -borrow some element naming from there but the ideas themselves are well known -- the __align element used to force alignment of the union comes from K&R's -storage allocator example. - -/* Essentially our current pthread_t renamed */ -typedef struct { - struct thread_state_t * __p; - long __x; /* sequence counter */ -} thread_id_t; - -Ensuring that the last element in the above struct is a long ensures that the -overall struct size is a multiple of sizeof(long), so there should be no trailing -padding in this struct or the union we define below. -(Later we'll see that we can handle internal but not trailing padding.) - -/* New pthread_t */ -typedef union { - char __size[sizeof(thread_id_t)]; /* array as the first element */ - thread_id_t __tid; - long __align; /* Ensure that the union starts on long boundary */ -} pthread_t; - -This guarrantees that, during an assignment or pass-by-value, the compiler copies -every byte in our thread_id_t because the compiler guarrantees that the __size -array, which we have ensured is the equal-largest element in the union, retains -equivalence. - -This means that pthread_t values stored, assigned and passed by value will at least -carry the value of any undefined padding bytes along and therefore ensure that -those values remain consistent. Our comparisons will return consistent results and -our hashes of [zero initialised] pthread_t values will also return consistent -results. - -We have also removed the need for a pthread_null() function; we can initialise -at declaration time or easily create our own const pthread_t to use in assignments -later: - -const pthread_t null_tid = {0}; /* braces are required */ - -pthread_t t; -... -t = null_tid; - - -Note that we don't have to explicitly make use of the __size array at all. It's -there just to force the compiler behaviour we want. - - -Partial solutions without a pthread_normalize function - - -An application-level pthread_null and pthread_compare proposal -(and pthread_hash proposal by extention) - -In order to deal with the problem of scalar/aggregate pthread_t type disparity in -portable code I suggest using an old-fashioned union, e.g.: - -Contraints: -- there is no padding, or padding values are preserved through assignment and - pass-by-value (see above); -- there are no extra non-id values in the pthread_t. - - -Example 1: A null initialiser for pthread_t variables... - -typedef union { - unsigned char b[sizeof(pthread_t)]; - pthread_t t; -} init_t; - -const init_t initial = {0}; - -pthread_t tid = initial.t; /* init tid to all zeroes */ - - -Example 2: A comparison function for pthread_t values - -typedef union { - unsigned char b[sizeof(pthread_t)]; - pthread_t t; -} pthcmp_t; - -int pthcmp(pthread_t left, pthread_t right) -{ - /* - * Compare two pthread handles in a way that imposes a repeatable but arbitrary - * ordering on them. - * I.e. given the same set of pthread_t handles the ordering should be the same - * each time but the order has no particular meaning other than that. E.g. - * the ordering does not imply the thread start sequence, or any other - * relationship between threads. - * - * Return values are: - * 1 : left is greater than right - * 0 : left is equal to right - * -1 : left is less than right - */ - int i; - pthcmp_t L, R; - L.t = left; - R.t = right; - for (i = 0; i < sizeof(pthread_t); i++) - { - if (L.b[i] > R.b[i]) - return 1; - else if (L.b[i] < R.b[i]) - return -1; - } - return 0; -} - -It has been pointed out that the C99 standard allows for the possibility that -integer types also may include padding bits, which could invalidate the above -method. This addition to C99 was specifically included after it was pointed -out that there was one, presumably not particularly well known, architecture -that included a padding bit in it's 32 bit integer type. See section 6.2.6.2 -of both the standard and the rationale, specifically the paragraph starting at -line 16 on page 43 of the rationale. - - -An aside - -Certain compilers, e.g. gcc and one of the IBM compilers, include a feature -extention: provided the union contains a member of the same type as the -object then the object may be cast to the union itself. - -We could use this feature to speed up the pthrcmp() function from example 2 -above by directly referencing rather than copying the pthread_t arguments to -the local union variables, e.g.: - -int pthcmp(pthread_t left, pthread_t right) -{ - /* - * Compare two pthread handles in a way that imposes a repeatable but arbitrary - * ordering on them. - * I.e. given the same set of pthread_t handles the ordering should be the same - * each time but the order has no particular meaning other than that. E.g. - * the ordering does not imply the thread start sequence, or any other - * relationship between threads. - * - * Return values are: - * 1 : left is greater than right - * 0 : left is equal to right - * -1 : left is less than right - */ - int i; - for (i = 0; i < sizeof(pthread_t); i++) - { - if (((pthcmp_t)left).b[i] > ((pthcmp_t)right).b[i]) - return 1; - else if (((pthcmp_t)left).b[i] < ((pthcmp_t)right).b[i]) - return -1; - } - return 0; -} - - -Result thus far - -We can't remove undefined bits if they are there in pthread_t already, but we have -attempted to render them inert for comparison and hashing functions by making them -consistent through assignment, copy and pass-by-value. - -Note: Hashing pthread_t values requires that all pthread_t variables be initialised -to the same value (usually all zeros) before being assigned a proper thread ID, i.e. -to ensure that any padding bits are zero, or at least the same value for all -pthread_t. Since all pthread_t values are generated by the library in the first -instance this need not be an application-level operation. - - -Conclusion - -I've attempted to resolve the multiple issues of type opacity and the possible -presence of undefined bits and bytes in pthread_t values, which prevent -applications from comparing or hashing pthread handles. - -Two complimentary partial solutions have been proposed, one an application-level -scheme to handle both scalar and aggregate pthread_t types equally, plus a -definition of pthread_t itself that neutralises padding bits and bytes by -coercing semantics out of the compiler to eliminate variations in the values of -padding bits. - -I have not provided any solution to the problem of handling extra values embedded -in pthread_t, e.g. debugging or trap information that an implementation is entitled -to include. Therefore none of this replaces the portability and flexibility of API -functions but what functions are needed? The threads standard is unlikely to -include new functions that can be implemented by a combination of existing features -and more generic functions (several references in the threads rationale suggest this). -Therefore I propose that the following function could replace the several functions -that have been suggested in conversations: - -pthread_t * pthread_normalize(pthread_t * handle); - -For most existing pthreads implementations this function, or macro, would reduce to -a no-op with zero call overhead. Most of the other desired operations on pthread_t -values (null, compare, hash, etc.) can be trivially derived from this and other -standard functions. +This file documents non-portable functions and other issues. + +Non-portable functions included in pthreads-win32 +------------------------------------------------- + +BOOL +pthread_win32_test_features_np(int mask) + + This routine allows an application to check which + run-time auto-detected features are available within + the library. + + The possible features are: + + PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE + Return TRUE if the native version of + InterlockedCompareExchange() is being used. + This feature is not meaningful in recent + library versions as MSVC builds only support + system implemented ICE. Note that all Mingw + builds use inlined asm versions of all the + Interlocked routines. + PTW32_ALERTABLE_ASYNC_CANCEL + Return TRUE is the QueueUserAPCEx package + QUSEREX.DLL is available and the AlertDrv.sys + driver is loaded into Windows, providing + alertable (pre-emptive) asyncronous threads + cancellation. If this feature returns FALSE + then the default async cancel scheme is in + use, which cannot cancel blocked threads. + + Features may be Or'ed into the mask parameter, in which case + the routine returns TRUE if any of the Or'ed features would + return TRUE. At this stage it doesn't make sense to Or features + but it may some day. + + +void * +pthread_timechange_handler_np(void *) + + To improve tolerance against operator or time service + initiated system clock changes. + + This routine can be called by an application when it + receives a WM_TIMECHANGE message from the system. At + present it broadcasts all condition variables so that + waiting threads can wake up and re-evaluate their + conditions and restart their timed waits if required. + + It has the same return type and argument type as a + thread routine so that it may be called directly + through pthread_create(), i.e. as a separate thread. + + Parameters + + Although a parameter must be supplied, it is ignored. + The value NULL can be used. + + Return values + + It can return an error EAGAIN to indicate that not + all condition variables were broadcast for some reason. + Otherwise, 0 is returned. + + If run as a thread, the return value is returned + through pthread_join(). + + The return value should be cast to an integer. + + +HANDLE +pthread_getw32threadhandle_np(pthread_t thread); + + Returns the win32 thread handle that the POSIX + thread "thread" is running as. + + Applications can use the win32 handle to set + win32 specific attributes of the thread. + +DWORD +pthread_getw32threadid_np (pthread_t thread) + + Returns the Windows native thread ID that the POSIX + thread "thread" is running as. + + Only valid when the library is built where + ! (defined(__MINGW64__) || defined(__MINGW32__)) || defined (__MSVCRT__) || defined (__DMC__) + and otherwise returns 0. + + +int +pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, int kind) + +int +pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, int *kind) + + These two routines are included for Linux compatibility + and are direct equivalents to the standard routines + pthread_mutexattr_settype + pthread_mutexattr_gettype + + pthread_mutexattr_setkind_np accepts the following + mutex kinds: + PTHREAD_MUTEX_FAST_NP + PTHREAD_MUTEX_ERRORCHECK_NP + PTHREAD_MUTEX_RECURSIVE_NP + + These are really just equivalent to (respectively): + PTHREAD_MUTEX_NORMAL + PTHREAD_MUTEX_ERRORCHECK + PTHREAD_MUTEX_RECURSIVE + + +int +pthread_delay_np (const struct timespec *interval) + + This routine causes a thread to delay execution for a specific period of time. + This period ends at the current time plus the specified interval. The routine + will not return before the end of the period is reached, but may return an + arbitrary amount of time after the period has gone by. This can be due to + system load, thread priorities, and system timer granularity. + + Specifying an interval of zero (0) seconds and zero (0) nanoseconds is + allowed and can be used to force the thread to give up the processor or to + deliver a pending cancellation request. + + This routine is a cancellation point. + + The timespec structure contains the following two fields: + + tv_sec is an integer number of seconds. + tv_nsec is an integer number of nanoseconds. + + Return Values + + If an error condition occurs, this routine returns an integer value + indicating the type of error. Possible return values are as follows: + + 0 Successful completion. + [EINVAL] The value specified by interval is invalid. + + +__int64 +pthread_getunique_np (pthread_t thr) + + Returns the unique number associated with thread thr. + The unique numbers are a simple way of positively identifying a thread when + pthread_t cannot be relied upon to identify the true thread instance. I.e. a + pthread_t value may be assigned to different threads throughout the life of a + process. + + Because pthreads4w (pthreads-win32) threads can be uniquely identified by their + pthread_t values this routine is provided only for source code compatibility. + + NOTE: if the library is re-initialised, i.e. by calling pthread_win32_process_detach_np() + followed by pthread_win32_process_attach_np(), then the unique number is reset along with + several other library global values. Library reinitialisation should not be required, + however, some older applications may still call these routines as they were once required to + do when statically linking the library. + +int +pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec *abstime) + +int +pthread_tryjoin_np (pthread_t thread, void **value_ptr) + + These function is added for compatibility with Linux. + + +int +pthread_num_processors_np (void) + + This routine (found on HPUX systems) returns the number of processors + in the system. This implementation actually returns the number of + processors available to the process, which can be a lower number + than the system's number, depending on the process's affinity mask. + + +BOOL +pthread_win32_process_attach_np (void); + +BOOL +pthread_win32_process_detach_np (void); + +BOOL +pthread_win32_thread_attach_np (void); + +BOOL +pthread_win32_thread_detach_np (void); + + These functions contain the code normally run via DllMain + when the library is used as a dll. As of version 2.9.0 of the + library, static builds using either MSC or GCC will call + pthread_win32_process_* automatically at application startup and + exit respectively. + + pthread_win32_thread_attach_np() is currently a no-op. + + pthread_win32_thread_detach_np() is not a no-op. It cleans up the + implicit pthread handle that is allocated to any thread not started + via pthread_create(). Such non-posix threads should call this routine + when they exit, or call pthread_exit() to both cleanup and exit. + + These functions invariably return TRUE except for + pthread_win32_process_attach_np() which will return FALSE + if pthreads-win32 initialisation fails. + + +int +pthread_attr_getaffinity_np (pthread_attr_t * attr, size_t cpusetsize, cpu_set_t * cpuset); + +int +pthread_attr_setaffinity_np (pthread_attr_t * attr, size_t cpusetsize, const cpu_set_t * cpuset); + +int +pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t * cpuset); + +int +pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, const cpu_set_t * cpuset); + + Manipulate the CPU affinity of threads. Compatibility with libgcc-based pthreads + implementations. + + +int +pthreadCancelableWait (HANDLE waitHandle); + +int +pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout); + + These two functions provide hooks into the pthread_cancel + mechanism that will allow you to wait on a Windows handle + and make it a cancellation point. Both functions block + until either the given w32 handle is signaled, or + pthread_cancel has been called. It is implemented using + WaitForMultipleObjects on 'waitHandle' and a manually + reset w32 event used to implement pthread_cancel. + +int +pthread_getname_np(pthread_t thr, char *name, int len); + +If __PTW32_COMPATIBILITY_BSD or __PTW32_COMPATIBILITY_TRU64 defined +int +pthread_setname_np(pthread_t thr, const char *name, void *arg); + +Otherwise: +int +pthread_setname_np(pthread_t thr, const char *name); + + Set and get thread names. Compatibility. + + +struct timespec * +pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * relative); + + Primarily to facilitate writing unit tests but exported for convenience. + The struct timespec pointed to by the first parameter is modified to represent the + time 'now' plus an optional offset value timespec in a platform optimal way. + Returns the first parameter so is compatible as the struct timespec * parameter in + POSIX timed function calls, e.g. + + struct timespec abstime, reltime = { 0, 5000000 } /* 5 ms */; + pthread_mutex_timedwait(&mtx, pthread_win32_getabstime_np(&abstime, &reltime)); + + +Non-portable issues +------------------- + +Thread priority + + POSIX defines a single contiguous range of numbers that determine a + thread's priority. Win32 defines priority classes and priority + levels relative to these classes. Classes are simply priority base + levels that the defined priority levels are relative to such that, + changing a process's priority class will change the priority of all + of it's threads, while the threads retain the same relativity to each + other. + + A Win32 system defines a single contiguous monotonic range of values + that define system priority levels, just like POSIX. However, Win32 + restricts individual threads to a subset of this range on a + per-process basis. + + The following table shows the base priority levels for combinations + of priority class and priority value in Win32. + + Process Priority Class Thread Priority Level + ----------------------------------------------------------------- + 1 IDLE_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 HIGH_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 2 IDLE_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 3 IDLE_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 4 IDLE_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 4 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 5 IDLE_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 5 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 5 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 6 IDLE_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 6 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 6 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 7 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 7 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 7 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 8 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 8 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 8 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 8 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 9 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 9 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 9 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 10 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 10 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 11 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 11 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 11 HIGH_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 12 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 12 HIGH_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 13 HIGH_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 14 HIGH_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 IDLE_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 16 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 17 REALTIME_PRIORITY_CLASS -7 + 18 REALTIME_PRIORITY_CLASS -6 + 19 REALTIME_PRIORITY_CLASS -5 + 20 REALTIME_PRIORITY_CLASS -4 + 21 REALTIME_PRIORITY_CLASS -3 + 22 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 23 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 24 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 25 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 26 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 27 REALTIME_PRIORITY_CLASS 3 + 28 REALTIME_PRIORITY_CLASS 4 + 29 REALTIME_PRIORITY_CLASS 5 + 30 REALTIME_PRIORITY_CLASS 6 + 31 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + + Windows NT: Values -7, -6, -5, -4, -3, 3, 4, 5, and 6 are not supported. + + + As you can see, the real priority levels available to any individual + Win32 thread are non-contiguous. + + An application using pthreads-win32 should not make assumptions about + the numbers used to represent thread priority levels, except that they + are monotonic between the values returned by sched_get_priority_min() + and sched_get_priority_max(). E.g. Windows 95, 98, NT, 2000, XP make + available a non-contiguous range of numbers between -15 and 15, while + at least one version of WinCE (3.0) defines the minimum priority + (THREAD_PRIORITY_LOWEST) as 5, and the maximum priority + (THREAD_PRIORITY_HIGHEST) as 1. + + Internally, pthreads-win32 maps any priority levels between + THREAD_PRIORITY_IDLE and THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, + or between THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to + THREAD_PRIORITY_HIGHEST. Currently, this also applies to + REALTIME_PRIORITY_CLASSi even if levels -7, -6, -5, -4, -3, 3, 4, 5, and 6 + are supported. + + If it wishes, a Win32 application using pthreads-win32 can use the Win32 + defined priority macros THREAD_PRIORITY_IDLE through + THREAD_PRIORITY_TIME_CRITICAL. + + +The opacity of the pthread_t datatype +------------------------------------- +and possible solutions for portable null/compare/hash, etc +---------------------------------------------------------- + +Because pthread_t is an opague datatype an implementation is permitted to define +pthread_t in any way it wishes. That includes defining some bits, if it is +scalar, or members, if it is an aggregate, to store information that may be +extra to the unique identifying value of the ID. As a result, pthread_t values +may not be directly comparable. + +If you want your code to be portable you must adhere to the following contraints: + +1) Don't assume it is a scalar data type, e.g. an integer or pointer value. There +are several other implementations where pthread_t is also a struct. See our FAQ +Question 11 for our reasons for defining pthread_t as a struct. + +2) You must not compare them using relational or equality operators. You must use +the API function pthread_equal() to test for equality. + +3) Never attempt to reference individual members. + + +The problem + +Certain applications would like to be able to access a scalar pthread_t, +primarily to use as keys into data structures to manage threads or +thread-related data, but this is not possible in a maximally portable and +standards compliant way for current POSIX threads implementations. + +This use is often required because pthread_t values are not unique through +the life of the process and so it is necessary for the application to keep +track of a threads status itself, and ironically this is because they are +scalar types in the first place. + +To my knowledge the only platform that provides a scalar pthread_t that is +unique through the life of a process is Solaris. Other platforms, including +HPUX, will not provide support to applications that do this. + +For implementations that define pthread_t as a scalar, programmers often +employ direct relational and equality operators with pthread_t. This code +will break when ported to a standard-comforming implementation that defines +pthread_t as an aggregate type. + +For implementations that define pthread_t as an aggregate, e.g. a struct, +programmers can use memcmp etc., but then face the prospect that the struct may +include alignment padding bytes or bits as well as extra implementation-specific +members that are not part of the unique identifying value. + +Opacity also means that an implementation is free to change the definition, +which should generally only require that applications be recompiled and relinked, +not rewritten. + + +Doesn't the compiler take care of padding? + +The C89 and later standards only effectively guarantee element-by-element +equivalence following an assignment or pass by value of a struct or union, +therefore undefined areas of any two otherwise equivalent pthread_t instances +can still compare differently, e.g. attempting to compare two such pthread_t +variables byte-by-byte, e.g. memcmp(&t1, &t2, sizeof(pthread_t) may give an +incorrect result. In practice I'm reasonably confident that compilers routinely +also copy the padding bytes, mainly because assignment of unions would be far +too complicated otherwise. But it just isn't guarranteed by the standard. + +Illustration: + +We have two thread IDs t1 and t2 + +pthread_t t1, t2; + +In an application we create the threads and intend to store the thread IDs in an +ordered data structure (linked list, tree, etc) so we need to be able to compare +them in order to insert them initially and also to traverse. + +Suppose pthread_t contains undefined padding bits and our compiler copies our +pthread_t [struct] element-by-element, then for the assignment: + +pthread_t temp = t1; + +temp and t1 will be equivalent and correct but a byte-for-byte comparison such as +memcmp(&temp, &t1, sizeof(pthread_t)) == 0 may not return true as we expect because +the undefined bits may not have the same values in the two variable instances. + +Similarly if passing by value under the same conditions. + +If, on the other hand, the undefined bits are at least constant through every +assignment and pass-by-value then the byte-for-byte comparison +memcmp(&temp, &t1, sizeof(pthread_t)) == 0 will always return the expected result. +How can we force the behaviour we need? + + +Solutions + +Adding new functions to the standard API or as non-portable extentions is +the only reliable to provide the necessary operations. Remember also that +POSIX is not tied to the C language. The most common functions that have +been suggested are: + +pthread_null() +pthread_compare() +pthread_hash() + +A single more general purpose function could also be defined as a +basis for at least the last two of the above functions. + +First we need to list the freedoms and constraints with respect +to pthread_t so that we can be sure our solution is compatible with the +standard. + +What is known or may be deduced from the standard: +1) pthread_t must be able to be passed by value, so it must be a single object. +2) from (1) it must be copyable so cannot embed thread-state information, locks +or other volatile objects required to manage the thread it associates with. +3) pthread_t may carry additional information, e.g. for debugging or to manage +itself. +4) there is an implicit requirement that the size of pthread_t is determinable +at compile-time and size-invariant, because it must be able to copy the object +(i.e. through assignment and pass-by-value). Such copies must be genuine +duplicates, not merely a copy of a pointer to a common instance such as +would be the case if pthread_t were defined as an array. + + +Suppose we define the following function: + +/* This function shall return it's argument */ +pthread_t* pthread_normalize(pthread_t* thread); + +For scalar or aggregate pthread_t types this function would simply zero any bits +within the pthread_t that don't uniquely identify the thread, including padding, +such that client code can return consistent results from operations done on the +result. If the additional bits are a pointer to an associate structure then +this function would ensure that the memory used to store that associate +structure does not leak. With normalization the following compare would be +valid and repeatable: + +memcmp(pthread_normalize(&t1),pthread_normalize(&t2),sizeof(pthread_t)) + +Note 1: such comparisons are intended merely to order and sort pthread_t values +and allow them to index various data structures. They are not intended to reveal +anything about the relationships between threads, like startup order. + +Note 2: the normalized pthread_t is also a valid pthread_t that uniquely +identifies the same thread. + +Advantages: +1) In most existing implementations this function would reduce to a no-op that +emits no additional instructions, i.e after in-lining or optimisation, or if +defined as a macro: +#define pthread_normalise(tptr) (tptr) + +2) This single function allows an application to portably derive +application-level versions of any of the other required functions. + +3) It is a generic function that could enable unanticipated uses. + +Disadvantages: +1) Less efficient than dedicated compare or hash functions for implementations +that include significant extra non-id elements in pthread_t. + +2) Still need to be concerned about padding if copying normalized pthread_t. +See the later section on defining pthread_t to neutralise padding issues. + +Generally a pthread_t may need to be normalized every time it is used, +which could have a significant impact. However, this is a design decision +for the implementor in a competitive environment. An implementation is free +to define a pthread_t in a way that minimises or eliminates padding or +renders this function a no-op. + +Hazards: +1) Pass-by-reference directly modifies 'thread' so the application must +synchronise access or ensure that the pointer refers to a copy. The alternative +of pass-by-value/return-by-value was considered but then this requires two copy +operations, disadvantaging implementations where this function is not a no-op +in terms of speed of execution. This function is intended to be used in high +frequency situations and needs to be efficient, or at least not unnecessarily +inefficient. The alternative also sits awkwardly with functions like memcmp. + +2) [Non-compliant] code that uses relational and equality operators on +arithmetic or pointer style pthread_t types would need to be rewritten, but it +should be rewritten anyway. + + +C implementation of null/compare/hash functions using pthread_normalize(): + +/* In pthread.h */ +pthread_t* pthread_normalize(pthread_t* thread); + +/* In user code */ +/* User-level bitclear function - clear bits in loc corresponding to mask */ +void* bitclear (void* loc, void* mask, size_t count); + +typedef unsigned int hash_t; + +/* User-level hash function */ +hash_t hash(void* ptr, size_t count); + +/* + * User-level pthr_null function - modifies the origin thread handle. + * The concept of a null pthread_t is highly implementation dependent + * and this design may be far from the mark. For example, in an + * implementation "null" may mean setting a special value inside one + * element of pthread_t to mean "INVALID". However, if that value was zero and + * formed part of the id component then we may get away with this design. + */ +pthread_t* pthr_null(pthread_t* tp) +{ + /* + * This should have the same effect as memset(tp, 0, sizeof(pthread_t)) + * We're just showing that we can do it. + */ + void* p = (void*) pthread_normalize(tp); + return (pthread_t*) bitclear(p, p, sizeof(pthread_t)); +} + +/* + * Safe user-level pthr_compare function - modifies temporary thread handle copies + */ +int pthr_compare_safe(pthread_t thread1, pthread_t thread2) +{ + return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); +} + +/* + * Fast user-level pthr_compare function - modifies origin thread handles + */ +int pthr_compare_fast(pthread_t* thread1, pthread_t* thread2) +{ + return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); +} + +/* + * Safe user-level pthr_hash function - modifies temporary thread handle copy + */ +hash_t pthr_hash_safe(pthread_t thread) +{ + return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); +} + +/* + * Fast user-level pthr_hash function - modifies origin thread handle + */ +hash_t pthr_hash_fast(pthread_t thread) +{ + return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); +} + +/* User-level bitclear function - modifies the origin array */ +void* bitclear(void* loc, void* mask, size_t count) +{ + int i; + for (i=0; i < count; i++) { + (unsigned char) *loc++ &= ~((unsigned char) *mask++); + } +} + +/* Donald Knuth hash */ +hash_t hash(void* str, size_t count) +{ + hash_t hash = (hash_t) count; + unsigned int i = 0; + + for(i = 0; i < len; str++, i++) + { + hash = ((hash << 5) ^ (hash >> 27)) ^ (*str); + } + return hash; +} + +/* Example of advantage point (3) - split a thread handle into its id and non-id values */ +pthread_t id = thread, non-id = thread; +bitclear((void*) &non-id, (void*) pthread_normalize(&id), sizeof(pthread_t)); + + +A pthread_t type change proposal to neutralise the effects of padding + +Even if pthread_normalize() is available, padding is still a problem because +the standard only garrantees element-by-element equivalence through +copy operations (assignment and pass-by-value). So padding bit values can +still change randomly after calls to pthread_normalize(). + +[I suspect that most compilers take the easy path and always byte-copy anyway, +partly because it becomes too complex to do (e.g. unions that contain sub-aggregates) +but also because programmers can easily design their aggregates to minimise and +often eliminate padding]. + +How can we eliminate the problem of padding bytes in structs? Could +defining pthread_t as a union rather than a struct provide a solution? + +In fact, the Linux pthread.h defines most of it's pthread_*_t objects (but not +pthread_t itself) as unions, possibly for this and/or other reasons. We'll +borrow some element naming from there but the ideas themselves are well known +- the __align element used to force alignment of the union comes from K&R's +storage allocator example. + +/* Essentially our current pthread_t renamed */ +typedef struct { + struct thread_state_t * __p; + long __x; /* sequence counter */ +} thread_id_t; + +Ensuring that the last element in the above struct is a long ensures that the +overall struct size is a multiple of sizeof(long), so there should be no trailing +padding in this struct or the union we define below. +(Later we'll see that we can handle internal but not trailing padding.) + +/* New pthread_t */ +typedef union { + char __size[sizeof(thread_id_t)]; /* array as the first element */ + thread_id_t __tid; + long __align; /* Ensure that the union starts on long boundary */ +} pthread_t; + +This guarrantees that, during an assignment or pass-by-value, the compiler copies +every byte in our thread_id_t because the compiler guarrantees that the __size +array, which we have ensured is the equal-largest element in the union, retains +equivalence. + +This means that pthread_t values stored, assigned and passed by value will at least +carry the value of any undefined padding bytes along and therefore ensure that +those values remain consistent. Our comparisons will return consistent results and +our hashes of [zero initialised] pthread_t values will also return consistent +results. + +We have also removed the need for a pthread_null() function; we can initialise +at declaration time or easily create our own const pthread_t to use in assignments +later: + +const pthread_t null_tid = {0}; /* braces are required */ + +pthread_t t; +... +t = null_tid; + + +Note that we don't have to explicitly make use of the __size array at all. It's +there just to force the compiler behaviour we want. + + +Partial solutions without a pthread_normalize function + + +An application-level pthread_null and pthread_compare proposal +(and pthread_hash proposal by extention) + +In order to deal with the problem of scalar/aggregate pthread_t type disparity in +portable code I suggest using an old-fashioned union, e.g.: + +Contraints: +- there is no padding, or padding values are preserved through assignment and + pass-by-value (see above); +- there are no extra non-id values in the pthread_t. + + +Example 1: A null initialiser for pthread_t variables... + +typedef union { + unsigned char b[sizeof(pthread_t)]; + pthread_t t; +} init_t; + +const init_t initial = {0}; + +pthread_t tid = initial.t; /* init tid to all zeroes */ + + +Example 2: A comparison function for pthread_t values + +typedef union { + unsigned char b[sizeof(pthread_t)]; + pthread_t t; +} pthcmp_t; + +int pthcmp(pthread_t left, pthread_t right) +{ + /* + * Compare two pthread handles in a way that imposes a repeatable but arbitrary + * ordering on them. + * I.e. given the same set of pthread_t handles the ordering should be the same + * each time but the order has no particular meaning other than that. E.g. + * the ordering does not imply the thread start sequence, or any other + * relationship between threads. + * + * Return values are: + * 1 : left is greater than right + * 0 : left is equal to right + * -1 : left is less than right + */ + int i; + pthcmp_t L, R; + L.t = left; + R.t = right; + for (i = 0; i < sizeof(pthread_t); i++) + { + if (L.b[i] > R.b[i]) + return 1; + else if (L.b[i] < R.b[i]) + return -1; + } + return 0; +} + +It has been pointed out that the C99 standard allows for the possibility that +integer types also may include padding bits, which could invalidate the above +method. This addition to C99 was specifically included after it was pointed +out that there was one, presumably not particularly well known, architecture +that included a padding bit in it's 32 bit integer type. See section 6.2.6.2 +of both the standard and the rationale, specifically the paragraph starting at +line 16 on page 43 of the rationale. + + +An aside + +Certain compilers, e.g. gcc and one of the IBM compilers, include a feature +extention: provided the union contains a member of the same type as the +object then the object may be cast to the union itself. + +We could use this feature to speed up the pthrcmp() function from example 2 +above by directly referencing rather than copying the pthread_t arguments to +the local union variables, e.g.: + +int pthcmp(pthread_t left, pthread_t right) +{ + /* + * Compare two pthread handles in a way that imposes a repeatable but arbitrary + * ordering on them. + * I.e. given the same set of pthread_t handles the ordering should be the same + * each time but the order has no particular meaning other than that. E.g. + * the ordering does not imply the thread start sequence, or any other + * relationship between threads. + * + * Return values are: + * 1 : left is greater than right + * 0 : left is equal to right + * -1 : left is less than right + */ + int i; + for (i = 0; i < sizeof(pthread_t); i++) + { + if (((pthcmp_t)left).b[i] > ((pthcmp_t)right).b[i]) + return 1; + else if (((pthcmp_t)left).b[i] < ((pthcmp_t)right).b[i]) + return -1; + } + return 0; +} + + +Result thus far + +We can't remove undefined bits if they are there in pthread_t already, but we have +attempted to render them inert for comparison and hashing functions by making them +consistent through assignment, copy and pass-by-value. + +Note: Hashing pthread_t values requires that all pthread_t variables be initialised +to the same value (usually all zeros) before being assigned a proper thread ID, i.e. +to ensure that any padding bits are zero, or at least the same value for all +pthread_t. Since all pthread_t values are generated by the library in the first +instance this need not be an application-level operation. + + +Conclusion + +I've attempted to resolve the multiple issues of type opacity and the possible +presence of undefined bits and bytes in pthread_t values, which prevent +applications from comparing or hashing pthread handles. + +Two complimentary partial solutions have been proposed, one an application-level +scheme to handle both scalar and aggregate pthread_t types equally, plus a +definition of pthread_t itself that neutralises padding bits and bytes by +coercing semantics out of the compiler to eliminate variations in the values of +padding bits. + +I have not provided any solution to the problem of handling extra values embedded +in pthread_t, e.g. debugging or trap information that an implementation is entitled +to include. Therefore none of this replaces the portability and flexibility of API +functions but what functions are needed? The threads standard is unlikely to +include new functions that can be implemented by a combination of existing features +and more generic functions (several references in the threads rationale suggest this). +Therefore I propose that the following function could replace the several functions +that have been suggested in conversations: + +pthread_t * pthread_normalize(pthread_t * handle); + +For most existing pthreads implementations this function, or macro, would reduce to +a no-op with zero call overhead. Most of the other desired operations on pthread_t +values (null, compare, hash, etc.) can be trivially derived from this and other +standard functions. diff --git a/_ptw32.h b/_ptw32.h index 62194f8e..90d9794e 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -2,40 +2,39 @@ * Module: _ptw32.h * * Purpose: - * Pthreads-win32 internal macros, to be shared by other headers - * comprising the pthreads-win32 package. + * Pthreads4w internal macros, to be shared by other headers + * comprising the pthreads4w package. * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2012, 2016, Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- */ + #ifndef __PTW32_H #define __PTW32_H diff --git a/aclocal.m4 b/aclocal.m4 index 8561e862..f615b29c 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,30 +1,30 @@ ## aclocal.m4 ## -------------------------------------------------------------------------- ## -## Pthreads-win32 - POSIX Threads Library for Win32 -## Copyright(C) 1998 John E. Bossom -## Copyright(C) 1999-2012, 2016, Pthreads-win32 contributors -## -## The current list of contributors is contained -## in the file CONTRIBUTORS included with the source -## code distribution. The list can also be seen at the -## following World Wide Web location: -## http://sources.redhat.com/pthreads-win32/contributors.html -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library in the file COPYING.LIB; -## if not, write to the Free Software Foundation, Inc., -## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. ## # # PTW32_AC_CHECK_TYPEDEF( TYPENAME, [HEADER] ) diff --git a/cleanup.c b/cleanup.c index 21e59dff..9e746d9f 100644 --- a/cleanup.c +++ b/cleanup.c @@ -8,33 +8,32 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- */ #ifdef HAVE_CONFIG_H diff --git a/configure.ac b/configure.ac index 5490826b..a3146a59 100644 --- a/configure.ac +++ b/configure.ac @@ -1,30 +1,30 @@ # configure.ac # -------------------------------------------------------------------------- # -# Pthreads-win32 - POSIX Threads Library for Win32 -# Copyright(C) 1998 John E. Bossom -# Copyright(C) 1999-2012, 2016, Pthreads-win32 contributors -# -# The current list of contributors is contained -# in the file CONTRIBUTORS included with the source -# code distribution. The list can also be seen at the -# following World Wide Web location: -# http://sources.redhat.com/pthreads-win32/contributors.html -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library in the file COPYING.LIB; -# if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. # AC_INIT([pthreads-win32],[git]) AC_CONFIG_HEADERS([config.h]) diff --git a/context.h b/context.h index c7bda8cc..d567e854 100644 --- a/context.h +++ b/context.h @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __PTW32_CONTEXT_H diff --git a/create.c b/create.c index 1747f5b1..21e04ce3 100644 --- a/create.c +++ b/create.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/dll.c b/dll.c index 5d7b951c..3c9afd76 100644 --- a/dll.c +++ b/dll.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/errno.c b/errno.c index dbdf4d7e..a4858c64 100644 --- a/errno.c +++ b/errno.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/global.c b/global.c index 7a9e354e..d346ba42 100644 --- a/global.c +++ b/global.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/implement.h b/implement.h index fe8d2bb6..543c2044 100644 --- a/implement.h +++ b/implement.h @@ -7,32 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Contact Email: Ross.Johnson@homemail.com.au + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #if !defined(_IMPLEMENT_H) diff --git a/manual/ChangeLog b/manual/ChangeLog index 443e6c01..bcf8930e 100644 --- a/manual/ChangeLog +++ b/manual/ChangeLog @@ -1,3 +1,9 @@ +2016-12-25 Ross Johnson + + * Change all references to "pthreads-w32" etc. to "PThreads4W" + * Change all references to the sourceware projects web page to the + SourceForge project web page. + 2015-02-03 Ross Johnson * *.html: Fix HEAD section inconsistencies and remove editor meta tags. @@ -38,7 +44,7 @@ * PortabilityIssues.html: Was nonPortableIssues.html. * index.html: Updated; add table of contents at top. - * *.html: Add Pthreads-win32 header info; add link back to the + * *.html: Add PThreads4W header info; add link back to the index page 'index.html'. 2005-05-06 Ross Johnson diff --git a/manual/PortabilityIssues.html b/manual/PortabilityIssues.html index 9c1b0d07..0fce9e00 100644 --- a/manual/PortabilityIssues.html +++ b/manual/PortabilityIssues.html @@ -18,7 +18,7 @@

POSIX Threads for Windows – REFERENCE – -Pthreads-w32

+Pthreads4W

Reference Index

Table of Contents

Name

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

Thread priority

4, 5, and 6 are not supported.

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

-

An application using Pthreads-w32 should +

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

Thread priority

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

-

Internally, pthreads-win32 maps any +

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

Thread priority

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

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

Author

-

Ross Johnson for use with Pthreads-w32.

+

Ross Johnson for use with Pthreads4W.

See also



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

POSIX -Threads for Windows – REFERENCE - Pthreads-w32

+Threads for Windows – REFERENCE - Pthreads4W

Reference Index

Table of Contents

Name

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

POSIX Threads for Windows – REFERENCE - -Pthreads-w32

+Pthreads4W

Table of Contents

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

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

POSIX threads API reference

cpu_set

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

POSIX threads API

sem_wait

sigwait

Non-portable -Pthreads-w32 routines

+PThreads4W routines

pthreadCancelableTimedWait

pthreadCancelableWait

pthread_attr_getaffinity_np

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

POSIX Threads for Windows – REFERENCE – -Pthreads-w32

+Pthreads4W

Reference Index

Table of Contents

Name

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

Errors

The interval timeout milliseconds elapsed before waitHandle was signalled.

Author

-

Ross Johnson for use with Pthreads-w32.

+

Ross Johnson for use with Pthreads4W.

See also

pthread_cancel(), pthread_self()

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

POSIX Threads for Windows – REFERENCE – -Pthreads-w32

-

Reference Index

-

Table of Contents

-

Name

-

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

-

Synopsis

-

#include <pthread.h> -

-

int pthread_attr_init(pthread_attr_t *attr); -

-

int pthread_attr_destroy(pthread_attr_t *attr); -

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

Description

-

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

-

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

-

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

-

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

-

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

-

The following thread attributes are supported: -

-

affinity

-

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

-

detachstate

-

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

-

Default value: PTHREAD_CREATE_JOINABLE. -

-

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

-

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

-

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

-

name

-

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

-

schedpolicy

-

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

-

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

-

Default value: SCHED_OTHER. -

-

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

-

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

-

schedparam

-

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

-

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

-

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

-

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

-

inheritsched

-

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

-

Default value: PTHREAD_EXPLICIT_SCHED. -

-

scope

-

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

-

Pthreads-w32 only supports PTHREAD_SCOPE_SYSTEM.

-

Default value: PTHREAD_SCOPE_SYSTEM. -

-

Return Value

-

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

-

Errors

-

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

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

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

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

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

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

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

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

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

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

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

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

-Author

-

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

-

Modified by Ross Johnson for use with Pthreads-w32.

-

See Also

-

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

-
-

Table of Contents

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

POSIX Threads for Windows – REFERENCE – +Pthreads4W

+

Reference Index

+

Table of Contents

+

Name

+

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

+

Synopsis

+

#include <pthread.h> +

+

int pthread_attr_init(pthread_attr_t *attr); +

+

int pthread_attr_destroy(pthread_attr_t *attr); +

+

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

+

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

+

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

+

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

+

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

+

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

+

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

+

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

+

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

+

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

+

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

+

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

+

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

+

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

+

Description

+

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

+

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

+

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

+

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

+

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

+

The following thread attributes are supported: +

+

affinity

+

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

+

detachstate

+

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

+

Default value: PTHREAD_CREATE_JOINABLE. +

+

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

+

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

+

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

+

name

+

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

+

schedpolicy

+

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

+

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

+

Default value: SCHED_OTHER. +

+

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

+

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

+

schedparam

+

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

+

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

+

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

+

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

+

inheritsched

+

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

+

Default value: PTHREAD_EXPLICIT_SCHED. +

+

scope

+

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

+

PThreads4W only supports PTHREAD_SCOPE_SYSTEM.

+

Default value: PTHREAD_SCOPE_SYSTEM. +

+

Return Value

+

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

+

Errors

+

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

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

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

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

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

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

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

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

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

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

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

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

+Author

+

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

+

Modified by Ross Johnson for use with Pthreads4W.

+

See Also

+

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

+
+

Table of Contents

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

POSIX Threads for Windows – REFERENCE – -Pthreads-w32

-

Reference Index

-

Table of Contents

-

Name

-

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

-

Synopsis

-

#include <pthread.h> -

-

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

-

Description

-

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

-

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

-

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

-

Return Value

-

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

-

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

-

Errors

-

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

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

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

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

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

-

The following sections are informative. -

-

Examples

-

None. -

-

Application Usage

-

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

-

Rationale

-

None. -

-

Future Directions

-

None. -

-

See Also

-

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

-

Copyright

-

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

-

Modified by Ross Johnson for use with Pthreads-w32.

-
-

Table of Contents

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

POSIX Threads for Windows – REFERENCE – +PThreads4W

+

Reference Index

+

Table of Contents

+

Name

+

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

+

Synopsis

+

#include <pthread.h> +

+

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

+

Description

+

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

+

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

+

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

+

Return Value

+

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

+

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

+

Errors

+

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

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

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

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

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

+

The following sections are informative. +

+

Examples

+

None. +

+

Application Usage

+

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

+

Rationale

+

None. +

+

Future Directions

+

None. +

+

See Also

+

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

+

Copyright

+

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

+

Modified by Ross Johnson for use with PThreads4W.

+
+

Table of Contents

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

POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

+

POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

Reference Index

Table of Contents

Name

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

Description

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

-

Pthreads-w32 defines _POSIX_THREAD_ATTR_STACKSIZE in +

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

-

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

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

Return Value

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

Copyright

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

-

Modified by Ross Johnson for use with Pthreads-w32.

+

Modified by Ross Johnson for use with Pthreads4W.


Table of Contents

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

    POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

    +

    POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

    Reference Index

    Table of Contents

    Name

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

    Application Usage

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

    -

    Pthreads-w32 defines _POSIX_BARRIERS to indicate +

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

    Rationale

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

    Future Directions

    Known Bugs

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

    Copyright

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

    -

    Modified by Ross Johnson for use with Pthreads-w32.

    +

    Modified by Ross Johnson for use with Pthreads4W.


    Table of Contents

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

      POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

      +

      POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

      Reference Index

      Table of Contents

      Name

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

      Application Usage

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

      -

      Pthreads-w32 defines _POSIX_BARRIERS to indicate +

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

      Rationale

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

      Copyright

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

      -

      Modified by Ross Johnson for use with Pthreads-w32.

      +

      Modified by Ross Johnson for use with Pthreads4W.


      Table of Contents

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

        POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

        +

        POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

        Reference Index

        Table of Contents

        Name

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

        Application Usage

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

        -

        Pthreads-w32 defines _POSIX_BARRIERS to indicate +

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

        Rationale

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

        Copyright

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

        -

        Modified by Ross Johnson for use with Pthreads-w32.

        +

        Modified by Ross Johnson for use with Pthreads4W.


        Table of Contents

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

          POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

          +

          POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

          Reference Index

          Table of Contents

          Name

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

          Description

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

          -

          Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

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

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

          Errors

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

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

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

          Application Usage

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

          -

          Pthreads-w32 defines _POSIX_BARRIERS and +

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

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

          Copyright

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

          -

          Modified by Ross Johnson for use with Pthreads-w32.

          +

          Modified by Ross Johnson for use with Pthreads4W.


          Table of Contents

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

            POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

            +

            POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

            Reference Index

            Table of Contents

            Name

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

            Description

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

            -

            Pthreads-w32 provides two levels of support for +

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

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

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

            Description


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

            -

            Pthreads-w32 provides two functions to enable additional +

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

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

            Errors

            Author

            Xavier Leroy <Xavier.Leroy@inria.fr>

            -

            Modified by Ross Johnson for use with Pthreads-w32.

            +

            Modified by Ross Johnson for use with Pthreads4W.

            See Also

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

            Bugs

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

            Bugs

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

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

            POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

            +

            POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

            Reference Index

            Table of Contents

            Name

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

            Author

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

            See Also

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

            POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

            +

            POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

            Reference Index

            Table of Contents

            Name

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

            Description

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

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

            Author

            Xavier Leroy <Xavier.Leroy@inria.fr>

            -

            Modified by Ross Johnson for use with Pthreads-w32.

            +

            Modified by Ross Johnson for use with Pthreads4W.

            See Also

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

            POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

            +

            POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

            Reference Index

            Table of Contents

            Name

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

            Description

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

            -

            Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

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

            Return Value

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

            Author

            Xavier Leroy <Xavier.Leroy@inria.fr>

            -

            Modified by Ross Johnson for use with Pthreads-w32.

            +

            Modified by Ross Johnson for use with Pthreads4W.

            See Also

            pthread_cond_init(3) .

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

            POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

            +

            POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

            Reference Index

            Table of Contents

            Name

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

            Description

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

            -

            Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

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

            Return Value

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

            Errors

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

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

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

            Examples

            None.

            Application Usage

            -

            Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

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

            Rationale

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

            Copyright

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

            -

            Modified by Ross Johnson for use with Pthreads-w32.

            +

            Modified by Ross Johnson for use with Pthreads4W.


            Table of Contents

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

              POSIX Threads for Windows – REFERENCE - -Pthreads-w32

              -

              Reference Index

              -

              Table of Contents

              -

              Name

              -

              pthread_create - create a new thread -

              -

              Synopsis

              -

              #include <pthread.h> -

              -

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

              -

              Description

              -

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

              -

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

              -

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

              -

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

              -

              Return Value

              -

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

              -

              Errors

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

              -Author

              -

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

              -

              Modified by Ross Johnson for use with Pthreads-w32.

              -

              See Also

              -

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

              -
              -

              Table of Contents

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

              POSIX Threads for Windows – REFERENCE - +Pthreads4W

              +

              Reference Index

              +

              Table of Contents

              +

              Name

              +

              pthread_create - create a new thread +

              +

              Synopsis

              +

              #include <pthread.h> +

              +

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

              +

              Description

              +

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

              +

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

              +

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

              +

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

              +

              Return Value

              +

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

              +

              Errors

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

              +Author

              +

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

              +

              Modified by Ross Johnson for use with Pthreads4W.

              +

              See Also

              +

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

              +
              +

              Table of Contents

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

              POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

              +

              POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

              Reference Index

              Table of Contents

              Name

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

              Errors

              The value specified by interval is invalid.

              Author

              -

              Ross Johnson for use with Pthreads-w32.

              +

              Ross Johnson for use with Pthreads4W.


              Table of Contents

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

                POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                +

                POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                Reference Index

                Table of Contents

                Name

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

                Author

                Xavier Leroy <Xavier.Leroy@inria.fr>

                -

                Modified by Ross Johnson for use with Pthreads-w32.

                +

                Modified by Ross Johnson for use with PThreads4W.

                See Also

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

                Table of Contents

                -

                Name

                -

                pthread_equal - compare two thread identifiers -

                -

                Synopsis

                -

                #include <pthread.h> -

                -

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

                -

                Description

                -

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

                -

                Return -Value

                -

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

                -

                Author

                -

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

                -

                See -Also

                -

                pthread_self(3) -. -

                -
                -

                Table of Contents

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

                Table of Contents

                +

                Name

                +

                pthread_equal - compare two thread identifiers +

                +

                Synopsis

                +

                #include <pthread.h> +

                +

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

                +

                Description

                +

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

                +

                Return +Value

                +

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

                +

                Author

                +

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

                +

                See +Also

                +

                pthread_self(3) +. +

                +
                +

                Table of Contents

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

                Table of Contents

                -

                Name

                -

                pthread_exit - terminate the calling thread -

                -

                Synopsis

                -

                #include <pthread.h> -

                -

                void pthread_exit(void *retval); -

                -

                Description

                -

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

                -

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

                -

                Return -Value

                -

                The pthread_exit function never returns. -

                -

                Author

                -

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

                -

                See -Also

                -

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

                -
                -

                Table of Contents

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

                Table of Contents

                +

                Name

                +

                pthread_exit - terminate the calling thread +

                +

                Synopsis

                +

                #include <pthread.h> +

                +

                void pthread_exit(void *retval); +

                +

                Description

                +

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

                +

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

                +

                Return +Value

                +

                The pthread_exit function never returns. +

                +

                Author

                +

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

                +

                See +Also

                +

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

                +
                +

                Table of Contents

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

                POSIX Threads for Windows ā€“ REFERENCE - -Pthreads-w32

                +Pthreads4W

                Reference Index

                Table of Contents

                Name

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

                Synopsis

                Description

                Returns the unique 64 bit sequence number assigned to thread.

                -

                In Pthreads-win32:

                +

                In PThreads4W:

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

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

                  Return Value

                  Errors

                  None.

                  Author

                  -

                  Ross Johnson for use with Pthreads-w32.

                  +

                  Ross Johnson for use with Pthreads4W.


                  Table of Contents

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

                    POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                    +

                    POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                    Reference Index

                    Table of Contents

                    Name

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

                    Return Value

                    Errors

                    None.

                    Author

                    -

                    Ross Johnson for use with Pthreads-w32.

                    +

                    Ross Johnson for use with Pthreads4W.


                    Table of Contents

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

                      POSIX Threads for Windows – REFERENCE - -Pthreads-w32

                      +Pthreads4W

                      Reference Index

                      Table of Contents

                      Name

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

                      Author

                      Xavier Leroy <Xavier.Leroy@inria.fr>

                      -

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

                      Modified by Ross Johnson for use with Pthreads4W.

                      See Also

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

                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                      +

                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                      Reference Index

                      Table of Contents

                      Name

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

                      Description

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

                      -

                      Pthreads-w32 stops running key +

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

                      Errors

                      Author

                      Xavier Leroy <Xavier.Leroy@inria.fr>

                      -

                      Modified by Ross Johnson for use with Pthreads-w32.

                      +

                      Modified by Ross Johnson for use with Pthreads4W.

                      See Also

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

                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                      +

                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                      Reference Index

                      Table of Contents

                      Name

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

                      Description

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

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

                      Description

                      shared between all threads.

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

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

                      Description

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

                      Cancellation

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

                      Errors

                      Author

                      Xavier Leroy <Xavier.Leroy@inria.fr>

                      -

                      Modified by Ross Johnson for use with Pthreads-w32.

                      +

                      Modified by Ross Johnson for use with Pthreads4W.

                      See Also

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

                      Notes

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

                      Bugs

                      -

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

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


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

                      POSIX Threads for Windows Ć¢ā‚¬ā€œ REFERENCE - -Pthreads-w32

                      +Pthreads4W

                      Reference Index

                      Table of Contents

                      Name

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

                      Description

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

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

                      Description

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

                      Author

                      Xavier Leroy <Xavier.Leroy@inria.fr>

                      -

                      Modified by Ross Johnson for use with Pthreads-w32.

                      +

                      Modified by Ross Johnson for use with Pthreads4W.

                      See Also

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

                      POSIX Threads for Windows Ć¢ā‚¬ā€œ REFERENCE - -Pthreads-w32

                      +Pthreads4W

                      Reference Index

                      Table of Contents

                      Name

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

                      Description

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

                      -

                      Pthreads-w32 also recognises the following equivalent +

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

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

                      Description

                      state.

                      The default mutex type is PTHREAD_MUTEX_NORMAL

                      -

                      Pthreads-w32 also recognises the following equivalent types +

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

                      PTHREAD_MUTEX_FAST_NP Ć¢ā‚¬ā€œ equivalent to PTHREAD_MUTEX_NORMAL

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

                      Return Value

                      Author

                      Xavier Leroy <Xavier.Leroy@inria.fr>

                      -

                      Modified by Ross Johnson for use with Pthreads-w32.

                      +

                      Modified by Ross Johnson for use with Pthreads4W.

                      See Also

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

                      See Also

                      .

                      Notes

                      -

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

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

                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                      +

                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                      Reference Index

                      Table of Contents

                      Name

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

                      Description

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

                      -

                      Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

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

                      Return Value

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

                      Copyright

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

                      -

                      Modified by Ross Johnson for use with Pthreads-w32.

                      +

                      Modified by Ross Johnson for use with Pthreads4W.


                      Table of Contents

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

                        POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                        +

                        POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                        Reference Index

                        Table of Contents

                        Name

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

                        Return ValueErrors

                        None.

                        Author

                        -

                        Ross Johnson for use with Pthreads-w32.

                        +

                        Ross Johnson for use with Pthreads4W.


                        Table of Contents

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

                          POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                          +

                          POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                          Reference Index

                          Table of Contents

                          Name

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

                          Errors

                          Author

                          Xavier Leroy <Xavier.Leroy@inria.fr>

                          -

                          Modified by Ross Johnson for use with Pthreads-w32.

                          +

                          Modified by Ross Johnson for use with Pthreads4W.


                          Table of Contents

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

                            POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                            +

                            POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                            Reference Index

                            Table of Contents

                            Name

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

                            Description

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

                            -

                            Pthreads-w32 supports statically initialized rwlock +

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

                            Description

                            pthread_rwlock_trywrlock , pthread_rwlock_unlock , or pthread_rwlock_wrlock is undefined.

                            -

                            Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

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

                            Return Value

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

                            Copyright

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

                            -

                            Modified by Ross Johnson for use with Pthreads-w32.

                            +

                            Modified by Ross Johnson for use with Pthreads4W.


                            Table of Contents

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

                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                              +

                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                              Reference Index

                              Table of Contents

                              Name

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

                              Description

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

                              -

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

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

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

                              Description

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

                              -

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

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

                              -

                              Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

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

                              Return Value

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

                              Copyright

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

                              -

                              Modified by Ross Johnson for use with Pthreads-w32.

                              +

                              Modified by Ross Johnson for use with Pthreads4W.


                              Table of Contents

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

                                POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                +

                                POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                Reference Index

                                Table of Contents

                                Name

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

                                Description

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

                                -

                                Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

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

                                Return Value

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

                                Copyright

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

                                -

                                Modified by Ross Johnson for use with Pthreads-w32.

                                +

                                Modified by Ross Johnson for use with Pthreads4W.


                                Table of Contents

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

                                  POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                  +

                                  POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                  Reference Index

                                  Table of Contents

                                  Name

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

                                  Description

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

                                  -

                                  Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

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

                                  Return Value

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

                                  Copyright

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

                                  -

                                  Modified by Ross Johnson for use with Pthreads-w32.

                                  +

                                  Modified by Ross Johnson for use with Pthreads4W.


                                  Table of Contents

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

                                    POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                    +

                                    POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                    Reference Index

                                    Table of Contents

                                    Name

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

                                    Description

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

                                    -

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

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

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

                                    -

                                    Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

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

                                    Return Value

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

                                    Copyright

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

                                    -

                                    Modified by Ross Johnson for use with Pthreads-w32.

                                    +

                                    Modified by Ross Johnson for use with Pthreads4W.


                                    Table of Contents

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

                                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                      +

                                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                      Reference Index

                                      Table of Contents

                                      Name

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

                                      Description

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

                                      -

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

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

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

                                      -

                                      Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

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

                                      Return Value

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

                                      Copyright

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

                                      -

                                      Modified by Ross Johnson for use with Pthreads-w32.

                                      +

                                      Modified by Ross Johnson for use with Pthreads4W.


                                      Table of Contents

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

                                        POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                        +

                                        POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                        Reference Index

                                        Table of Contents

                                        Name

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

                                        Description

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

                                        -

                                        Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

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

                                        Return Value

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

                                        Copyright

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

                                        -

                                        Modified by Ross Johnson for use with Pthreads-w32.

                                        +

                                        Modified by Ross Johnson for use with Pthreads4W.


                                        Table of Contents

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

                                          POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                          +

                                          POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                          Reference Index

                                          Table of Contents

                                          Name

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

                                          Description

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

                                          -

                                          Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

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

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

                                          -

                                          Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

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

                                          Return Value

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

                                          Copyright

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

                                          -

                                          Modified by Ross Johnson for use with Pthreads-w32.

                                          +

                                          Modified by Ross Johnson for use with Pthreads4W.


                                          Table of Contents

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

                                            POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                            +

                                            POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                            Reference Index

                                            Table of Contents

                                            Name

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

                                            Description

                                            pthread_self return the thread identifier for the calling thread.

                                            -

                                            Pthreads-w32 also provides support for Win32 native +

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

                                            Description

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

                                            Author

                                            Xavier Leroy <Xavier.Leroy@inria.fr>

                                            -

                                            Modified by Ross Johnson for use with Pthreads-w32.

                                            +

                                            Modified by Ross Johnson for use with Pthreads4W.

                                            See Also

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

                                            POSIX -Threads for Windows – REFERENCE - Pthreads-w32

                                            +Threads for Windows – REFERENCE - Pthreads4W

                                            Reference Index

                                            Table of Contents

                                            Name

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

                                            Description

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

                                            Pthreads-w32 currently ignores the cpusetsize +

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

                                            Return Value

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

                                            See Also

                                            sched_getaffinity(3)

                                            Copyright

                                            Most of this is taken from the Linux manual page.

                                            -

                                            Modified by Ross Johnson for use with Pthreads-w32.

                                            +

                                            Modified by Ross Johnson for use with PThreads4W.


                                            Table of Contents

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

                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                              +

                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                              Reference Index

                                              Table of Contents

                                              Name

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

                                              Description

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

                                              -

                                              Pthreads-w32 provides two levels of support for +

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

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

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

                                              Description


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

                                              -

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

                                              +

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

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

                                              Errors

                                              Author

                                              Xavier Leroy <Xavier.Leroy@inria.fr>

                                              -

                                              Modified by Ross Johnson for use with Pthreads-w32.

                                              +

                                              Modified by Ross Johnson for use with Pthreads4W.

                                              See Also

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

                                              Bugs

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

                                              Bugs

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

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

                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                              +

                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                              Reference Index

                                              Table of Contents

                                              Name

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

                                              Description

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

                                              -

                                              Pthreads-w32 provides two levels of support for +

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

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

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

                                              Description


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

                                              -

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

                                              +

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

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

                                              Errors

                                              Author

                                              Xavier Leroy <Xavier.Leroy@inria.fr>

                                              -

                                              Modified by Ross Johnson for use with Pthreads-w32.

                                              +

                                              Modified by Ross Johnson for use with Pthreads4W.

                                              See Also

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

                                              Bugs

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

                                              Bugs

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

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

                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                              +

                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                              Reference Index

                                              Table of Contents

                                              Name

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

                                              Description

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

                                              -

                                              Pthreads-w32 provides these routines for source code +

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

                                              Return Value

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

                                              Copyright

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

                                              -

                                              Modified by Ross Johnson for use with Pthreads-w32.

                                              +

                                              Modified by Ross Johnson for use with Pthreads4W.


                                              Table of Contents

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

                                                POSIX -Threads for Windows – REFERENCE - Pthreads-w32

                                                +Threads for Windows – REFERENCE - PThreads4W

                                                Reference Index

                                                Table of Contents

                                                Name

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

                                                POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                +

                                                POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                                Reference Index

                                                Table of Contents

                                                Name

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

                                                Description

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

                                                -

                                                Pthreads-w32 only supports SCHED_OTHER and does not support +

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

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

                                                Author

                                                Xavier Leroy <Xavier.Leroy@inria.fr>

                                                -

                                                Modified by Ross Johnson for use with Pthreads-w32.

                                                +

                                                Modified by Ross Johnson for use with Pthreads4W.

                                                See Also

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

                                                POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                +

                                                POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                                Reference Index

                                                Table of Contents

                                                Name

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

                                                Description

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

                                                -

                                                Pthreads-w32 supports single and multiple processor systems +

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

                                                Description

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

                                                -

                                                Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

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

                                                Description

                                                or pthread_spin_unlock(3) is undefined.

                                                -

                                                Pthreads-w32 supports statically initialized spin locks +

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

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

                                                Copyright

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

                                                -

                                                Modified by Ross Johnson for use with Pthreads-w32.

                                                +

                                                Modified by Ross Johnson for use with Pthreads4W.


                                                Table of Contents

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

                                                  POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                  +

                                                  POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                                  Reference Index

                                                  Table of Contents

                                                  Name

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

                                                  Description

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

                                                  -

                                                  Pthreads-w32 supports single and multiple processor systems +

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

                                                  Copyright

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

                                                  -

                                                  Modified by Ross Johnson for use with Pthreads-w32.

                                                  +

                                                  Modified by Ross Johnson for use with Pthreads4W.


                                                  Table of Contents

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

                                                    POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                    +

                                                    POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                                    Reference Index

                                                    Table of Contents

                                                    Name

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

                                                    Description

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

                                                    -

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

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

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

                                                    Examples

                                                    None.

                                                    Application Usage

                                                    -

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

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

                                                    Rationale

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

                                                    Copyright

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

                                                    -

                                                    Modified by Ross Johnson for use with Pthreads-w32.

                                                    +

                                                    Modified by Ross Johnson for use with Pthreads4W.


                                                    Table of Contents

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

                                                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                      +

                                                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                                      Reference Index

                                                      Table of Contents

                                                      Name

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

                                                      Errors

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

                                                      Author

                                                      -

                                                      Ross Johnson for use with Pthreads-w32.

                                                      +

                                                      Ross Johnson for use with Pthreads4W.


                                                      Table of Contents

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

                                                        POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                        +

                                                        POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                                        Reference Index

                                                        Table of Contents

                                                        Name

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

                                                        Synopsis

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

                                                        Description

                                                        thread exits.

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

                                                        +PThreads4W initialisation fails.

                                                        Cancellation

                                                        None.

                                                        Return Value

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

                                                        Return ValueErrors

                                                        None.

                                                        Author

                                                        -

                                                        Ross Johnson for use with Pthreads-w32.

                                                        +

                                                        Ross Johnson for use with Pthreads4W.


                                                        Table of Contents

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

                                                          POSIX Threads for Windows – REFERENCE - -Pthreads-w32

                                                          +Pthreads4W

                                                          Reference Index

                                                          Table of Contents

                                                          Name

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

                                                          Return

                                                          Errors

                                                          None.

                                                          Author

                                                          -

                                                          Ross Johnson for use with Pthreads-w32.

                                                          +

                                                          Ross Johnson for use with Pthreads4W.


                                                          Table of Contents

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

                                                            POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                            +

                                                            POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                                            Reference Index

                                                            Table of Contents

                                                            Name

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

                                                            Return ValueErrors

                                                            None.

                                                            Author

                                                            -

                                                            Ross Johnson for use with Pthreads-w32.

                                                            +

                                                            Ross Johnson for use with Pthreads4W.


                                                            Table of Contents

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

                                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                              +

                                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                                              Reference Index

                                                              Table of Contents

                                                              Name

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

                                                              Copyright

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

                                                              -

                                                              Modified by Ross Johnson for use with Pthreads-w32.

                                                              +

                                                              Modified by Ross Johnson for use with Pthreads4W.


                                                              Table of Contents

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

                                                                POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                                +

                                                                POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                                                Reference Index

                                                                Table of Contents

                                                                Name

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

                                                                Description

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

                                                                -

                                                                Pthreads-w32 only supports the SCHED_OTHER policy, +

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

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

                                                                Copyright

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

                                                                -

                                                                Modified by Ross Johnson for use with Pthreads-w32.

                                                                +

                                                                Modified by Ross Johnson for use with Pthreads4W.


                                                                Table of Contents

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

                                                                  POSIX -Threads for Windows – REFERENCE - Pthreads-w32

                                                                  +Threads for Windows – REFERENCE - Pthreads4W

                                                          Reference Index

                                                          Table of Contents

                                                          Name

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

                                                          Description

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

                                                          -

                                                          Pthreads-w32 currently ignores the cpusetsize +

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

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

                                                          See Also

                                                          pthread_getaffinity_np(3)

                                                          Copyright

                                                          Most of this is taken from the Linux manual page.

                                                          -

                                                          Modified by Ross Johnson for use with Pthreads-w32.

                                                          +

                                                          Modified by Ross Johnson for use with PThreads4W.


                                                          Table of Contents

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

                                                            POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                            +

                                                            POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                                            Reference Index

                                                            Table of Contents

                                                            Name

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

                                                            Description

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

                                                            -

                                                            Pthreads-w32 only supports the SCHED_OTHER policy. +

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

                                                            Copyright

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

                                                            -

                                                            Modified by Ross Johnson for use with Pthreads-w32.

                                                            +

                                                            Modified by Ross Johnson for use with Pthreads4W.


                                                            Table of Contents

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

                                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                              +

                                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                                              Reference Index

                                                              Table of Contents

                                                              Name

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

                                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                              +

                                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

                                                              Reference Index

                                                              Table of Contents

                                                              Name

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

                                                              Description

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

                                                              -

                                                              Pthreads-w32 currently does not support process-shared +

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

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

                                                              Description

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

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

                                                              Author

                                                              Xavier Leroy <Xavier.Leroy@inria.fr>

                                                              -

                                                              Modified by Ross Johnson for use with Pthreads-w32.

                                                              +

                                                              Modified by Ross Johnson for use with Pthreads4W.

                                                              See Also

                                                              pthread_mutex_init(3) , pthread_cond_init(3) , diff --git a/pthread.c b/pthread.c index 775988f6..515adedd 100644 --- a/pthread.c +++ b/pthread.c @@ -8,33 +8,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread.h b/pthread.h index 6cee1930..75e8b501 100644 --- a/pthread.h +++ b/pthread.h @@ -2,33 +2,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #if !defined( PTHREAD_H ) @@ -167,7 +164,7 @@ * The source code and other information about this library * are available from * - * http://sources.redhat.com/pthreads-win32/ + * https://sourceforge.net/projects/pthreads4w/ * * ------------------------------------------------------------- */ diff --git a/pthread_attr_destroy.c b/pthread_attr_destroy.c index 44373c8f..65b190b7 100644 --- a/pthread_attr_destroy.c +++ b/pthread_attr_destroy.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getaffinity_np.c b/pthread_attr_getaffinity_np.c index ae121d76..2227bca3 100644 --- a/pthread_attr_getaffinity_np.c +++ b/pthread_attr_getaffinity_np.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getdetachstate.c b/pthread_attr_getdetachstate.c index 2584848b..6c90f3b7 100644 --- a/pthread_attr_getdetachstate.c +++ b/pthread_attr_getdetachstate.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getinheritsched.c b/pthread_attr_getinheritsched.c index 443c80fd..a97326b9 100644 --- a/pthread_attr_getinheritsched.c +++ b/pthread_attr_getinheritsched.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getname_np.c b/pthread_attr_getname_np.c index b21c3326..b083de66 100644 --- a/pthread_attr_getname_np.c +++ b/pthread_attr_getname_np.c @@ -1,54 +1,51 @@ -/* - * pthread_attr_getname_np.c - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "pthread.h" -#include "implement.h" - -int -pthread_attr_getname_np(pthread_attr_t * attr, char *name, int len) -{ - //strncpy_s(name, len - 1, (*attr)->thrname, len - 1); -#if defined(_MSVCRT_) -# pragma warning(suppress:4996) - strncpy(name, (*attr)->thrname, len - 1); - (*attr)->thrname[len - 1] = '\0'; -#endif - - return 0; -} +/* + * pthread_attr_getname_np.c + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "pthread.h" +#include "implement.h" + +int +pthread_attr_getname_np(pthread_attr_t * attr, char *name, int len) +{ + //strncpy_s(name, len - 1, (*attr)->thrname, len - 1); +#if defined(_MSVCRT_) +# pragma warning(suppress:4996) + strncpy(name, (*attr)->thrname, len - 1); + (*attr)->thrname[len - 1] = '\0'; +#endif + + return 0; +} diff --git a/pthread_attr_getschedparam.c b/pthread_attr_getschedparam.c index 7251acf8..79228957 100644 --- a/pthread_attr_getschedparam.c +++ b/pthread_attr_getschedparam.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getschedpolicy.c b/pthread_attr_getschedpolicy.c index c08e74ee..996e63d6 100644 --- a/pthread_attr_getschedpolicy.c +++ b/pthread_attr_getschedpolicy.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getscope.c b/pthread_attr_getscope.c index c5c5f064..cdccd785 100644 --- a/pthread_attr_getscope.c +++ b/pthread_attr_getscope.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getstackaddr.c b/pthread_attr_getstackaddr.c index 90fd0700..0d5c1322 100644 --- a/pthread_attr_getstackaddr.c +++ b/pthread_attr_getstackaddr.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getstacksize.c b/pthread_attr_getstacksize.c index 1735b419..738146fc 100644 --- a/pthread_attr_getstacksize.c +++ b/pthread_attr_getstacksize.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_init.c b/pthread_attr_init.c index 9e8c4d4a..e1040df7 100644 --- a/pthread_attr_init.c +++ b/pthread_attr_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setaffinity_np.c b/pthread_attr_setaffinity_np.c index a1091907..62ea7b97 100644 --- a/pthread_attr_setaffinity_np.c +++ b/pthread_attr_setaffinity_np.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setdetachstate.c b/pthread_attr_setdetachstate.c index 2f7c5e22..07c18f51 100644 --- a/pthread_attr_setdetachstate.c +++ b/pthread_attr_setdetachstate.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setinheritsched.c b/pthread_attr_setinheritsched.c index db67f6d6..d02033bc 100644 --- a/pthread_attr_setinheritsched.c +++ b/pthread_attr_setinheritsched.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setname_np.c b/pthread_attr_setname_np.c index f34b8075..a8d2ce2b 100644 --- a/pthread_attr_setname_np.c +++ b/pthread_attr_setname_np.c @@ -1,99 +1,96 @@ -/* - * pthread_attr_setname_np.c - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include "pthread.h" -#include "implement.h" - -#if defined (__PTW32_COMPATIBILITY_BSD) || defined (__PTW32_COMPATIBILITY_TRU64) -int -pthread_attr_setname_np(pthread_attr_t * attr, const char *name, void *arg) -{ - int len; - int result; - char tmpbuf[PTHREAD_MAX_NAMELEN_NP]; - char * newname; - char * oldname; - - /* - * According to the MSDN description for snprintf() - * where count is the second parameter: - * If len < count, then len characters are stored in buffer, a null-terminator is appended, and len is returned. - * If len = count, then len characters are stored in buffer, no null-terminator is appended, and len is returned. - * If len > count, then count characters are stored in buffer, no null-terminator is appended, and a negative value is returned. - * - * This is different to the POSIX behaviour which returns the number of characters that would have been written in all cases. - */ - len = snprintf(tmpbuf, PTHREAD_MAX_NAMELEN_NP-1, name, arg); - tmpbuf[PTHREAD_MAX_NAMELEN_NP-1] = '\0'; - if (len < 0) - { - return EINVAL; - } - - newname = _strdup(tmpbuf); - - oldname = (*attr)->thrname; - (*attr)->thrname = newname; - if (oldname) - { - free(oldname); - } - - return 0; -} -#else -int -pthread_attr_setname_np(pthread_attr_t * attr, const char *name) -{ - char * newname; - char * oldname; - - newname = _strdup(name); - - oldname = (*attr)->thrname; - (*attr)->thrname = newname; - if (oldname) - { - free(oldname); - } - - return 0; -} -#endif +/* + * pthread_attr_setname_np.c + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include "pthread.h" +#include "implement.h" + +#if defined (__PTW32_COMPATIBILITY_BSD) || defined (__PTW32_COMPATIBILITY_TRU64) +int +pthread_attr_setname_np(pthread_attr_t * attr, const char *name, void *arg) +{ + int len; + int result; + char tmpbuf[PTHREAD_MAX_NAMELEN_NP]; + char * newname; + char * oldname; + + /* + * According to the MSDN description for snprintf() + * where count is the second parameter: + * If len < count, then len characters are stored in buffer, a null-terminator is appended, and len is returned. + * If len = count, then len characters are stored in buffer, no null-terminator is appended, and len is returned. + * If len > count, then count characters are stored in buffer, no null-terminator is appended, and a negative value is returned. + * + * This is different to the POSIX behaviour which returns the number of characters that would have been written in all cases. + */ + len = snprintf(tmpbuf, PTHREAD_MAX_NAMELEN_NP-1, name, arg); + tmpbuf[PTHREAD_MAX_NAMELEN_NP-1] = '\0'; + if (len < 0) + { + return EINVAL; + } + + newname = _strdup(tmpbuf); + + oldname = (*attr)->thrname; + (*attr)->thrname = newname; + if (oldname) + { + free(oldname); + } + + return 0; +} +#else +int +pthread_attr_setname_np(pthread_attr_t * attr, const char *name) +{ + char * newname; + char * oldname; + + newname = _strdup(name); + + oldname = (*attr)->thrname; + (*attr)->thrname = newname; + if (oldname) + { + free(oldname); + } + + return 0; +} +#endif diff --git a/pthread_attr_setschedparam.c b/pthread_attr_setschedparam.c index 1472f2df..c1362c6a 100644 --- a/pthread_attr_setschedparam.c +++ b/pthread_attr_setschedparam.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setschedpolicy.c b/pthread_attr_setschedpolicy.c index 331be677..f3857f2e 100644 --- a/pthread_attr_setschedpolicy.c +++ b/pthread_attr_setschedpolicy.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setscope.c b/pthread_attr_setscope.c index 96bc4941..68f8178f 100644 --- a/pthread_attr_setscope.c +++ b/pthread_attr_setscope.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setstackaddr.c b/pthread_attr_setstackaddr.c index 2a1b90e5..f44b758f 100644 --- a/pthread_attr_setstackaddr.c +++ b/pthread_attr_setstackaddr.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setstacksize.c b/pthread_attr_setstacksize.c index 8143db50..33179944 100644 --- a/pthread_attr_setstacksize.c +++ b/pthread_attr_setstacksize.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrier_destroy.c b/pthread_barrier_destroy.c index 8f59c49f..69a0d372 100644 --- a/pthread_barrier_destroy.c +++ b/pthread_barrier_destroy.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrier_init.c b/pthread_barrier_init.c index bc76fcd7..8434b23f 100644 --- a/pthread_barrier_init.c +++ b/pthread_barrier_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrier_wait.c b/pthread_barrier_wait.c index acbdc260..5038aa04 100644 --- a/pthread_barrier_wait.c +++ b/pthread_barrier_wait.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrierattr_destroy.c b/pthread_barrierattr_destroy.c index d8953a9b..57285791 100644 --- a/pthread_barrierattr_destroy.c +++ b/pthread_barrierattr_destroy.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrierattr_getpshared.c b/pthread_barrierattr_getpshared.c index 7d9736c0..9600d85b 100644 --- a/pthread_barrierattr_getpshared.c +++ b/pthread_barrierattr_getpshared.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrierattr_init.c b/pthread_barrierattr_init.c index aef72b4f..1ae348c1 100644 --- a/pthread_barrierattr_init.c +++ b/pthread_barrierattr_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrierattr_setpshared.c b/pthread_barrierattr_setpshared.c index 7f5dc549..30909b3b 100644 --- a/pthread_barrierattr_setpshared.c +++ b/pthread_barrierattr_setpshared.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_cancel.c b/pthread_cancel.c index fb4b1b7f..e3047857 100644 --- a/pthread_cancel.c +++ b/pthread_cancel.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_cond_destroy.c b/pthread_cond_destroy.c index 803ee61f..acfeb523 100644 --- a/pthread_cond_destroy.c +++ b/pthread_cond_destroy.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_cond_init.c b/pthread_cond_init.c index 3522be1c..f8e92702 100644 --- a/pthread_cond_init.c +++ b/pthread_cond_init.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_cond_signal.c b/pthread_cond_signal.c index 31119fd1..b5186d00 100644 --- a/pthread_cond_signal.c +++ b/pthread_cond_signal.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * ------------------------------------------------------------- * Algorithm: diff --git a/pthread_cond_wait.c b/pthread_cond_wait.c index c6a13137..58909acc 100644 --- a/pthread_cond_wait.c +++ b/pthread_cond_wait.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * ------------------------------------------------------------- * Algorithm: diff --git a/pthread_condattr_destroy.c b/pthread_condattr_destroy.c index 696065ef..e2d4075e 100644 --- a/pthread_condattr_destroy.c +++ b/pthread_condattr_destroy.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_condattr_getpshared.c b/pthread_condattr_getpshared.c index dc161a9d..643d482f 100644 --- a/pthread_condattr_getpshared.c +++ b/pthread_condattr_getpshared.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_condattr_init.c b/pthread_condattr_init.c index aa32cc6d..7e21d892 100644 --- a/pthread_condattr_init.c +++ b/pthread_condattr_init.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_condattr_setpshared.c b/pthread_condattr_setpshared.c index 977b5a5c..ebff18b1 100644 --- a/pthread_condattr_setpshared.c +++ b/pthread_condattr_setpshared.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_delay_np.c b/pthread_delay_np.c index fad51ca2..a43d8a5b 100644 --- a/pthread_delay_np.c +++ b/pthread_delay_np.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_detach.c b/pthread_detach.c index 63289b1f..6933d469 100644 --- a/pthread_detach.c +++ b/pthread_detach.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_equal.c b/pthread_equal.c index 48da7e20..712d43b5 100644 --- a/pthread_equal.c +++ b/pthread_equal.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_exit.c b/pthread_exit.c index a8a68ada..f98230a7 100644 --- a/pthread_exit.c +++ b/pthread_exit.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getconcurrency.c b/pthread_getconcurrency.c index 1e957968..c848115e 100644 --- a/pthread_getconcurrency.c +++ b/pthread_getconcurrency.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getname_np.c b/pthread_getname_np.c index 97e8f88e..84e729c1 100644 --- a/pthread_getname_np.c +++ b/pthread_getname_np.c @@ -3,33 +3,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getschedparam.c b/pthread_getschedparam.c index 0afefd5f..dd3cc3df 100644 --- a/pthread_getschedparam.c +++ b/pthread_getschedparam.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getspecific.c b/pthread_getspecific.c index 77caa6b1..4173e2fc 100644 --- a/pthread_getspecific.c +++ b/pthread_getspecific.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getunique_np.c b/pthread_getunique_np.c index 6a7eb409..1ae84061 100755 --- a/pthread_getunique_np.c +++ b/pthread_getunique_np.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getw32threadhandle_np.c b/pthread_getw32threadhandle_np.c index 2de0d13c..8678ac46 100644 --- a/pthread_getw32threadhandle_np.c +++ b/pthread_getw32threadhandle_np.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_join.c b/pthread_join.c index f7a0760d..b317bef0 100644 --- a/pthread_join.c +++ b/pthread_join.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_key_create.c b/pthread_key_create.c index 9d167568..2468c098 100644 --- a/pthread_key_create.c +++ b/pthread_key_create.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_key_delete.c b/pthread_key_delete.c index b32eea26..b983e282 100644 --- a/pthread_key_delete.c +++ b/pthread_key_delete.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_kill.c b/pthread_kill.c index 860d0558..b838352e 100644 --- a/pthread_kill.c +++ b/pthread_kill.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_consistent.c b/pthread_mutex_consistent.c index 52660949..dd64d7d9 100755 --- a/pthread_mutex_consistent.c +++ b/pthread_mutex_consistent.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_destroy.c b/pthread_mutex_destroy.c index 99e2a761..c1b8b757 100644 --- a/pthread_mutex_destroy.c +++ b/pthread_mutex_destroy.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_init.c b/pthread_mutex_init.c index 69346f04..514df06c 100644 --- a/pthread_mutex_init.c +++ b/pthread_mutex_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_lock.c b/pthread_mutex_lock.c index 17a9ce0e..1e4c1774 100644 --- a/pthread_mutex_lock.c +++ b/pthread_mutex_lock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H @@ -48,14 +45,14 @@ int pthread_mutex_lock (pthread_mutex_t * mutex) { - int kind; - pthread_mutex_t mx; - int result = 0; - /* * Let the system deal with invalid pointers. */ - if (*mutex == NULL) + pthread_mutex_t mx = *mutex; + int kind; + int result = 0; + + if (mx == NULL) { return EINVAL; } @@ -66,15 +63,15 @@ pthread_mutex_lock (pthread_mutex_t * mutex) * again inside the guarded section of __ptw32_mutex_check_need_init() * to avoid race conditions. */ - if (*mutex >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) + if (mx >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) { if ((result = __ptw32_mutex_check_need_init (mutex)) != 0) { return (result); } + mx = *mutex; } - mx = *mutex; kind = mx->kind; if (kind >= 0) diff --git a/pthread_mutex_timedlock.c b/pthread_mutex_timedlock.c index 72cb16ba..60a813c0 100644 --- a/pthread_mutex_timedlock.c +++ b/pthread_mutex_timedlock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H @@ -113,13 +110,17 @@ int pthread_mutex_timedlock (pthread_mutex_t * mutex, const struct timespec *abstime) { - pthread_mutex_t mx; - int kind; - int result = 0; - /* * Let the system deal with invalid pointers. */ + pthread_mutex_t mx = *mutex; + int kind; + int result = 0; + + if (mx == NULL) + { + return EINVAL; + } /* * We do a quick check to see if we need to do more work @@ -127,15 +128,15 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, * again inside the guarded section of __ptw32_mutex_check_need_init() * to avoid race conditions. */ - if (*mutex >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) + if (mx >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) { if ((result = __ptw32_mutex_check_need_init (mutex)) != 0) { return (result); } + mx = *mutex; } - mx = *mutex; kind = mx->kind; if (kind >= 0) diff --git a/pthread_mutex_trylock.c b/pthread_mutex_trylock.c index 499185f9..8c98abd7 100644 --- a/pthread_mutex_trylock.c +++ b/pthread_mutex_trylock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H @@ -46,13 +43,17 @@ int pthread_mutex_trylock (pthread_mutex_t * mutex) { - pthread_mutex_t mx; - int kind; - int result = 0; - /* * Let the system deal with invalid pointers. */ + pthread_mutex_t mx = *mutex; + int kind; + int result = 0; + + if (mx == NULL) + { + return EINVAL; + } /* * We do a quick check to see if we need to do more work @@ -60,15 +61,15 @@ pthread_mutex_trylock (pthread_mutex_t * mutex) * again inside the guarded section of __ptw32_mutex_check_need_init() * to avoid race conditions. */ - if (*mutex >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) + if (mx >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) { if ((result = __ptw32_mutex_check_need_init (mutex)) != 0) { return (result); } + mx = *mutex; } - mx = *mutex; kind = mx->kind; if (kind >= 0) diff --git a/pthread_mutex_unlock.c b/pthread_mutex_unlock.c index 5c56447e..88bf241f 100644 --- a/pthread_mutex_unlock.c +++ b/pthread_mutex_unlock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H @@ -46,22 +43,19 @@ int pthread_mutex_unlock (pthread_mutex_t * mutex) { - int result = 0; - int kind; - pthread_mutex_t mx; - /* * Let the system deal with invalid pointers. */ - - mx = *mutex; + pthread_mutex_t mx = *mutex; + int kind; + int result = 0; /* * If the thread calling us holds the mutex then there is no * race condition. If another thread holds the * lock then we shouldn't be in here. */ - if (mx < PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) + if (mx < PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) // Remember, pointers are unsigned. { kind = mx->kind; @@ -173,6 +167,11 @@ pthread_mutex_unlock (pthread_mutex_t * mutex) } else if (mx != PTHREAD_MUTEX_INITIALIZER) { + /* + * If mx is PTHREAD_ERRORCHECK_MUTEX_INITIALIZER or PTHREAD_RECURSIVE_MUTEX_INITIALIZER + * we need to know we are doing something unexpected. For PTHREAD_MUTEX_INITIALIZER + * (normal) mutexes we can just silently ignore it. + */ result = EINVAL; } diff --git a/pthread_mutexattr_destroy.c b/pthread_mutexattr_destroy.c index ae8428cc..f384dc89 100644 --- a/pthread_mutexattr_destroy.c +++ b/pthread_mutexattr_destroy.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_getkind_np.c b/pthread_mutexattr_getkind_np.c index 13903b87..c91e0c2f 100644 --- a/pthread_mutexattr_getkind_np.c +++ b/pthread_mutexattr_getkind_np.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_getpshared.c b/pthread_mutexattr_getpshared.c index b285d2d2..599482ec 100644 --- a/pthread_mutexattr_getpshared.c +++ b/pthread_mutexattr_getpshared.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_getrobust.c b/pthread_mutexattr_getrobust.c index 28c28657..0a0f1864 100755 --- a/pthread_mutexattr_getrobust.c +++ b/pthread_mutexattr_getrobust.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_gettype.c b/pthread_mutexattr_gettype.c index a6e4cdb8..ed7c6512 100644 --- a/pthread_mutexattr_gettype.c +++ b/pthread_mutexattr_gettype.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_init.c b/pthread_mutexattr_init.c index 037b88b3..2a98555e 100644 --- a/pthread_mutexattr_init.c +++ b/pthread_mutexattr_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_setkind_np.c b/pthread_mutexattr_setkind_np.c index 3d55d821..29494454 100644 --- a/pthread_mutexattr_setkind_np.c +++ b/pthread_mutexattr_setkind_np.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_setpshared.c b/pthread_mutexattr_setpshared.c index 997f469a..50e556d4 100644 --- a/pthread_mutexattr_setpshared.c +++ b/pthread_mutexattr_setpshared.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_setrobust.c b/pthread_mutexattr_setrobust.c index 4f18b489..c2f00d9d 100755 --- a/pthread_mutexattr_setrobust.c +++ b/pthread_mutexattr_setrobust.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_settype.c b/pthread_mutexattr_settype.c index bb650eb4..d4def28a 100644 --- a/pthread_mutexattr_settype.c +++ b/pthread_mutexattr_settype.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_num_processors_np.c b/pthread_num_processors_np.c index b0da609e..f8201e0e 100644 --- a/pthread_num_processors_np.c +++ b/pthread_num_processors_np.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_once.c b/pthread_once.c index e48a4dcf..e9568f55 100644 --- a/pthread_once.c +++ b/pthread_once.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_destroy.c b/pthread_rwlock_destroy.c index 40fe5aad..672e6788 100644 --- a/pthread_rwlock_destroy.c +++ b/pthread_rwlock_destroy.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_init.c b/pthread_rwlock_init.c index cfcc1c00..bcf366cf 100644 --- a/pthread_rwlock_init.c +++ b/pthread_rwlock_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_rdlock.c b/pthread_rwlock_rdlock.c index dcebd672..22be6a23 100644 --- a/pthread_rwlock_rdlock.c +++ b/pthread_rwlock_rdlock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_timedrdlock.c b/pthread_rwlock_timedrdlock.c index 8ef92231..90e43576 100644 --- a/pthread_rwlock_timedrdlock.c +++ b/pthread_rwlock_timedrdlock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_timedwrlock.c b/pthread_rwlock_timedwrlock.c index cb7e4189..2d227921 100644 --- a/pthread_rwlock_timedwrlock.c +++ b/pthread_rwlock_timedwrlock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_tryrdlock.c b/pthread_rwlock_tryrdlock.c index 6ff255c5..c1c6a498 100644 --- a/pthread_rwlock_tryrdlock.c +++ b/pthread_rwlock_tryrdlock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_trywrlock.c b/pthread_rwlock_trywrlock.c index 676dedd8..5aedae07 100644 --- a/pthread_rwlock_trywrlock.c +++ b/pthread_rwlock_trywrlock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_unlock.c b/pthread_rwlock_unlock.c index 2a02b7a7..22c6cfbb 100644 --- a/pthread_rwlock_unlock.c +++ b/pthread_rwlock_unlock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_wrlock.c b/pthread_rwlock_wrlock.c index eafb01b5..d832867c 100644 --- a/pthread_rwlock_wrlock.c +++ b/pthread_rwlock_wrlock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlockattr_destroy.c b/pthread_rwlockattr_destroy.c index e9e3407b..e55acd61 100644 --- a/pthread_rwlockattr_destroy.c +++ b/pthread_rwlockattr_destroy.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlockattr_getpshared.c b/pthread_rwlockattr_getpshared.c index 4de7d30e..b297ec34 100644 --- a/pthread_rwlockattr_getpshared.c +++ b/pthread_rwlockattr_getpshared.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlockattr_init.c b/pthread_rwlockattr_init.c index 994b7ec0..452bbf98 100644 --- a/pthread_rwlockattr_init.c +++ b/pthread_rwlockattr_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlockattr_setpshared.c b/pthread_rwlockattr_setpshared.c index 0263c11f..d3bd618b 100644 --- a/pthread_rwlockattr_setpshared.c +++ b/pthread_rwlockattr_setpshared.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_self.c b/pthread_self.c index 6b960f16..bdfca470 100644 --- a/pthread_self.c +++ b/pthread_self.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setaffinity.c b/pthread_setaffinity.c index 79e70b5c..22e157dd 100644 --- a/pthread_setaffinity.c +++ b/pthread_setaffinity.c @@ -1,243 +1,240 @@ -/* - * pthread_setaffinity.c - * - * Description: - * This translation unit implements thread cpu affinity setting. - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "pthread.h" -#include "implement.h" - -int -pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, - const cpu_set_t *cpuset) - /* - * ------------------------------------------------------ - * DOCPUBLIC - * The pthread_setaffinity_np() function sets the CPU affinity mask - * of the thread thread to the CPU set pointed to by cpuset. If the - * call is successful, and the thread is not currently running on one - * of the CPUs in cpuset, then it is migrated to one of those CPUs. - * - * PARAMETERS - * thread - * The target thread - * - * cpusetsize - * Ignored in pthreads4w. - * Usually set to sizeof(cpu_set_t) - * - * cpuset - * The new cpu set mask. - * - * The set of CPUs on which the thread will actually run - * is the intersection of the set specified in the cpuset - * argument and the set of CPUs actually present for - * the process. - * - * DESCRIPTION - * The pthread_setaffinity_np() function sets the CPU affinity mask - * of the thread thread to the CPU set pointed to by cpuset. If the - * call is successful, and the thread is not currently running on one - * of the CPUs in cpuset, then it is migrated to one of those CPUs. - * - * RESULTS - * 0 Success - * ESRCH Thread does not exist - * EFAULT pcuset is NULL - * EAGAIN The thread affinity could not be set - * ENOSYS The platform does not support this function - * - * ------------------------------------------------------ - */ -{ -#if ! defined(HAVE_CPU_AFFINITY) - - return ENOSYS; - -#else - - int result = 0; - __ptw32_thread_t * tp; - __ptw32_mcs_local_node_t node; - cpu_set_t processCpuset; - - __ptw32_mcs_lock_acquire (&__ptw32_thread_reuse_lock, &node); - - tp = (__ptw32_thread_t *) thread.p; - - if (NULL == tp || thread.x != tp->ptHandle.x || NULL == tp->threadH) - { - result = ESRCH; - } - else - { - if (cpuset) - { - if (sched_getaffinity(0, sizeof(cpu_set_t), &processCpuset)) - { - result = __PTW32_GET_ERRNO(); - } - else - { - /* - * Result is the intersection of available CPUs and the mask. - */ - cpu_set_t newMask; - - CPU_AND(&newMask, &processCpuset, cpuset); - - if (((_sched_cpu_set_vector_*)&newMask)->_cpuset) - { - if (SetThreadAffinityMask (tp->threadH, ((_sched_cpu_set_vector_*)&newMask)->_cpuset)) - { - /* - * We record the intersection of the process affinity - * and the thread affinity cpusets so that - * pthread_getaffinity_np() returns the actual thread - * CPU set. - */ - tp->cpuset = ((_sched_cpu_set_vector_*)&newMask)->_cpuset; - } - else - { - result = EAGAIN; - } - } - else - { - result = EINVAL; - } - } - } - else - { - result = EFAULT; - } - } - - __ptw32_mcs_lock_release (&node); - - return result; - -#endif -} - -int -pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t *cpuset) - /* - * ------------------------------------------------------ - * DOCPUBLIC - * The pthread_getaffinity_np() function returns the CPU affinity mask - * of the thread thread in the CPU set pointed to by cpuset. - * - * PARAMETERS - * thread - * The target thread - * - * cpusetsize - * Ignored in pthreads4w. - * Usually set to sizeof(cpu_set_t) - * - * cpuset - * The location where the current cpu set - * will be returned. - * - * - * DESCRIPTION - * The pthread_getaffinity_np() function returns the CPU affinity mask - * of the thread thread in the CPU set pointed to by cpuset. - * - * RESULTS - * 0 Success - * ESRCH thread does not exist - * EFAULT cpuset is NULL - * ENOSYS The platform does not support this function - * - * ------------------------------------------------------ - */ -{ -#if ! defined(HAVE_CPU_AFFINITY) - - return ENOSYS; - -#else - - int result = 0; - __ptw32_thread_t * tp; - __ptw32_mcs_local_node_t node; - - __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); - - tp = (__ptw32_thread_t *) thread.p; - - if (NULL == tp || thread.x != tp->ptHandle.x || NULL == tp->threadH) - { - result = ESRCH; - } - else - { - if (cpuset) - { - if (tp->cpuset) - { - /* - * The application may have set thread affinity independently - * via SetThreadAffinityMask(). If so, we adjust our record of the threads - * affinity and try to do so in a reasonable way. - */ - DWORD_PTR vThreadMask = SetThreadAffinityMask(tp->threadH, tp->cpuset); - if (vThreadMask && vThreadMask != tp->cpuset) - { - (void) SetThreadAffinityMask(tp->threadH, vThreadMask); - tp->cpuset = vThreadMask; - } - } - ((_sched_cpu_set_vector_*)cpuset)->_cpuset = tp->cpuset; - } - else - { - result = EFAULT; - } - } - - __ptw32_mcs_lock_release(&node); - - return result; - -#endif -} +/* + * pthread_setaffinity.c + * + * Description: + * This translation unit implements thread cpu affinity setting. + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "pthread.h" +#include "implement.h" + +int +pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, + const cpu_set_t *cpuset) + /* + * ------------------------------------------------------ + * DOCPUBLIC + * The pthread_setaffinity_np() function sets the CPU affinity mask + * of the thread thread to the CPU set pointed to by cpuset. If the + * call is successful, and the thread is not currently running on one + * of the CPUs in cpuset, then it is migrated to one of those CPUs. + * + * PARAMETERS + * thread + * The target thread + * + * cpusetsize + * Ignored in pthreads4w. + * Usually set to sizeof(cpu_set_t) + * + * cpuset + * The new cpu set mask. + * + * The set of CPUs on which the thread will actually run + * is the intersection of the set specified in the cpuset + * argument and the set of CPUs actually present for + * the process. + * + * DESCRIPTION + * The pthread_setaffinity_np() function sets the CPU affinity mask + * of the thread thread to the CPU set pointed to by cpuset. If the + * call is successful, and the thread is not currently running on one + * of the CPUs in cpuset, then it is migrated to one of those CPUs. + * + * RESULTS + * 0 Success + * ESRCH Thread does not exist + * EFAULT pcuset is NULL + * EAGAIN The thread affinity could not be set + * ENOSYS The platform does not support this function + * + * ------------------------------------------------------ + */ +{ +#if ! defined(HAVE_CPU_AFFINITY) + + return ENOSYS; + +#else + + int result = 0; + __ptw32_thread_t * tp; + __ptw32_mcs_local_node_t node; + cpu_set_t processCpuset; + + __ptw32_mcs_lock_acquire (&__ptw32_thread_reuse_lock, &node); + + tp = (__ptw32_thread_t *) thread.p; + + if (NULL == tp || thread.x != tp->ptHandle.x || NULL == tp->threadH) + { + result = ESRCH; + } + else + { + if (cpuset) + { + if (sched_getaffinity(0, sizeof(cpu_set_t), &processCpuset)) + { + result = __PTW32_GET_ERRNO(); + } + else + { + /* + * Result is the intersection of available CPUs and the mask. + */ + cpu_set_t newMask; + + CPU_AND(&newMask, &processCpuset, cpuset); + + if (((_sched_cpu_set_vector_*)&newMask)->_cpuset) + { + if (SetThreadAffinityMask (tp->threadH, ((_sched_cpu_set_vector_*)&newMask)->_cpuset)) + { + /* + * We record the intersection of the process affinity + * and the thread affinity cpusets so that + * pthread_getaffinity_np() returns the actual thread + * CPU set. + */ + tp->cpuset = ((_sched_cpu_set_vector_*)&newMask)->_cpuset; + } + else + { + result = EAGAIN; + } + } + else + { + result = EINVAL; + } + } + } + else + { + result = EFAULT; + } + } + + __ptw32_mcs_lock_release (&node); + + return result; + +#endif +} + +int +pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t *cpuset) + /* + * ------------------------------------------------------ + * DOCPUBLIC + * The pthread_getaffinity_np() function returns the CPU affinity mask + * of the thread thread in the CPU set pointed to by cpuset. + * + * PARAMETERS + * thread + * The target thread + * + * cpusetsize + * Ignored in pthreads4w. + * Usually set to sizeof(cpu_set_t) + * + * cpuset + * The location where the current cpu set + * will be returned. + * + * + * DESCRIPTION + * The pthread_getaffinity_np() function returns the CPU affinity mask + * of the thread thread in the CPU set pointed to by cpuset. + * + * RESULTS + * 0 Success + * ESRCH thread does not exist + * EFAULT cpuset is NULL + * ENOSYS The platform does not support this function + * + * ------------------------------------------------------ + */ +{ +#if ! defined(HAVE_CPU_AFFINITY) + + return ENOSYS; + +#else + + int result = 0; + __ptw32_thread_t * tp; + __ptw32_mcs_local_node_t node; + + __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); + + tp = (__ptw32_thread_t *) thread.p; + + if (NULL == tp || thread.x != tp->ptHandle.x || NULL == tp->threadH) + { + result = ESRCH; + } + else + { + if (cpuset) + { + if (tp->cpuset) + { + /* + * The application may have set thread affinity independently + * via SetThreadAffinityMask(). If so, we adjust our record of the threads + * affinity and try to do so in a reasonable way. + */ + DWORD_PTR vThreadMask = SetThreadAffinityMask(tp->threadH, tp->cpuset); + if (vThreadMask && vThreadMask != tp->cpuset) + { + (void) SetThreadAffinityMask(tp->threadH, vThreadMask); + tp->cpuset = vThreadMask; + } + } + ((_sched_cpu_set_vector_*)cpuset)->_cpuset = tp->cpuset; + } + else + { + result = EFAULT; + } + } + + __ptw32_mcs_lock_release(&node); + + return result; + +#endif +} diff --git a/pthread_setcancelstate.c b/pthread_setcancelstate.c index 90eac87a..2e541a4c 100644 --- a/pthread_setcancelstate.c +++ b/pthread_setcancelstate.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setcanceltype.c b/pthread_setcanceltype.c index f201bc93..06189f87 100644 --- a/pthread_setcanceltype.c +++ b/pthread_setcanceltype.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setconcurrency.c b/pthread_setconcurrency.c index b47f6b5c..1c758040 100644 --- a/pthread_setconcurrency.c +++ b/pthread_setconcurrency.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setname_np.c b/pthread_setname_np.c index c3f3cd90..41759c9c 100644 --- a/pthread_setname_np.c +++ b/pthread_setname_np.c @@ -3,33 +3,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setschedparam.c b/pthread_setschedparam.c index 28598ab6..2cdfd4d1 100644 --- a/pthread_setschedparam.c +++ b/pthread_setschedparam.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setspecific.c b/pthread_setspecific.c index f65985be..6894882b 100644 --- a/pthread_setspecific.c +++ b/pthread_setspecific.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_spin_destroy.c b/pthread_spin_destroy.c index 81ddd453..d6edd31e 100644 --- a/pthread_spin_destroy.c +++ b/pthread_spin_destroy.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_spin_init.c b/pthread_spin_init.c index bdf0effb..75e6eeef 100644 --- a/pthread_spin_init.c +++ b/pthread_spin_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_spin_lock.c b/pthread_spin_lock.c index cc015d56..64ad0e31 100644 --- a/pthread_spin_lock.c +++ b/pthread_spin_lock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_spin_trylock.c b/pthread_spin_trylock.c index bf4f2c31..d9fd7197 100644 --- a/pthread_spin_trylock.c +++ b/pthread_spin_trylock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_spin_unlock.c b/pthread_spin_unlock.c index 0f039abc..8d24d735 100644 --- a/pthread_spin_unlock.c +++ b/pthread_spin_unlock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_testcancel.c b/pthread_testcancel.c index cce05f2f..7a3ea69b 100644 --- a/pthread_testcancel.c +++ b/pthread_testcancel.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_timechange_handler_np.c b/pthread_timechange_handler_np.c index 943a928b..88bab108 100644 --- a/pthread_timechange_handler_np.c +++ b/pthread_timechange_handler_np.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_timedjoin_np.c b/pthread_timedjoin_np.c index 0eec13cb..6ae04a9d 100644 --- a/pthread_timedjoin_np.c +++ b/pthread_timedjoin_np.c @@ -1,188 +1,185 @@ -/* - * pthread_timedjoin_np.c - * - * Description: - * This translation unit implements functions related to thread - * synchronisation. - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "pthread.h" -#include "implement.h" - -/* - * Not needed yet, but defining it should indicate clashes with build target - * environment that should be fixed. - */ -#if !defined(WINCE) -# include -#endif - - -int -pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec *abstime) - /* - * ------------------------------------------------------ - * DOCPUBLIC - * This function waits for 'thread' to terminate and - * returns the thread's exit value if 'value_ptr' is not - * NULL or until 'abstime' passes and returns an - * error. If 'abstime' is NULL then the function waits - * forever, i.e. reverts to pthread_join behaviour. - * This function detaches the thread on successful - * completion. - * - * PARAMETERS - * thread - * an instance of pthread_t - * - * value_ptr - * pointer to an instance of pointer to void - * - * abstime - * pointer to an instance of struct timespec - * representing an absolute time value - * - * - * DESCRIPTION - * This function waits for 'thread' to terminate and - * returns the thread's exit value if 'value_ptr' is not - * NULL or until 'abstime' passes and returns an - * error. If 'abstime' is NULL then the function waits - * forever, i.e. reverts to pthread_join behaviour. - * This function detaches the thread on successful - * completion. - * NOTE: Detached threads cannot be joined or canceled. - * In this implementation 'abstime' will be - * resolved to the nearest millisecond. - * - * RESULTS - * 0 'thread' has completed - * ETIMEDOUT abstime passed - * EINVAL thread is not a joinable thread, - * ESRCH no thread could be found with ID 'thread', - * ENOENT thread couldn't find it's own valid handle, - * EDEADLK attempt to join thread with self - * - * ------------------------------------------------------ - */ -{ - int result; - pthread_t self; - DWORD milliseconds; - __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; - __ptw32_mcs_local_node_t node; - - if (abstime == NULL) - { - milliseconds = INFINITE; - } - else - { - /* - * Calculate timeout as milliseconds from current system time. - */ - milliseconds = __ptw32_relmillisecs (abstime); - } - - __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); - - if (NULL == tp - || thread.x != tp->ptHandle.x) - { - result = ESRCH; - } - else if (PTHREAD_CREATE_DETACHED == tp->detachState) - { - result = EINVAL; - } - else - { - result = 0; - } - - __ptw32_mcs_lock_release(&node); - - if (result == 0) - { - /* - * The target thread is joinable and can't be reused before we join it. - */ - self = pthread_self(); - - if (NULL == self.p) - { - result = ENOENT; - } - else if (pthread_equal (self, thread)) - { - result = EDEADLK; - } - else - { - /* - * Pthread_join is a cancellation point. - * If we are canceled then our target thread must not be - * detached (destroyed). This is guaranteed because - * pthreadCancelableTimedWait will not return if we - * are canceled. - */ - result = pthreadCancelableTimedWait (tp->threadH, milliseconds); - - if (0 == result) - { - if (value_ptr != NULL) - { - *value_ptr = tp->exitStatus; - } - - /* - * The result of making multiple simultaneous calls to - * pthread_join() or pthread_timedjoin_np() or pthread_detach() - * specifying the same target is undefined. - */ - result = pthread_detach (thread); - } - else if (ETIMEDOUT != result) - { - result = ESRCH; - } - } - } - - return (result); - -} +/* + * pthread_timedjoin_np.c + * + * Description: + * This translation unit implements functions related to thread + * synchronisation. + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "pthread.h" +#include "implement.h" + +/* + * Not needed yet, but defining it should indicate clashes with build target + * environment that should be fixed. + */ +#if !defined(WINCE) +# include +#endif + + +int +pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec *abstime) + /* + * ------------------------------------------------------ + * DOCPUBLIC + * This function waits for 'thread' to terminate and + * returns the thread's exit value if 'value_ptr' is not + * NULL or until 'abstime' passes and returns an + * error. If 'abstime' is NULL then the function waits + * forever, i.e. reverts to pthread_join behaviour. + * This function detaches the thread on successful + * completion. + * + * PARAMETERS + * thread + * an instance of pthread_t + * + * value_ptr + * pointer to an instance of pointer to void + * + * abstime + * pointer to an instance of struct timespec + * representing an absolute time value + * + * + * DESCRIPTION + * This function waits for 'thread' to terminate and + * returns the thread's exit value if 'value_ptr' is not + * NULL or until 'abstime' passes and returns an + * error. If 'abstime' is NULL then the function waits + * forever, i.e. reverts to pthread_join behaviour. + * This function detaches the thread on successful + * completion. + * NOTE: Detached threads cannot be joined or canceled. + * In this implementation 'abstime' will be + * resolved to the nearest millisecond. + * + * RESULTS + * 0 'thread' has completed + * ETIMEDOUT abstime passed + * EINVAL thread is not a joinable thread, + * ESRCH no thread could be found with ID 'thread', + * ENOENT thread couldn't find it's own valid handle, + * EDEADLK attempt to join thread with self + * + * ------------------------------------------------------ + */ +{ + int result; + pthread_t self; + DWORD milliseconds; + __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; + __ptw32_mcs_local_node_t node; + + if (abstime == NULL) + { + milliseconds = INFINITE; + } + else + { + /* + * Calculate timeout as milliseconds from current system time. + */ + milliseconds = __ptw32_relmillisecs (abstime); + } + + __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); + + if (NULL == tp + || thread.x != tp->ptHandle.x) + { + result = ESRCH; + } + else if (PTHREAD_CREATE_DETACHED == tp->detachState) + { + result = EINVAL; + } + else + { + result = 0; + } + + __ptw32_mcs_lock_release(&node); + + if (result == 0) + { + /* + * The target thread is joinable and can't be reused before we join it. + */ + self = pthread_self(); + + if (NULL == self.p) + { + result = ENOENT; + } + else if (pthread_equal (self, thread)) + { + result = EDEADLK; + } + else + { + /* + * Pthread_join is a cancellation point. + * If we are canceled then our target thread must not be + * detached (destroyed). This is guaranteed because + * pthreadCancelableTimedWait will not return if we + * are canceled. + */ + result = pthreadCancelableTimedWait (tp->threadH, milliseconds); + + if (0 == result) + { + if (value_ptr != NULL) + { + *value_ptr = tp->exitStatus; + } + + /* + * The result of making multiple simultaneous calls to + * pthread_join() or pthread_timedjoin_np() or pthread_detach() + * specifying the same target is undefined. + */ + result = pthread_detach (thread); + } + else if (ETIMEDOUT != result) + { + result = ESRCH; + } + } + } + + return (result); + +} diff --git a/pthread_tryjoin_np.c b/pthread_tryjoin_np.c index cdc47584..4b62d1e9 100644 --- a/pthread_tryjoin_np.c +++ b/pthread_tryjoin_np.c @@ -1,173 +1,170 @@ -/* - * pthread_tryjoin_np.c - * - * Description: - * This translation unit implements functions related to thread - * synchronisation. - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "pthread.h" -#include "implement.h" - -/* - * Not needed yet, but defining it should indicate clashes with build target - * environment that should be fixed. - */ -#if !defined(WINCE) -# include -#endif - - -int -pthread_tryjoin_np (pthread_t thread, void **value_ptr) - /* - * ------------------------------------------------------ - * DOCPUBLIC - * This function checks if 'thread' has terminated and - * returns the thread's exit value if 'value_ptr' is not - * NULL or until 'abstime' passes and returns an - * error. If the thread has not exited the function returns - * immediately. This function detaches the thread on successful - * completion. - * - * PARAMETERS - * thread - * an instance of pthread_t - * - * value_ptr - * pointer to an instance of pointer to void - * - * - * DESCRIPTION - * This function checks if 'thread' has terminated and - * returns the thread's exit value if 'value_ptr' is not - * NULL or until 'abstime' passes and returns an - * error. If the thread has not exited the function returns - * immediately. This function detaches the thread on successful - * completion. - * NOTE: Detached threads cannot be joined or canceled. - * In this implementation 'abstime' will be - * resolved to the nearest millisecond. - * - * RESULTS - * 0 'thread' has completed - * EBUSY 'thread' is still live - * EINVAL thread is not a joinable thread, - * ESRCH no thread could be found with ID 'thread', - * ENOENT thread couldn't find it's own valid handle, - * EDEADLK attempt to join thread with self - * - * ------------------------------------------------------ - */ -{ - int result; - pthread_t self; - __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; - __ptw32_mcs_local_node_t node; - - __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); - - if (NULL == tp - || thread.x != tp->ptHandle.x) - { - result = ESRCH; - } - else if (PTHREAD_CREATE_DETACHED == tp->detachState) - { - result = EINVAL; - } - else - { - result = 0; - } - - __ptw32_mcs_lock_release(&node); - - if (result == 0) - { - /* - * The target thread is joinable and can't be reused before we join it. - */ - self = pthread_self(); - - if (NULL == self.p) - { - result = ENOENT; - } - else if (pthread_equal (self, thread)) - { - result = EDEADLK; - } - else - { - /* - * Pthread_join is a cancellation point. - * If we are canceled then our target thread must not be - * detached (destroyed). This is guaranteed because - * pthreadCancelableTimedWait will not return if we - * are canceled. - */ - result = pthreadCancelableTimedWait (tp->threadH, 0); - - if (0 == result) - { - if (value_ptr != NULL) - { - *value_ptr = tp->exitStatus; - } - - /* - * The result of making multiple simultaneous calls to - * pthread_join(), pthread_timedjoin_np(), pthread_tryjoin_np() - * or pthread_detach() specifying the same target is undefined. - */ - result = pthread_detach (thread); - } - else if (ETIMEDOUT == result) - { - result = EBUSY; - } - else - { - result = ESRCH; - } - } - } - - return (result); - -} +/* + * pthread_tryjoin_np.c + * + * Description: + * This translation unit implements functions related to thread + * synchronisation. + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "pthread.h" +#include "implement.h" + +/* + * Not needed yet, but defining it should indicate clashes with build target + * environment that should be fixed. + */ +#if !defined(WINCE) +# include +#endif + + +int +pthread_tryjoin_np (pthread_t thread, void **value_ptr) + /* + * ------------------------------------------------------ + * DOCPUBLIC + * This function checks if 'thread' has terminated and + * returns the thread's exit value if 'value_ptr' is not + * NULL or until 'abstime' passes and returns an + * error. If the thread has not exited the function returns + * immediately. This function detaches the thread on successful + * completion. + * + * PARAMETERS + * thread + * an instance of pthread_t + * + * value_ptr + * pointer to an instance of pointer to void + * + * + * DESCRIPTION + * This function checks if 'thread' has terminated and + * returns the thread's exit value if 'value_ptr' is not + * NULL or until 'abstime' passes and returns an + * error. If the thread has not exited the function returns + * immediately. This function detaches the thread on successful + * completion. + * NOTE: Detached threads cannot be joined or canceled. + * In this implementation 'abstime' will be + * resolved to the nearest millisecond. + * + * RESULTS + * 0 'thread' has completed + * EBUSY 'thread' is still live + * EINVAL thread is not a joinable thread, + * ESRCH no thread could be found with ID 'thread', + * ENOENT thread couldn't find it's own valid handle, + * EDEADLK attempt to join thread with self + * + * ------------------------------------------------------ + */ +{ + int result; + pthread_t self; + __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; + __ptw32_mcs_local_node_t node; + + __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); + + if (NULL == tp + || thread.x != tp->ptHandle.x) + { + result = ESRCH; + } + else if (PTHREAD_CREATE_DETACHED == tp->detachState) + { + result = EINVAL; + } + else + { + result = 0; + } + + __ptw32_mcs_lock_release(&node); + + if (result == 0) + { + /* + * The target thread is joinable and can't be reused before we join it. + */ + self = pthread_self(); + + if (NULL == self.p) + { + result = ENOENT; + } + else if (pthread_equal (self, thread)) + { + result = EDEADLK; + } + else + { + /* + * Pthread_join is a cancellation point. + * If we are canceled then our target thread must not be + * detached (destroyed). This is guaranteed because + * pthreadCancelableTimedWait will not return if we + * are canceled. + */ + result = pthreadCancelableTimedWait (tp->threadH, 0); + + if (0 == result) + { + if (value_ptr != NULL) + { + *value_ptr = tp->exitStatus; + } + + /* + * The result of making multiple simultaneous calls to + * pthread_join(), pthread_timedjoin_np(), pthread_tryjoin_np() + * or pthread_detach() specifying the same target is undefined. + */ + result = pthread_detach (thread); + } + else if (ETIMEDOUT == result) + { + result = EBUSY; + } + else + { + result = ESRCH; + } + } + } + + return (result); + +} diff --git a/pthread_win32_attach_detach_np.c b/pthread_win32_attach_detach_np.c index 247681dd..2f7e0787 100644 --- a/pthread_win32_attach_detach_np.c +++ b/pthread_win32_attach_detach_np.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_MCS_lock.c b/ptw32_MCS_lock.c index 48623a58..61609ec9 100644 --- a/ptw32_MCS_lock.c +++ b/ptw32_MCS_lock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ /* diff --git a/ptw32_callUserDestroyRoutines.c b/ptw32_callUserDestroyRoutines.c index d0d20321..ec58ff71 100644 --- a/ptw32_callUserDestroyRoutines.c +++ b/ptw32_callUserDestroyRoutines.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_calloc.c b/ptw32_calloc.c index bc6a5b0e..c583733a 100644 --- a/ptw32_calloc.c +++ b/ptw32_calloc.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_cond_check_need_init.c b/ptw32_cond_check_need_init.c index fb3e41f7..8c86b959 100644 --- a/ptw32_cond_check_need_init.c +++ b/ptw32_cond_check_need_init.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_getprocessors.c b/ptw32_getprocessors.c index 0ec6054c..937383b8 100644 --- a/ptw32_getprocessors.c +++ b/ptw32_getprocessors.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_is_attr.c b/ptw32_is_attr.c index 01ca0363..be5f1664 100644 --- a/ptw32_is_attr.c +++ b/ptw32_is_attr.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_mutex_check_need_init.c b/ptw32_mutex_check_need_init.c index 6c189a57..a694a53e 100644 --- a/ptw32_mutex_check_need_init.c +++ b/ptw32_mutex_check_need_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_new.c b/ptw32_new.c index 79c673af..fac6f73b 100644 --- a/ptw32_new.c +++ b/ptw32_new.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_processInitialize.c b/ptw32_processInitialize.c index b9a64c5a..3fb6dddb 100644 --- a/ptw32_processInitialize.c +++ b/ptw32_processInitialize.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_processTerminate.c b/ptw32_processTerminate.c index f53ad5a6..a3cc434c 100644 --- a/ptw32_processTerminate.c +++ b/ptw32_processTerminate.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_relmillisecs.c b/ptw32_relmillisecs.c index 7ea14185..e084c238 100644 --- a/ptw32_relmillisecs.c +++ b/ptw32_relmillisecs.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_reuse.c b/ptw32_reuse.c index 86df4f88..0ddd2398 100644 --- a/ptw32_reuse.c +++ b/ptw32_reuse.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_rwlock_cancelwrwait.c b/ptw32_rwlock_cancelwrwait.c index 9552833c..5fe70801 100644 --- a/ptw32_rwlock_cancelwrwait.c +++ b/ptw32_rwlock_cancelwrwait.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_rwlock_check_need_init.c b/ptw32_rwlock_check_need_init.c index a4a2bbbb..937a6f81 100644 --- a/ptw32_rwlock_check_need_init.c +++ b/ptw32_rwlock_check_need_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_semwait.c b/ptw32_semwait.c index d9b1bdd2..c9f10779 100644 --- a/ptw32_semwait.c +++ b/ptw32_semwait.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_spinlock_check_need_init.c b/ptw32_spinlock_check_need_init.c index 52db677b..41390227 100644 --- a/ptw32_spinlock_check_need_init.c +++ b/ptw32_spinlock_check_need_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_threadDestroy.c b/ptw32_threadDestroy.c index 065b2dd9..bd3835a5 100644 --- a/ptw32_threadDestroy.c +++ b/ptw32_threadDestroy.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_threadStart.c b/ptw32_threadStart.c index da74bc01..89635a30 100644 --- a/ptw32_threadStart.c +++ b/ptw32_threadStart.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_throw.c b/ptw32_throw.c index 95b84027..a3993f2d 100644 --- a/ptw32_throw.c +++ b/ptw32_throw.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_timespec.c b/ptw32_timespec.c index cd9782c5..94c7f3aa 100644 --- a/ptw32_timespec.c +++ b/ptw32_timespec.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_tkAssocCreate.c b/ptw32_tkAssocCreate.c index 153b8162..9f350ed7 100644 --- a/ptw32_tkAssocCreate.c +++ b/ptw32_tkAssocCreate.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_tkAssocDestroy.c b/ptw32_tkAssocDestroy.c index c150384e..fdf95578 100644 --- a/ptw32_tkAssocDestroy.c +++ b/ptw32_tkAssocDestroy.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sched.h b/sched.h index 89d54481..34800304 100644 --- a/sched.h +++ b/sched.h @@ -9,33 +9,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #if !defined(_SCHED_H) #define _SCHED_H diff --git a/sched_get_priority_max.c b/sched_get_priority_max.c index 456a7adf..977889b5 100644 --- a/sched_get_priority_max.c +++ b/sched_get_priority_max.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sched_get_priority_min.c b/sched_get_priority_min.c index 9d7e367c..fbd47571 100644 --- a/sched_get_priority_min.c +++ b/sched_get_priority_min.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sched_getscheduler.c b/sched_getscheduler.c index e61830c5..d2d091f8 100644 --- a/sched_getscheduler.c +++ b/sched_getscheduler.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sched_setaffinity.c b/sched_setaffinity.c index cf944c9d..95667f2c 100644 --- a/sched_setaffinity.c +++ b/sched_setaffinity.c @@ -1,352 +1,349 @@ -/* - * sched_setaffinity.c - * - * Description: - * POSIX scheduling functions that deal with CPU affinity. - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "pthread.h" -#include "implement.h" -#include "sched.h" - -int -sched_setaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *set) - /* - * ------------------------------------------------------ - * DOCPUBLIC - * Sets the CPU affinity mask of the process whose ID is pid - * to the value specified by mask. If pid is zero, then the - * calling process is used. The argument cpusetsize is the - * length (in bytes) of the data pointed to by mask. Normally - * this argument would be specified as sizeof(cpu_set_t). - * - * If the process specified by pid is not currently running on - * one of the CPUs specified in mask, then that process is - * migrated to one of the CPUs specified in mask. - * - * PARAMETERS - * pid - * Process ID - * - * cpusetsize - * Currently ignored in pthreads4w. - * Usually set to sizeof(cpu_set_t) - * - * mask - * Pointer to the CPU mask to set (cpu_set_t). - * - * DESCRIPTION - * Sets the CPU affinity mask of the process whose ID is pid - * to the value specified by mask. If pid is zero, then the - * calling process is used. The argument cpusetsize is the - * length (in bytes) of the data pointed to by mask. Normally - * this argument would be specified as sizeof(cpu_set_t). - * - * If the process specified by pid is not currently running on - * one of the CPUs specified in mask, then that process is - * migrated to one of the CPUs specified in mask. - * - * RESULTS - * 0 successfully created semaphore, - * EFAULT 'mask' is a NULL pointer. - * EINVAL '*mask' contains no CPUs in the set - * of available CPUs. - * EAGAIN The system available CPUs could not - * be obtained. - * EPERM The process referred to by 'pid' is - * not modifiable by us. - * ESRCH The process referred to by 'pid' was - * not found. - * ENOSYS Function not supported. - * - * ------------------------------------------------------ - */ -{ -#if ! defined(NEED_PROCESS_AFFINITY_MASK) - - DWORD_PTR vProcessMask; - DWORD_PTR vSystemMask; - HANDLE h; - int targetPid = (int)(size_t) pid; - int result = 0; - - if (NULL == set) - { - result = EFAULT; - } - else - { - if (0 == targetPid) - { - targetPid = (int) GetCurrentProcessId (); - } - - h = OpenProcess (PROCESS_QUERY_INFORMATION|PROCESS_SET_INFORMATION, __PTW32_FALSE, (DWORD) targetPid); - - if (NULL == h) - { - result = (((0xFF & ERROR_ACCESS_DENIED) == GetLastError()) ? EPERM : ESRCH); - } - else - { - if (GetProcessAffinityMask (h, &vProcessMask, &vSystemMask)) - { - /* - * Result is the intersection of available CPUs and the mask. - */ - DWORD_PTR newMask = vSystemMask & ((_sched_cpu_set_vector_*)set)->_cpuset; - - if (newMask) - { - if (SetProcessAffinityMask(h, newMask) == 0) - { - switch (GetLastError()) - { - case (0xFF & ERROR_ACCESS_DENIED): - result = EPERM; - break; - case (0xFF & ERROR_INVALID_PARAMETER): - result = EINVAL; - break; - default: - result = EAGAIN; - break; - } - } - } - else - { - /* - * Mask does not contain any CPUs currently available on the system. - */ - result = EINVAL; - } - } - else - { - result = EAGAIN; - } - } - CloseHandle(h); - } - - if (result != 0) - { - __PTW32_SET_ERRNO(result); - return -1; - } - else - { - return 0; - } - -#else - - __PTW32_SET_ERRNO(ENOSYS); - return -1; - -#endif -} - - -int -sched_getaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *set) - /* - * ------------------------------------------------------ - * DOCPUBLIC - * Gets the CPU affinity mask of the process whose ID is pid - * to the value specified by mask. If pid is zero, then the - * calling process is used. The argument cpusetsize is the - * length (in bytes) of the data pointed to by mask. Normally - * this argument would be specified as sizeof(cpu_set_t). - * - * PARAMETERS - * pid - * Process ID - * - * cpusetsize - * Currently ignored in pthreads4w. - * Usually set to sizeof(cpu_set_t) - * - * mask - * Pointer to the CPU mask to set (cpu_set_t). - * - * DESCRIPTION - * Sets the CPU affinity mask of the process whose ID is pid - * to the value specified by mask. If pid is zero, then the - * calling process is used. The argument cpusetsize is the - * length (in bytes) of the data pointed to by mask. Normally - * this argument would be specified as sizeof(cpu_set_t). - * - * RESULTS - * 0 successfully created semaphore, - * EFAULT 'mask' is a NULL pointer. - * EAGAIN The system available CPUs could not - * be obtained. - * EPERM The process referred to by 'pid' is - * not modifiable by us. - * ESRCH The process referred to by 'pid' was - * not found. - * - * ------------------------------------------------------ - */ -{ - DWORD_PTR vProcessMask; - DWORD_PTR vSystemMask; - HANDLE h; - int targetPid = (int)(size_t) pid; - int result = 0; - - if (NULL == set) - { - result = EFAULT; - } - else - { - -#if ! defined(NEED_PROCESS_AFFINITY_MASK) - - if (0 == targetPid) - { - targetPid = (int) GetCurrentProcessId (); - } - - h = OpenProcess (PROCESS_QUERY_INFORMATION, __PTW32_FALSE, (DWORD) targetPid); - - if (NULL == h) - { - result = (((0xFF & ERROR_ACCESS_DENIED) == GetLastError()) ? EPERM : ESRCH); - } - else - { - if (GetProcessAffinityMask (h, &vProcessMask, &vSystemMask)) - { - ((_sched_cpu_set_vector_*)set)->_cpuset = vProcessMask; - } - else - { - result = EAGAIN; - } - } - CloseHandle(h); - -#else - ((_sched_cpu_set_vector_*)set)->_cpuset = (size_t)0x1; -#endif - - } - - if (result != 0) - { - __PTW32_SET_ERRNO(result); - return -1; - } - else - { - return 0; - } -} - -/* - * Support routines for cpu_set_t - */ -int _sched_affinitycpucount (const cpu_set_t *set) -{ - size_t tset; - int count; - - /* - * Relies on tset being unsigned, otherwise the right-shift will - * be arithmetic rather than logical and the 'for' will loop forever. - */ - for (count = 0, tset = ((_sched_cpu_set_vector_*)set)->_cpuset; tset; tset >>= 1) - { - if (tset & (size_t)1) - { - count++; - } - } - return count; -} - -void _sched_affinitycpuzero (cpu_set_t *pset) -{ - ((_sched_cpu_set_vector_*)pset)->_cpuset = (size_t)0; -} - -void _sched_affinitycpuset (int cpu, cpu_set_t *pset) -{ - ((_sched_cpu_set_vector_*)pset)->_cpuset |= ((size_t)1 << cpu); -} - -void _sched_affinitycpuclr (int cpu, cpu_set_t *pset) -{ - ((_sched_cpu_set_vector_*)pset)->_cpuset &= ~((size_t)1 << cpu); -} - -int _sched_affinitycpuisset (int cpu, const cpu_set_t *pset) -{ - return ((((_sched_cpu_set_vector_*)pset)->_cpuset & - ((size_t)1 << cpu)) != (size_t)0); -} - -void _sched_affinitycpuand(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2) -{ - ((_sched_cpu_set_vector_*)pdestset)->_cpuset = - (((_sched_cpu_set_vector_*)psrcset1)->_cpuset & - ((_sched_cpu_set_vector_*)psrcset2)->_cpuset); -} - -void _sched_affinitycpuor(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2) -{ - ((_sched_cpu_set_vector_*)pdestset)->_cpuset = - (((_sched_cpu_set_vector_*)psrcset1)->_cpuset | - ((_sched_cpu_set_vector_*)psrcset2)->_cpuset); -} - -void _sched_affinitycpuxor(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2) -{ - ((_sched_cpu_set_vector_*)pdestset)->_cpuset = - (((_sched_cpu_set_vector_*)psrcset1)->_cpuset ^ - ((_sched_cpu_set_vector_*)psrcset2)->_cpuset); -} - -int _sched_affinitycpuequal (const cpu_set_t *pset1, const cpu_set_t *pset2) -{ - return (((_sched_cpu_set_vector_*)pset1)->_cpuset == - ((_sched_cpu_set_vector_*)pset2)->_cpuset); -} +/* + * sched_setaffinity.c + * + * Description: + * POSIX scheduling functions that deal with CPU affinity. + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "pthread.h" +#include "implement.h" +#include "sched.h" + +int +sched_setaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *set) + /* + * ------------------------------------------------------ + * DOCPUBLIC + * Sets the CPU affinity mask of the process whose ID is pid + * to the value specified by mask. If pid is zero, then the + * calling process is used. The argument cpusetsize is the + * length (in bytes) of the data pointed to by mask. Normally + * this argument would be specified as sizeof(cpu_set_t). + * + * If the process specified by pid is not currently running on + * one of the CPUs specified in mask, then that process is + * migrated to one of the CPUs specified in mask. + * + * PARAMETERS + * pid + * Process ID + * + * cpusetsize + * Currently ignored in pthreads4w. + * Usually set to sizeof(cpu_set_t) + * + * mask + * Pointer to the CPU mask to set (cpu_set_t). + * + * DESCRIPTION + * Sets the CPU affinity mask of the process whose ID is pid + * to the value specified by mask. If pid is zero, then the + * calling process is used. The argument cpusetsize is the + * length (in bytes) of the data pointed to by mask. Normally + * this argument would be specified as sizeof(cpu_set_t). + * + * If the process specified by pid is not currently running on + * one of the CPUs specified in mask, then that process is + * migrated to one of the CPUs specified in mask. + * + * RESULTS + * 0 successfully created semaphore, + * EFAULT 'mask' is a NULL pointer. + * EINVAL '*mask' contains no CPUs in the set + * of available CPUs. + * EAGAIN The system available CPUs could not + * be obtained. + * EPERM The process referred to by 'pid' is + * not modifiable by us. + * ESRCH The process referred to by 'pid' was + * not found. + * ENOSYS Function not supported. + * + * ------------------------------------------------------ + */ +{ +#if ! defined(NEED_PROCESS_AFFINITY_MASK) + + DWORD_PTR vProcessMask; + DWORD_PTR vSystemMask; + HANDLE h; + int targetPid = (int)(size_t) pid; + int result = 0; + + if (NULL == set) + { + result = EFAULT; + } + else + { + if (0 == targetPid) + { + targetPid = (int) GetCurrentProcessId (); + } + + h = OpenProcess (PROCESS_QUERY_INFORMATION|PROCESS_SET_INFORMATION, __PTW32_FALSE, (DWORD) targetPid); + + if (NULL == h) + { + result = (((0xFF & ERROR_ACCESS_DENIED) == GetLastError()) ? EPERM : ESRCH); + } + else + { + if (GetProcessAffinityMask (h, &vProcessMask, &vSystemMask)) + { + /* + * Result is the intersection of available CPUs and the mask. + */ + DWORD_PTR newMask = vSystemMask & ((_sched_cpu_set_vector_*)set)->_cpuset; + + if (newMask) + { + if (SetProcessAffinityMask(h, newMask) == 0) + { + switch (GetLastError()) + { + case (0xFF & ERROR_ACCESS_DENIED): + result = EPERM; + break; + case (0xFF & ERROR_INVALID_PARAMETER): + result = EINVAL; + break; + default: + result = EAGAIN; + break; + } + } + } + else + { + /* + * Mask does not contain any CPUs currently available on the system. + */ + result = EINVAL; + } + } + else + { + result = EAGAIN; + } + } + CloseHandle(h); + } + + if (result != 0) + { + __PTW32_SET_ERRNO(result); + return -1; + } + else + { + return 0; + } + +#else + + __PTW32_SET_ERRNO(ENOSYS); + return -1; + +#endif +} + + +int +sched_getaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *set) + /* + * ------------------------------------------------------ + * DOCPUBLIC + * Gets the CPU affinity mask of the process whose ID is pid + * to the value specified by mask. If pid is zero, then the + * calling process is used. The argument cpusetsize is the + * length (in bytes) of the data pointed to by mask. Normally + * this argument would be specified as sizeof(cpu_set_t). + * + * PARAMETERS + * pid + * Process ID + * + * cpusetsize + * Currently ignored in pthreads4w. + * Usually set to sizeof(cpu_set_t) + * + * mask + * Pointer to the CPU mask to set (cpu_set_t). + * + * DESCRIPTION + * Sets the CPU affinity mask of the process whose ID is pid + * to the value specified by mask. If pid is zero, then the + * calling process is used. The argument cpusetsize is the + * length (in bytes) of the data pointed to by mask. Normally + * this argument would be specified as sizeof(cpu_set_t). + * + * RESULTS + * 0 successfully created semaphore, + * EFAULT 'mask' is a NULL pointer. + * EAGAIN The system available CPUs could not + * be obtained. + * EPERM The process referred to by 'pid' is + * not modifiable by us. + * ESRCH The process referred to by 'pid' was + * not found. + * + * ------------------------------------------------------ + */ +{ + DWORD_PTR vProcessMask; + DWORD_PTR vSystemMask; + HANDLE h; + int targetPid = (int)(size_t) pid; + int result = 0; + + if (NULL == set) + { + result = EFAULT; + } + else + { + +#if ! defined(NEED_PROCESS_AFFINITY_MASK) + + if (0 == targetPid) + { + targetPid = (int) GetCurrentProcessId (); + } + + h = OpenProcess (PROCESS_QUERY_INFORMATION, __PTW32_FALSE, (DWORD) targetPid); + + if (NULL == h) + { + result = (((0xFF & ERROR_ACCESS_DENIED) == GetLastError()) ? EPERM : ESRCH); + } + else + { + if (GetProcessAffinityMask (h, &vProcessMask, &vSystemMask)) + { + ((_sched_cpu_set_vector_*)set)->_cpuset = vProcessMask; + } + else + { + result = EAGAIN; + } + } + CloseHandle(h); + +#else + ((_sched_cpu_set_vector_*)set)->_cpuset = (size_t)0x1; +#endif + + } + + if (result != 0) + { + __PTW32_SET_ERRNO(result); + return -1; + } + else + { + return 0; + } +} + +/* + * Support routines for cpu_set_t + */ +int _sched_affinitycpucount (const cpu_set_t *set) +{ + size_t tset; + int count; + + /* + * Relies on tset being unsigned, otherwise the right-shift will + * be arithmetic rather than logical and the 'for' will loop forever. + */ + for (count = 0, tset = ((_sched_cpu_set_vector_*)set)->_cpuset; tset; tset >>= 1) + { + if (tset & (size_t)1) + { + count++; + } + } + return count; +} + +void _sched_affinitycpuzero (cpu_set_t *pset) +{ + ((_sched_cpu_set_vector_*)pset)->_cpuset = (size_t)0; +} + +void _sched_affinitycpuset (int cpu, cpu_set_t *pset) +{ + ((_sched_cpu_set_vector_*)pset)->_cpuset |= ((size_t)1 << cpu); +} + +void _sched_affinitycpuclr (int cpu, cpu_set_t *pset) +{ + ((_sched_cpu_set_vector_*)pset)->_cpuset &= ~((size_t)1 << cpu); +} + +int _sched_affinitycpuisset (int cpu, const cpu_set_t *pset) +{ + return ((((_sched_cpu_set_vector_*)pset)->_cpuset & + ((size_t)1 << cpu)) != (size_t)0); +} + +void _sched_affinitycpuand(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2) +{ + ((_sched_cpu_set_vector_*)pdestset)->_cpuset = + (((_sched_cpu_set_vector_*)psrcset1)->_cpuset & + ((_sched_cpu_set_vector_*)psrcset2)->_cpuset); +} + +void _sched_affinitycpuor(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2) +{ + ((_sched_cpu_set_vector_*)pdestset)->_cpuset = + (((_sched_cpu_set_vector_*)psrcset1)->_cpuset | + ((_sched_cpu_set_vector_*)psrcset2)->_cpuset); +} + +void _sched_affinitycpuxor(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2) +{ + ((_sched_cpu_set_vector_*)pdestset)->_cpuset = + (((_sched_cpu_set_vector_*)psrcset1)->_cpuset ^ + ((_sched_cpu_set_vector_*)psrcset2)->_cpuset); +} + +int _sched_affinitycpuequal (const cpu_set_t *pset1, const cpu_set_t *pset2) +{ + return (((_sched_cpu_set_vector_*)pset1)->_cpuset == + ((_sched_cpu_set_vector_*)pset2)->_cpuset); +} diff --git a/sched_setscheduler.c b/sched_setscheduler.c index 1f166fb9..df7f881b 100644 --- a/sched_setscheduler.c +++ b/sched_setscheduler.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sched_yield.c b/sched_yield.c index 30de449b..228d77dc 100644 --- a/sched_yield.c +++ b/sched_yield.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_close.c b/sem_close.c index 6b317861..25dafc76 100644 --- a/sem_close.c +++ b/sem_close.c @@ -13,33 +13,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_destroy.c b/sem_destroy.c index e1f35b73..478885a7 100644 --- a/sem_destroy.c +++ b/sem_destroy.c @@ -13,33 +13,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_getvalue.c b/sem_getvalue.c index 8c6c0b44..cbe250af 100644 --- a/sem_getvalue.c +++ b/sem_getvalue.c @@ -13,33 +13,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_init.c b/sem_init.c index 3e088d61..a8500b66 100644 --- a/sem_init.c +++ b/sem_init.c @@ -11,33 +11,30 @@ * * ------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_open.c b/sem_open.c index 84f37aab..c11b3691 100644 --- a/sem_open.c +++ b/sem_open.c @@ -13,33 +13,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_post.c b/sem_post.c index 37423fae..ec436980 100644 --- a/sem_post.c +++ b/sem_post.c @@ -13,33 +13,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_post_multiple.c b/sem_post_multiple.c index e14bc8d1..43a7ad6a 100644 --- a/sem_post_multiple.c +++ b/sem_post_multiple.c @@ -13,33 +13,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_timedwait.c b/sem_timedwait.c index 50581b96..84244839 100644 --- a/sem_timedwait.c +++ b/sem_timedwait.c @@ -13,33 +13,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_trywait.c b/sem_trywait.c index 40c8ec8c..a0dc96d8 100644 --- a/sem_trywait.c +++ b/sem_trywait.c @@ -13,33 +13,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_unlink.c b/sem_unlink.c index e5559d37..ba0d86ab 100644 --- a/sem_unlink.c +++ b/sem_unlink.c @@ -13,33 +13,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_wait.c b/sem_wait.c index 710040e4..c80efc49 100644 --- a/sem_wait.c +++ b/sem_wait.c @@ -13,33 +13,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/semaphore.h b/semaphore.h index 4f1c237d..ed0a86e5 100644 --- a/semaphore.h +++ b/semaphore.h @@ -9,33 +9,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2012, 2016, Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #if !defined( SEMAPHORE_H ) #define SEMAPHORE_H diff --git a/signal.c b/signal.c index b677b5ac..37548dc2 100644 --- a/signal.c +++ b/signal.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ /* diff --git a/tests/Bmakefile b/tests/Bmakefile index 04291245..15054992 100644 --- a/tests/Bmakefile +++ b/tests/Bmakefile @@ -13,7 +13,7 @@ # in the file CONTRIBUTORS included with the source # code distribution. The list can also be seen at the # following World Wide Web location: -# http://sources.redhat.com/pthreads-win32/contributors.html +# https://sourceforge.net/projects/pthreads4w/contributors.html # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/tests/ChangeLog b/tests/ChangeLog index 0abe865d..271ce979 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2016-12-25 Ross Johnson + + * Change all license notices to the Apache License 2.0 + 2016-12-21 Ross Johnson * mutex6.c: fix random failures by using a polling loop to replace diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index 66f85170..ebe33fc2 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -3,30 +3,30 @@ # # -------------------------------------------------------------------------- # -# Pthreads-win32 - POSIX Threads Library for Win32 -# Copyright(C) 1998 John E. Bossom -# Copyright(C) 1999,2012 Pthreads-win32 contributors -# -# The current list of contributors is contained -# in the file CONTRIBUTORS included with the source -# code distribution. The list can also be seen at the -# following World Wide Web location: -# http://sources.redhat.com/pthreads-win32/contributors.html -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library in the file COPYING.LIB; -# if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. # srcdir = @srcdir@ top_srcdir = @top_srcdir@ diff --git a/tests/Makefile b/tests/Makefile index 511f65c2..9750593a 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -11,7 +11,7 @@ # in the file CONTRIBUTORS included with the source # code distribution. The list can also be seen at the # following World Wide Web location: -# http://sources.redhat.com/pthreads-win32/contributors.html +# https://sourceforge.net/projects/pthreads4w/contributors.html # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/tests/Wmakefile b/tests/Wmakefile index fceeda47..053880dd 100644 --- a/tests/Wmakefile +++ b/tests/Wmakefile @@ -13,7 +13,7 @@ # in the file CONTRIBUTORS included with the source # code distribution. The list can also be seen at the # following World Wide Web location: -# http://sources.redhat.com/pthreads-win32/contributors.html +# https://sourceforge.net/projects/pthreads4w/contributors.html # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/tests/affinity1.c b/tests/affinity1.c index 3a80eeae..729b2014 100644 --- a/tests/affinity1.c +++ b/tests/affinity1.c @@ -1,126 +1,123 @@ -/* - * affinity1.c - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Basic test of CPU_*() support routines. - * - */ - -#if ! defined(WINCE) - -#include "test.h" - -int -main() -{ - unsigned int cpu; - cpu_set_t newmask; - cpu_set_t src1mask; - cpu_set_t src2mask; - cpu_set_t src3mask; - - CPU_ZERO(&newmask); - CPU_ZERO(&src1mask); - memset(&src2mask, 0, sizeof(cpu_set_t)); - assert(memcmp(&src1mask, &src2mask, sizeof(cpu_set_t)) == 0); - assert(CPU_EQUAL(&src1mask, &src2mask)); - assert(CPU_COUNT(&src1mask) == 0); - - CPU_ZERO(&src1mask); - CPU_ZERO(&src2mask); - CPU_ZERO(&src3mask); - - for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu += 2) - { - CPU_SET(cpu, &src1mask); /* 0b01010101010101010101010101010101 */ - } - for (cpu = 0; cpu < sizeof(cpu_set_t)*4; cpu++) - { - CPU_SET(cpu, &src2mask); /* 0b00000000000000001111111111111111 */ - } - for (cpu = sizeof(cpu_set_t)*4; cpu < sizeof(cpu_set_t)*8; cpu += 2) - { - CPU_SET(cpu, &src2mask); /* 0b01010101010101011111111111111111 */ - } - for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu += 2) - { - CPU_SET(cpu, &src3mask); /* 0b01010101010101010101010101010101 */ - } - - assert(CPU_COUNT(&src1mask) == (sizeof(cpu_set_t)*4)); - assert(CPU_COUNT(&src2mask) == ((sizeof(cpu_set_t)*4 + (sizeof(cpu_set_t)*2)))); - assert(CPU_COUNT(&src3mask) == (sizeof(cpu_set_t)*4)); - CPU_SET(0, &newmask); - CPU_SET(1, &newmask); - CPU_SET(3, &newmask); - assert(CPU_ISSET(1, &newmask)); - CPU_CLR(1, &newmask); - assert(!CPU_ISSET(1, &newmask)); - CPU_OR(&newmask, &src1mask, &src2mask); - assert(CPU_EQUAL(&newmask, &src2mask)); - CPU_AND(&newmask, &src1mask, &src2mask); - assert(CPU_EQUAL(&newmask, &src1mask)); - CPU_XOR(&newmask, &src1mask, &src3mask); - memset(&src2mask, 0, sizeof(cpu_set_t)); - assert(memcmp(&newmask, &src2mask, sizeof(cpu_set_t)) == 0); - - /* - * Need to confirm the bitwise logical right-shift in CpuCount(). - * i.e. zeros inserted into MSB on shift because cpu_set_t is - * unsigned. - */ - CPU_ZERO(&src1mask); - for (cpu = 1; cpu < sizeof(cpu_set_t)*8; cpu += 2) - { - CPU_SET(cpu, &src1mask); /* 0b10101010101010101010101010101010 */ - } - assert(CPU_ISSET(sizeof(cpu_set_t)*8-1, &src1mask)); - assert(CPU_COUNT(&src1mask) == (sizeof(cpu_set_t)*4)); - - return 0; -} - -#else - -#include - -int -main() -{ - fprintf(stderr, "Test N/A for this target environment.\n"); - return 0; -} - -#endif +/* + * affinity1.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Basic test of CPU_*() support routines. + * + */ + +#if ! defined(WINCE) + +#include "test.h" + +int +main() +{ + unsigned int cpu; + cpu_set_t newmask; + cpu_set_t src1mask; + cpu_set_t src2mask; + cpu_set_t src3mask; + + CPU_ZERO(&newmask); + CPU_ZERO(&src1mask); + memset(&src2mask, 0, sizeof(cpu_set_t)); + assert(memcmp(&src1mask, &src2mask, sizeof(cpu_set_t)) == 0); + assert(CPU_EQUAL(&src1mask, &src2mask)); + assert(CPU_COUNT(&src1mask) == 0); + + CPU_ZERO(&src1mask); + CPU_ZERO(&src2mask); + CPU_ZERO(&src3mask); + + for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu += 2) + { + CPU_SET(cpu, &src1mask); /* 0b01010101010101010101010101010101 */ + } + for (cpu = 0; cpu < sizeof(cpu_set_t)*4; cpu++) + { + CPU_SET(cpu, &src2mask); /* 0b00000000000000001111111111111111 */ + } + for (cpu = sizeof(cpu_set_t)*4; cpu < sizeof(cpu_set_t)*8; cpu += 2) + { + CPU_SET(cpu, &src2mask); /* 0b01010101010101011111111111111111 */ + } + for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu += 2) + { + CPU_SET(cpu, &src3mask); /* 0b01010101010101010101010101010101 */ + } + + assert(CPU_COUNT(&src1mask) == (sizeof(cpu_set_t)*4)); + assert(CPU_COUNT(&src2mask) == ((sizeof(cpu_set_t)*4 + (sizeof(cpu_set_t)*2)))); + assert(CPU_COUNT(&src3mask) == (sizeof(cpu_set_t)*4)); + CPU_SET(0, &newmask); + CPU_SET(1, &newmask); + CPU_SET(3, &newmask); + assert(CPU_ISSET(1, &newmask)); + CPU_CLR(1, &newmask); + assert(!CPU_ISSET(1, &newmask)); + CPU_OR(&newmask, &src1mask, &src2mask); + assert(CPU_EQUAL(&newmask, &src2mask)); + CPU_AND(&newmask, &src1mask, &src2mask); + assert(CPU_EQUAL(&newmask, &src1mask)); + CPU_XOR(&newmask, &src1mask, &src3mask); + memset(&src2mask, 0, sizeof(cpu_set_t)); + assert(memcmp(&newmask, &src2mask, sizeof(cpu_set_t)) == 0); + + /* + * Need to confirm the bitwise logical right-shift in CpuCount(). + * i.e. zeros inserted into MSB on shift because cpu_set_t is + * unsigned. + */ + CPU_ZERO(&src1mask); + for (cpu = 1; cpu < sizeof(cpu_set_t)*8; cpu += 2) + { + CPU_SET(cpu, &src1mask); /* 0b10101010101010101010101010101010 */ + } + assert(CPU_ISSET(sizeof(cpu_set_t)*8-1, &src1mask)); + assert(CPU_COUNT(&src1mask) == (sizeof(cpu_set_t)*4)); + + return 0; +} + +#else + +#include + +int +main() +{ + fprintf(stderr, "Test N/A for this target environment.\n"); + return 0; +} + +#endif diff --git a/tests/affinity2.c b/tests/affinity2.c index 29963eac..f5bfa352 100644 --- a/tests/affinity2.c +++ b/tests/affinity2.c @@ -1,117 +1,114 @@ -/* - * affinity2.c - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Have the process switch CPUs. - * - */ - -#if ! defined(WINCE) - -#include "test.h" - -int -main() -{ - unsigned int cpu; - int result; - cpu_set_t newmask; - cpu_set_t mask; - cpu_set_t switchmask; - cpu_set_t flipmask; - - CPU_ZERO(&mask); - CPU_ZERO(&switchmask); - CPU_ZERO(&flipmask); - - for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu += 2) - { - CPU_SET(cpu, &switchmask); /* 0b01010101010101010101010101010101 */ - } - for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu++) - { - CPU_SET(cpu, &flipmask); /* 0b11111111111111111111111111111111 */ - } - - assert(sched_getaffinity(0, sizeof(cpu_set_t), &newmask) == 0); - assert(!CPU_EQUAL(&newmask, &mask)); - - result = sched_setaffinity(0, sizeof(cpu_set_t), &newmask); - if (result != 0) - { - int err = -#if defined (__PTW32_USES_SEPARATE_CRT) - GetLastError(); -#else - errno; -#endif - - assert(err != ESRCH); - assert(err != EFAULT); - assert(err != EPERM); - assert(err != EINVAL); - assert(err != EAGAIN); - assert(err == ENOSYS); - assert(CPU_COUNT(&mask) == 1); - } - else - { - if (CPU_COUNT(&mask) > 1) - { - CPU_AND(&newmask, &mask, &switchmask); /* Remove every other CPU */ - assert(sched_setaffinity(0, sizeof(cpu_set_t), &newmask) == 0); - assert(sched_getaffinity(0, sizeof(cpu_set_t), &mask) == 0); - CPU_XOR(&newmask, &mask, &flipmask); /* Switch to all alternative CPUs */ - assert(sched_setaffinity(0, sizeof(cpu_set_t), &newmask) == 0); - assert(sched_getaffinity(0, sizeof(cpu_set_t), &mask) == 0); - assert(!CPU_EQUAL(&newmask, &mask)); - } - } - - return 0; -} - -#else - -#include - -int -main() -{ - fprintf(stderr, "Test N/A for this target environment.\n"); - return 0; -} - -#endif +/* + * affinity2.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Have the process switch CPUs. + * + */ + +#if ! defined(WINCE) + +#include "test.h" + +int +main() +{ + unsigned int cpu; + int result; + cpu_set_t newmask; + cpu_set_t mask; + cpu_set_t switchmask; + cpu_set_t flipmask; + + CPU_ZERO(&mask); + CPU_ZERO(&switchmask); + CPU_ZERO(&flipmask); + + for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu += 2) + { + CPU_SET(cpu, &switchmask); /* 0b01010101010101010101010101010101 */ + } + for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu++) + { + CPU_SET(cpu, &flipmask); /* 0b11111111111111111111111111111111 */ + } + + assert(sched_getaffinity(0, sizeof(cpu_set_t), &newmask) == 0); + assert(!CPU_EQUAL(&newmask, &mask)); + + result = sched_setaffinity(0, sizeof(cpu_set_t), &newmask); + if (result != 0) + { + int err = +#if defined (__PTW32_USES_SEPARATE_CRT) + GetLastError(); +#else + errno; +#endif + + assert(err != ESRCH); + assert(err != EFAULT); + assert(err != EPERM); + assert(err != EINVAL); + assert(err != EAGAIN); + assert(err == ENOSYS); + assert(CPU_COUNT(&mask) == 1); + } + else + { + if (CPU_COUNT(&mask) > 1) + { + CPU_AND(&newmask, &mask, &switchmask); /* Remove every other CPU */ + assert(sched_setaffinity(0, sizeof(cpu_set_t), &newmask) == 0); + assert(sched_getaffinity(0, sizeof(cpu_set_t), &mask) == 0); + CPU_XOR(&newmask, &mask, &flipmask); /* Switch to all alternative CPUs */ + assert(sched_setaffinity(0, sizeof(cpu_set_t), &newmask) == 0); + assert(sched_getaffinity(0, sizeof(cpu_set_t), &mask) == 0); + assert(!CPU_EQUAL(&newmask, &mask)); + } + } + + return 0; +} + +#else + +#include + +int +main() +{ + fprintf(stderr, "Test N/A for this target environment.\n"); + return 0; +} + +#endif diff --git a/tests/affinity3.c b/tests/affinity3.c index fa5de857..27c11e42 100644 --- a/tests/affinity3.c +++ b/tests/affinity3.c @@ -1,120 +1,117 @@ -/* - * affinity3.c - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Have the thread switch CPUs. - * - */ - -#if ! defined(WINCE) - -#include "test.h" - -int -main() -{ - int result; - unsigned int cpu; - cpu_set_t newmask; - cpu_set_t processCpus; - cpu_set_t mask; - cpu_set_t switchmask; - cpu_set_t flipmask; - pthread_t self = pthread_self(); - - CPU_ZERO(&mask); - CPU_ZERO(&switchmask); - CPU_ZERO(&flipmask); - - if (pthread_getaffinity_np(self, sizeof(cpu_set_t), &processCpus) == ENOSYS) - { - printf("pthread_get/set_affinity_np API not supported for this platform: skipping test."); - return 0; - } - assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &processCpus) == 0); - printf("This thread has a starting affinity with %d CPUs\n", CPU_COUNT(&processCpus)); - assert(!CPU_EQUAL(&mask, &processCpus)); - - for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu += 2) - { - CPU_SET(cpu, &switchmask); /* 0b01010101010101010101010101010101 */ - } - for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu++) - { - CPU_SET(cpu, &flipmask); /* 0b11111111111111111111111111111111 */ - } - - result = pthread_setaffinity_np(self, sizeof(cpu_set_t), &processCpus); - if (result != 0) - { - assert(result != ESRCH); - assert(result != EFAULT); - assert(result != EPERM); - assert(result != EINVAL); - assert(result != EAGAIN); - assert(result == ENOSYS); - assert(CPU_COUNT(&mask) == 1); - } - else - { - if (CPU_COUNT(&mask) > 1) - { - CPU_AND(&newmask, &processCpus, &switchmask); /* Remove every other CPU */ - assert(pthread_setaffinity_np(self, sizeof(cpu_set_t), &newmask) == 0); - assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &mask) == 0); - assert(CPU_EQUAL(&mask, &newmask)); - CPU_XOR(&newmask, &mask, &flipmask); /* Switch to all alternative CPUs */ - assert(!CPU_EQUAL(&mask, &newmask)); - assert(pthread_setaffinity_np(self, sizeof(cpu_set_t), &newmask) == 0); - assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &mask) == 0); - assert(CPU_EQUAL(&mask, &newmask)); - } - } - - return 0; -} - -#else - -#include - -int -main() -{ - fprintf(stderr, "Test N/A for this target environment.\n"); - return 0; -} - -#endif +/* + * affinity3.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Have the thread switch CPUs. + * + */ + +#if ! defined(WINCE) + +#include "test.h" + +int +main() +{ + int result; + unsigned int cpu; + cpu_set_t newmask; + cpu_set_t processCpus; + cpu_set_t mask; + cpu_set_t switchmask; + cpu_set_t flipmask; + pthread_t self = pthread_self(); + + CPU_ZERO(&mask); + CPU_ZERO(&switchmask); + CPU_ZERO(&flipmask); + + if (pthread_getaffinity_np(self, sizeof(cpu_set_t), &processCpus) == ENOSYS) + { + printf("pthread_get/set_affinity_np API not supported for this platform: skipping test."); + return 0; + } + assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &processCpus) == 0); + printf("This thread has a starting affinity with %d CPUs\n", CPU_COUNT(&processCpus)); + assert(!CPU_EQUAL(&mask, &processCpus)); + + for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu += 2) + { + CPU_SET(cpu, &switchmask); /* 0b01010101010101010101010101010101 */ + } + for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu++) + { + CPU_SET(cpu, &flipmask); /* 0b11111111111111111111111111111111 */ + } + + result = pthread_setaffinity_np(self, sizeof(cpu_set_t), &processCpus); + if (result != 0) + { + assert(result != ESRCH); + assert(result != EFAULT); + assert(result != EPERM); + assert(result != EINVAL); + assert(result != EAGAIN); + assert(result == ENOSYS); + assert(CPU_COUNT(&mask) == 1); + } + else + { + if (CPU_COUNT(&mask) > 1) + { + CPU_AND(&newmask, &processCpus, &switchmask); /* Remove every other CPU */ + assert(pthread_setaffinity_np(self, sizeof(cpu_set_t), &newmask) == 0); + assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &mask) == 0); + assert(CPU_EQUAL(&mask, &newmask)); + CPU_XOR(&newmask, &mask, &flipmask); /* Switch to all alternative CPUs */ + assert(!CPU_EQUAL(&mask, &newmask)); + assert(pthread_setaffinity_np(self, sizeof(cpu_set_t), &newmask) == 0); + assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &mask) == 0); + assert(CPU_EQUAL(&mask, &newmask)); + } + } + + return 0; +} + +#else + +#include + +int +main() +{ + fprintf(stderr, "Test N/A for this target environment.\n"); + return 0; +} + +#endif diff --git a/tests/affinity4.c b/tests/affinity4.c index ac1bfcb4..b189d443 100644 --- a/tests/affinity4.c +++ b/tests/affinity4.c @@ -1,91 +1,88 @@ -/* - * affinity4.c - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Test thread CPU affinity setting. - * - */ - -#if ! defined(WINCE) - -#include "test.h" - -int -main() -{ - unsigned int cpu; - cpu_set_t threadCpus; - DWORD_PTR vThreadMask; - cpu_set_t keepCpus; - pthread_t self = pthread_self(); - - if (pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == ENOSYS) - { - printf("pthread_get/set_affinity_np API not supported for this platform: skipping test."); - return 0; - } - - CPU_ZERO(&keepCpus); - for (cpu = 1; cpu < sizeof(cpu_set_t)*8; cpu += 2) - { - CPU_SET(cpu, &keepCpus); /* 0b10101010101010101010101010101010 */ - } - - assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == 0); - if (CPU_COUNT(&threadCpus) > 1) - { - CPU_AND(&threadCpus, &threadCpus, &keepCpus); - vThreadMask = SetThreadAffinityMask(GetCurrentThread(), (*(PDWORD_PTR)&threadCpus) /* Violating Opacity */); - assert(pthread_setaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == 0); - vThreadMask = SetThreadAffinityMask(GetCurrentThread(), vThreadMask); - assert(vThreadMask != 0); - assert(memcmp(&vThreadMask, &threadCpus, sizeof(DWORD_PTR)) == 0); - } - - return 0; -} - -#else - -#include - -int -main() -{ - fprintf(stderr, "Test N/A for this target environment.\n"); - return 0; -} - -#endif +/* + * affinity4.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Test thread CPU affinity setting. + * + */ + +#if ! defined(WINCE) + +#include "test.h" + +int +main() +{ + unsigned int cpu; + cpu_set_t threadCpus; + DWORD_PTR vThreadMask; + cpu_set_t keepCpus; + pthread_t self = pthread_self(); + + if (pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == ENOSYS) + { + printf("pthread_get/set_affinity_np API not supported for this platform: skipping test."); + return 0; + } + + CPU_ZERO(&keepCpus); + for (cpu = 1; cpu < sizeof(cpu_set_t)*8; cpu += 2) + { + CPU_SET(cpu, &keepCpus); /* 0b10101010101010101010101010101010 */ + } + + assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == 0); + if (CPU_COUNT(&threadCpus) > 1) + { + CPU_AND(&threadCpus, &threadCpus, &keepCpus); + vThreadMask = SetThreadAffinityMask(GetCurrentThread(), (*(PDWORD_PTR)&threadCpus) /* Violating Opacity */); + assert(pthread_setaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == 0); + vThreadMask = SetThreadAffinityMask(GetCurrentThread(), vThreadMask); + assert(vThreadMask != 0); + assert(memcmp(&vThreadMask, &threadCpus, sizeof(DWORD_PTR)) == 0); + } + + return 0; +} + +#else + +#include + +int +main() +{ + fprintf(stderr, "Test N/A for this target environment.\n"); + return 0; +} + +#endif diff --git a/tests/affinity5.c b/tests/affinity5.c index 9615bc8f..51ac7447 100644 --- a/tests/affinity5.c +++ b/tests/affinity5.c @@ -1,124 +1,121 @@ -/* - * affinity5.c - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Test thread CPU affinity inheritance. - * - */ - -#if ! defined(WINCE) - -#include "test.h" - -typedef union -{ - /* Violates opacity */ - cpu_set_t cpuset; - unsigned long int bits; /* To stop GCC complaining about %lx args to printf */ -} cpuset_to_ulint; - -void * -mythread(void * arg) -{ - HANDLE threadH = GetCurrentThread(); - cpu_set_t *parentCpus = (cpu_set_t*) arg; - cpu_set_t threadCpus; - DWORD_PTR vThreadMask; - cpuset_to_ulint a, b; - - assert(pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &threadCpus) == 0); - assert(CPU_EQUAL(parentCpus, &threadCpus)); - vThreadMask = SetThreadAffinityMask(threadH, (*(PDWORD_PTR)&threadCpus) /* Violating Opacity */); - assert(vThreadMask != 0); - assert(memcmp(&vThreadMask, &threadCpus, sizeof(DWORD_PTR)) == 0); - a.cpuset = *parentCpus; - b.cpuset = threadCpus; - /* Violates opacity */ - printf("CPU affinity: Parent/Thread = 0x%lx/0x%lx\n", a.bits, b.bits); - - return (void*) 0; -} - -int -main() -{ - unsigned int cpu; - pthread_t tid; - cpu_set_t threadCpus; - DWORD_PTR vThreadMask; - cpu_set_t keepCpus; - pthread_t self = pthread_self(); - - if (pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == ENOSYS) - { - printf("pthread_get/set_affinity_np API not supported for this platform: skipping test."); - return 0; - } - - CPU_ZERO(&keepCpus); - for (cpu = 1; cpu < sizeof(cpu_set_t)*8; cpu += 2) - { - CPU_SET(cpu, &keepCpus); /* 0b10101010101010101010101010101010 */ - } - - assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == 0); - if (CPU_COUNT(&threadCpus) > 1) - { - assert(pthread_create(&tid, NULL, mythread, (void*)&threadCpus) == 0); - assert(pthread_join(tid, NULL) == 0); - CPU_AND(&threadCpus, &threadCpus, &keepCpus); - assert(pthread_setaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == 0); - vThreadMask = SetThreadAffinityMask(GetCurrentThread(), (*(PDWORD_PTR)&threadCpus) /* Violating Opacity */); - assert(vThreadMask != 0); - assert(memcmp(&vThreadMask, &threadCpus, sizeof(DWORD_PTR)) == 0); - assert(pthread_create(&tid, NULL, mythread, (void*)&threadCpus) == 0); - assert(pthread_join(tid, NULL) == 0); - } - - return 0; -} - -#else - -#include - -int -main() -{ - fprintf(stderr, "Test N/A for this target environment.\n"); - return 0; -} - -#endif +/* + * affinity5.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Test thread CPU affinity inheritance. + * + */ + +#if ! defined(WINCE) + +#include "test.h" + +typedef union +{ + /* Violates opacity */ + cpu_set_t cpuset; + unsigned long int bits; /* To stop GCC complaining about %lx args to printf */ +} cpuset_to_ulint; + +void * +mythread(void * arg) +{ + HANDLE threadH = GetCurrentThread(); + cpu_set_t *parentCpus = (cpu_set_t*) arg; + cpu_set_t threadCpus; + DWORD_PTR vThreadMask; + cpuset_to_ulint a, b; + + assert(pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &threadCpus) == 0); + assert(CPU_EQUAL(parentCpus, &threadCpus)); + vThreadMask = SetThreadAffinityMask(threadH, (*(PDWORD_PTR)&threadCpus) /* Violating Opacity */); + assert(vThreadMask != 0); + assert(memcmp(&vThreadMask, &threadCpus, sizeof(DWORD_PTR)) == 0); + a.cpuset = *parentCpus; + b.cpuset = threadCpus; + /* Violates opacity */ + printf("CPU affinity: Parent/Thread = 0x%lx/0x%lx\n", a.bits, b.bits); + + return (void*) 0; +} + +int +main() +{ + unsigned int cpu; + pthread_t tid; + cpu_set_t threadCpus; + DWORD_PTR vThreadMask; + cpu_set_t keepCpus; + pthread_t self = pthread_self(); + + if (pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == ENOSYS) + { + printf("pthread_get/set_affinity_np API not supported for this platform: skipping test."); + return 0; + } + + CPU_ZERO(&keepCpus); + for (cpu = 1; cpu < sizeof(cpu_set_t)*8; cpu += 2) + { + CPU_SET(cpu, &keepCpus); /* 0b10101010101010101010101010101010 */ + } + + assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == 0); + if (CPU_COUNT(&threadCpus) > 1) + { + assert(pthread_create(&tid, NULL, mythread, (void*)&threadCpus) == 0); + assert(pthread_join(tid, NULL) == 0); + CPU_AND(&threadCpus, &threadCpus, &keepCpus); + assert(pthread_setaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == 0); + vThreadMask = SetThreadAffinityMask(GetCurrentThread(), (*(PDWORD_PTR)&threadCpus) /* Violating Opacity */); + assert(vThreadMask != 0); + assert(memcmp(&vThreadMask, &threadCpus, sizeof(DWORD_PTR)) == 0); + assert(pthread_create(&tid, NULL, mythread, (void*)&threadCpus) == 0); + assert(pthread_join(tid, NULL) == 0); + } + + return 0; +} + +#else + +#include + +int +main() +{ + fprintf(stderr, "Test N/A for this target environment.\n"); + return 0; +} + +#endif diff --git a/tests/affinity6.c b/tests/affinity6.c index c3b8332d..dceab703 100644 --- a/tests/affinity6.c +++ b/tests/affinity6.c @@ -1,119 +1,116 @@ -/* - * affinity6.c - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Test thread CPU affinity from thread attributes. - * - */ - -#if ! defined(WINCE) - -#include "test.h" - -typedef union -{ - /* Violates opacity */ - cpu_set_t cpuset; - unsigned long int bits; /* To stop GCC complaining about %lx args to printf */ -} cpuset_to_ulint; - -void * -mythread(void * arg) -{ - pthread_attr_t *attrPtr = (pthread_attr_t *) arg; - cpu_set_t threadCpus, attrCpus; - - assert(pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &threadCpus) == 0); - assert(pthread_attr_getaffinity_np(attrPtr, sizeof(cpu_set_t), &attrCpus) == 0); - assert(CPU_EQUAL(&attrCpus, &threadCpus)); - - return (void*) 0; -} - -int -main() -{ - unsigned int cpu; - pthread_t tid; - pthread_attr_t attr1, attr2; - cpu_set_t threadCpus; - cpu_set_t keepCpus; - pthread_t self = pthread_self(); - - if (pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == ENOSYS) - { - printf("pthread_get/set_affinity_np API not supported for this platform: skipping test."); - return 0; - } - - assert(pthread_attr_init(&attr1) == 0); - assert(pthread_attr_init(&attr2) == 0); - - CPU_ZERO(&keepCpus); - for (cpu = 1; cpu < sizeof(cpu_set_t)*8; cpu += 2) - { - CPU_SET(cpu, &keepCpus); /* 0b10101010101010101010101010101010 */ - } - - assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == 0); - - if (CPU_COUNT(&threadCpus) > 1) - { - assert(pthread_attr_setaffinity_np(&attr1, sizeof(cpu_set_t), &threadCpus) == 0); - CPU_AND(&threadCpus, &threadCpus, &keepCpus); - assert(pthread_attr_setaffinity_np(&attr2, sizeof(cpu_set_t), &threadCpus) == 0); - - assert(pthread_create(&tid, &attr1, mythread, (void *) &attr1) == 0); - assert(pthread_join(tid, NULL) == 0); - assert(pthread_create(&tid, &attr2, mythread, (void *) &attr2) == 0); - assert(pthread_join(tid, NULL) == 0); - } - assert(pthread_attr_destroy(&attr1) == 0); - assert(pthread_attr_destroy(&attr2) == 0); - return 0; -} - -#else - -#include - -int -main() -{ - fprintf(stderr, "Test N/A for this target environment.\n"); - return 0; -} - -#endif +/* + * affinity6.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Test thread CPU affinity from thread attributes. + * + */ + +#if ! defined(WINCE) + +#include "test.h" + +typedef union +{ + /* Violates opacity */ + cpu_set_t cpuset; + unsigned long int bits; /* To stop GCC complaining about %lx args to printf */ +} cpuset_to_ulint; + +void * +mythread(void * arg) +{ + pthread_attr_t *attrPtr = (pthread_attr_t *) arg; + cpu_set_t threadCpus, attrCpus; + + assert(pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &threadCpus) == 0); + assert(pthread_attr_getaffinity_np(attrPtr, sizeof(cpu_set_t), &attrCpus) == 0); + assert(CPU_EQUAL(&attrCpus, &threadCpus)); + + return (void*) 0; +} + +int +main() +{ + unsigned int cpu; + pthread_t tid; + pthread_attr_t attr1, attr2; + cpu_set_t threadCpus; + cpu_set_t keepCpus; + pthread_t self = pthread_self(); + + if (pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == ENOSYS) + { + printf("pthread_get/set_affinity_np API not supported for this platform: skipping test."); + return 0; + } + + assert(pthread_attr_init(&attr1) == 0); + assert(pthread_attr_init(&attr2) == 0); + + CPU_ZERO(&keepCpus); + for (cpu = 1; cpu < sizeof(cpu_set_t)*8; cpu += 2) + { + CPU_SET(cpu, &keepCpus); /* 0b10101010101010101010101010101010 */ + } + + assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == 0); + + if (CPU_COUNT(&threadCpus) > 1) + { + assert(pthread_attr_setaffinity_np(&attr1, sizeof(cpu_set_t), &threadCpus) == 0); + CPU_AND(&threadCpus, &threadCpus, &keepCpus); + assert(pthread_attr_setaffinity_np(&attr2, sizeof(cpu_set_t), &threadCpus) == 0); + + assert(pthread_create(&tid, &attr1, mythread, (void *) &attr1) == 0); + assert(pthread_join(tid, NULL) == 0); + assert(pthread_create(&tid, &attr2, mythread, (void *) &attr2) == 0); + assert(pthread_join(tid, NULL) == 0); + } + assert(pthread_attr_destroy(&attr1) == 0); + assert(pthread_attr_destroy(&attr2) == 0); + return 0; +} + +#else + +#include + +int +main() +{ + fprintf(stderr, "Test N/A for this target environment.\n"); + return 0; +} + +#endif diff --git a/tests/barrier1.c b/tests/barrier1.c index cff727b9..0e566911 100644 --- a/tests/barrier1.c +++ b/tests/barrier1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/barrier2.c b/tests/barrier2.c index 1afd8d07..1b9c62ef 100644 --- a/tests/barrier2.c +++ b/tests/barrier2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/barrier3.c b/tests/barrier3.c index a3145519..8fc22055 100644 --- a/tests/barrier3.c +++ b/tests/barrier3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/barrier4.c b/tests/barrier4.c index 7c427e58..27a5ef78 100644 --- a/tests/barrier4.c +++ b/tests/barrier4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/barrier5.c b/tests/barrier5.c index 86e69838..c4529160 100644 --- a/tests/barrier5.c +++ b/tests/barrier5.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/barrier6.c b/tests/barrier6.c index d4d82145..1c3e1cee 100755 --- a/tests/barrier6.c +++ b/tests/barrier6.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/benchlib.c b/tests/benchlib.c index 259c2aec..7c16390c 100644 --- a/tests/benchlib.c +++ b/tests/benchlib.c @@ -3,33 +3,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * */ diff --git a/tests/benchtest.h b/tests/benchtest.h index 5c798452..781bffb3 100644 --- a/tests/benchtest.h +++ b/tests/benchtest.h @@ -3,33 +3,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * */ diff --git a/tests/benchtest1.c b/tests/benchtest1.c index 193d3c76..a442a051 100644 --- a/tests/benchtest1.c +++ b/tests/benchtest1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/benchtest2.c b/tests/benchtest2.c index fd25a3df..323807b0 100644 --- a/tests/benchtest2.c +++ b/tests/benchtest2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/benchtest3.c b/tests/benchtest3.c index 824c407a..244c81c7 100644 --- a/tests/benchtest3.c +++ b/tests/benchtest3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/benchtest4.c b/tests/benchtest4.c index 9e303532..084ba1b5 100644 --- a/tests/benchtest4.c +++ b/tests/benchtest4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/benchtest5.c b/tests/benchtest5.c index beda4726..ed662af8 100644 --- a/tests/benchtest5.c +++ b/tests/benchtest5.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cancel1.c b/tests/cancel1.c index f93c497b..2eb0c1d9 100644 --- a/tests/cancel1.c +++ b/tests/cancel1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cancel2.c b/tests/cancel2.c index 1e80e668..2c473246 100644 --- a/tests/cancel2.c +++ b/tests/cancel2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cancel3.c b/tests/cancel3.c index 9ccd490a..9cbcc000 100644 --- a/tests/cancel3.c +++ b/tests/cancel3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cancel4.c b/tests/cancel4.c index 4267f172..e99bc756 100644 --- a/tests/cancel4.c +++ b/tests/cancel4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cancel5.c b/tests/cancel5.c index 033ecf10..6cfff573 100644 --- a/tests/cancel5.c +++ b/tests/cancel5.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cancel6a.c b/tests/cancel6a.c index e5da0789..cf60f970 100644 --- a/tests/cancel6a.c +++ b/tests/cancel6a.c @@ -2,25 +2,30 @@ * File: cancel6a.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright (C) 1998 Ben Elliston and Ross Johnson - * Copyright (C) 1999,2000,2001 Ross Johnson + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Contact Email: rpj@ise.canberra.edu.au + * Homepage: https://sourceforge.net/projects/pthreads4w/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cancel6d.c b/tests/cancel6d.c index f94ed5ac..5c341050 100644 --- a/tests/cancel6d.c +++ b/tests/cancel6d.c @@ -2,25 +2,30 @@ * File: cancel6d.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright (C) 1998 Ben Elliston and Ross Johnson - * Copyright (C) 1999,2000,2001 Ross Johnson + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Contact Email: rpj@ise.canberra.edu.au + * Homepage: https://sourceforge.net/projects/pthreads4w/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cancel7.c b/tests/cancel7.c index cdd8b156..6d647d29 100644 --- a/tests/cancel7.c +++ b/tests/cancel7.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cancel8.c b/tests/cancel8.c index 697593f6..6cbe61e7 100644 --- a/tests/cancel8.c +++ b/tests/cancel8.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cancel9.c b/tests/cancel9.c index d9bab65a..6f21e7e7 100644 --- a/tests/cancel9.c +++ b/tests/cancel9.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cleanup0.c b/tests/cleanup0.c index 888640b7..e547f7a6 100644 --- a/tests/cleanup0.c +++ b/tests/cleanup0.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cleanup1.c b/tests/cleanup1.c index 08c63bdd..bf67f605 100644 --- a/tests/cleanup1.c +++ b/tests/cleanup1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cleanup2.c b/tests/cleanup2.c index 52a804e6..ed2f003e 100644 --- a/tests/cleanup2.c +++ b/tests/cleanup2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cleanup3.c b/tests/cleanup3.c index 7d6a4b96..394f5f7e 100644 --- a/tests/cleanup3.c +++ b/tests/cleanup3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/common.mk b/tests/common.mk index 4552b058..1e652769 100644 --- a/tests/common.mk +++ b/tests/common.mk @@ -1,60 +1,60 @@ -# -# Common elements to all makefiles -# - -ALL_KNOWN_TESTS = \ - affinity1 affinity2 affinity3 affinity4 affinity5 affinity6 \ - barrier1 barrier2 barrier3 barrier4 barrier5 barrier6 \ - cancel1 cancel2 cancel3 cancel4 cancel5 cancel6a cancel6d \ - cancel7 cancel8 cancel9 \ - cleanup0 cleanup1 cleanup2 cleanup3 \ - condvar1 condvar1_1 condvar1_2 condvar2 condvar2_1 \ - condvar3 condvar3_1 condvar3_2 condvar3_3 \ - condvar4 condvar5 condvar6 \ - condvar7 condvar8 condvar9 \ - timeouts \ - count1 \ - context1 \ - create1 create2 create3 \ - delay1 delay2 \ - detach1 \ - equal1 \ - errno1 \ - exception1 exception2 exception3_0 exception3 \ - exit1 exit2 exit3 exit4 exit5 exit6 \ - eyal1 \ - join0 join1 join2 join3 join4 \ - kill1 \ - mutex1 mutex1n mutex1e mutex1r \ - mutex2 mutex2r mutex2e mutex3 mutex3r mutex3e \ - mutex4 mutex5 mutex6 mutex6n mutex6e mutex6r \ - mutex6s mutex6es mutex6rs \ - mutex7 mutex7n mutex7e mutex7r \ - mutex8 mutex8n mutex8e mutex8r \ - name_np1 name_np2 \ - once1 once2 once3 once4 \ - priority1 priority2 inherit1 \ - reinit1 \ - reuse1 reuse2 \ - robust1 robust2 robust3 robust4 robust5 \ - rwlock1 rwlock2 rwlock3 rwlock4 \ - rwlock2_t rwlock3_t rwlock4_t rwlock5_t rwlock6_t rwlock6_t2 \ - rwlock5 rwlock6 rwlock7 rwlock7_1 rwlock8 rwlock8_1 \ - self1 self2 \ - semaphore1 semaphore2 semaphore3 \ - semaphore4 semaphore4t semaphore5 \ - sequence1 \ - sizes \ - spin1 spin2 spin3 spin4 \ - stress1 threestage \ - tsd1 tsd2 tsd3 \ - valid1 valid2 - -TESTS = $(ALL_KNOWN_TESTS) - -BENCHTESTS = \ - benchtest1 benchtest2 benchtest3 benchtest4 benchtest5 - -# Output useful info if no target given. I.e. the first target that "make" sees is used in this case. -default_target: help +# +# Common elements to all makefiles +# + +ALL_KNOWN_TESTS = \ + affinity1 affinity2 affinity3 affinity4 affinity5 affinity6 \ + barrier1 barrier2 barrier3 barrier4 barrier5 barrier6 \ + cancel1 cancel2 cancel3 cancel4 cancel5 cancel6a cancel6d \ + cancel7 cancel8 cancel9 \ + cleanup0 cleanup1 cleanup2 cleanup3 \ + condvar1 condvar1_1 condvar1_2 condvar2 condvar2_1 \ + condvar3 condvar3_1 condvar3_2 condvar3_3 \ + condvar4 condvar5 condvar6 \ + condvar7 condvar8 condvar9 \ + timeouts \ + count1 \ + context1 \ + create1 create2 create3 \ + delay1 delay2 \ + detach1 \ + equal1 \ + errno1 \ + exception1 exception2 exception3_0 exception3 \ + exit1 exit2 exit3 exit4 exit5 exit6 \ + eyal1 \ + join0 join1 join2 join3 join4 \ + kill1 \ + mutex1 mutex1n mutex1e mutex1r \ + mutex2 mutex2r mutex2e mutex3 mutex3r mutex3e \ + mutex4 mutex5 mutex6 mutex6n mutex6e mutex6r \ + mutex6s mutex6es mutex6rs \ + mutex7 mutex7n mutex7e mutex7r \ + mutex8 mutex8n mutex8e mutex8r \ + name_np1 name_np2 \ + once1 once2 once3 once4 \ + priority1 priority2 inherit1 \ + reinit1 \ + reuse1 reuse2 \ + robust1 robust2 robust3 robust4 robust5 \ + rwlock1 rwlock2 rwlock3 rwlock4 \ + rwlock2_t rwlock3_t rwlock4_t rwlock5_t rwlock6_t rwlock6_t2 \ + rwlock5 rwlock6 rwlock7 rwlock7_1 rwlock8 rwlock8_1 \ + self1 self2 \ + semaphore1 semaphore2 semaphore3 \ + semaphore4 semaphore4t semaphore5 \ + sequence1 \ + sizes \ + spin1 spin2 spin3 spin4 \ + stress1 threestage \ + tsd1 tsd2 tsd3 \ + valid1 valid2 + +TESTS = $(ALL_KNOWN_TESTS) + +BENCHTESTS = \ + benchtest1 benchtest2 benchtest3 benchtest4 benchtest5 + +# Output useful info if no target given. I.e. the first target that "make" sees is used in this case. +default_target: help \ No newline at end of file diff --git a/tests/condvar1.c b/tests/condvar1.c index 303a87b8..be495d1d 100644 --- a/tests/condvar1.c +++ b/tests/condvar1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar1_1.c b/tests/condvar1_1.c index 565697e5..d006c0fb 100644 --- a/tests/condvar1_1.c +++ b/tests/condvar1_1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar1_2.c b/tests/condvar1_2.c index 61185518..7b806e4d 100644 --- a/tests/condvar1_2.c +++ b/tests/condvar1_2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar2.c b/tests/condvar2.c index 2ca309f1..ccae417c 100644 --- a/tests/condvar2.c +++ b/tests/condvar2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar2_1.c b/tests/condvar2_1.c index bf8170ca..5fe5eb32 100644 --- a/tests/condvar2_1.c +++ b/tests/condvar2_1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar3.c b/tests/condvar3.c index c9943ff8..e55fa795 100644 --- a/tests/condvar3.c +++ b/tests/condvar3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar3_1.c b/tests/condvar3_1.c index 16f0a64a..d763e20f 100644 --- a/tests/condvar3_1.c +++ b/tests/condvar3_1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar3_2.c b/tests/condvar3_2.c index 909f6a19..9aad4053 100644 --- a/tests/condvar3_2.c +++ b/tests/condvar3_2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar3_3.c b/tests/condvar3_3.c index 54702847..825ba312 100644 --- a/tests/condvar3_3.c +++ b/tests/condvar3_3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar4.c b/tests/condvar4.c index a63104fd..70c04455 100644 --- a/tests/condvar4.c +++ b/tests/condvar4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar5.c b/tests/condvar5.c index feeefbcd..7a579515 100644 --- a/tests/condvar5.c +++ b/tests/condvar5.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar6.c b/tests/condvar6.c index 1e4baf2c..43873613 100644 --- a/tests/condvar6.c +++ b/tests/condvar6.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar7.c b/tests/condvar7.c index f1fc30ee..9aff62c6 100644 --- a/tests/condvar7.c +++ b/tests/condvar7.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar8.c b/tests/condvar8.c index a2e0931a..29a5cb4b 100644 --- a/tests/condvar8.c +++ b/tests/condvar8.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar9.c b/tests/condvar9.c index d928fc1e..1f3196b4 100644 --- a/tests/condvar9.c +++ b/tests/condvar9.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/context1.c b/tests/context1.c index 22b0609c..cd6dd86c 100644 --- a/tests/context1.c +++ b/tests/context1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/context2.c b/tests/context2.c index caca5a60..f8a19429 100644 --- a/tests/context2.c +++ b/tests/context2.c @@ -1,159 +1,157 @@ -/* - * File: context2.c - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2005 Pthreads-win32 contributors - * - * Contact Email: rpj@callisto.canberra.edu.au - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Test Synopsis: Test context switching method. - * - * Test Method (Validation or Falsification): - * - - * - * Requirements Tested: - * - - * - * Features Tested: - * - - * - * Cases Tested: - * - - * - * Description: - * - - * - * Environment: - * - - * - * Input: - * - None. - * - * Output: - * - File name, Line number, and failed expression on failure. - * - No output on success. - * - * Assumptions: - * - pthread_create - * pthread_exit - * - * Pass Criteria: - * - Process returns zero exit status. - * - * Fail Criteria: - * - Process returns non-zero exit status. - */ - -#define _WIN32_WINNT 0x400 - -#include "test.h" -/* Cheating here - sneaking a peek at library internals */ -#include "../config.h" -#include "../implement.h" -#include "../context.h" - -static int washere = 0; -static volatile size_t tree_counter = 0; - -#ifdef _MSC_VER -# pragma inline_depth(0) -# pragma optimize("g", off) -#endif - -static size_t tree(size_t depth) -{ - if (! depth--) - return tree_counter++; - - return tree(depth) + tree(depth); -} - -static void * func(void * arg) -{ - washere = 1; - - return (void *) tree(64); -} - -static void -anotherEnding () -{ - /* - * Switched context - */ - washere++; - pthread_exit(0); -} - -#ifdef _MSC_VER -# pragma inline_depth() -# pragma optimize("", on) -#endif - -int -main() -{ - pthread_t t; - HANDLE hThread; - - assert(pthread_create(&t, NULL, func, NULL) == 0); - - hThread = ((__ptw32_thread_t *)t.p)->threadH; - - Sleep(500); - - SuspendThread(hThread); - - if (WaitForSingleObject(hThread, 0) == WAIT_TIMEOUT) - { - /* - * Ok, thread did not exit before we got to it. - */ - CONTEXT context; - - context.ContextFlags = CONTEXT_CONTROL; - - GetThreadContext(hThread, &context); - __PTW32_PROGCTR (context) = (DWORD_PTR) anotherEnding; - SetThreadContext(hThread, &context); - ResumeThread(hThread); - } - else - { - printf("Exited early\n"); - fflush(stdout); - } - - Sleep(1000); - - assert(washere == 2); - - return 0; -} +/* + * File: context2.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Test Synopsis: Test context switching method. + * + * Test Method (Validation or Falsification): + * - + * + * Requirements Tested: + * - + * + * Features Tested: + * - + * + * Cases Tested: + * - + * + * Description: + * - + * + * Environment: + * - + * + * Input: + * - None. + * + * Output: + * - File name, Line number, and failed expression on failure. + * - No output on success. + * + * Assumptions: + * - pthread_create + * pthread_exit + * + * Pass Criteria: + * - Process returns zero exit status. + * + * Fail Criteria: + * - Process returns non-zero exit status. + */ + +#define _WIN32_WINNT 0x400 + +#include "test.h" +/* Cheating here - sneaking a peek at library internals */ +#include "../config.h" +#include "../implement.h" +#include "../context.h" + +static int washere = 0; +static volatile size_t tree_counter = 0; + +#ifdef _MSC_VER +# pragma inline_depth(0) +# pragma optimize("g", off) +#endif + +static size_t tree(size_t depth) +{ + if (! depth--) + return tree_counter++; + + return tree(depth) + tree(depth); +} + +static void * func(void * arg) +{ + washere = 1; + + return (void *) tree(64); +} + +static void +anotherEnding () +{ + /* + * Switched context + */ + washere++; + pthread_exit(0); +} + +#ifdef _MSC_VER +# pragma inline_depth() +# pragma optimize("", on) +#endif + +int +main() +{ + pthread_t t; + HANDLE hThread; + + assert(pthread_create(&t, NULL, func, NULL) == 0); + + hThread = ((__ptw32_thread_t *)t.p)->threadH; + + Sleep(500); + + SuspendThread(hThread); + + if (WaitForSingleObject(hThread, 0) == WAIT_TIMEOUT) + { + /* + * Ok, thread did not exit before we got to it. + */ + CONTEXT context; + + context.ContextFlags = CONTEXT_CONTROL; + + GetThreadContext(hThread, &context); + __PTW32_PROGCTR (context) = (DWORD_PTR) anotherEnding; + SetThreadContext(hThread, &context); + ResumeThread(hThread); + } + else + { + printf("Exited early\n"); + fflush(stdout); + } + + Sleep(1000); + + assert(washere == 2); + + return 0; +} diff --git a/tests/count1.c b/tests/count1.c index c639fd27..ac08017e 100644 --- a/tests/count1.c +++ b/tests/count1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/create1.c b/tests/create1.c index 63b1bf6e..c64b15fd 100644 --- a/tests/create1.c +++ b/tests/create1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/create2.c b/tests/create2.c index 9e56d9d4..7d73d947 100644 --- a/tests/create2.c +++ b/tests/create2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/create3.c b/tests/create3.c index 5063d0ba..3986f091 100644 --- a/tests/create3.c +++ b/tests/create3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/delay1.c b/tests/delay1.c index 9c5293e8..eedf79b8 100644 --- a/tests/delay1.c +++ b/tests/delay1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/delay2.c b/tests/delay2.c index 5ff6c1de..a510415a 100644 --- a/tests/delay2.c +++ b/tests/delay2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/detach1.c b/tests/detach1.c index 4eb8cb73..df2dd6cd 100644 --- a/tests/detach1.c +++ b/tests/detach1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/equal1.c b/tests/equal1.c index 2dfa7942..60d3ac07 100644 --- a/tests/equal1.c +++ b/tests/equal1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/errno1.c b/tests/errno1.c index 14e8150a..0a361d0c 100644 --- a/tests/errno1.c +++ b/tests/errno1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/exception1.c b/tests/exception1.c index 100af205..96984905 100644 --- a/tests/exception1.c +++ b/tests/exception1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/exception2.c b/tests/exception2.c index 7842b842..b155b2f8 100644 --- a/tests/exception2.c +++ b/tests/exception2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/exception3.c b/tests/exception3.c index 2665bcc7..210e61a8 100644 --- a/tests/exception3.c +++ b/tests/exception3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/exception3_0.c b/tests/exception3_0.c index ab25c460..b791c2ee 100644 --- a/tests/exception3_0.c +++ b/tests/exception3_0.c @@ -1,190 +1,187 @@ -/* - * File: exception3.c - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Test Synopsis: Test running of user supplied terminate() function. - * - * Test Method (Validation or Falsification): - * - - * - * Requirements Tested: - * - - * - * Features Tested: - * - - * - * Cases Tested: - * - - * - * Description: - * - - * - * Environment: - * - - * - * Input: - * - None. - * - * Output: - * - File name, Line number, and failed expression on failure. - * - No output on success. - * - * Assumptions: - * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock - * pthread_testcancel, pthread_cancel - * - * Pass Criteria: - * - Process returns zero exit status. - * - * Fail Criteria: - * - Process returns non-zero exit status. - */ - -#include "test.h" - -/* - * Note: Due to a buggy C++ runtime in Visual Studio 2005, when we are - * built with /MD and an unhandled exception occurs, the runtime does not - * properly call the terminate handler specified by set_terminate(). - */ -#if defined(__cplusplus) \ - && !(defined(_MSC_VER) && _MSC_VER == 1400 && defined(_DLL) && !defined(_DEBUG)) - -#if defined(_MSC_VER) -# include -#else -# if defined(__GNUC__) && __GNUC__ < 3 -# include -# else -# include - using std::set_terminate; -# endif -#endif - -/* - * Create NUMTHREADS threads in addition to the Main thread. - */ -enum { - NUMTHREADS = 10 -}; - -int caught = 0; -CRITICAL_SECTION caughtLock; - -void -terminateFunction () -{ - EnterCriticalSection(&caughtLock); - caught++; -#if 0 - { - FILE * fp = fopen("pthread.log", "a"); - fprintf(fp, "Caught = %d\n", caught); - fclose(fp); - } -#endif - LeaveCriticalSection(&caughtLock); - - /* - * Notes from the MSVC++ manual: - * 1) A term_func() should call exit(), otherwise - * abort() will be called on return to the caller. - * abort() raises SIGABRT. The default signal handler - * for all signals terminates the calling program with - * exit code 3. - * 2) A term_func() must not throw an exception. Dev: Therefore - * term_func() should not call pthread_exit() if an - * exception-using version of pthreads-win32 library - * is being used (i.e. either pthreadVCE or pthreadVSE). - */ - exit(0); -} - -void * -exceptionedThread(void * arg) -{ - int dummy = 0x1; - - set_terminate(&terminateFunction); - assert(set_terminate(&terminateFunction) == &terminateFunction); - - throw dummy; - - return (void *) 2; -} - -int -main() -{ - int i; - DWORD et[NUMTHREADS]; - - DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX); - SetErrorMode(dwMode | SEM_NOGPFAULTERRORBOX); - - InitializeCriticalSection(&caughtLock); - - for (i = 0; i < NUMTHREADS; i++) - { - CreateThread(NULL, //Choose default security - 0, //Default stack size - (LPTHREAD_START_ROUTINE)&exceptionedThread, //Routine to execute - NULL, //Thread parameter - 0, //Immediately run the thread - &et[i] //Thread Id - ); - } - - Sleep(NUMTHREADS * 10); - - DeleteCriticalSection(&caughtLock); - /* - * Fail. Should never be reached. - */ - return 1; -} - -#else /* defined(__cplusplus) */ - -#include - -int -main() -{ - fprintf(stderr, "Test N/A for this compiler environment.\n"); - return 0; -} - -#endif /* defined(__cplusplus) */ +/* + * File: exception3.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Test Synopsis: Test running of user supplied terminate() function. + * + * Test Method (Validation or Falsification): + * - + * + * Requirements Tested: + * - + * + * Features Tested: + * - + * + * Cases Tested: + * - + * + * Description: + * - + * + * Environment: + * - + * + * Input: + * - None. + * + * Output: + * - File name, Line number, and failed expression on failure. + * - No output on success. + * + * Assumptions: + * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock + * pthread_testcancel, pthread_cancel + * + * Pass Criteria: + * - Process returns zero exit status. + * + * Fail Criteria: + * - Process returns non-zero exit status. + */ + +#include "test.h" + +/* + * Note: Due to a buggy C++ runtime in Visual Studio 2005, when we are + * built with /MD and an unhandled exception occurs, the runtime does not + * properly call the terminate handler specified by set_terminate(). + */ +#if defined(__cplusplus) \ + && !(defined(_MSC_VER) && _MSC_VER == 1400 && defined(_DLL) && !defined(_DEBUG)) + +#if defined(_MSC_VER) +# include +#else +# if defined(__GNUC__) && __GNUC__ < 3 +# include +# else +# include + using std::set_terminate; +# endif +#endif + +/* + * Create NUMTHREADS threads in addition to the Main thread. + */ +enum { + NUMTHREADS = 10 +}; + +int caught = 0; +CRITICAL_SECTION caughtLock; + +void +terminateFunction () +{ + EnterCriticalSection(&caughtLock); + caught++; +#if 0 + { + FILE * fp = fopen("pthread.log", "a"); + fprintf(fp, "Caught = %d\n", caught); + fclose(fp); + } +#endif + LeaveCriticalSection(&caughtLock); + + /* + * Notes from the MSVC++ manual: + * 1) A term_func() should call exit(), otherwise + * abort() will be called on return to the caller. + * abort() raises SIGABRT. The default signal handler + * for all signals terminates the calling program with + * exit code 3. + * 2) A term_func() must not throw an exception. Dev: Therefore + * term_func() should not call pthread_exit() if an + * exception-using version of pthreads-win32 library + * is being used (i.e. either pthreadVCE or pthreadVSE). + */ + exit(0); +} + +void * +exceptionedThread(void * arg) +{ + int dummy = 0x1; + + set_terminate(&terminateFunction); + assert(set_terminate(&terminateFunction) == &terminateFunction); + + throw dummy; + + return (void *) 2; +} + +int +main() +{ + int i; + DWORD et[NUMTHREADS]; + + DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX); + SetErrorMode(dwMode | SEM_NOGPFAULTERRORBOX); + + InitializeCriticalSection(&caughtLock); + + for (i = 0; i < NUMTHREADS; i++) + { + CreateThread(NULL, //Choose default security + 0, //Default stack size + (LPTHREAD_START_ROUTINE)&exceptionedThread, //Routine to execute + NULL, //Thread parameter + 0, //Immediately run the thread + &et[i] //Thread Id + ); + } + + Sleep(NUMTHREADS * 10); + + DeleteCriticalSection(&caughtLock); + /* + * Fail. Should never be reached. + */ + return 1; +} + +#else /* defined(__cplusplus) */ + +#include + +int +main() +{ + fprintf(stderr, "Test N/A for this compiler environment.\n"); + return 0; +} + +#endif /* defined(__cplusplus) */ diff --git a/tests/exit1.c b/tests/exit1.c index 35294245..e405ea78 100644 --- a/tests/exit1.c +++ b/tests/exit1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/exit2.c b/tests/exit2.c index a534d477..60f37f15 100644 --- a/tests/exit2.c +++ b/tests/exit2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/exit3.c b/tests/exit3.c index 13397200..0dfe2f3e 100644 --- a/tests/exit3.c +++ b/tests/exit3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/exit4.c b/tests/exit4.c index e4138389..1395f896 100644 --- a/tests/exit4.c +++ b/tests/exit4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/exit5.c b/tests/exit5.c index b7b8ad7a..1c8b9e13 100644 --- a/tests/exit5.c +++ b/tests/exit5.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/eyal1.c b/tests/eyal1.c index 5da95ff5..c80b2f0c 100644 --- a/tests/eyal1.c +++ b/tests/eyal1.c @@ -3,33 +3,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/inherit1.c b/tests/inherit1.c index d09cfc77..13fb2a89 100644 --- a/tests/inherit1.c +++ b/tests/inherit1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/join0.c b/tests/join0.c index f5c040eb..ea628d8a 100644 --- a/tests/join0.c +++ b/tests/join0.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/join1.c b/tests/join1.c index a0412791..d8a2549a 100644 --- a/tests/join1.c +++ b/tests/join1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/join2.c b/tests/join2.c index 8864f221..5ac6c571 100644 --- a/tests/join2.c +++ b/tests/join2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/join3.c b/tests/join3.c index 35368667..a3b6dd68 100644 --- a/tests/join3.c +++ b/tests/join3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/join4.c b/tests/join4.c index 3961dfeb..16aa34dc 100644 --- a/tests/join4.c +++ b/tests/join4.c @@ -1,81 +1,78 @@ -/* - * Test for pthread_timedjoin_np() timing out. - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Depends on API functions: pthread_create(). - */ - -#include "test.h" - -void * -func(void * arg) -{ - Sleep(1200); - return arg; -} - -int -main(int argc, char * argv[]) -{ - pthread_t id; - struct timespec abstime, reltime = { 1, 0 }; - void* result = (void*)-1; - - assert(pthread_create(&id, NULL, func, (void *)(size_t)999) == 0); - - /* - * Let thread start before we attempt to join it. - */ - Sleep(100); - - (void) pthread_win32_getabstime_np(&abstime, &reltime); - - /* Test for pthread_timedjoin_np timeout */ - assert(pthread_timedjoin_np(id, &result, &abstime) == ETIMEDOUT); - assert((int)(size_t)result == -1); - - /* Test for pthread_tryjoin_np behaviour before thread has exited */ - assert(pthread_tryjoin_np(id, &result) == EBUSY); - assert((int)(size_t)result == -1); - - Sleep(500); - - /* Test for pthread_tryjoin_np behaviour after thread has exited */ - assert(pthread_tryjoin_np(id, &result) == 0); - assert((int)(size_t)result == 999); - - /* Success. */ - return 0; -} +/* + * Test for pthread_timedjoin_np() timing out. + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Depends on API functions: pthread_create(). + */ + +#include "test.h" + +void * +func(void * arg) +{ + Sleep(1200); + return arg; +} + +int +main(int argc, char * argv[]) +{ + pthread_t id; + struct timespec abstime, reltime = { 1, 0 }; + void* result = (void*)-1; + + assert(pthread_create(&id, NULL, func, (void *)(size_t)999) == 0); + + /* + * Let thread start before we attempt to join it. + */ + Sleep(100); + + (void) pthread_win32_getabstime_np(&abstime, &reltime); + + /* Test for pthread_timedjoin_np timeout */ + assert(pthread_timedjoin_np(id, &result, &abstime) == ETIMEDOUT); + assert((int)(size_t)result == -1); + + /* Test for pthread_tryjoin_np behaviour before thread has exited */ + assert(pthread_tryjoin_np(id, &result) == EBUSY); + assert((int)(size_t)result == -1); + + Sleep(500); + + /* Test for pthread_tryjoin_np behaviour after thread has exited */ + assert(pthread_tryjoin_np(id, &result) == 0); + assert((int)(size_t)result == 999); + + /* Success. */ + return 0; +} diff --git a/tests/kill1.c b/tests/kill1.c index 84ca3c00..e9ef224b 100644 --- a/tests/kill1.c +++ b/tests/kill1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex1.c b/tests/mutex1.c index 6d9beaf8..e2579796 100644 --- a/tests/mutex1.c +++ b/tests/mutex1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex1e.c b/tests/mutex1e.c index 9d0a32ec..a9996519 100644 --- a/tests/mutex1e.c +++ b/tests/mutex1e.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex1n.c b/tests/mutex1n.c index 7e306cfa..41d31168 100644 --- a/tests/mutex1n.c +++ b/tests/mutex1n.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex1r.c b/tests/mutex1r.c index fb2de7ea..83ead94b 100644 --- a/tests/mutex1r.c +++ b/tests/mutex1r.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex2.c b/tests/mutex2.c index 8bd490f3..eba52f20 100644 --- a/tests/mutex2.c +++ b/tests/mutex2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex2e.c b/tests/mutex2e.c index dd17ccd8..293ec135 100644 --- a/tests/mutex2e.c +++ b/tests/mutex2e.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex2r.c b/tests/mutex2r.c index 740d6073..3d1931a7 100644 --- a/tests/mutex2r.c +++ b/tests/mutex2r.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex3.c b/tests/mutex3.c index 94ca2dae..f21fb1f2 100644 --- a/tests/mutex3.c +++ b/tests/mutex3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex3e.c b/tests/mutex3e.c index 40911fc8..b27c1142 100644 --- a/tests/mutex3e.c +++ b/tests/mutex3e.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex3r.c b/tests/mutex3r.c index 891692b4..fa45d022 100644 --- a/tests/mutex3r.c +++ b/tests/mutex3r.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex4.c b/tests/mutex4.c index 220c2601..c04c91d6 100644 --- a/tests/mutex4.c +++ b/tests/mutex4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex5.c b/tests/mutex5.c index 6d123793..3fa14952 100644 --- a/tests/mutex5.c +++ b/tests/mutex5.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6.c b/tests/mutex6.c index 08081010..dd76166d 100644 --- a/tests/mutex6.c +++ b/tests/mutex6.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6e.c b/tests/mutex6e.c index d6f69546..fb939ffc 100644 --- a/tests/mutex6e.c +++ b/tests/mutex6e.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6es.c b/tests/mutex6es.c index 6fa2424f..e9541cae 100644 --- a/tests/mutex6es.c +++ b/tests/mutex6es.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6n.c b/tests/mutex6n.c index e4681a5c..d55d926b 100644 --- a/tests/mutex6n.c +++ b/tests/mutex6n.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6r.c b/tests/mutex6r.c index 41fc6914..14439682 100644 --- a/tests/mutex6r.c +++ b/tests/mutex6r.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6rs.c b/tests/mutex6rs.c index d17566d7..cf69c098 100644 --- a/tests/mutex6rs.c +++ b/tests/mutex6rs.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6s.c b/tests/mutex6s.c index 26dc0215..3522bce7 100644 --- a/tests/mutex6s.c +++ b/tests/mutex6s.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex7.c b/tests/mutex7.c index ee3fe5c1..94766d39 100644 --- a/tests/mutex7.c +++ b/tests/mutex7.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex7e.c b/tests/mutex7e.c index 1fc1a15f..76d76e95 100644 --- a/tests/mutex7e.c +++ b/tests/mutex7e.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex7n.c b/tests/mutex7n.c index feca8ee2..145d68fe 100644 --- a/tests/mutex7n.c +++ b/tests/mutex7n.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex7r.c b/tests/mutex7r.c index 3e0ae135..3c046818 100644 --- a/tests/mutex7r.c +++ b/tests/mutex7r.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex8.c b/tests/mutex8.c index d2ed686f..b12eb148 100644 --- a/tests/mutex8.c +++ b/tests/mutex8.c @@ -2,25 +2,30 @@ * mutex8.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright (C) 1998 Ben Elliston and Ross Johnson - * Copyright (C) 1999,2000,2001 Ross Johnson + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Contact Email: rpj@ise.canberra.edu.au + * Homepage: https://sourceforge.net/projects/pthreads4w/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex8e.c b/tests/mutex8e.c index 5cf2de68..b1e559ba 100644 --- a/tests/mutex8e.c +++ b/tests/mutex8e.c @@ -2,25 +2,30 @@ * mutex8e.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright (C) 1998 Ben Elliston and Ross Johnson - * Copyright (C) 1999,2000,2001 Ross Johnson + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Contact Email: rpj@ise.canberra.edu.au + * Homepage: https://sourceforge.net/projects/pthreads4w/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex8n.c b/tests/mutex8n.c index 0ea3cf32..dda005f6 100644 --- a/tests/mutex8n.c +++ b/tests/mutex8n.c @@ -2,25 +2,30 @@ * mutex8n.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright (C) 1998 Ben Elliston and Ross Johnson - * Copyright (C) 1999,2000,2001 Ross Johnson + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Contact Email: rpj@ise.canberra.edu.au + * Homepage: https://sourceforge.net/projects/pthreads4w/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex8r.c b/tests/mutex8r.c index 83673c1c..2a563993 100644 --- a/tests/mutex8r.c +++ b/tests/mutex8r.c @@ -2,25 +2,30 @@ * mutex8r.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright (C) 1998 Ben Elliston and Ross Johnson - * Copyright (C) 1999,2000,2001 Ross Johnson + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Contact Email: rpj@ise.canberra.edu.au + * Homepage: https://sourceforge.net/projects/pthreads4w/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/name_np1.c b/tests/name_np1.c index b9c33224..9032525d 100644 --- a/tests/name_np1.c +++ b/tests/name_np1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/name_np2.c b/tests/name_np2.c index ae6c9ec7..fa3f0beb 100644 --- a/tests/name_np2.c +++ b/tests/name_np2.c @@ -1,110 +1,107 @@ -/* - * name_np2.c - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Description: - * Create a thread and give it a name. - * - * The MSVC version should display the thread name in the MSVS debugger. - * Confirmed for MSVS10 Express: - * - * VCExpress name_np1.exe /debugexe - * - * did indeed display the thread name in the trace output. - * - * Depends on API functions: - * pthread_create - * pthread_join - * pthread_self - * pthread_attr_init - * pthread_getname_np - * pthread_attr_setname_np - * pthread_barrier_init - * pthread_barrier_wait - */ - -#include "test.h" - -static int washere = 0; -static pthread_attr_t attr; -static pthread_barrier_t sync; -#if defined (__PTW32_COMPATIBILITY_BSD) -static int seqno = 0; -#endif - -void * func(void * arg) -{ - char buf[32]; - pthread_t self = pthread_self(); - - washere = 1; - pthread_barrier_wait(&sync); - assert(pthread_getname_np(self, buf, 32) == 0); - printf("Thread name: %s\n", buf); - pthread_barrier_wait(&sync); - - return 0; -} - -int -main() -{ - pthread_t t; - - assert(pthread_attr_init(&attr) == 0); -#if defined (__PTW32_COMPATIBILITY_BSD) - seqno++; - assert(pthread_attr_setname_np(&attr, "MyThread%d", (void *)&seqno) == 0); -#elif defined (__PTW32_COMPATIBILITY_TRU64) - assert(pthread_attr_setname_np(&attr, "MyThread1", NULL) == 0); -#else - assert(pthread_attr_setname_np(&attr, "MyThread1") == 0); -#endif - - assert(pthread_barrier_init(&sync, NULL, 2) == 0); - - assert(pthread_create(&t, &attr, func, NULL) == 0); - pthread_barrier_wait(&sync); - pthread_barrier_wait(&sync); - - assert(pthread_join(t, NULL) == 0); - - assert(pthread_barrier_destroy(&sync) == 0); - assert(pthread_attr_destroy(&attr) == 0); - - assert(washere == 1); - - return 0; -} +/* + * name_np2.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Description: + * Create a thread and give it a name. + * + * The MSVC version should display the thread name in the MSVS debugger. + * Confirmed for MSVS10 Express: + * + * VCExpress name_np1.exe /debugexe + * + * did indeed display the thread name in the trace output. + * + * Depends on API functions: + * pthread_create + * pthread_join + * pthread_self + * pthread_attr_init + * pthread_getname_np + * pthread_attr_setname_np + * pthread_barrier_init + * pthread_barrier_wait + */ + +#include "test.h" + +static int washere = 0; +static pthread_attr_t attr; +static pthread_barrier_t sync; +#if defined (__PTW32_COMPATIBILITY_BSD) +static int seqno = 0; +#endif + +void * func(void * arg) +{ + char buf[32]; + pthread_t self = pthread_self(); + + washere = 1; + pthread_barrier_wait(&sync); + assert(pthread_getname_np(self, buf, 32) == 0); + printf("Thread name: %s\n", buf); + pthread_barrier_wait(&sync); + + return 0; +} + +int +main() +{ + pthread_t t; + + assert(pthread_attr_init(&attr) == 0); +#if defined (__PTW32_COMPATIBILITY_BSD) + seqno++; + assert(pthread_attr_setname_np(&attr, "MyThread%d", (void *)&seqno) == 0); +#elif defined (__PTW32_COMPATIBILITY_TRU64) + assert(pthread_attr_setname_np(&attr, "MyThread1", NULL) == 0); +#else + assert(pthread_attr_setname_np(&attr, "MyThread1") == 0); +#endif + + assert(pthread_barrier_init(&sync, NULL, 2) == 0); + + assert(pthread_create(&t, &attr, func, NULL) == 0); + pthread_barrier_wait(&sync); + pthread_barrier_wait(&sync); + + assert(pthread_join(t, NULL) == 0); + + assert(pthread_barrier_destroy(&sync) == 0); + assert(pthread_attr_destroy(&attr) == 0); + + assert(washere == 1); + + return 0; +} diff --git a/tests/once1.c b/tests/once1.c index 3a7f2e8c..68afc821 100644 --- a/tests/once1.c +++ b/tests/once1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/once2.c b/tests/once2.c index ffd6bfe1..d5dc8fd1 100644 --- a/tests/once2.c +++ b/tests/once2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/once3.c b/tests/once3.c index 4486f34f..d21529bb 100644 --- a/tests/once3.c +++ b/tests/once3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/once4.c b/tests/once4.c index 39feea94..5f57426c 100644 --- a/tests/once4.c +++ b/tests/once4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/priority1.c b/tests/priority1.c index d77420f8..292fed4c 100644 --- a/tests/priority1.c +++ b/tests/priority1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/priority2.c b/tests/priority2.c index c4552e62..fca0b4c7 100644 --- a/tests/priority2.c +++ b/tests/priority2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/reuse1.c b/tests/reuse1.c index bcf8571c..0c8ff218 100644 --- a/tests/reuse1.c +++ b/tests/reuse1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/reuse2.c b/tests/reuse2.c index 93643b90..9ae44fdf 100644 --- a/tests/reuse2.c +++ b/tests/reuse2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/robust1.c b/tests/robust1.c index 4bb479ac..74976e66 100755 --- a/tests/robust1.c +++ b/tests/robust1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/robust2.c b/tests/robust2.c index 795a17ff..eae452ed 100755 --- a/tests/robust2.c +++ b/tests/robust2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/robust3.c b/tests/robust3.c index e9d05c7d..b5fda18a 100755 --- a/tests/robust3.c +++ b/tests/robust3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/robust4.c b/tests/robust4.c index 35d5b84f..182aabc0 100755 --- a/tests/robust4.c +++ b/tests/robust4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/robust5.c b/tests/robust5.c index 82e592e9..4a51c155 100755 --- a/tests/robust5.c +++ b/tests/robust5.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/runorder.mk b/tests/runorder.mk index 37f6e988..8c7cd73f 100644 --- a/tests/runorder.mk +++ b/tests/runorder.mk @@ -1,159 +1,159 @@ -# -# Common rules that define the run order of tests -# -benchtest1.bench: -benchtest2.bench: -benchtest3.bench: -benchtest4.bench: -benchtest5.bench: - -affinity1.pass: -affinity2.pass: affinity1.pass -affinity3.pass: affinity2.pass self1.pass create3.pass -affinity4.pass: affinity3.pass -affinity5.pass: affinity4.pass -affinity6.pass: affinity5.pass -barrier1.pass: semaphore4.pass -barrier2.pass: barrier1.pass semaphore4.pass -barrier3.pass: barrier2.pass semaphore4.pass self1.pass create3.pass join4.pass -barrier4.pass: barrier3.pass semaphore4.pass self1.pass create3.pass join4.pass mutex8.pass -barrier5.pass: barrier4.pass semaphore4.pass self1.pass create3.pass join4.pass mutex8.pass -barrier6.pass: barrier5.pass semaphore4.pass self1.pass create3.pass join4.pass mutex8.pass -cancel1.pass: self1.pass create3.pass -cancel2.pass: self1.pass create3.pass join4.pass barrier6.pass -cancel3.pass: self1.pass create3.pass join4.pass context1.pass -cancel4.pass: cancel3.pass self1.pass create3.pass join4.pass -cancel5.pass: cancel3.pass self1.pass create3.pass join4.pass -cancel6a.pass: cancel3.pass self1.pass create3.pass join4.pass -cancel6d.pass: cancel3.pass self1.pass create3.pass join4.pass -cancel7.pass: self1.pass create3.pass join4.pass kill1.pass -cancel8.pass: cancel7.pass self1.pass mutex8.pass kill1.pass -cancel9.pass: cancel8.pass self1.pass create3.pass join4.pass mutex8.pass kill1.pass -cleanup0.pass: self1.pass create3.pass join4.pass mutex8.pass cancel5.pass -cleanup1.pass: cleanup0.pass -cleanup2.pass: cleanup1.pass -cleanup3.pass: cleanup2.pass -condvar1.pass: self1.pass create3.pass semaphore1.pass mutex8.pass -condvar1_1.pass: condvar1.pass -condvar1_2.pass: join2.pass -condvar2.pass: condvar1.pass -condvar2_1.pass: condvar2.pass join2.pass -condvar3.pass: create1.pass condvar2.pass -condvar3_1.pass: condvar3.pass join2.pass -condvar3_2.pass: condvar3_1.pass -condvar3_3.pass: condvar3_2.pass -condvar4.pass: create1.pass -condvar5.pass: condvar4.pass -condvar6.pass: condvar5.pass -condvar7.pass: condvar6.pass cleanup1.pass -condvar8.pass: condvar7.pass -condvar9.pass: condvar8.pass -context1.pass: cancel1.pass -count1.pass: join1.pass -create1.pass: mutex2.pass -create2.pass: create1.pass -create3.pass: create2.pass -delay1.pass: self1.pass create3.pass -delay2.pass: delay1.pass -detach1.pass: join0.pass -equal1.pass: self1.pass create1.pass -errno1.pass: mutex3.pass -exception1.pass: cancel4.pass -exception2.pass: exception1.pass -exception3_0.pass: exception2.pass -exception3.pass: exception3_0.pass -exit1.pass: self1.pass create3.pass -exit2.pass: create1.pass -exit3.pass: create1.pass -exit4.pass: self1.pass create3.pass -exit5.pass: exit4.pass kill1.pass -exit6.pass: exit5.pass -eyal1.pass: self1.pass create3.pass mutex8.pass tsd1.pass -inherit1.pass: join1.pass priority1.pass -join0.pass: create1.pass -join1.pass: create1.pass -join2.pass: create1.pass -join3.pass: join2.pass -join4.pass: join3.pass -kill1.pass: self1.pass -mutex1.pass: mutex5.pass -mutex1n.pass: mutex1.pass -mutex1e.pass: mutex1.pass -mutex1r.pass: mutex1.pass -mutex2.pass: mutex1.pass -mutex2r.pass: mutex2.pass -mutex2e.pass: mutex2.pass -mutex3.pass: create1.pass -mutex3r.pass: mutex3.pass -mutex3e.pass: mutex3.pass -mutex4.pass: mutex3.pass -mutex5.pass: sizes.pass -mutex6.pass: mutex4.pass -mutex6n.pass: mutex4.pass -mutex6e.pass: mutex4.pass -mutex6r.pass: mutex4.pass -mutex6s.pass: mutex6.pass -mutex6rs.pass: mutex6r.pass -mutex6es.pass: mutex6e.pass -mutex7.pass: mutex6.pass -mutex7n.pass: mutex6n.pass -mutex7e.pass: mutex6e.pass -mutex7r.pass: mutex6r.pass -mutex8.pass: mutex7.pass -mutex8n.pass: mutex7n.pass -mutex8e.pass: mutex7e.pass -mutex8r.pass: mutex7r.pass -name_np1.pass: join4.pass barrier6.pass -name_np2.pass: name_np1.pass -once1.pass: create1.pass -once2.pass: once1.pass -once3.pass: once2.pass -once4.pass: once3.pass -priority1.pass: join1.pass -priority2.pass: priority1.pass barrier3.pass -reinit1.pass: rwlock7.pass -reuse1.pass: create3.pass -reuse2.pass: reuse1.pass -robust1.pass: mutex8r.pass -robust2.pass: mutex8r.pass -robust3.pass: robust2.pass -robust4.pass: robust3.pass -robust5.pass: robust4.pass -rwlock1.pass: condvar6.pass -rwlock2.pass: rwlock1.pass -rwlock3.pass: rwlock2.pass join2.pass -rwlock4.pass: rwlock3.pass -rwlock5.pass: rwlock4.pass -rwlock6.pass: rwlock5.pass -rwlock7.pass: rwlock6.pass -rwlock7_1.pass: rwlock7.pass -rwlock8.pass: rwlock7.pass -rwlock8_1.pass: rwlock8.pass -rwlock2_t.pass: rwlock2.pass -rwlock3_t.pass: rwlock2_t.pass -rwlock4_t.pass: rwlock3_t.pass -rwlock5_t.pass: rwlock4_t.pass -rwlock6_t.pass: rwlock5_t.pass -rwlock6_t2.pass: rwlock6_t.pass -self1.pass: sizes.pass -self2.pass: self1.pass equal1.pass create1.pass -semaphore1.pass: sizes.pass -semaphore2.pass: semaphore1.pass -semaphore3.pass: semaphore2.pass -semaphore4.pass: semaphore3.pass cancel1.pass -semaphore4t.pass: semaphore4.pass -semaphore5.pass: semaphore4.pass -sequence1.pass: reuse2.pass -sizes.pass: -spin1.pass: self1.pass create3.pass mutex8.pass -spin2.pass: spin1.pass -spin3.pass: spin2.pass -spin4.pass: spin3.pass -stress1.pass: create3.pass mutex8.pass barrier6.pass -threestage.pass: stress1.pass -timeouts.pass: condvar9.pass -tsd1.pass: barrier5.pass join1.pass -tsd2.pass: tsd1.pass -tsd3.pass: tsd2.pass -valid1.pass: join1.pass -valid2.pass: valid1.pass +# +# Common rules that define the run order of tests +# +benchtest1.bench: +benchtest2.bench: +benchtest3.bench: +benchtest4.bench: +benchtest5.bench: + +affinity1.pass: +affinity2.pass: affinity1.pass +affinity3.pass: affinity2.pass self1.pass create3.pass +affinity4.pass: affinity3.pass +affinity5.pass: affinity4.pass +affinity6.pass: affinity5.pass +barrier1.pass: semaphore4.pass +barrier2.pass: barrier1.pass semaphore4.pass +barrier3.pass: barrier2.pass semaphore4.pass self1.pass create3.pass join4.pass +barrier4.pass: barrier3.pass semaphore4.pass self1.pass create3.pass join4.pass mutex8.pass +barrier5.pass: barrier4.pass semaphore4.pass self1.pass create3.pass join4.pass mutex8.pass +barrier6.pass: barrier5.pass semaphore4.pass self1.pass create3.pass join4.pass mutex8.pass +cancel1.pass: self1.pass create3.pass +cancel2.pass: self1.pass create3.pass join4.pass barrier6.pass +cancel3.pass: self1.pass create3.pass join4.pass context1.pass +cancel4.pass: cancel3.pass self1.pass create3.pass join4.pass +cancel5.pass: cancel3.pass self1.pass create3.pass join4.pass +cancel6a.pass: cancel3.pass self1.pass create3.pass join4.pass +cancel6d.pass: cancel3.pass self1.pass create3.pass join4.pass +cancel7.pass: self1.pass create3.pass join4.pass kill1.pass +cancel8.pass: cancel7.pass self1.pass mutex8.pass kill1.pass +cancel9.pass: cancel8.pass self1.pass create3.pass join4.pass mutex8.pass kill1.pass +cleanup0.pass: self1.pass create3.pass join4.pass mutex8.pass cancel5.pass +cleanup1.pass: cleanup0.pass +cleanup2.pass: cleanup1.pass +cleanup3.pass: cleanup2.pass +condvar1.pass: self1.pass create3.pass semaphore1.pass mutex8.pass +condvar1_1.pass: condvar1.pass +condvar1_2.pass: join2.pass +condvar2.pass: condvar1.pass +condvar2_1.pass: condvar2.pass join2.pass +condvar3.pass: create1.pass condvar2.pass +condvar3_1.pass: condvar3.pass join2.pass +condvar3_2.pass: condvar3_1.pass +condvar3_3.pass: condvar3_2.pass +condvar4.pass: create1.pass +condvar5.pass: condvar4.pass +condvar6.pass: condvar5.pass +condvar7.pass: condvar6.pass cleanup1.pass +condvar8.pass: condvar7.pass +condvar9.pass: condvar8.pass +context1.pass: cancel1.pass +count1.pass: join1.pass +create1.pass: mutex2.pass +create2.pass: create1.pass +create3.pass: create2.pass +delay1.pass: self1.pass create3.pass +delay2.pass: delay1.pass +detach1.pass: join0.pass +equal1.pass: self1.pass create1.pass +errno1.pass: mutex3.pass +exception1.pass: cancel4.pass +exception2.pass: exception1.pass +exception3_0.pass: exception2.pass +exception3.pass: exception3_0.pass +exit1.pass: self1.pass create3.pass +exit2.pass: create1.pass +exit3.pass: create1.pass +exit4.pass: self1.pass create3.pass +exit5.pass: exit4.pass kill1.pass +exit6.pass: exit5.pass +eyal1.pass: self1.pass create3.pass mutex8.pass tsd1.pass +inherit1.pass: join1.pass priority1.pass +join0.pass: create1.pass +join1.pass: create1.pass +join2.pass: create1.pass +join3.pass: join2.pass +join4.pass: join3.pass +kill1.pass: self1.pass +mutex1.pass: mutex5.pass +mutex1n.pass: mutex1.pass +mutex1e.pass: mutex1.pass +mutex1r.pass: mutex1.pass +mutex2.pass: mutex1.pass +mutex2r.pass: mutex2.pass +mutex2e.pass: mutex2.pass +mutex3.pass: create1.pass +mutex3r.pass: mutex3.pass +mutex3e.pass: mutex3.pass +mutex4.pass: mutex3.pass +mutex5.pass: sizes.pass +mutex6.pass: mutex4.pass +mutex6n.pass: mutex4.pass +mutex6e.pass: mutex4.pass +mutex6r.pass: mutex4.pass +mutex6s.pass: mutex6.pass +mutex6rs.pass: mutex6r.pass +mutex6es.pass: mutex6e.pass +mutex7.pass: mutex6.pass +mutex7n.pass: mutex6n.pass +mutex7e.pass: mutex6e.pass +mutex7r.pass: mutex6r.pass +mutex8.pass: mutex7.pass +mutex8n.pass: mutex7n.pass +mutex8e.pass: mutex7e.pass +mutex8r.pass: mutex7r.pass +name_np1.pass: join4.pass barrier6.pass +name_np2.pass: name_np1.pass +once1.pass: create1.pass +once2.pass: once1.pass +once3.pass: once2.pass +once4.pass: once3.pass +priority1.pass: join1.pass +priority2.pass: priority1.pass barrier3.pass +reinit1.pass: rwlock7.pass +reuse1.pass: create3.pass +reuse2.pass: reuse1.pass +robust1.pass: mutex8r.pass +robust2.pass: mutex8r.pass +robust3.pass: robust2.pass +robust4.pass: robust3.pass +robust5.pass: robust4.pass +rwlock1.pass: condvar6.pass +rwlock2.pass: rwlock1.pass +rwlock3.pass: rwlock2.pass join2.pass +rwlock4.pass: rwlock3.pass +rwlock5.pass: rwlock4.pass +rwlock6.pass: rwlock5.pass +rwlock7.pass: rwlock6.pass +rwlock7_1.pass: rwlock7.pass +rwlock8.pass: rwlock7.pass +rwlock8_1.pass: rwlock8.pass +rwlock2_t.pass: rwlock2.pass +rwlock3_t.pass: rwlock2_t.pass +rwlock4_t.pass: rwlock3_t.pass +rwlock5_t.pass: rwlock4_t.pass +rwlock6_t.pass: rwlock5_t.pass +rwlock6_t2.pass: rwlock6_t.pass +self1.pass: sizes.pass +self2.pass: self1.pass equal1.pass create1.pass +semaphore1.pass: sizes.pass +semaphore2.pass: semaphore1.pass +semaphore3.pass: semaphore2.pass +semaphore4.pass: semaphore3.pass cancel1.pass +semaphore4t.pass: semaphore4.pass +semaphore5.pass: semaphore4.pass +sequence1.pass: reuse2.pass +sizes.pass: +spin1.pass: self1.pass create3.pass mutex8.pass +spin2.pass: spin1.pass +spin3.pass: spin2.pass +spin4.pass: spin3.pass +stress1.pass: create3.pass mutex8.pass barrier6.pass +threestage.pass: stress1.pass +timeouts.pass: condvar9.pass +tsd1.pass: barrier5.pass join1.pass +tsd2.pass: tsd1.pass +tsd3.pass: tsd2.pass +valid1.pass: join1.pass +valid2.pass: valid1.pass diff --git a/tests/rwlock1.c b/tests/rwlock1.c index e76e920e..63a321f1 100644 --- a/tests/rwlock1.c +++ b/tests/rwlock1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock2.c b/tests/rwlock2.c index e9aff324..1ab766f5 100644 --- a/tests/rwlock2.c +++ b/tests/rwlock2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock2_t.c b/tests/rwlock2_t.c index d6a96713..82a0581b 100644 --- a/tests/rwlock2_t.c +++ b/tests/rwlock2_t.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock3.c b/tests/rwlock3.c index 08bda6e2..0eeafec6 100644 --- a/tests/rwlock3.c +++ b/tests/rwlock3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock3_t.c b/tests/rwlock3_t.c index 9076496e..11400053 100644 --- a/tests/rwlock3_t.c +++ b/tests/rwlock3_t.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock4.c b/tests/rwlock4.c index b1ff7e0e..473b8119 100644 --- a/tests/rwlock4.c +++ b/tests/rwlock4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock4_t.c b/tests/rwlock4_t.c index bc871b83..79bcd3a7 100644 --- a/tests/rwlock4_t.c +++ b/tests/rwlock4_t.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock5.c b/tests/rwlock5.c index 2d6e80cc..331ad7d2 100644 --- a/tests/rwlock5.c +++ b/tests/rwlock5.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock5_t.c b/tests/rwlock5_t.c index 03e6c295..7651fe44 100644 --- a/tests/rwlock5_t.c +++ b/tests/rwlock5_t.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock6.c b/tests/rwlock6.c index af523b44..6e31be1d 100644 --- a/tests/rwlock6.c +++ b/tests/rwlock6.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock6_t.c b/tests/rwlock6_t.c index b33cd480..aad34a6a 100644 --- a/tests/rwlock6_t.c +++ b/tests/rwlock6_t.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock6_t2.c b/tests/rwlock6_t2.c index 279ca770..5aaa0ad6 100644 --- a/tests/rwlock6_t2.c +++ b/tests/rwlock6_t2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/self1.c b/tests/self1.c index 3278dc02..145e9e08 100644 --- a/tests/self1.c +++ b/tests/self1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/self2.c b/tests/self2.c index 3fff003d..cf8fce5d 100644 --- a/tests/self2.c +++ b/tests/self2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore1.c b/tests/semaphore1.c index 91d875f1..f623dc7a 100644 --- a/tests/semaphore1.c +++ b/tests/semaphore1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore2.c b/tests/semaphore2.c index de56cb31..9b10a6a5 100644 --- a/tests/semaphore2.c +++ b/tests/semaphore2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore3.c b/tests/semaphore3.c index 810d6777..b76ed2f5 100644 --- a/tests/semaphore3.c +++ b/tests/semaphore3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore4.c b/tests/semaphore4.c index eab1d890..4166dff5 100644 --- a/tests/semaphore4.c +++ b/tests/semaphore4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore4t.c b/tests/semaphore4t.c index acc7985d..11cac910 100644 --- a/tests/semaphore4t.c +++ b/tests/semaphore4t.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore5.c b/tests/semaphore5.c index 5ebcb35c..ee967da3 100644 --- a/tests/semaphore5.c +++ b/tests/semaphore5.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/sequence1.c b/tests/sequence1.c index 51c3da7c..b10030cc 100755 --- a/tests/sequence1.c +++ b/tests/sequence1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/spin1.c b/tests/spin1.c index 82af2ca7..881a7913 100644 --- a/tests/spin1.c +++ b/tests/spin1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/spin2.c b/tests/spin2.c index 267cd5c3..e8d61825 100644 --- a/tests/spin2.c +++ b/tests/spin2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/spin3.c b/tests/spin3.c index e5a89cf5..fbc8d7c0 100644 --- a/tests/spin3.c +++ b/tests/spin3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/spin4.c b/tests/spin4.c index f602810d..f9a42c99 100644 --- a/tests/spin4.c +++ b/tests/spin4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/stress1.c b/tests/stress1.c index 333b5d7f..c6be04fe 100644 --- a/tests/stress1.c +++ b/tests/stress1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/test.h b/tests/test.h index 2df922e8..1a78c4da 100644 --- a/tests/test.h +++ b/tests/test.h @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * */ diff --git a/tests/threestage.c b/tests/threestage.c index 8443f1f7..cd607f0d 100644 --- a/tests/threestage.c +++ b/tests/threestage.c @@ -1,583 +1,583 @@ -/* - This source code is taken directly from examples in the book - Windows System Programming, Edition 4 by Johnson (John) Hart - - Session 6, Chapter 10. ThreeStage.c - - Several required additional header and source files from the - book examples have been included inline to simplify building. - The only modification to the code has been to provide default - values when run without arguments. - - Three-stage Producer Consumer system - Other files required in this project, either directly or - in the form of libraries (DLLs are preferable) - QueueObj.c (inlined here) - Messages.c (inlined here) - - Usage: ThreeStage npc goal [display] - start up "npc" paired producer and consumer threads. - Display messages if "display" is non-zero - Each producer must produce a total of - "goal" messages, where each message is tagged - with the consumer that should receive it - Messages are sent to a "transmitter thread" which performs - additional processing before sending message groups to the - "receiver thread." Finally, the receiver thread sends - the messages to the consumer threads. - - Transmitter: Receive messages one at a time from producers, - create a transmission message of up to "TBLOCK_SIZE" messages - to be sent to the Receiver. (this could be a network xfer - Receiver: Take message blocks sent by the Transmitter - and send the individual messages to the designated consumer - */ - -/* Suppress warning re use of ctime() */ -#define _CRT_SECURE_NO_WARNINGS 1 - -#include "test.h" -#define sleep(i) Sleep(i*1000) -#ifndef max -#define max(a,b) ((a) > (b) ? (a) : (b)) -#endif - -#define DATA_SIZE 256 -typedef struct msg_block_tag { /* Message block */ - pthread_mutex_t mguard; /* Mutex for the message block */ - pthread_cond_t mconsumed; /* Event: Message consumed; */ - /* Produce a new one or stop */ - pthread_cond_t mready; /* Event: Message ready */ - /* - * Note: the mutex and events are not used by some programs, such - * as Program 10-3, 4, 5 (the multi-stage pipeline) as the messages - * are part of a protected queue - */ - volatile unsigned int source; /* Creating producer identity */ - volatile unsigned int destination;/* Identity of receiving thread*/ - - volatile unsigned int f_consumed; - volatile unsigned int f_ready; - volatile unsigned int f_stop; - /* Consumed & ready state flags, stop flag */ - volatile unsigned int sequence; /* Message block sequence number */ - time_t timestamp; - unsigned int checksum; /* Message contents checksum */ - unsigned int data[DATA_SIZE]; /* Message Contents */ -} msg_block_t; - -void message_fill (msg_block_t *, unsigned int, unsigned int, unsigned int); -void message_display (msg_block_t *); - -#define CV_TIMEOUT 5 /* tunable parameter for the CV model */ - - -/* - Definitions of a synchronized, general bounded queue structure. - Queues are implemented as arrays with indices to youngest - and oldest messages, with wrap around. - Each queue also contains a guard mutex and - "not empty" and "not full" condition variables. - Finally, there is a pointer to an array of messages of - arbitrary type - */ - -typedef struct queue_tag { /* General purpose queue */ - pthread_mutex_t q_guard;/* Guard the message block */ - pthread_cond_t q_ne; /* Event: Queue is not empty */ - pthread_cond_t q_nf; /* Event: Queue is not full */ - /* These two events are manual-reset for the broadcast model - * and auto-reset for the signal model */ - volatile unsigned int q_size; /* Queue max size size */ - volatile unsigned int q_first; /* Index of oldest message */ - volatile unsigned int q_last; /* Index of youngest msg */ - volatile unsigned int q_destroyed;/* Q receiver has terminated */ - void * msg_array; /* array of q_size messages */ -} queue_t; - -/* Queue management functions */ -unsigned int q_initialize (queue_t *, unsigned int, unsigned int); -unsigned int q_destroy (queue_t *); -unsigned int q_destroyed (queue_t *); -unsigned int q_empty (queue_t *); -unsigned int q_full (queue_t *); -unsigned int q_get (queue_t *, void *, unsigned int, unsigned int); -unsigned int q_put (queue_t *, void *, unsigned int, unsigned int); -unsigned int q_remove (queue_t *, void *, unsigned int); -unsigned int q_insert (queue_t *, void *, unsigned int); - -#include -#include -#include - -#define DELAY_COUNT 1000 -#define MAX_THREADS 1024 - -/* Queue lengths and blocking factors. These numbers are arbitrary and */ -/* can be adjusted for performance tuning. The current values are */ -/* not well balanced. */ - -#define TBLOCK_SIZE 5 /* Transmitter combines this many messages at at time */ -#define Q_TIMEOUT 2000 /* Transmiter and receiver timeout (ms) waiting for messages */ -//#define Q_TIMEOUT INFINITE -#define MAX_RETRY 5 /* Number of q_get retries before quitting */ -#define P2T_QLEN 10 /* Producer to Transmitter queue length */ -#define T2R_QLEN 4 /* Transmitter to Receiver queue length */ -#define R2C_QLEN 4 /* Receiver to Consumer queue length - there is one - * such queue for each consumer */ - -void * producer (void *); -void * consumer (void *); -void * transmitter (void *); -void * receiver (void *); - - -typedef struct _THARG { - volatile unsigned int thread_number; - volatile unsigned int work_goal; /* used by producers */ - volatile unsigned int work_done; /* Used by producers and consumers */ -} THARG; - - -/* Grouped messages sent by the transmitter to receiver */ -typedef struct T2R_MSG_TYPEag { - volatile unsigned int num_msgs; /* Number of messages contained */ - msg_block_t messages [TBLOCK_SIZE]; -} T2R_MSG_TYPE; - -queue_t p2tq, t2rq, *r2cq_array; - -/* ShutDown, AllProduced are global flags to shut down the system & transmitter */ -static volatile unsigned int ShutDown = 0; -static volatile unsigned int AllProduced = 0; -static unsigned int DisplayMessages = 0; - -int main (int argc, char * argv[]) -{ - unsigned int tstatus = 0, nthread, ithread, goal, thid; - pthread_t *producer_th, *consumer_th, transmitter_th, receiver_th; - THARG *producer_arg, *consumer_arg; - - if (argc < 3) { - nthread = 32; - goal = 1000; - } else { - nthread = atoi(argv[1]); - goal = atoi(argv[2]); - if (argc >= 4) - DisplayMessages = atoi(argv[3]); - } - - srand ((int)time(NULL)); /* Seed the RN generator */ - - if (nthread > MAX_THREADS) { - printf ("Maximum number of producers or consumers is %d.\n", MAX_THREADS); - return 2; - } - producer_th = (pthread_t *) malloc (nthread * sizeof(pthread_t)); - producer_arg = (THARG *) calloc (nthread, sizeof (THARG)); - consumer_th = (pthread_t *) malloc (nthread * sizeof(pthread_t)); - consumer_arg = (THARG *) calloc (nthread, sizeof (THARG)); - - if (producer_th == NULL || producer_arg == NULL - || consumer_th == NULL || consumer_arg == NULL) - perror ("Cannot allocate working memory for threads."); - - q_initialize (&p2tq, sizeof(msg_block_t), P2T_QLEN); - q_initialize (&t2rq, sizeof(T2R_MSG_TYPE), T2R_QLEN); - /* Allocate and initialize Receiver to Consumer queue for each consumer */ - r2cq_array = (queue_t *) calloc (nthread, sizeof(queue_t)); - if (r2cq_array == NULL) perror ("Cannot allocate memory for r2c queues"); - - for (ithread = 0; ithread < nthread; ithread++) { - /* Initialize r2c queue for this consumer thread */ - q_initialize (&r2cq_array[ithread], sizeof(msg_block_t), R2C_QLEN); - /* Fill in the thread arg */ - consumer_arg[ithread].thread_number = ithread; - consumer_arg[ithread].work_goal = goal; - consumer_arg[ithread].work_done = 0; - - tstatus = pthread_create (&consumer_th[ithread], NULL, - consumer, (void *)&consumer_arg[ithread]); - if (tstatus != 0) - perror ("Cannot create consumer thread"); - - producer_arg[ithread].thread_number = ithread; - producer_arg[ithread].work_goal = goal; - producer_arg[ithread].work_done = 0; - tstatus = pthread_create (&producer_th[ithread], NULL, - producer, (void *)&producer_arg[ithread]); - if (tstatus != 0) - perror ("Cannot create producer thread"); - } - - tstatus = pthread_create (&transmitter_th, NULL, transmitter, &thid); - if (tstatus != 0) - perror ("Cannot create tranmitter thread"); - tstatus = pthread_create (&receiver_th, NULL, receiver, &thid); - if (tstatus != 0) - perror ("Cannot create receiver thread"); - - - printf ("BOSS: All threads are running\n"); - /* Wait for the producers to complete */ - /* The implementation allows too many threads for WaitForMultipleObjects */ - /* although you could call WFMO in a loop */ - for (ithread = 0; ithread < nthread; ithread++) { - tstatus = pthread_join (producer_th[ithread], NULL); - if (tstatus != 0) - perror ("Cannot wait for producer thread"); - printf ("BOSS: Producer %d produced %d work units\n", - ithread, producer_arg[ithread].work_done); - } - /* Producers have completed their work. */ - printf ("BOSS: All producers have completed their work.\n"); - AllProduced = 1; - - /* Wait for the consumers to complete */ - for (ithread = 0; ithread < nthread; ithread++) { - tstatus = pthread_join (consumer_th[ithread], NULL); - if (tstatus != 0) - perror ("Cannot wait for consumer thread"); - printf ("BOSS: consumer %d consumed %d work units\n", - ithread, consumer_arg[ithread].work_done); - } - printf ("BOSS: All consumers have completed their work.\n"); - - ShutDown = 1; /* Set a shutdown flag - All messages have been consumed */ - - /* Wait for the transmitter and receiver */ - - tstatus = pthread_join (transmitter_th, NULL); - if (tstatus != 0) - perror ("Failed waiting for transmitter"); - tstatus = pthread_join (receiver_th, NULL); - if (tstatus != 0) - perror ("Failed waiting for receiver"); - - q_destroy (&p2tq); - q_destroy (&t2rq); - for (ithread = 0; ithread < nthread; ithread++) - q_destroy (&r2cq_array[ithread]); - free (r2cq_array); - free (producer_th); - free (consumer_th); - free (producer_arg); - free(consumer_arg); - printf ("System has finished. Shutting down\n"); - return 0; -} - -void * producer (void * arg) -{ - THARG * parg; - unsigned int ithread, tstatus = 0; - msg_block_t msg; - - parg = (THARG *)arg; - ithread = parg->thread_number; - - while (parg->work_done < parg->work_goal && !ShutDown) { - /* Periodically produce work units until the goal is satisfied */ - /* messages receive a source and destination address which are */ - /* the same in this case but could, in general, be different. */ - sleep (rand()/100000000); - message_fill (&msg, ithread, ithread, parg->work_done); - - /* put the message in the queue - Use an infinite timeout to assure - * that the message is inserted, even if consumers are delayed */ - tstatus = q_put (&p2tq, &msg, sizeof(msg), INFINITE); - if (0 == tstatus) { - parg->work_done++; - } - } - - return 0; -} - -void * consumer (void * arg) -{ - THARG * carg; - unsigned int tstatus = 0, ithread, Retries = 0; - msg_block_t msg; - queue_t *pr2cq; - - carg = (THARG *) arg; - ithread = carg->thread_number; - - carg = (THARG *)arg; - pr2cq = &r2cq_array[ithread]; - - while (carg->work_done < carg->work_goal && Retries < MAX_RETRY && !ShutDown) { - /* Receive and display/process messages */ - /* Try to receive the requested number of messages, - * but allow for early system shutdown */ - - tstatus = q_get (pr2cq, &msg, sizeof(msg), Q_TIMEOUT); - if (0 == tstatus) { - if (DisplayMessages > 0) message_display (&msg); - carg->work_done++; - Retries = 0; - } else { - Retries++; - } - } - - return NULL; -} - -void * transmitter (void * arg) -{ - - /* Obtain multiple producer messages, combining into a single */ - /* compound message for the receiver */ - - unsigned int tstatus = 0, im, Retries = 0; - T2R_MSG_TYPE t2r_msg = {0}; - msg_block_t p2t_msg; - - while (!ShutDown && !AllProduced) { - t2r_msg.num_msgs = 0; - /* pack the messages for transmission to the receiver */ - im = 0; - while (im < TBLOCK_SIZE && !ShutDown && Retries < MAX_RETRY && !AllProduced) { - tstatus = q_get (&p2tq, &p2t_msg, sizeof(p2t_msg), Q_TIMEOUT); - if (0 == tstatus) { - memcpy (&t2r_msg.messages[im], &p2t_msg, sizeof(p2t_msg)); - t2r_msg.num_msgs++; - im++; - Retries = 0; - } else { /* Timed out. */ - Retries++; - } - } - tstatus = q_put (&t2rq, &t2r_msg, sizeof(t2r_msg), INFINITE); - if (tstatus != 0) return NULL; - } - return NULL; -} - - -void * receiver (void * arg) -{ - /* Obtain compound messages from the transmitter and unblock them */ - /* and transmit to the designated consumer. */ - - unsigned int tstatus = 0, im, ic, Retries = 0; - T2R_MSG_TYPE t2r_msg; - msg_block_t r2c_msg; - - while (!ShutDown && Retries < MAX_RETRY) { - tstatus = q_get (&t2rq, &t2r_msg, sizeof(t2r_msg), Q_TIMEOUT); - if (tstatus != 0) { /* Timeout - Have the producers shut down? */ - Retries++; - continue; - } - Retries = 0; - /* Distribute the packaged messages to the proper consumer */ - im = 0; - while (im < t2r_msg.num_msgs) { - memcpy (&r2c_msg, &t2r_msg.messages[im], sizeof(r2c_msg)); - ic = r2c_msg.destination; /* Destination consumer */ - tstatus = q_put (&r2cq_array[ic], &r2c_msg, sizeof(r2c_msg), INFINITE); - if (0 == tstatus) im++; - } - } - return NULL; -} - -#if (!defined INFINITE) -#define INFINITE 0xFFFFFFFF -#endif - -/* - Finite bounded queue management functions - q_get, q_put timeouts (max_wait) are in ms - convert to sec, rounding up - */ -unsigned int q_get (queue_t *q, void * msg, unsigned int msize, unsigned int MaxWait) -{ - int tstatus = 0, got_msg = 0, time_inc = (MaxWait + 999) /1000; - struct timespec timeout; - timeout.tv_nsec = 0; - - if (q_destroyed(q)) return 1; - pthread_mutex_lock (&q->q_guard); - while (q_empty (q) && 0 == tstatus) { - if (MaxWait != INFINITE) { - timeout.tv_sec = time(NULL) + time_inc; - tstatus = pthread_cond_timedwait (&q->q_ne, &q->q_guard, &timeout); - } else { - tstatus = pthread_cond_wait (&q->q_ne, &q->q_guard); - } - } - /* remove the message, if any, from the queue */ - if (0 == tstatus && !q_empty (q)) { - q_remove (q, msg, msize); - got_msg = 1; - /* Signal that the queue is not full as we've removed a message */ - pthread_cond_broadcast (&q->q_nf); - } - pthread_mutex_unlock (&q->q_guard); - return (0 == tstatus && got_msg == 1 ? 0 : max(1, tstatus)); /* 0 indicates success */ -} - -unsigned int q_put (queue_t *q, void * msg, unsigned int msize, unsigned int MaxWait) -{ - int tstatus = 0, put_msg = 0, time_inc = (MaxWait + 999) /1000; - struct timespec timeout; - timeout.tv_nsec = 0; - - if (q_destroyed(q)) return 1; - pthread_mutex_lock (&q->q_guard); - while (q_full (q) && 0 == tstatus) { - if (MaxWait != INFINITE) { - timeout.tv_sec = time(NULL) + time_inc; - tstatus = pthread_cond_timedwait (&q->q_nf, &q->q_guard, &timeout); - } else { - tstatus = pthread_cond_wait (&q->q_nf, &q->q_guard); - } - } - /* Insert the message into the queue if there's room */ - if (0 == tstatus && !q_full (q)) { - q_insert (q, msg, msize); - put_msg = 1; - /* Signal that the queue is not empty as we've inserted a message */ - pthread_cond_broadcast (&q->q_ne); - } - pthread_mutex_unlock (&q->q_guard); - return (0 == tstatus && put_msg == 1 ? 0 : max(1, tstatus)); /* 0 indictates success */ -} - -unsigned int q_initialize (queue_t *q, unsigned int msize, unsigned int nmsgs) -{ - /* Initialize queue, including its mutex and events */ - /* Allocate storage for all messages. */ - - q->q_first = q->q_last = 0; - q->q_size = nmsgs; - q->q_destroyed = 0; - - pthread_mutex_init (&q->q_guard, NULL); - pthread_cond_init (&q->q_ne, NULL); - pthread_cond_init (&q->q_nf, NULL); - - if ((q->msg_array = calloc (nmsgs, msize)) == NULL) return 1; - return 0; /* No error */ -} - -unsigned int q_destroy (queue_t *q) -{ - if (q_destroyed(q)) return 1; - /* Free all the resources created by q_initialize */ - pthread_mutex_lock (&q->q_guard); - q->q_destroyed = 1; - free (q->msg_array); - pthread_cond_destroy (&q->q_ne); - pthread_cond_destroy (&q->q_nf); - pthread_mutex_unlock (&q->q_guard); - pthread_mutex_destroy (&q->q_guard); - - return 0; -} - -unsigned int q_destroyed (queue_t *q) -{ - return (q->q_destroyed); -} - -unsigned int q_empty (queue_t *q) -{ - return (q->q_first == q->q_last); -} - -unsigned int q_full (queue_t *q) -{ - return ((q->q_first - q->q_last) == 1 || - (q->q_last == q->q_size-1 && q->q_first == 0)); -} - - -unsigned int q_remove (queue_t *q, void * msg, unsigned int msize) -{ - char *pm; - - pm = (char *)q->msg_array; - /* Remove oldest ("first") message */ - memcpy (msg, pm + (q->q_first * msize), msize); - // Invalidate the message - q->q_first = ((q->q_first + 1) % q->q_size); - return 0; /* no error */ -} - -unsigned int q_insert (queue_t *q, void * msg, unsigned int msize) -{ - char *pm; - - pm = (char *)q->msg_array; - /* Add a new youngest ("last") message */ - if (q_full(q)) return 1; /* Error - Q is full */ - memcpy (pm + (q->q_last * msize), msg, msize); - q->q_last = ((q->q_last + 1) % q->q_size); - - return 0; -} - -unsigned int compute_checksum (void * msg, unsigned int length) -{ - /* Computer an xor checksum on the entire message of "length" - * integers */ - unsigned int i, cs = 0, *pint; - - pint = (unsigned int *) msg; - for (i = 0; i < length; i++) { - cs = (cs ^ *pint); - pint++; - } - return cs; -} - -void message_fill (msg_block_t *mblock, unsigned int src, unsigned int dest, unsigned int seqno) -{ - /* Fill the message buffer, and include checksum and timestamp */ - /* This function is called from the producer thread while it */ - /* owns the message block mutex */ - - unsigned int i; - - mblock->checksum = 0; - for (i = 0; i < DATA_SIZE; i++) { - mblock->data[i] = rand(); - } - mblock->source = src; - mblock->destination = dest; - mblock->sequence = seqno; - mblock->timestamp = time(NULL); - mblock->checksum = compute_checksum (mblock, sizeof(msg_block_t)/sizeof(unsigned int)); - /* printf ("Generated message: %d %d %d %d %x %x\n", - src, dest, seqno, mblock->timestamp, - mblock->data[0], mblock->data[DATA_SIZE-1]); */ - return; -} - -void message_display (msg_block_t *mblock) -{ - /* Display message buffer and timestamp, validate checksum */ - /* This function is called from the consumer thread while it */ - /* owns the message block mutex */ - unsigned int tcheck = 0; - - tcheck = compute_checksum (mblock, sizeof(msg_block_t)/sizeof(unsigned int)); - printf ("\nMessage number %d generated at: %s", - mblock->sequence, ctime (&(mblock->timestamp))); - printf ("Source and destination: %d %d\n", - mblock->source, mblock->destination); - printf ("First and last entries: %x %x\n", - mblock->data[0], mblock->data[DATA_SIZE-1]); - if (tcheck == 0 /*mblock->checksum was 0 when CS first computed */) - printf ("GOOD ->Checksum was validated.\n"); - else - printf ("BAD ->Checksum failed. message was corrupted\n"); - - return; - -} +/* + This source code is taken directly from examples in the book + Windows System Programming, Edition 4 by Johnson (John) Hart + + Session 6, Chapter 10. ThreeStage.c + + Several required additional header and source files from the + book examples have been included inline to simplify building. + The only modification to the code has been to provide default + values when run without arguments. + + Three-stage Producer Consumer system + Other files required in this project, either directly or + in the form of libraries (DLLs are preferable) + QueueObj.c (inlined here) + Messages.c (inlined here) + + Usage: ThreeStage npc goal [display] + start up "npc" paired producer and consumer threads. + Display messages if "display" is non-zero + Each producer must produce a total of + "goal" messages, where each message is tagged + with the consumer that should receive it + Messages are sent to a "transmitter thread" which performs + additional processing before sending message groups to the + "receiver thread." Finally, the receiver thread sends + the messages to the consumer threads. + + Transmitter: Receive messages one at a time from producers, + create a transmission message of up to "TBLOCK_SIZE" messages + to be sent to the Receiver. (this could be a network xfer + Receiver: Take message blocks sent by the Transmitter + and send the individual messages to the designated consumer + */ + +/* Suppress warning re use of ctime() */ +#define _CRT_SECURE_NO_WARNINGS 1 + +#include "test.h" +#define sleep(i) Sleep(i*1000) +#ifndef max +#define max(a,b) ((a) > (b) ? (a) : (b)) +#endif + +#define DATA_SIZE 256 +typedef struct msg_block_tag { /* Message block */ + pthread_mutex_t mguard; /* Mutex for the message block */ + pthread_cond_t mconsumed; /* Event: Message consumed; */ + /* Produce a new one or stop */ + pthread_cond_t mready; /* Event: Message ready */ + /* + * Note: the mutex and events are not used by some programs, such + * as Program 10-3, 4, 5 (the multi-stage pipeline) as the messages + * are part of a protected queue + */ + volatile unsigned int source; /* Creating producer identity */ + volatile unsigned int destination;/* Identity of receiving thread*/ + + volatile unsigned int f_consumed; + volatile unsigned int f_ready; + volatile unsigned int f_stop; + /* Consumed & ready state flags, stop flag */ + volatile unsigned int sequence; /* Message block sequence number */ + time_t timestamp; + unsigned int checksum; /* Message contents checksum */ + unsigned int data[DATA_SIZE]; /* Message Contents */ +} msg_block_t; + +void message_fill (msg_block_t *, unsigned int, unsigned int, unsigned int); +void message_display (msg_block_t *); + +#define CV_TIMEOUT 5 /* tunable parameter for the CV model */ + + +/* + Definitions of a synchronized, general bounded queue structure. + Queues are implemented as arrays with indices to youngest + and oldest messages, with wrap around. + Each queue also contains a guard mutex and + "not empty" and "not full" condition variables. + Finally, there is a pointer to an array of messages of + arbitrary type + */ + +typedef struct queue_tag { /* General purpose queue */ + pthread_mutex_t q_guard;/* Guard the message block */ + pthread_cond_t q_ne; /* Event: Queue is not empty */ + pthread_cond_t q_nf; /* Event: Queue is not full */ + /* These two events are manual-reset for the broadcast model + * and auto-reset for the signal model */ + volatile unsigned int q_size; /* Queue max size size */ + volatile unsigned int q_first; /* Index of oldest message */ + volatile unsigned int q_last; /* Index of youngest msg */ + volatile unsigned int q_destroyed;/* Q receiver has terminated */ + void * msg_array; /* array of q_size messages */ +} queue_t; + +/* Queue management functions */ +unsigned int q_initialize (queue_t *, unsigned int, unsigned int); +unsigned int q_destroy (queue_t *); +unsigned int q_destroyed (queue_t *); +unsigned int q_empty (queue_t *); +unsigned int q_full (queue_t *); +unsigned int q_get (queue_t *, void *, unsigned int, unsigned int); +unsigned int q_put (queue_t *, void *, unsigned int, unsigned int); +unsigned int q_remove (queue_t *, void *, unsigned int); +unsigned int q_insert (queue_t *, void *, unsigned int); + +#include +#include +#include + +#define DELAY_COUNT 1000 +#define MAX_THREADS 1024 + +/* Queue lengths and blocking factors. These numbers are arbitrary and */ +/* can be adjusted for performance tuning. The current values are */ +/* not well balanced. */ + +#define TBLOCK_SIZE 5 /* Transmitter combines this many messages at at time */ +#define Q_TIMEOUT 2000 /* Transmiter and receiver timeout (ms) waiting for messages */ +//#define Q_TIMEOUT INFINITE +#define MAX_RETRY 5 /* Number of q_get retries before quitting */ +#define P2T_QLEN 10 /* Producer to Transmitter queue length */ +#define T2R_QLEN 4 /* Transmitter to Receiver queue length */ +#define R2C_QLEN 4 /* Receiver to Consumer queue length - there is one + * such queue for each consumer */ + +void * producer (void *); +void * consumer (void *); +void * transmitter (void *); +void * receiver (void *); + + +typedef struct _THARG { + volatile unsigned int thread_number; + volatile unsigned int work_goal; /* used by producers */ + volatile unsigned int work_done; /* Used by producers and consumers */ +} THARG; + + +/* Grouped messages sent by the transmitter to receiver */ +typedef struct T2R_MSG_TYPEag { + volatile unsigned int num_msgs; /* Number of messages contained */ + msg_block_t messages [TBLOCK_SIZE]; +} T2R_MSG_TYPE; + +queue_t p2tq, t2rq, *r2cq_array; + +/* ShutDown, AllProduced are global flags to shut down the system & transmitter */ +static volatile unsigned int ShutDown = 0; +static volatile unsigned int AllProduced = 0; +static unsigned int DisplayMessages = 0; + +int main (int argc, char * argv[]) +{ + unsigned int tstatus = 0, nthread, ithread, goal, thid; + pthread_t *producer_th, *consumer_th, transmitter_th, receiver_th; + THARG *producer_arg, *consumer_arg; + + if (argc < 3) { + nthread = 32; + goal = 1000; + } else { + nthread = atoi(argv[1]); + goal = atoi(argv[2]); + if (argc >= 4) + DisplayMessages = atoi(argv[3]); + } + + srand ((int)time(NULL)); /* Seed the RN generator */ + + if (nthread > MAX_THREADS) { + printf ("Maximum number of producers or consumers is %d.\n", MAX_THREADS); + return 2; + } + producer_th = (pthread_t *) malloc (nthread * sizeof(pthread_t)); + producer_arg = (THARG *) calloc (nthread, sizeof (THARG)); + consumer_th = (pthread_t *) malloc (nthread * sizeof(pthread_t)); + consumer_arg = (THARG *) calloc (nthread, sizeof (THARG)); + + if (producer_th == NULL || producer_arg == NULL + || consumer_th == NULL || consumer_arg == NULL) + perror ("Cannot allocate working memory for threads."); + + q_initialize (&p2tq, sizeof(msg_block_t), P2T_QLEN); + q_initialize (&t2rq, sizeof(T2R_MSG_TYPE), T2R_QLEN); + /* Allocate and initialize Receiver to Consumer queue for each consumer */ + r2cq_array = (queue_t *) calloc (nthread, sizeof(queue_t)); + if (r2cq_array == NULL) perror ("Cannot allocate memory for r2c queues"); + + for (ithread = 0; ithread < nthread; ithread++) { + /* Initialize r2c queue for this consumer thread */ + q_initialize (&r2cq_array[ithread], sizeof(msg_block_t), R2C_QLEN); + /* Fill in the thread arg */ + consumer_arg[ithread].thread_number = ithread; + consumer_arg[ithread].work_goal = goal; + consumer_arg[ithread].work_done = 0; + + tstatus = pthread_create (&consumer_th[ithread], NULL, + consumer, (void *)&consumer_arg[ithread]); + if (tstatus != 0) + perror ("Cannot create consumer thread"); + + producer_arg[ithread].thread_number = ithread; + producer_arg[ithread].work_goal = goal; + producer_arg[ithread].work_done = 0; + tstatus = pthread_create (&producer_th[ithread], NULL, + producer, (void *)&producer_arg[ithread]); + if (tstatus != 0) + perror ("Cannot create producer thread"); + } + + tstatus = pthread_create (&transmitter_th, NULL, transmitter, &thid); + if (tstatus != 0) + perror ("Cannot create tranmitter thread"); + tstatus = pthread_create (&receiver_th, NULL, receiver, &thid); + if (tstatus != 0) + perror ("Cannot create receiver thread"); + + + printf ("BOSS: All threads are running\n"); + /* Wait for the producers to complete */ + /* The implementation allows too many threads for WaitForMultipleObjects */ + /* although you could call WFMO in a loop */ + for (ithread = 0; ithread < nthread; ithread++) { + tstatus = pthread_join (producer_th[ithread], NULL); + if (tstatus != 0) + perror ("Cannot wait for producer thread"); + printf ("BOSS: Producer %d produced %d work units\n", + ithread, producer_arg[ithread].work_done); + } + /* Producers have completed their work. */ + printf ("BOSS: All producers have completed their work.\n"); + AllProduced = 1; + + /* Wait for the consumers to complete */ + for (ithread = 0; ithread < nthread; ithread++) { + tstatus = pthread_join (consumer_th[ithread], NULL); + if (tstatus != 0) + perror ("Cannot wait for consumer thread"); + printf ("BOSS: consumer %d consumed %d work units\n", + ithread, consumer_arg[ithread].work_done); + } + printf ("BOSS: All consumers have completed their work.\n"); + + ShutDown = 1; /* Set a shutdown flag - All messages have been consumed */ + + /* Wait for the transmitter and receiver */ + + tstatus = pthread_join (transmitter_th, NULL); + if (tstatus != 0) + perror ("Failed waiting for transmitter"); + tstatus = pthread_join (receiver_th, NULL); + if (tstatus != 0) + perror ("Failed waiting for receiver"); + + q_destroy (&p2tq); + q_destroy (&t2rq); + for (ithread = 0; ithread < nthread; ithread++) + q_destroy (&r2cq_array[ithread]); + free (r2cq_array); + free (producer_th); + free (consumer_th); + free (producer_arg); + free(consumer_arg); + printf ("System has finished. Shutting down\n"); + return 0; +} + +void * producer (void * arg) +{ + THARG * parg; + unsigned int ithread, tstatus = 0; + msg_block_t msg; + + parg = (THARG *)arg; + ithread = parg->thread_number; + + while (parg->work_done < parg->work_goal && !ShutDown) { + /* Periodically produce work units until the goal is satisfied */ + /* messages receive a source and destination address which are */ + /* the same in this case but could, in general, be different. */ + sleep (rand()/100000000); + message_fill (&msg, ithread, ithread, parg->work_done); + + /* put the message in the queue - Use an infinite timeout to assure + * that the message is inserted, even if consumers are delayed */ + tstatus = q_put (&p2tq, &msg, sizeof(msg), INFINITE); + if (0 == tstatus) { + parg->work_done++; + } + } + + return 0; +} + +void * consumer (void * arg) +{ + THARG * carg; + unsigned int tstatus = 0, ithread, Retries = 0; + msg_block_t msg; + queue_t *pr2cq; + + carg = (THARG *) arg; + ithread = carg->thread_number; + + carg = (THARG *)arg; + pr2cq = &r2cq_array[ithread]; + + while (carg->work_done < carg->work_goal && Retries < MAX_RETRY && !ShutDown) { + /* Receive and display/process messages */ + /* Try to receive the requested number of messages, + * but allow for early system shutdown */ + + tstatus = q_get (pr2cq, &msg, sizeof(msg), Q_TIMEOUT); + if (0 == tstatus) { + if (DisplayMessages > 0) message_display (&msg); + carg->work_done++; + Retries = 0; + } else { + Retries++; + } + } + + return NULL; +} + +void * transmitter (void * arg) +{ + + /* Obtain multiple producer messages, combining into a single */ + /* compound message for the receiver */ + + unsigned int tstatus = 0, im, Retries = 0; + T2R_MSG_TYPE t2r_msg = {0}; + msg_block_t p2t_msg; + + while (!ShutDown && !AllProduced) { + t2r_msg.num_msgs = 0; + /* pack the messages for transmission to the receiver */ + im = 0; + while (im < TBLOCK_SIZE && !ShutDown && Retries < MAX_RETRY && !AllProduced) { + tstatus = q_get (&p2tq, &p2t_msg, sizeof(p2t_msg), Q_TIMEOUT); + if (0 == tstatus) { + memcpy (&t2r_msg.messages[im], &p2t_msg, sizeof(p2t_msg)); + t2r_msg.num_msgs++; + im++; + Retries = 0; + } else { /* Timed out. */ + Retries++; + } + } + tstatus = q_put (&t2rq, &t2r_msg, sizeof(t2r_msg), INFINITE); + if (tstatus != 0) return NULL; + } + return NULL; +} + + +void * receiver (void * arg) +{ + /* Obtain compound messages from the transmitter and unblock them */ + /* and transmit to the designated consumer. */ + + unsigned int tstatus = 0, im, ic, Retries = 0; + T2R_MSG_TYPE t2r_msg; + msg_block_t r2c_msg; + + while (!ShutDown && Retries < MAX_RETRY) { + tstatus = q_get (&t2rq, &t2r_msg, sizeof(t2r_msg), Q_TIMEOUT); + if (tstatus != 0) { /* Timeout - Have the producers shut down? */ + Retries++; + continue; + } + Retries = 0; + /* Distribute the packaged messages to the proper consumer */ + im = 0; + while (im < t2r_msg.num_msgs) { + memcpy (&r2c_msg, &t2r_msg.messages[im], sizeof(r2c_msg)); + ic = r2c_msg.destination; /* Destination consumer */ + tstatus = q_put (&r2cq_array[ic], &r2c_msg, sizeof(r2c_msg), INFINITE); + if (0 == tstatus) im++; + } + } + return NULL; +} + +#if (!defined INFINITE) +#define INFINITE 0xFFFFFFFF +#endif + +/* + Finite bounded queue management functions + q_get, q_put timeouts (max_wait) are in ms - convert to sec, rounding up + */ +unsigned int q_get (queue_t *q, void * msg, unsigned int msize, unsigned int MaxWait) +{ + int tstatus = 0, got_msg = 0, time_inc = (MaxWait + 999) /1000; + struct timespec timeout; + timeout.tv_nsec = 0; + + if (q_destroyed(q)) return 1; + pthread_mutex_lock (&q->q_guard); + while (q_empty (q) && 0 == tstatus) { + if (MaxWait != INFINITE) { + timeout.tv_sec = time(NULL) + time_inc; + tstatus = pthread_cond_timedwait (&q->q_ne, &q->q_guard, &timeout); + } else { + tstatus = pthread_cond_wait (&q->q_ne, &q->q_guard); + } + } + /* remove the message, if any, from the queue */ + if (0 == tstatus && !q_empty (q)) { + q_remove (q, msg, msize); + got_msg = 1; + /* Signal that the queue is not full as we've removed a message */ + pthread_cond_broadcast (&q->q_nf); + } + pthread_mutex_unlock (&q->q_guard); + return (0 == tstatus && got_msg == 1 ? 0 : max(1, tstatus)); /* 0 indicates success */ +} + +unsigned int q_put (queue_t *q, void * msg, unsigned int msize, unsigned int MaxWait) +{ + int tstatus = 0, put_msg = 0, time_inc = (MaxWait + 999) /1000; + struct timespec timeout; + timeout.tv_nsec = 0; + + if (q_destroyed(q)) return 1; + pthread_mutex_lock (&q->q_guard); + while (q_full (q) && 0 == tstatus) { + if (MaxWait != INFINITE) { + timeout.tv_sec = time(NULL) + time_inc; + tstatus = pthread_cond_timedwait (&q->q_nf, &q->q_guard, &timeout); + } else { + tstatus = pthread_cond_wait (&q->q_nf, &q->q_guard); + } + } + /* Insert the message into the queue if there's room */ + if (0 == tstatus && !q_full (q)) { + q_insert (q, msg, msize); + put_msg = 1; + /* Signal that the queue is not empty as we've inserted a message */ + pthread_cond_broadcast (&q->q_ne); + } + pthread_mutex_unlock (&q->q_guard); + return (0 == tstatus && put_msg == 1 ? 0 : max(1, tstatus)); /* 0 indictates success */ +} + +unsigned int q_initialize (queue_t *q, unsigned int msize, unsigned int nmsgs) +{ + /* Initialize queue, including its mutex and events */ + /* Allocate storage for all messages. */ + + q->q_first = q->q_last = 0; + q->q_size = nmsgs; + q->q_destroyed = 0; + + pthread_mutex_init (&q->q_guard, NULL); + pthread_cond_init (&q->q_ne, NULL); + pthread_cond_init (&q->q_nf, NULL); + + if ((q->msg_array = calloc (nmsgs, msize)) == NULL) return 1; + return 0; /* No error */ +} + +unsigned int q_destroy (queue_t *q) +{ + if (q_destroyed(q)) return 1; + /* Free all the resources created by q_initialize */ + pthread_mutex_lock (&q->q_guard); + q->q_destroyed = 1; + free (q->msg_array); + pthread_cond_destroy (&q->q_ne); + pthread_cond_destroy (&q->q_nf); + pthread_mutex_unlock (&q->q_guard); + pthread_mutex_destroy (&q->q_guard); + + return 0; +} + +unsigned int q_destroyed (queue_t *q) +{ + return (q->q_destroyed); +} + +unsigned int q_empty (queue_t *q) +{ + return (q->q_first == q->q_last); +} + +unsigned int q_full (queue_t *q) +{ + return ((q->q_first - q->q_last) == 1 || + (q->q_last == q->q_size-1 && q->q_first == 0)); +} + + +unsigned int q_remove (queue_t *q, void * msg, unsigned int msize) +{ + char *pm; + + pm = (char *)q->msg_array; + /* Remove oldest ("first") message */ + memcpy (msg, pm + (q->q_first * msize), msize); + // Invalidate the message + q->q_first = ((q->q_first + 1) % q->q_size); + return 0; /* no error */ +} + +unsigned int q_insert (queue_t *q, void * msg, unsigned int msize) +{ + char *pm; + + pm = (char *)q->msg_array; + /* Add a new youngest ("last") message */ + if (q_full(q)) return 1; /* Error - Q is full */ + memcpy (pm + (q->q_last * msize), msg, msize); + q->q_last = ((q->q_last + 1) % q->q_size); + + return 0; +} + +unsigned int compute_checksum (void * msg, unsigned int length) +{ + /* Computer an xor checksum on the entire message of "length" + * integers */ + unsigned int i, cs = 0, *pint; + + pint = (unsigned int *) msg; + for (i = 0; i < length; i++) { + cs = (cs ^ *pint); + pint++; + } + return cs; +} + +void message_fill (msg_block_t *mblock, unsigned int src, unsigned int dest, unsigned int seqno) +{ + /* Fill the message buffer, and include checksum and timestamp */ + /* This function is called from the producer thread while it */ + /* owns the message block mutex */ + + unsigned int i; + + mblock->checksum = 0; + for (i = 0; i < DATA_SIZE; i++) { + mblock->data[i] = rand(); + } + mblock->source = src; + mblock->destination = dest; + mblock->sequence = seqno; + mblock->timestamp = time(NULL); + mblock->checksum = compute_checksum (mblock, sizeof(msg_block_t)/sizeof(unsigned int)); + /* printf ("Generated message: %d %d %d %d %x %x\n", + src, dest, seqno, mblock->timestamp, + mblock->data[0], mblock->data[DATA_SIZE-1]); */ + return; +} + +void message_display (msg_block_t *mblock) +{ + /* Display message buffer and timestamp, validate checksum */ + /* This function is called from the consumer thread while it */ + /* owns the message block mutex */ + unsigned int tcheck = 0; + + tcheck = compute_checksum (mblock, sizeof(msg_block_t)/sizeof(unsigned int)); + printf ("\nMessage number %d generated at: %s", + mblock->sequence, ctime (&(mblock->timestamp))); + printf ("Source and destination: %d %d\n", + mblock->source, mblock->destination); + printf ("First and last entries: %x %x\n", + mblock->data[0], mblock->data[DATA_SIZE-1]); + if (tcheck == 0 /*mblock->checksum was 0 when CS first computed */) + printf ("GOOD ->Checksum was validated.\n"); + else + printf ("BAD ->Checksum failed. message was corrupted\n"); + + return; + +} diff --git a/tests/timeouts.c b/tests/timeouts.c index 1362d08d..e63a8ead 100644 --- a/tests/timeouts.c +++ b/tests/timeouts.c @@ -1,252 +1,249 @@ -/* - * File: timeouts.c - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Test Synopsis: - * - confirm accuracy of abstime calculations and timeouts - * - * Test Method (Validation or Falsification): - * - time actual CV wait timeout using a sequence of increasing sub 1 second timeouts. - * - * Requirements Tested: - * - - * - * Features Tested: - * - - * - * Cases Tested: - * - - * - * Description: - * - - * - * Environment: - * - - * - * Input: - * - None. - * - * Output: - * - Printed measured elapsed time should closely match specified timeout. - * - Return code should always be ETIMEDOUT (usually 138 but possibly 10060) - * - * Assumptions: - * - - * - * Pass Criteria: - * - Relies on observation. - * - * Fail Criteria: - * - - */ - -#include "test.h" - -/* - */ - -#include -#include -#include -#include -#include -#include - -#include "pthread.h" - -#define DEFAULT_MINTIME_INIT 999999999 -#define CYG_ONEBILLION 1000000000LL -#define CYG_ONEMILLION 1000000LL -#define CYG_ONEKAPPA 1000LL - -#if defined(_MSC_VER) && (_MSC_VER > 1200) -typedef long long cyg_tim_t; //msvc > 6.0 -#else -typedef int64_t cyg_tim_t; //msvc 6.0 -#endif - -LARGE_INTEGER frequency; -LARGE_INTEGER global_start; - -cyg_tim_t CYG_DIFFT(cyg_tim_t t1, cyg_tim_t t2) -{ - return (cyg_tim_t)((t2 - t1) * CYG_ONEBILLION / frequency.QuadPart); //nsec -} - -void CYG_InitTimers() -{ - QueryPerformanceFrequency(&frequency); - global_start.QuadPart = 0; -} - -void CYG_MARK1(cyg_tim_t *T) -{ - LARGE_INTEGER curTime; - QueryPerformanceCounter (&curTime); - *T = (curTime.QuadPart);// + global_start.QuadPart); -} - -///////////////////GetTimestampTS///////////////// - -#if 1 - -int GetTimestampTS(struct timespec *tv) -{ - struct _timeb timebuffer; - -#if !(_MSC_VER <= 1200) - _ftime64_s( &timebuffer ); //msvc > 6.0 -#else - _ftime( &timebuffer ); //msvc = 6.0 -#endif - - tv->tv_sec = timebuffer.time; - tv->tv_nsec = 1000000L * timebuffer.millitm; - return 0; -} - -#else - -int GetTimestampTS(struct timespec *tv) -{ - static LONGLONG epoch = 0; - SYSTEMTIME local; - FILETIME abs; - LONGLONG now; - - if(!epoch) { - memset(&local,0,sizeof(SYSTEMTIME)); - local.wYear = 1970; - local.wMonth = 1; - local.wDay = 1; - local.wHour = 0; - local.wMinute = 0; - local.wSecond = 0; - SystemTimeToFileTime(&local, &abs); - epoch = *(LONGLONG *)&abs; - } - GetSystemTime(&local); - SystemTimeToFileTime(&local, &abs); - now = *(LONGLONG *)&abs; - now = now - epoch; - tv->tv_sec = (long)(now / 10000000); - tv->tv_nsec = (long)((now * 100) % 1000000000); - - return 0; -} - -#endif - -///////////////////GetTimestampTS///////////////// - - -#define MSEC_F 1000000L -#define USEC_F 1000L -#define NSEC_F 1L - -pthread_mutexattr_t mattr_; -pthread_mutex_t mutex_; -pthread_condattr_t cattr_; -pthread_cond_t cv_; - -int Init(void) -{ - pthread_mutexattr_init(&mattr_); - pthread_mutex_init(&mutex_, &mattr_); - pthread_condattr_init(&cattr_); - pthread_cond_init(&cv_, &cattr_); - return 0; -} - -int Destroy(void) -{ - pthread_cond_destroy(&cv_); - pthread_mutex_destroy(&mutex_); - pthread_mutexattr_destroy(&mattr_); - pthread_condattr_destroy(&cattr_); - return 0; -} - -int Wait(time_t sec, long nsec) -{ - struct timespec abstime; - long sc; - int result = 0; - GetTimestampTS(&abstime); - abstime.tv_sec += sec; - abstime.tv_nsec += nsec; - if((sc = (abstime.tv_nsec / 1000000000L))){ - abstime.tv_sec += sc; - abstime.tv_nsec %= 1000000000L; - } - pthread_mutex_lock(&mutex_); - /* - * We don't need to check the CV. - */ - result = pthread_cond_timedwait(&cv_, &mutex_, &abstime); - pthread_mutex_unlock(&mutex_); - return result; -} - -char tbuf[128]; -void printtim(cyg_tim_t rt, cyg_tim_t dt, int wres) -{ - printf("wait result [%d]: timeout(ms) [expected/actual]: %ld/%ld\n", wres, (long)(rt/CYG_ONEMILLION), (long)(dt/CYG_ONEMILLION)); -} - - -int main(int argc, char* argv[]) -{ - int i = 0; - int wres = 0; - cyg_tim_t t1, t2, dt, rt; - - CYG_InitTimers(); - - Init(); - - while(i++ < 10){ - rt = 90*i*MSEC_F; - CYG_MARK1(&t1); - wres = Wait(0, (long)(size_t)rt); - CYG_MARK1(&t2); - dt = CYG_DIFFT(t1, t2); - printtim(rt, dt, wres); - } - - Destroy(); - - return 0; -} +/* + * File: timeouts.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Test Synopsis: + * - confirm accuracy of abstime calculations and timeouts + * + * Test Method (Validation or Falsification): + * - time actual CV wait timeout using a sequence of increasing sub 1 second timeouts. + * + * Requirements Tested: + * - + * + * Features Tested: + * - + * + * Cases Tested: + * - + * + * Description: + * - + * + * Environment: + * - + * + * Input: + * - None. + * + * Output: + * - Printed measured elapsed time should closely match specified timeout. + * - Return code should always be ETIMEDOUT (usually 138 but possibly 10060) + * + * Assumptions: + * - + * + * Pass Criteria: + * - Relies on observation. + * + * Fail Criteria: + * - + */ + +#include "test.h" + +/* + */ + +#include +#include +#include +#include +#include +#include + +#include "pthread.h" + +#define DEFAULT_MINTIME_INIT 999999999 +#define CYG_ONEBILLION 1000000000LL +#define CYG_ONEMILLION 1000000LL +#define CYG_ONEKAPPA 1000LL + +#if defined(_MSC_VER) && (_MSC_VER > 1200) +typedef long long cyg_tim_t; //msvc > 6.0 +#else +typedef int64_t cyg_tim_t; //msvc 6.0 +#endif + +LARGE_INTEGER frequency; +LARGE_INTEGER global_start; + +cyg_tim_t CYG_DIFFT(cyg_tim_t t1, cyg_tim_t t2) +{ + return (cyg_tim_t)((t2 - t1) * CYG_ONEBILLION / frequency.QuadPart); //nsec +} + +void CYG_InitTimers() +{ + QueryPerformanceFrequency(&frequency); + global_start.QuadPart = 0; +} + +void CYG_MARK1(cyg_tim_t *T) +{ + LARGE_INTEGER curTime; + QueryPerformanceCounter (&curTime); + *T = (curTime.QuadPart);// + global_start.QuadPart); +} + +///////////////////GetTimestampTS///////////////// + +#if 1 + +int GetTimestampTS(struct timespec *tv) +{ + struct _timeb timebuffer; + +#if !(_MSC_VER <= 1200) + _ftime64_s( &timebuffer ); //msvc > 6.0 +#else + _ftime( &timebuffer ); //msvc = 6.0 +#endif + + tv->tv_sec = timebuffer.time; + tv->tv_nsec = 1000000L * timebuffer.millitm; + return 0; +} + +#else + +int GetTimestampTS(struct timespec *tv) +{ + static LONGLONG epoch = 0; + SYSTEMTIME local; + FILETIME abs; + LONGLONG now; + + if(!epoch) { + memset(&local,0,sizeof(SYSTEMTIME)); + local.wYear = 1970; + local.wMonth = 1; + local.wDay = 1; + local.wHour = 0; + local.wMinute = 0; + local.wSecond = 0; + SystemTimeToFileTime(&local, &abs); + epoch = *(LONGLONG *)&abs; + } + GetSystemTime(&local); + SystemTimeToFileTime(&local, &abs); + now = *(LONGLONG *)&abs; + now = now - epoch; + tv->tv_sec = (long)(now / 10000000); + tv->tv_nsec = (long)((now * 100) % 1000000000); + + return 0; +} + +#endif + +///////////////////GetTimestampTS///////////////// + + +#define MSEC_F 1000000L +#define USEC_F 1000L +#define NSEC_F 1L + +pthread_mutexattr_t mattr_; +pthread_mutex_t mutex_; +pthread_condattr_t cattr_; +pthread_cond_t cv_; + +int Init(void) +{ + pthread_mutexattr_init(&mattr_); + pthread_mutex_init(&mutex_, &mattr_); + pthread_condattr_init(&cattr_); + pthread_cond_init(&cv_, &cattr_); + return 0; +} + +int Destroy(void) +{ + pthread_cond_destroy(&cv_); + pthread_mutex_destroy(&mutex_); + pthread_mutexattr_destroy(&mattr_); + pthread_condattr_destroy(&cattr_); + return 0; +} + +int Wait(time_t sec, long nsec) +{ + struct timespec abstime; + long sc; + int result = 0; + GetTimestampTS(&abstime); + abstime.tv_sec += sec; + abstime.tv_nsec += nsec; + if((sc = (abstime.tv_nsec / 1000000000L))){ + abstime.tv_sec += sc; + abstime.tv_nsec %= 1000000000L; + } + pthread_mutex_lock(&mutex_); + /* + * We don't need to check the CV. + */ + result = pthread_cond_timedwait(&cv_, &mutex_, &abstime); + pthread_mutex_unlock(&mutex_); + return result; +} + +char tbuf[128]; +void printtim(cyg_tim_t rt, cyg_tim_t dt, int wres) +{ + printf("wait result [%d]: timeout(ms) [expected/actual]: %ld/%ld\n", wres, (long)(rt/CYG_ONEMILLION), (long)(dt/CYG_ONEMILLION)); +} + + +int main(int argc, char* argv[]) +{ + int i = 0; + int wres = 0; + cyg_tim_t t1, t2, dt, rt; + + CYG_InitTimers(); + + Init(); + + while(i++ < 10){ + rt = 90*i*MSEC_F; + CYG_MARK1(&t1); + wres = Wait(0, (long)(size_t)rt); + CYG_MARK1(&t2); + dt = CYG_DIFFT(t1, t2); + printtim(rt, dt, wres); + } + + Destroy(); + + return 0; +} diff --git a/tests/tryentercs.c b/tests/tryentercs.c index f94e914e..97d95f5a 100644 --- a/tests/tryentercs.c +++ b/tests/tryentercs.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/tryentercs2.c b/tests/tryentercs2.c index 2df8cd82..515be2ab 100644 --- a/tests/tryentercs2.c +++ b/tests/tryentercs2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/tsd1.c b/tests/tsd1.c index 4a5ade2c..29d61437 100644 --- a/tests/tsd1.c +++ b/tests/tsd1.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * * -------------------------------------------------------------------------- diff --git a/tests/tsd2.c b/tests/tsd2.c index 471026a9..a9c3bb74 100644 --- a/tests/tsd2.c +++ b/tests/tsd2.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * * -------------------------------------------------------------------------- diff --git a/tests/tsd3.c b/tests/tsd3.c index af88f989..ef8eb44d 100644 --- a/tests/tsd3.c +++ b/tests/tsd3.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * * -------------------------------------------------------------------------- diff --git a/tests/valid1.c b/tests/valid1.c index 13266795..9b09364d 100644 --- a/tests/valid1.c +++ b/tests/valid1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/valid2.c b/tests/valid2.c index ea07d238..073fc071 100644 --- a/tests/valid2.c +++ b/tests/valid2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/version.rc b/version.rc index 479f518a..c87a9f76 100644 --- a/version.rc +++ b/version.rc @@ -2,33 +2,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include @@ -129,15 +126,15 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "ProductName", "POSIX Threads for Windows LPGL\0" + VALUE "ProductName", "POSIX Threads for Windows\0" VALUE "ProductVersion", __PTW32_VERSION_STRING VALUE "FileVersion", __PTW32_VERSION_STRING VALUE "FileDescription", __PTW32_VERSIONINFO_DESCRIPTION VALUE "InternalName", __PTW32_VERSIONINFO_NAME VALUE "OriginalFilename", __PTW32_VERSIONINFO_NAME - VALUE "CompanyName", "Open Source Software community LGPL\0" - VALUE "LegalCopyright", "Copyright (C) Project contributors 2012\0" - VALUE "Comments", "http://sourceware.org/pthreads-win32/\0" + VALUE "CompanyName", "Open Source Software community\0" + VALUE "LegalCopyright", "Copyright - Project contributors 1999-2016\0" + VALUE "Comments", "https://sourceforge.net/p/pthreads4w/wiki/Contributors/\0" END END BLOCK "VarFileInfo" diff --git a/w32_CancelableWait.c b/w32_CancelableWait.c index 068affaf..58c11dec 100644 --- a/w32_CancelableWait.c +++ b/w32_CancelableWait.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H From 6f7dd6129e91b00a118e47711f6001852a1888b7 Mon Sep 17 00:00:00 2001 From: Nicholas Twerdochlib Date: Thu, 30 Mar 2017 12:17:18 -0400 Subject: [PATCH 127/207] changed _pth32.h to _ptw32.h for install --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2482459a..3a683e9a 100644 --- a/Makefile +++ b/Makefile @@ -210,7 +210,7 @@ install: if not exist $(HDRDEST) mkdir $(HDRDEST) if exist pthreadV*.dll copy pthreadV*.dll $(DLLDEST) copy pthreadV*.lib $(LIBDEST) - copy _pth32.h $(HDRDEST) + copy _ptw32.h $(HDRDEST) copy pthread.h $(HDRDEST) copy sched.h $(HDRDEST) copy semaphore.h $(HDRDEST) From 96711019609449a037381f7973d8c44842130569 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sun, 22 Jul 2018 18:08:29 +1000 Subject: [PATCH 128/207] Attempts to get /MT passing tests --- ChangeLog | 11 +++++++++++ Makefile | 12 +++++++++++- _ptw32.h | 4 ++-- dll.c | 7 +++++++ tests/ChangeLog | 5 +++++ tests/reinit1.c | 8 +++++++- 6 files changed, 43 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f6822c7..c91ed8a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2018-07-22 Ross Johnson + + * Makefile (all-tests-md): New; run the /MD build and tests from + all-tests-cflags. + * Makefile (all-tests-mt): New; run the /MT build and tests from + all-tests-cflags. + * Makefile (all-tests-cflags): retain; require all-tests-md and + all-tests-mt. + * _ptw32.h (int64_t): change from #define to typedef. + * _ptw32.h (uint64_t): Likewise. + 2016-12-25 Ross Johnson * Change all license notices to the Apache License 2.0 diff --git a/Makefile b/Makefile index 3a683e9a..f05ea016 100644 --- a/Makefile +++ b/Makefile @@ -114,11 +114,21 @@ all-tests: @ echo $@ completed successfully. all-tests-cflags: + $(MAKE) all-tests-md all-tests-mt + @ echo $@ completed successfully. + +all-tests-md: @ -$(SETENV) $(MAKE) all-tests XCFLAGS="/W3 /WX /MD /nologo" - $(MAKE) all-tests XCFLAGS="/W3 /WX /MT /nologo" !IF DEFINED(MORE_EXHAUSTIVE) $(MAKE) all-tests XCFLAGS="/W3 /WX /MDd /nologo" XDBG="-debug" +!ENDIF + @ echo $@ completed successfully. + +all-tests-mt: + @ -$(SETENV) + $(MAKE) all-tests XCFLAGS="/W3 /WX /MT /nologo" +!IF DEFINED(MORE_EXHAUSTIVE) $(MAKE) all-tests XCFLAGS="/W3 /WX /MTd /nologo" XDBG="-debug" !ENDIF @ echo $@ completed successfully. diff --git a/_ptw32.h b/_ptw32.h index 90d9794e..14174596 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -165,8 +165,8 @@ # define int64_t LONGLONG # define uint64_t ULONGLONG #elif !defined(__MINGW32__) -# define int64_t _int64 -# define uint64_t unsigned _int64 +typedef _int64 int64_t; +typedef unsigned _int64 uint64_t; # if defined (__PTW32_CONFIG_MSVC6) typedef long intptr_t; # endif diff --git a/dll.c b/dll.c index 3c9afd76..cac31fc3 100644 --- a/dll.c +++ b/dll.c @@ -163,6 +163,13 @@ EXTERN_C PIMAGE_TLS_CALLBACK _xl_b = TlsMain; static int on_process_init(void) { +#if defined(_MSC_VER) && !defined(_DLL) + extern int __cdecl _heap_init (void); + extern int __cdecl _mtinit (void); + + _heap_init(); + _mtinit(); +#endif pthread_win32_process_attach_np (); return 0; } diff --git a/tests/ChangeLog b/tests/ChangeLog index 271ce979..fa94ae84 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2018-07-22 Ross Johnson + + * reinit1.c: MSVC with /MT flag needs to explicitly call + pthread_win32_thread_detach_np(). + 2016-12-25 Ross Johnson * Change all license notices to the Apache License 2.0 diff --git a/tests/reinit1.c b/tests/reinit1.c index b8bfdb40..815ac6d1 100644 --- a/tests/reinit1.c +++ b/tests/reinit1.c @@ -1,7 +1,7 @@ /* * reinit1.c * - * Same test as rwlock7.c but loop two or times reinitialising the library + * Same test as rwlock7.c but loop two or more times reinitialising the library * each time, to test reinitialisation. We use a rwlock test because rw locks * use CVs, mutexes and semaphores internally. * @@ -146,6 +146,12 @@ main (int argc, char *argv[]) assert(pthread_join (threads[count].thread_id, NULL) == 0); } +#if defined(_MSC_VER) && !defined(_DLL) + /* + * We need this when compiling with MSVC and /MT or /MTd flag + */ + pthread_win32_thread_detach_np(); +#endif pthread_win32_process_detach_np(); pthread_win32_process_attach_np(); } From 4c682ab3588e8912551c3001c7b40493663c65b9 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 23 Jul 2018 20:54:35 +1000 Subject: [PATCH 129/207] Additiona ARM processor macro checks and ChangeLog attributions --- ChangeLog | 7 +++++++ context.h | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c91ed8a2..98a8d6c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2018-07-22 Carlo Bramini + + * context.h (ARM): Additional macros checked for ARM processors. + 2018-07-22 Ross Johnson * Makefile (all-tests-md): New; run the /MD build and tests from @@ -6,6 +10,9 @@ all-tests-cflags. * Makefile (all-tests-cflags): retain; require all-tests-md and all-tests-mt. + +2018-07-22 Mark Pizzolato + * _ptw32.h (int64_t): change from #define to typedef. * _ptw32.h (uint64_t): Likewise. diff --git a/context.h b/context.h index d567e854..be609009 100644 --- a/context.h +++ b/context.h @@ -61,8 +61,8 @@ #define __PTW32_PROGCTR(Context) ((Context).Rip) #endif -#if defined(_ARM_) || defined(ARM) -#define __PTW32_PROGCTR(Context) ((Context).Pc) +#if defined(_ARM_) || defined(ARM) || defined(_M_ARM) || defined(_M_ARM64) +#define PTW32_PROGCTR(Context) ((Context).Pc) #endif #if !defined (__PTW32_PROGCTR) From 4b81ab7831861449fedd1a9a55faf51bbdefd9af Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 1 Aug 2018 10:40:41 +1000 Subject: [PATCH 130/207] Indentation --- _ptw32.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_ptw32.h b/_ptw32.h index 14174596..90c8d388 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -165,8 +165,8 @@ # define int64_t LONGLONG # define uint64_t ULONGLONG #elif !defined(__MINGW32__) -typedef _int64 int64_t; -typedef unsigned _int64 uint64_t; + typedef _int64 int64_t; + typedef unsigned _int64 uint64_t; # if defined (__PTW32_CONFIG_MSVC6) typedef long intptr_t; # endif From 4e402ff2c674b0fabcc99c07d4bdd6961a64d0ed Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 1 Aug 2018 11:34:42 +1000 Subject: [PATCH 131/207] Explain licence change --- NEWS | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/NEWS b/NEWS index 3adcdaf2..8fe721f8 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ RELEASE 3.0.0 -------------- -(2017-01-01) +(2018-08-01) General ------- @@ -12,18 +12,33 @@ files, e.g. PTW32_* changes to __PTW32_*, ptw32_* to __ptw32_*, etc. License Change -------------- -Pthreads4w version 3.0.0 is being released under the terms of the Apache -License v2.0. The APLv2 is compatible with the GPLv3 and LGPLv3 licenses -and therefore this code may continue to be legally included within GPLv3 -and LGPLv3 projects. - -Pthreads4w version 2 releases will remain LGPL but version 2.11 will be -released under v3 of that license so that any additions to pthreads4w -version 3 code that we backport to v2 will not pollute that code. - -Because this license compatibility is not reciprocal, future -modifications to pthreads4w will only be accepted to version 3 (or -later), i.e. the APLv2 code-base. +With the agreement of all substantial relevant contributors Pthreads4w +version 3 is being released under the terms of the Apache License v2.0. +The APLv2 is compatible with the GPLv3 and LGPLv3 licenses and therefore +this code may continue to be legally included within GPLv3 and LGPLv3 +projects. + +A substantial relevant contributor was defined as one who has contributed +original code that implements a complete capability or significant +optimisation in the releases going forward. This excludes several +contributors who have contributed code that has later been replaced, or +have provided patches to fix bugs, reorganise code or improve build +processes. This distinction was necessary in order to move forward in the +high likelyhood that not all contributors would be contactable. All +contributors are listed in the file CONTRIBUTORS. + +Contributors who have requested this change or agreed to it when consulted +are: + +John Bossom +Alexander Terekhov +Vladimir Kliatchko +Ross Johnson + +Pthreads4w version 2 releases will remain LGPL but version 2.11 and later +will be released under v3 of that license so that any additions to +pthreads4w version 3 code that is backported to v2 will not pollute that +code. Backporting and Support of Legacy Windows Releases -------------------------------------------------- From 1097a036e8bffedcf78e0602fc99dfa6e463ef59 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 1 Aug 2018 11:35:34 +1000 Subject: [PATCH 132/207] Add licence files --- LICENSE | 202 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ NOTICE | 29 ++++++++ 2 files changed, 231 insertions(+) create mode 100644 LICENSE create mode 100644 NOTICE diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..7a4a3ea2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/NOTICE b/NOTICE new file mode 100644 index 00000000..5bd404a2 --- /dev/null +++ b/NOTICE @@ -0,0 +1,29 @@ +PThreads4W - POSIX threads for Windows +Copyright 1998 John E. Bossom +Copyright 1999-2016, Pthreads4w contributors + +This product includes software developed through the colaborative +effort of several individuals, each of whom is listed in the file +CONTRIBUTORS included with this software. + +The following files are not covered under the Copyrights +listed above: + + [1] tests/rwlock7.c + [1] tests/rwlock7_1.c + [1] tests/rwlock8.c + [1] tests/rwlock8_1.c + [2] tests/threestage.c + +[1] The file tests/rwlock7.c and those similarly named are derived from +code written by Dave Butenhof for his book 'Programming With POSIX(R) +Threads'. The original code was obtained by free download from his +website http://home.earthlink.net/~anneart/family/Threads/source.html + +[2] The file tests/threestage.c 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 compilation. +The only modification to the code has been to provide default +values when run without arguments. From 98bba9a580195212d2faf1c4946c90b89fc97bd2 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 1 Aug 2018 11:48:54 +1000 Subject: [PATCH 133/207] Remove old licence files --- COPYING | 152 ---------------- COPYING.FSF | 504 ---------------------------------------------------- 2 files changed, 656 deletions(-) delete mode 100644 COPYING delete mode 100644 COPYING.FSF diff --git a/COPYING b/COPYING deleted file mode 100644 index b63ae7dd..00000000 --- a/COPYING +++ /dev/null @@ -1,152 +0,0 @@ - pthreads-win32 - a POSIX threads library for Microsoft Windows - - -This file is Copyrighted ------------------------- - - This file is covered under the following Copyright: - - Copyright (C) 2001,2012 Ross P. Johnson - All rights reserved. - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -Pthreads-win32 is covered by the GNU Lesser General Public License ------------------------------------------------------------------- - - Pthreads-win32 is open software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - as published by the Free Software Foundation version 2.1 of the - License. - - Pthreads-win32 is several binary link libraries, several modules, - associated interface definition files and scripts used to control - its compilation and installation. - - Pthreads-win32 is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - A copy of the GNU Lesser General Public License is distributed with - pthreads-win32 under the filename: - - COPYING.FSF - - You should have received a copy of the version 2.1 GNU Lesser General - Public License with pthreads-win32; if not, write to: - - Free Software Foundation, Inc. - 59 Temple Place - Suite 330 - Boston, MA 02111-1307 - USA - - The contact addresses for pthreads-win32 is as follows: - - Homepage1: http://sourceware.org/pthreads-win32/ - Homepage2: http://sourceforge.net/projects/pthreads4w/ - Email: Ross Johnson - Please use: Firstname.Lastname@homemail.com.au - - - -Pthreads-win32 copyrights and exception files ---------------------------------------------- - - With the exception of the files listed below, Pthreads-win32 - is covered under the following GNU Lesser General Public License - Copyrights: - - Pthreads-win32 - POSIX Threads Library for Win32 - Copyright(C) 1998 John E. Bossom - Copyright(C) 1999,2006 Pthreads-win32 contributors - - The current list of contributors is contained - in the file CONTRIBUTORS included with the source - code distribution. The current list of CONTRIBUTORS - can also be seen at the following WWW location: - http://sources.redhat.com/pthreads-win32/contributors.html - - Contact Email: Ross Johnson - Please use: Firstname.Lastname@homemail.com.au - - These files are not covered under one of the Copyrights listed above: - - COPYING - COPYING.LIB - tests/rwlock7.c - tests/threestage.c - - This file, COPYING, is distributed under the Copyright found at the - top of this file. It is important to note that you may distribute - verbatim copies of this file but you may not modify this file. - - The file COPYING.LIB, which contains a copy of the version 2.1 - GNU Lesser General Public License, is itself copyrighted by the - Free Software Foundation, Inc. Please note that the Free Software - Foundation, Inc. does NOT have a copyright over Pthreads-win32, - only the COPYING.LIB that is supplied with pthreads-win32. - - The file tests/rwlock7.c is derived from code written by - Dave Butenhof for his book 'Programming With POSIX(R) Threads'. - The original code was obtained by free download from his website - http://home.earthlink.net/~anneart/family/Threads/source.html - and did not contain a copyright or author notice. It is assumed to - be freely distributable. - - In all cases one may use and distribute these exception files freely. - And because one may freely distribute the LGPL covered files, the - entire pthreads-win32 source may be freely used and distributed. - - - -General Copyleft and License info ---------------------------------- - - For general information on Copylefts, see: - - http://www.gnu.org/copyleft/ - - For information on GNU Lesser General Public Licenses, see: - - http://www.gnu.org/copyleft/lesser.html - http://www.gnu.org/copyleft/lesser.txt - - -Why pthreads-win32 did not use the GNU General Public License -------------------------------------------------------------- - - The goal of the pthreads-win32 project has been to - provide a quality and complete implementation of the POSIX - threads API for Microsoft Windows within the limits imposed - by virtue of it being a stand-alone library and not - linked directly to other POSIX compliant libraries. For - example, some functions and features, such as those based - on POSIX signals, are missing. - - Pthreads-win32 is a library, available in several different - versions depending on supported compilers, and may be used - as a dynamically linked module or a statically linked set of - binary modules. It is not an application on it's own. - - It was fully intended that pthreads-win32 be usable with - commercial software not covered by either the GPL or the LGPL - licenses. Pthreads-win32 has many contributors to it's - code base, many of whom have done so because they have - used the library in commercial or proprietry software - projects. - - Releasing pthreads-win32 under the LGPL ensures that the - library can be used widely, while at the same time ensures - that bug fixes and improvements to the pthreads-win32 code - itself is returned to benefit all current and future users - of the library. - - Although pthreads-win32 makes it possible for applications - that use POSIX threads to be ported to Win32 platforms, the - broader goal of the project is to encourage the use of open - standards, and in particular, to make it just a little easier - for developers writing Win32 applications to consider - widening the potential market for their products. diff --git a/COPYING.FSF b/COPYING.FSF deleted file mode 100644 index b1e3f5a2..00000000 --- a/COPYING.FSF +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it 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. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - 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 - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - From 959e1c13053fbfea7a413952db05fd244046a5b2 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 1 Aug 2018 13:34:55 +1000 Subject: [PATCH 134/207] Four files to remain LGPL but change to v3. --- ANNOUNCE | 19 +++++++++++------ GNUmakefile.in | 51 +++++++++++++++++++++++--------------------- aclocal.m4 | 51 +++++++++++++++++++++++--------------------- configure.ac | 51 +++++++++++++++++++++++--------------------- tests/GNUmakefile.in | 51 +++++++++++++++++++++++--------------------- 5 files changed, 120 insertions(+), 103 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 2eaee8d9..0fbc5c1c 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -17,18 +17,23 @@ Some common non-portable functions are also implemented for additional compatibility, as are a few functions specific to pthreads4w for easier integration with Windows applications. -Pthreads4w is free software. Version 3.0.0 is distributed under the -Apache License version 2.0 (APLv2). The APLv2 is compatible with the GPLv3 -and LGPLv3 licenses and therefore this code may continue to be legally -included within GPLv3 and LGPLv3 projects. +Pthreads4w is free software. With the exception of four files noted later, +Version 3.0.0 is distributed under the Apache License version 2.0 (APLv2). +The APLv2 is compatible with the GPLv3 and LGPLv3 licenses and therefore +this code may continue to be legally included within GPLv3 and LGPLv3 +projects. All version 1 and 2 releases will remain LGPL but version 2.11 will be released under v3 of that license so that any modifications to pthreads4w version 3 code that we backport to v2 will not pollute that code. -Because this license compatibility is not reciprocal, future -modifications to pthreads4w will only be accepted to version 3 (or -later), i.e. the APLv2 code-base. +The four files that will remain LGPL but change to v3 are files used to +configure the GNU environment builds: + + aclocal.m4 + configure.ac + GNUmakefile.in + tests/GNUmakefile.in For those who want to try the most recent changes, the SourceForge Git repository is the one to use. The Sourceware CVS repository is synchronised diff --git a/GNUmakefile.in b/GNUmakefile.in index e80a3885..d75ccc33 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -1,30 +1,33 @@ # @configure_input@ # -------------------------------------------------------------------------- # - * 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. +# 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/ +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library in the file COPYING.LIB; +# if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # PACKAGE = @PACKAGE_TARNAME@ VERSION = @PACKAGE_VERSION@ diff --git a/aclocal.m4 b/aclocal.m4 index f615b29c..5aa936ec 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,30 +1,33 @@ ## aclocal.m4 ## -------------------------------------------------------------------------- ## - * 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. +## 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/ +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 3 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library in the file COPYING.LIB; +## if not, write to the Free Software Foundation, Inc., +## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA ## # # PTW32_AC_CHECK_TYPEDEF( TYPENAME, [HEADER] ) diff --git a/configure.ac b/configure.ac index a3146a59..1f5cc64b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,30 +1,33 @@ # configure.ac # -------------------------------------------------------------------------- # - * 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. +# 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/ +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library in the file COPYING.LIB; +# if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # AC_INIT([pthreads-win32],[git]) AC_CONFIG_HEADERS([config.h]) diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index ebe33fc2..80c86cfc 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -3,30 +3,33 @@ # # -------------------------------------------------------------------------- # - * 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. +# 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/ +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library in the file COPYING.LIB; +# if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # srcdir = @srcdir@ top_srcdir = @top_srcdir@ From 52382fa189948ee9d80406613ded878d9f244a41 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 1 Aug 2018 14:00:26 +1000 Subject: [PATCH 135/207] Licence change additional info --- NEWS | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index 8fe721f8..145dd020 100644 --- a/NEWS +++ b/NEWS @@ -13,22 +13,30 @@ files, e.g. PTW32_* changes to __PTW32_*, ptw32_* to __ptw32_*, etc. License Change -------------- With the agreement of all substantial relevant contributors Pthreads4w -version 3 is being released under the terms of the Apache License v2.0. -The APLv2 is compatible with the GPLv3 and LGPLv3 licenses and therefore -this code may continue to be legally included within GPLv3 and LGPLv3 -projects. +version 3, with the exception of four files, is being released under the +terms of the Apache License v2.0. The APLv2 is compatible with the GPLv3 +and LGPLv3 licenses and therefore this code may continue to be legally +included within GPLv3 and LGPLv3 projects. A substantial relevant contributor was defined as one who has contributed -original code that implements a complete capability or significant -optimisation in the releases going forward. This excludes several -contributors who have contributed code that has later been replaced, or -have provided patches to fix bugs, reorganise code or improve build +original code that implements a capability present in the releases going +forward. This excludes several contributors who have contributed code +that has been obsoleted, or have provided patches that fix bugs, +reorganise code for aesthetic or practical purposes, or improve build processes. This distinction was necessary in order to move forward in the -high likelyhood that not all contributors would be contactable. All +likelyhood that not all contributors would be contactable. All contributors are listed in the file CONTRIBUTORS. -Contributors who have requested this change or agreed to it when consulted -are: +The four files that will remain LGPL but change to v3 are files used to +configure the GNU environment builds: + + aclocal.m4 + configure.ac + GNUmakefile.in + tests/GNUmakefile.in + +Contributors who have either requested this change or agreed to it when +consulted are: John Bossom Alexander Terekhov From 2f314507043e4aeff23395e4ffc77bc548d5bcd4 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 2 Aug 2018 19:38:10 +1000 Subject: [PATCH 136/207] Remove comment --- _ptw32.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/_ptw32.h b/_ptw32.h index 90c8d388..88ed0af1 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -212,10 +212,6 @@ #endif /* POSIX 2008 - related to robust mutexes */ -/* - * FIXME: These should be changed for version 3.0.0 onward. - * 42 clashes with EILSEQ. - */ #if __PTW32_VERSION_MAJOR > 2 # if !defined(EOWNERDEAD) # define EOWNERDEAD 1000 From c5a9be2676e0346fac394021572b816e417ba0e3 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Thu, 2 Aug 2018 19:39:17 +1000 Subject: [PATCH 137/207] Project name change in comment --- pthread.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pthread.h b/pthread.h index 75e8b501..37f0cef7 100644 --- a/pthread.h +++ b/pthread.h @@ -1143,7 +1143,7 @@ __PTW32_DLLPORT int __PTW32_CDECL pthreadCancelableTimedWait (void *waitHandle, * * http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/b4500c0d-1b69-40c7-9ef5-08da1025b5bf * - * When pthreads-win32 is built with __PTW32_USES_SEPARATE_CRT + * When pthreads4w is built with __PTW32_USES_SEPARATE_CRT * defined, the following features are enabled: * * (1) In addition to setting the errno variable when errors @@ -1161,7 +1161,7 @@ __PTW32_DLLPORT int __PTW32_CDECL pthreadCancelableTimedWait (void *waitHandle, * * Note: "_DLL" implies the /MD compiler flag. */ -#if defined(_MSC_VER) && !defined(_DLL) && !defined (__PTW32_STATIC_LIB) +#if defined(_MSC_VER) && !defined(_DLL) && !defined (__PTW32_STATIC_LIB) && !defined(__PTW32_STATIC_TLSLIB) # define __PTW32_USES_SEPARATE_CRT #endif From dd2ceb01c69af1f56dafb3c6e21a744c937064b6 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Fri, 3 Aug 2018 10:34:54 +1000 Subject: [PATCH 138/207] Add assertion --- tests/timeouts.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/timeouts.c b/tests/timeouts.c index e63a8ead..e382f417 100644 --- a/tests/timeouts.c +++ b/tests/timeouts.c @@ -213,6 +213,8 @@ int Wait(time_t sec, long nsec) * We don't need to check the CV. */ result = pthread_cond_timedwait(&cv_, &mutex_, &abstime); + assert(result != 0); + assert(errno == ETIMEDOUT); pthread_mutex_unlock(&mutex_); return result; } From ffe98255280ffb32d36ff75487a8e9a4104c3a9d Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sun, 5 Aug 2018 10:34:29 +1000 Subject: [PATCH 139/207] Static tests built with /MT; Macro renaming and additional macros --- Makefile | 82 +++++++++++++++++++++++++------------------------- tests/Makefile | 71 +++++++++++++++++++++++-------------------- 2 files changed, 79 insertions(+), 74 deletions(-) diff --git a/Makefile b/Makefile index 700f94c5..b3e4c4b2 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,10 @@ # The variables $DLLDEST and $LIBDEST hold the destination directories for the # dll and the lib, respectively. Probably all that needs to change is $DEVROOT. -# DLL_VER: +# PTW32_VER: # See pthread.h and README for the description of version numbering. -DLL_VER = 2$(EXTRAVERSION) -DLL_VERD= $(DLL_VER)d +PTW32_VER = 2$(EXTRAVERSION) +PTW32_VER_DEBUG= $(PTW32_VER)d DESTROOT = ..\PTHREADS-BUILT DEST_LIB_NAME = pthread.lib @@ -15,16 +15,16 @@ DLLDEST = $(DESTROOT)\bin LIBDEST = $(DESTROOT)\lib HDRDEST = $(DESTROOT)\include -DLLS = pthreadVCE$(DLL_VER).dll pthreadVSE$(DLL_VER).dll pthreadVC$(DLL_VER).dll \ - pthreadVCE$(DLL_VERD).dll pthreadVSE$(DLL_VERD).dll pthreadVC$(DLL_VERD).dll -INLINED_STATIC_STAMPS = pthreadVCE$(DLL_VER).inlined_static_stamp pthreadVSE$(DLL_VER).inlined_static_stamp \ - pthreadVC$(DLL_VER).inlined_static_stamp pthreadVCE$(DLL_VERD).inlined_static_stamp \ - pthreadVSE$(DLL_VERD).inlined_static_stamp pthreadVC$(DLL_VERD).inlined_static_stamp -SMALL_STATIC_STAMPS = pthreadVCE$(DLL_VER).small_static_stamp pthreadVSE$(DLL_VER).small_static_stamp \ - pthreadVC$(DLL_VER).small_static_stamp pthreadVCE$(DLL_VERD).small_static_stamp \ - pthreadVSE$(DLL_VERD).small_static_stamp pthreadVC$(DLL_VERD).small_static_stamp +DLLS = pthreadVCE$(PTW32_VER).dll pthreadVSE$(PTW32_VER).dll pthreadVC$(PTW32_VER).dll \ + pthreadVCE$(PTW32_VER_DEBUG).dll pthreadVSE$(PTW32_VER_DEBUG).dll pthreadVC$(PTW32_VER_DEBUG).dll +INLINED_STATIC_STAMPS = pthreadVCE$(PTW32_VER).inlined_static_stamp pthreadVSE$(PTW32_VER).inlined_static_stamp \ + pthreadVC$(PTW32_VER).inlined_static_stamp pthreadVCE$(PTW32_VER_DEBUG).inlined_static_stamp \ + pthreadVSE$(PTW32_VER_DEBUG).inlined_static_stamp pthreadVC$(PTW32_VER_DEBUG).inlined_static_stamp +SMALL_STATIC_STAMPS = pthreadVCE$(PTW32_VER).small_static_stamp pthreadVSE$(PTW32_VER).small_static_stamp \ + pthreadVC$(PTW32_VER).small_static_stamp pthreadVCE$(PTW32_VER_DEBUG).small_static_stamp \ + pthreadVSE$(PTW32_VER_DEBUG).small_static_stamp pthreadVC$(PTW32_VER_DEBUG).small_static_stamp -CC = cl +CC = cl /errorReport:none /nologo CPPFLAGS = /I. /DHAVE_CONFIG_H XCFLAGS = /W3 /MD /nologo CFLAGS = /O2 /Ob2 $(XCFLAGS) @@ -126,76 +126,76 @@ all-tests-cflags: all-tests-md: @ -$(SETENV) - $(MAKE) all-tests XCFLAGS="/W3 /WX /MD /nologo" + $(MAKE) all-tests XCFLAGS="/W3 /WX /MD" !IF DEFINED(MORE_EXHAUSTIVE) - $(MAKE) all-tests XCFLAGS="/W3 /WX /MDd /nologo" XDBG="-debug" + $(MAKE) all-tests XCFLAGS="/W3 /WX /MDd" XDBG="-debug" !ENDIF @ echo $@ completed successfully. all-tests-mt: @ -$(SETENV) - $(MAKE) all-tests-static XCFLAGS="/W3 /WX /MT /nologo" + $(MAKE) all-tests-static XCFLAGS="/W3 /WX /MT" !IF DEFINED(MORE_EXHAUSTIVE) - $(MAKE) all-tests-static XCFLAGS="/W3 /WX /MTd /nologo" XDBG="-debug" + $(MAKE) all-tests-static XCFLAGS="/W3 /WX /MTd" XDBG="-debug" !ENDIF @ echo $@ completed successfully. VCE: - @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VER).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(PTW32_VER).dll VCE-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VERD).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).dll VSE: - @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VER).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(PTW32_VER).dll VSE-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VERD).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).dll VC: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(PTW32_VER).dll VC-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).dll # # Static builds # #VCE-small-static: -# @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VER).small_static_stamp +# @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_CXX pthreadVCE$(PTW32_VER).small_static_stamp #VCE-small-static-debug: -# @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VERD).small_static_stamp +# @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).small_static_stamp #VSE-small-static: -# @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VER).small_static_stamp +# @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_SEH pthreadVSE$(PTW32_VER).small_static_stamp #VSE-small-static-debug: -# @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VERD).small_static_stamp +# @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).small_static_stamp #VC-small-static: -# @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).small_static_stamp +# @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(PTW32_VER).small_static_stamp #VC-small-static-debug: -# @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).small_static_stamp +# @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).small_static_stamp VCE-static: - @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VER).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(PTW32_VER).inlined_static_stamp VCE-static-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VERD).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).inlined_static_stamp VSE-static: - @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VER).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(PTW32_VER).inlined_static_stamp VSE-static-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(DLL_VERD).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).inlined_static_stamp VC-static: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(PTW32_VER).inlined_static_stamp VC-static-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).inlined_static_stamp realclean: clean @@ -230,15 +230,15 @@ install: copy pthread.h $(HDRDEST) copy sched.h $(HDRDEST) copy semaphore.h $(HDRDEST) - if exist pthreadVC$(DLL_VER).lib copy pthreadVC$(DLL_VER).lib $(LIBDEST)\$(DEST_LIB_NAME) - if exist pthreadVC$(DLL_VERD).lib copy pthreadVC$(DLL_VERD).lib $(LIBDEST)\$(DEST_LIB_NAME) - if exist pthreadVCE$(DLL_VER).lib copy pthreadVCE$(DLL_VER).lib $(LIBDEST)\$(DEST_LIB_NAME) - if exist pthreadVCE$(DLL_VERD).lib copy pthreadVCE$(DLL_VERD).lib $(LIBDEST)\$(DEST_LIB_NAME) - if exist pthreadVSE$(DLL_VER).lib copy pthreadVSE$(DLL_VER).lib $(LIBDEST)\$(DEST_LIB_NAME) - if exist pthreadVSE$(DLL_VERD).lib copy pthreadVSE$(DLL_VERD).lib $(LIBDEST)\$(DEST_LIB_NAME) + if exist pthreadVC$(PTW32_VER).lib copy pthreadVC$(PTW32_VER).lib $(LIBDEST)\$(DEST_LIB_NAME) + if exist pthreadVC$(PTW32_VER_DEBUG).lib copy pthreadVC$(PTW32_VER_DEBUG).lib $(LIBDEST)\$(DEST_LIB_NAME) + if exist pthreadVCE$(PTW32_VER).lib copy pthreadVCE$(PTW32_VER).lib $(LIBDEST)\$(DEST_LIB_NAME) + if exist pthreadVCE$(PTW32_VER_DEBUG).lib copy pthreadVCE$(PTW32_VER_DEBUG).lib $(LIBDEST)\$(DEST_LIB_NAME) + if exist pthreadVSE$(PTW32_VER).lib copy pthreadVSE$(PTW32_VER).lib $(LIBDEST)\$(DEST_LIB_NAME) + if exist pthreadVSE$(PTW32_VER_DEBUG).lib copy pthreadVSE$(PTW32_VER_DEBUG).lib $(LIBDEST)\$(DEST_LIB_NAME) $(DLLS): $(DLL_OBJS) - $(CC) /LDd /Zi /nologo $(DLL_OBJS) /link /implib:$*.lib $(XLIBS) /out:$@ + $(CC) /LDd /Zi $(DLL_OBJS) /link /implib:$*.lib $(XLIBS) /out:$@ $(INLINED_STATIC_STAMPS): $(DLL_OBJS) if exist $*.lib del $*.lib diff --git a/tests/Makefile b/tests/Makefile index 6d79ff35..a2920a24 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -29,7 +29,9 @@ # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -DLL_VER = 2$(EXTRAVERSION) +PTW32_VER = 2$(EXTRAVERSION) + +CC = cl /errorReport:none /nologo CP = copy RM = erase @@ -50,22 +52,22 @@ XXLIBS = ws2_32.lib # C++ Exceptions VCEFLAGS = /EHs /TP /DPtW32NoCatchWarn /D__CLEANUP_CXX -VCELIB = pthreadVCE$(DLL_VER).lib -VCEDLL = pthreadVCE$(DLL_VER).dll -VCELIBD = pthreadVCE$(DLL_VER)d.lib -VCEDLLD = pthreadVCE$(DLL_VER)d.dll +VCELIB = pthreadVCE$(PTW32_VER).lib +VCEDLL = pthreadVCE$(PTW32_VER).dll +VCELIBD = pthreadVCE$(PTW32_VER)d.lib +VCEDLLD = pthreadVCE$(PTW32_VER)d.dll # Structured Exceptions VSEFLAGS = /D__CLEANUP_SEH -VSELIB = pthreadVSE$(DLL_VER).lib -VSEDLL = pthreadVSE$(DLL_VER).dll -VSELIBD = pthreadVSE$(DLL_VER)d.lib -VSEDLLD = pthreadVSE$(DLL_VER)d.dll +VSELIB = pthreadVSE$(PTW32_VER).lib +VSEDLL = pthreadVSE$(PTW32_VER).dll +VSELIBD = pthreadVSE$(PTW32_VER)d.lib +VSEDLLD = pthreadVSE$(PTW32_VER)d.dll # C cleanup code VCFLAGS = /D__CLEANUP_C -VCLIB = pthreadVC$(DLL_VER).lib -VCDLL = pthreadVC$(DLL_VER).dll -VCLIBD = pthreadVC$(DLL_VER)d.lib -VCDLLD = pthreadVC$(DLL_VER)d.dll +VCLIB = pthreadVC$(PTW32_VER).lib +VCDLL = pthreadVC$(PTW32_VER).dll +VCLIBD = pthreadVC$(PTW32_VER)d.lib +VCDLLD = pthreadVC$(PTW32_VER)d.dll # C++ Exceptions in application - using VC version of pthreads dll VCXFLAGS = /EHs /TP /D__CLEANUP_C @@ -73,10 +75,13 @@ VCXFLAGS = /EHs /TP /D__CLEANUP_C CPLIB = $(VCLIB) CPDLL = $(VCDLL) -CFLAGS= $(OPTIM) /W3 /MD /nologo /Z7 -LFLAGS= /INCREMENTAL:NO -INCLUDES=-I. -BUILD_DIR=.. +CFLAGS = $(OPTIM) /W3 /MD /Z7 +CFLAGS_DEBUG = $(OPTIM) /W3 /MDd /Z7 +CFLAGS_STATIC = $(OPTIM) /W3 /MT /Z7 +CFLAGS_STATIC_DEBUG = $(OPTIM) /W3 /MTd /Z7 +LFLAGS = /INCREMENTAL:NO +INCLUDES = -I. +BUILD_DIR = .. EHFLAGS = @@ -155,52 +160,52 @@ VCX-bench: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCXFLAGS)" $(BENCHTESTS) VC-static VC-small-static: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" allpassed VCE-static VCE-small-static: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" allpassed VSE-static VSE-small-static: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" allpassed VCX-static VCX-small-static: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCXFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCXFLAGS) /DPTW32_STATIC_LIB" allpassed VC-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) VCE-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) VSE-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) VCX-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCXFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCXFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) VC-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_DEBUG)" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCFLAGS)" allpassed VC-static-debug VC-small-static-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC_DEBUG)" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" allpassed VCE-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIBD)" CPDLL="$(VCEDLLD)" EHFLAGS="$(VCEFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_DEBUG)" CPLIB="$(VCELIBD)" CPDLL="$(VCEDLLD)" EHFLAGS="$(VCEFLAGS)" allpassed VCE-static-debug VCE-small-static-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIBD)" CPDLL="" EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC_DEBUG)" CPLIB="$(VCELIBD)" CPDLL="" EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" allpassed VSE-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIBD)" CPDLL="$(VSEDLLD)" EHFLAGS="$(VSEFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_DEBUG)" CPLIB="$(VSELIBD)" CPDLL="$(VSEDLLD)" EHFLAGS="$(VSEFLAGS)" allpassed VSE-static-debug VSE-small-static-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIBD)" CPDLL="" EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC_DEBUG)" CPLIB="$(VSELIBD)" CPDLL="" EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" allpassed VCX-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCXFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_DEBUG)" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCXFLAGS)" allpassed VCX-static-debug VCX-small-static-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCXFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC_DEBUG)" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCXFLAGS) /DPTW32_STATIC_LIB" allpassed clean: if exist *.dll $(RM) *.dll From c9c3e9b15411a260bf233c9427fe041eaccee8d7 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sun, 5 Aug 2018 13:08:39 +1000 Subject: [PATCH 140/207] Static link using /MT for tests; macro name changes --- Makefile | 95 ++++++++++++++++++++++++++++---------------------- tests/Makefile | 59 ++++++++++++++++++++----------- 2 files changed, 91 insertions(+), 63 deletions(-) diff --git a/Makefile b/Makefile index f05ea016..f88edf8d 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,10 @@ # The variables $DLLDEST and $LIBDEST hold the destination directories for the # dll and the lib, respectively. Probably all that needs to change is $DEVROOT. -# DLL_VER: +# PTW32_VER: # See pthread.h and README for the description of version numbering. -DLL_VER = 2$(EXTRAVERSION) -DLL_VERD= $(DLL_VER)d +PTW32_VER = 2$(EXTRAVERSION) +PTW32_VER_DEBUG= $(PTW32_VER)d DESTROOT = ..\PTHREADS-BUILT DEST_LIB_NAME = pthread.lib @@ -15,16 +15,16 @@ DLLDEST = $(DESTROOT)\bin LIBDEST = $(DESTROOT)\lib HDRDEST = $(DESTROOT)\include -DLLS = pthreadVCE$(DLL_VER).dll pthreadVSE$(DLL_VER).dll pthreadVC$(DLL_VER).dll \ - pthreadVCE$(DLL_VERD).dll pthreadVSE$(DLL_VERD).dll pthreadVC$(DLL_VERD).dll -INLINED_STATIC_STAMPS = pthreadVCE$(DLL_VER).inlined_static_stamp pthreadVSE$(DLL_VER).inlined_static_stamp \ - pthreadVC$(DLL_VER).inlined_static_stamp pthreadVCE$(DLL_VERD).inlined_static_stamp \ - pthreadVSE$(DLL_VERD).inlined_static_stamp pthreadVC$(DLL_VERD).inlined_static_stamp -SMALL_STATIC_STAMPS = pthreadVCE$(DLL_VER).small_static_stamp pthreadVSE$(DLL_VER).small_static_stamp \ - pthreadVC$(DLL_VER).small_static_stamp pthreadVCE$(DLL_VERD).small_static_stamp \ - pthreadVSE$(DLL_VERD).small_static_stamp pthreadVC$(DLL_VERD).small_static_stamp +DLLS = pthreadVCE$(PTW32_VER).dll pthreadVSE$(PTW32_VER).dll pthreadVC$(PTW32_VER).dll \ + pthreadVCE$(PTW32_VER_DEBUG).dll pthreadVSE$(PTW32_VER_DEBUG).dll pthreadVC$(PTW32_VER_DEBUG).dll +INLINED_STATIC_STAMPS = pthreadVCE$(PTW32_VER).inlined_static_stamp pthreadVSE$(PTW32_VER).inlined_static_stamp \ + pthreadVC$(PTW32_VER).inlined_static_stamp pthreadVCE$(PTW32_VER_DEBUG).inlined_static_stamp \ + pthreadVSE$(PTW32_VER_DEBUG).inlined_static_stamp pthreadVC$(PTW32_VER_DEBUG).inlined_static_stamp +SMALL_STATIC_STAMPS = pthreadVCE$(PTW32_VER).small_static_stamp pthreadVSE$(PTW32_VER).small_static_stamp \ + pthreadVC$(PTW32_VER).small_static_stamp pthreadVCE$(PTW32_VER_DEBUG).small_static_stamp \ + pthreadVSE$(PTW32_VER_DEBUG).small_static_stamp pthreadVC$(PTW32_VER_DEBUG).small_static_stamp -CC = cl +CC = cl /errorReport:none /nologo CPPFLAGS = /I. /DHAVE_CONFIG_H XCFLAGS = /W3 /MD /nologo CFLAGS = /O2 /Ob2 $(XCFLAGS) @@ -59,7 +59,9 @@ STATIC_OBJS = $(STATIC_OBJS) $(RESOURCE_OBJS) help: @ echo Run one of the following command lines: @ echo nmake clean all-tests - @ echo nmake -DEXHAUSTIVE clean all-tests + @ echo nmake -DEXHAUSTIVE clean all-tests + @ echo nmake clean all-tests-md + @ echo nmake clean all-tests-mt @ echo nmake clean VC @ echo nmake clean VC-debug @ echo nmake clean VC-static @@ -90,6 +92,9 @@ all: TEST_ENV = CFLAGS="$(CFLAGS) /DNO_ERROR_DIALOGS" all-tests: + $(MAKE) all-tests-dll all-tests-static + +all-tests-dll: # $(MAKE) /E realclean VC-small-static$(XDBG) # cd tests && $(MAKE) /E clean VC-small-static$(XDBG) $(TEST_ENV) && $(MAKE) /E clean VCX-small-static$(XDBG) $(TEST_ENV) # $(MAKE) /E realclean VCE-small-static$(XDBG) @@ -102,6 +107,8 @@ all-tests: cd tests && $(MAKE) /E clean VCE$(XDBG) $(TEST_ENV) $(MAKE) /E realclean VSE$(XDBG) cd tests && $(MAKE) /E clean VSE$(XDBG) $(TEST_ENV) + +all-tests-static: #!IF DEFINED(EXHAUSTIVE) $(MAKE) /E realclean VC-static$(XDBG) cd tests && $(MAKE) /E clean VC-static$(XDBG) $(TEST_ENV) && $(MAKE) /E clean VCX-static$(XDBG) $(TEST_ENV) @@ -117,78 +124,82 @@ all-tests-cflags: $(MAKE) all-tests-md all-tests-mt @ echo $@ completed successfully. +all-tests-md: + $(MAKE) all-tests-md all-tests-mt + @ echo $@ completed successfully. + all-tests-md: @ -$(SETENV) - $(MAKE) all-tests XCFLAGS="/W3 /WX /MD /nologo" + $(MAKE) all-tests XCFLAGS="/W3 /WX /MD" !IF DEFINED(MORE_EXHAUSTIVE) - $(MAKE) all-tests XCFLAGS="/W3 /WX /MDd /nologo" XDBG="-debug" + $(MAKE) all-tests XCFLAGS="/W3 /WX /MDd" XDBG="-debug" !ENDIF @ echo $@ completed successfully. all-tests-mt: @ -$(SETENV) - $(MAKE) all-tests XCFLAGS="/W3 /WX /MT /nologo" + $(MAKE) all-tests-static XCFLAGS="/W3 /WX /MT" !IF DEFINED(MORE_EXHAUSTIVE) - $(MAKE) all-tests XCFLAGS="/W3 /WX /MTd /nologo" XDBG="-debug" + $(MAKE) all-tests-static XCFLAGS="/W3 /WX /MTd" XDBG="-debug" !ENDIF @ echo $@ completed successfully. VCE: - @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(DLL_VER).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).dll VCE-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(DLL_VERD).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).dll VSE: - @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(DLL_VER).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).dll VSE-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(DLL_VERD).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).dll VC: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(DLL_VER).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).dll VC-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(DLL_VERD).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).dll # # Static builds # #VCE-small-static: -# @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(DLL_VER).small_static_stamp +# @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).small_static_stamp #VCE-small-static-debug: -# @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(DLL_VERD).small_static_stamp +# @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).small_static_stamp #VSE-small-static: -# @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(DLL_VER).small_static_stamp +# @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).small_static_stamp #VSE-small-static-debug: -# @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(DLL_VERD).small_static_stamp +# @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).small_static_stamp #VC-small-static: -# @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(DLL_VER).small_static_stamp +# @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).small_static_stamp #VC-small-static-debug: -# @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(DLL_VERD).small_static_stamp +# @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).small_static_stamp VCE-static: - @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(DLL_VER).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).inlined_static_stamp VCE-static-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(DLL_VERD).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).inlined_static_stamp VSE-static: - @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(DLL_VER).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).inlined_static_stamp VSE-static-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(DLL_VERD).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).inlined_static_stamp VC-static: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(DLL_VER).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).inlined_static_stamp VC-static-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(DLL_VERD).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).inlined_static_stamp realclean: clean @@ -224,15 +235,15 @@ install: copy pthread.h $(HDRDEST) copy sched.h $(HDRDEST) copy semaphore.h $(HDRDEST) - if exist pthreadVC$(DLL_VER).lib copy pthreadVC$(DLL_VER).lib $(LIBDEST)\$(DEST_LIB_NAME) - if exist pthreadVC$(DLL_VERD).lib copy pthreadVC$(DLL_VERD).lib $(LIBDEST)\$(DEST_LIB_NAME) - if exist pthreadVCE$(DLL_VER).lib copy pthreadVCE$(DLL_VER).lib $(LIBDEST)\$(DEST_LIB_NAME) - if exist pthreadVCE$(DLL_VERD).lib copy pthreadVCE$(DLL_VERD).lib $(LIBDEST)\$(DEST_LIB_NAME) - if exist pthreadVSE$(DLL_VER).lib copy pthreadVSE$(DLL_VER).lib $(LIBDEST)\$(DEST_LIB_NAME) - if exist pthreadVSE$(DLL_VERD).lib copy pthreadVSE$(DLL_VERD).lib $(LIBDEST)\$(DEST_LIB_NAME) + if exist pthreadVC$(PTW32_VER).lib copy pthreadVC$(PTW32_VER).lib $(LIBDEST)\$(DEST_LIB_NAME) + if exist pthreadVC$(PTW32_VER_DEBUG).lib copy pthreadVC$(PTW32_VER_DEBUG).lib $(LIBDEST)\$(DEST_LIB_NAME) + if exist pthreadVCE$(PTW32_VER).lib copy pthreadVCE$(PTW32_VER).lib $(LIBDEST)\$(DEST_LIB_NAME) + if exist pthreadVCE$(PTW32_VER_DEBUG).lib copy pthreadVCE$(PTW32_VER_DEBUG).lib $(LIBDEST)\$(DEST_LIB_NAME) + if exist pthreadVSE$(PTW32_VER).lib copy pthreadVSE$(PTW32_VER).lib $(LIBDEST)\$(DEST_LIB_NAME) + if exist pthreadVSE$(PTW32_VER_DEBUG).lib copy pthreadVSE$(PTW32_VER_DEBUG).lib $(LIBDEST)\$(DEST_LIB_NAME) $(DLLS): $(DLL_OBJS) - $(CC) /LDd /Zi /nologo $(DLL_OBJS) /link /implib:$*.lib $(XLIBS) /out:$@ + $(CC) /LDd /Zi $(DLL_OBJS) /link /implib:$*.lib $(XLIBS) /out:$@ $(INLINED_STATIC_STAMPS): $(DLL_OBJS) if exist $*.lib del $*.lib diff --git a/tests/Makefile b/tests/Makefile index 9750593a..0368ca04 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -29,7 +29,9 @@ # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -DLL_VER = 2$(EXTRAVERSION) +PTW32_VER = 2$(EXTRAVERSION) + +CC = cl /errorReport:none /nologo CP = copy RM = erase @@ -50,22 +52,22 @@ XXLIBS = ws2_32.lib # C++ Exceptions VCEFLAGS = /EHs /TP /D__PtW32NoCatchWarn /D__PTW32_CLEANUP_CXX -VCELIB = pthreadVCE$(DLL_VER).lib -VCEDLL = pthreadVCE$(DLL_VER).dll -VCELIBD = pthreadVCE$(DLL_VER)d.lib -VCEDLLD = pthreadVCE$(DLL_VER)d.dll +VCELIB = pthreadVCE$(PTW32_VER).lib +VCEDLL = pthreadVCE$(PTW32_VER).dll +VCELIBD = pthreadVCE$(PTW32_VER)d.lib +VCEDLLD = pthreadVCE$(PTW32_VER)d.dll # Structured Exceptions VSEFLAGS = /D__PTW32_CLEANUP_SEH -VSELIB = pthreadVSE$(DLL_VER).lib -VSEDLL = pthreadVSE$(DLL_VER).dll -VSELIBD = pthreadVSE$(DLL_VER)d.lib -VSEDLLD = pthreadVSE$(DLL_VER)d.dll +VSELIB = pthreadVSE$(PTW32_VER).lib +VSEDLL = pthreadVSE$(PTW32_VER).dll +VSELIBD = pthreadVSE$(PTW32_VER)d.lib +VSEDLLD = pthreadVSE$(PTW32_VER)d.dll # C cleanup code VCFLAGS = /D__PTW32_CLEANUP_C -VCLIB = pthreadVC$(DLL_VER).lib -VCDLL = pthreadVC$(DLL_VER).dll -VCLIBD = pthreadVC$(DLL_VER)d.lib -VCDLLD = pthreadVC$(DLL_VER)d.dll +VCLIB = pthreadVC$(PTW32_VER).lib +VCDLL = pthreadVC$(PTW32_VER).dll +VCLIBD = pthreadVC$(PTW32_VER)d.lib +VCDLLD = pthreadVC$(PTW32_VER)d.dll # C++ Exceptions in application - using VC version of pthreads dll VCXFLAGS = /EHs /TP /D__PTW32_CLEANUP_C @@ -73,10 +75,13 @@ VCXFLAGS = /EHs /TP /D__PTW32_CLEANUP_C CPLIB = $(VCLIB) CPDLL = $(VCDLL) -CFLAGS= $(OPTIM) /W3 /MD /nologo /Z7 -LFLAGS= /INCREMENTAL:NO -INCLUDES=-I. -BUILD_DIR=.. +CFLAGS = $(OPTIM) /W3 /MD /Z7 +CFLAGS_DEBUG = $(OPTIM) /W3 /MDd /Z7 +CFLAGS_STATIC = $(OPTIM) /W3 /MT /Z7 +CFLAGS_STATIC_DEBUG = $(OPTIM) /W3 /MTd /Z7 +LFLAGS = /INCREMENTAL:NO +INCLUDES = -I. +BUILD_DIR = .. EHFLAGS = @@ -156,51 +161,63 @@ VCX-bench: VC-static VC-small-static: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" allpassed VCE-static VCE-small-static: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" allpassed VSE-static VSE-small-static: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" allpassed VCX-static VCX-small-static: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCXFLAGS) /D__PTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCXFLAGS) /DPTW32_STATIC_LIB" allpassed VC-static-bench: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) VCE-static-bench: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) VSE-static-bench: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) VCX-static-bench: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCXFLAGS) /D__PTW32_STATIC_LIB" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCXFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) VC-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_DEBUG)" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCFLAGS)" allpassed VC-static-debug VC-small-static-debug: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC_DEBUG)" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" allpassed VCE-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIBD)" CPDLL="$(VCEDLLD)" EHFLAGS="$(VCEFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_DEBUG)" CPLIB="$(VCELIBD)" CPDLL="$(VCEDLLD)" EHFLAGS="$(VCEFLAGS)" allpassed VCE-static-debug VCE-small-static-debug: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIBD)" CPDLL="" EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC_DEBUG)" CPLIB="$(VCELIBD)" CPDLL="" EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" allpassed VSE-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIBD)" CPDLL="$(VSEDLLD)" EHFLAGS="$(VSEFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_DEBUG)" CPLIB="$(VSELIBD)" CPDLL="$(VSEDLLD)" EHFLAGS="$(VSEFLAGS)" allpassed VSE-static-debug VSE-small-static-debug: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIBD)" CPDLL="" EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC_DEBUG)" CPLIB="$(VSELIBD)" CPDLL="" EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" allpassed VCX-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCXFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_DEBUG)" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCXFLAGS)" allpassed VCX-static-debug VCX-small-static-debug: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCXFLAGS) /D__PTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC_DEBUG)" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCXFLAGS) /DPTW32_STATIC_LIB" allpassed clean: if exist *.dll $(RM) *.dll From 689bbdc4878dc110b1185cdec8916a8427c891ed Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 6 Aug 2018 13:04:12 +1000 Subject: [PATCH 141/207] Apply Mark Pizzolato's full static linking changes; ignore .project file. This removes the PIMAGE_TLS_CALLBACK method, which does not work for us. errno just will not work when there are multiple CRT libs in use (static pthreads lib and application dll). I.e. we are insisting on either full DLL or full static linking exclusively. --- .gitignore | 3 ++- _ptw32.h | 17 +---------------- dll.c | 48 ++---------------------------------------------- need_errno.h | 1 - pthread.h | 2 +- pthread_detach.c | 6 +++++- tests/Makefile | 42 +++++++++++++++++++++--------------------- 7 files changed, 32 insertions(+), 87 deletions(-) diff --git a/.gitignore b/.gitignore index c795622c..0fa70b68 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,5 @@ tests/sched.h tests/semaphore.h tests/benchlib.o tests/SIZES.* -tests/*.log \ No newline at end of file +tests/*.log +/.project diff --git a/_ptw32.h b/_ptw32.h index 1083b339..30c3bb95 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -65,22 +65,7 @@ # define __PTW32_END_C_DECLS #endif -#if defined (PTW32_STATIC_LIB) && _MSC_VER >= 1400 -# undef PTW32_STATIC_LIB -# define PTW32_STATIC_TLSLIB -#endif - -/* When building the library, you should define PTW32_BUILD so that - * the variables/functions are exported correctly. When using the library, - * do NOT define PTW32_BUILD, and then the variables/functions will - * be imported correctly. - * - * FIXME: Used defined feature test macros, such as PTW32_STATIC_LIB, (and - * maybe even PTW32_BUILD), should be renamed with one initial underscore; - * internally defined macros, such as PTW32_DLLPORT, should be renamed with - * two initial underscores ... perhaps __PTW32_DECLSPEC is nicer anyway? - */ -#if defined PTW32_STATIC_LIB || defined PTW32_STATIC_TLSLIB +#if defined PTW32_STATIC_LIB # define PTW32_DLLPORT #elif defined PTW32_BUILD diff --git a/dll.c b/dll.c index 82022264..9c256d2c 100644 --- a/dll.c +++ b/dll.c @@ -38,11 +38,6 @@ # include #endif -#if defined(PTW32_STATIC_LIB) && defined(_MSC_VER) && _MSC_VER >= 1400 -# undef PTW32_STATIC_LIB -# define PTW32_STATIC_TLSLIB -#endif - #include "pthread.h" #include "implement.h" @@ -62,12 +57,7 @@ */ extern "C" #endif /* __cplusplus */ - BOOL WINAPI -#if defined(PTW32_STATIC_TLSLIB) -PTW32_StaticLibMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) -#else -DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) -#endif + BOOL WINAPI DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) { BOOL result = PTW32_TRUE; @@ -111,33 +101,6 @@ DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) typedef int foo; #endif -/* Visual Studio 8+ can leverage PIMAGE_TLS_CALLBACK CRT segments, which - * give a static lib its very own DllMain. - */ -#ifdef PTW32_STATIC_TLSLIB - -static void WINAPI -TlsMain(PVOID h, DWORD r, PVOID u) -{ - (void)PTW32_StaticLibMain((HINSTANCE)h, r, u); -} - -#ifdef _M_X64 -# pragma comment (linker, "/INCLUDE:_tls_used") -# pragma comment (linker, "/INCLUDE:_xl_b") -# pragma const_seg(".CRT$XLB") -EXTERN_C const PIMAGE_TLS_CALLBACK _xl_b = TlsMain; -# pragma const_seg() -#else -# pragma comment (linker, "/INCLUDE:__tls_used") -# pragma comment (linker, "/INCLUDE:__xl_b") -# pragma data_seg(".CRT$XLB") -EXTERN_C PIMAGE_TLS_CALLBACK _xl_b = TlsMain; -# pragma data_seg() -#endif /* _M_X64 */ - -#endif /* PTW32_STATIC_TLSLIB */ - #if defined(PTW32_STATIC_LIB) /* @@ -165,13 +128,6 @@ EXTERN_C PIMAGE_TLS_CALLBACK _xl_b = TlsMain; static int on_process_init(void) { -#if defined(_MSC_VER) && !defined(_DLL) - extern int __cdecl _heap_init (void); - extern int __cdecl _mtinit (void); - - _heap_init(); - _mtinit(); -#endif pthread_win32_process_attach_np (); return 0; } @@ -187,7 +143,7 @@ static int on_process_exit(void) __attribute__((section(".ctors"), used)) static int (*gcc_ctor)(void) = on_process_init; __attribute__((section(".dtors"), used)) static int (*gcc_dtor)(void) = on_process_exit; #elif defined(_MSC_VER) -# if _MSC_VER >= 1400 /* MSVC8 */ +# if _MSC_VER >= 1400 /* MSVC8+ */ # pragma section(".CRT$XCU", long, read) # pragma section(".CRT$XPU", long, read) __declspec(allocate(".CRT$XCU")) static int (*msc_ctor)(void) = on_process_init; diff --git a/need_errno.h b/need_errno.h index 77d2280b..7bef0614 100644 --- a/need_errno.h +++ b/need_errno.h @@ -60,7 +60,6 @@ extern "C" { #endif #if defined(PTW32_STATIC_LIB) && defined(_MSC_VER) && _MSC_VER >= 1400 -# undef PTW32_STATIC_LIB # define PTW32_STATIC_TLSLIB #endif diff --git a/pthread.h b/pthread.h index a887dc66..cf596ac2 100644 --- a/pthread.h +++ b/pthread.h @@ -1161,7 +1161,7 @@ PTW32_DLLPORT int PTW32_CDECL pthreadCancelableTimedWait (void *waitHandle, * * Note: "_DLL" implies the /MD compiler flag. */ -#if defined(_MSC_VER) && !defined(_DLL) && !defined(PTW32_STATIC_LIB) && !defined(PTW32_STATIC_TLSLIB) +#if defined(_MSC_VER) && !defined(_DLL) && !defined(PTW32_STATIC_LIB) # define PTW32_USES_SEPARATE_CRT #endif diff --git a/pthread_detach.c b/pthread_detach.c index ffe577ca..e5215397 100644 --- a/pthread_detach.c +++ b/pthread_detach.c @@ -105,9 +105,13 @@ pthread_detach (pthread_t thread) result = 0; ptw32_mcs_lock_acquire (&tp->stateLock, &stateLock); - if (tp->state != PThreadStateLast) + if (tp->state < PThreadStateLast) { tp->detachState = PTHREAD_CREATE_DETACHED; + if (tp->state == PThreadStateExiting) + { + destroyIt = PTW32_TRUE; + } } else if (tp->detachState != PTHREAD_CREATE_DETACHED) { diff --git a/tests/Makefile b/tests/Makefile index a2920a24..37ebd160 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -75,15 +75,15 @@ VCXFLAGS = /EHs /TP /D__CLEANUP_C CPLIB = $(VCLIB) CPDLL = $(VCDLL) -CFLAGS = $(OPTIM) /W3 /MD /Z7 -CFLAGS_DEBUG = $(OPTIM) /W3 /MDd /Z7 -CFLAGS_STATIC = $(OPTIM) /W3 /MT /Z7 -CFLAGS_STATIC_DEBUG = $(OPTIM) /W3 /MTd /Z7 +CFLAGS = $(OPTIM) /W3 /Z7 +CFLAGS_DEBUG = $(OPTIM) /W3 /Z7 LFLAGS = /INCREMENTAL:NO INCLUDES = -I. BUILD_DIR = .. EHFLAGS = +EHFLAGS_STATIC = /MT /DPTW32_STATIC_LIB -I.. /DHAVE_CONFIG_H /DPTW32_BUILD_INLINED ..\pthread.c +EHFLAGS_STATIC_DEBUG = /MTd /DPTW32_STATIC_LIB -I.. /DHAVE_CONFIG_H /DPTW32_BUILD_INLINED ..\pthread.c # If a test case returns a non-zero exit code to the shell, make will # stop. @@ -160,52 +160,52 @@ VCX-bench: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCXFLAGS)" $(BENCHTESTS) VC-static VC-small-static: - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCFLAGS) $(EHFLAGS_STATIC)" allpassed VCE-static VCE-small-static: - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_STATIC)" allpassed VSE-static VSE-small-static: - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_STATIC)" allpassed VCX-static VCX-small-static: - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCXFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_STATIC)" allpassed VC-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) VCE-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) VSE-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) VCX-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCXFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) VC-debug: - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_DEBUG)" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCFLAGS)" allpassed VC-static-debug VC-small-static-debug: - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC_DEBUG)" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed VCE-debug: - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_DEBUG)" CPLIB="$(VCELIBD)" CPDLL="$(VCEDLLD)" EHFLAGS="$(VCEFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIBD)" CPDLL="$(VCEDLLD)" EHFLAGS="$(VCEFLAGS)" allpassed VCE-static-debug VCE-small-static-debug: - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC_DEBUG)" CPLIB="$(VCELIBD)" CPDLL="" EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIBD)" CPDLL="" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed VSE-debug: - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_DEBUG)" CPLIB="$(VSELIBD)" CPDLL="$(VSEDLLD)" EHFLAGS="$(VSEFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIBD)" CPDLL="$(VSEDLLD)" EHFLAGS="$(VSEFLAGS)" allpassed VSE-static-debug VSE-small-static-debug: - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC_DEBUG)" CPLIB="$(VSELIBD)" CPDLL="" EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed VCX-debug: - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_DEBUG)" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCXFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCXFLAGS)" allpassed VCX-static-debug VCX-small-static-debug: - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC_DEBUG)" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCXFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed clean: if exist *.dll $(RM) *.dll @@ -227,7 +227,7 @@ clean: if exist *.log $(RM) *.log .c.pass: - $(CC) $(EHFLAGS) $(CFLAGS) $(INCLUDES) $*.c /Fe$*.exe /link $(LFLAGS) $(CPLIB) $(XXLIBS) + $(CC) $(CFLAGS) $(INCLUDES) $(EHFLAGS) $*.c /Fe$*.exe /link $(LFLAGS) $(CPLIB) $(XXLIBS) @ $(ECHO) ... Running $(TEST) test: $*.exe @ .\$*.exe @ $(ECHO) ...... Passed From b7e01583171933827f37a06b9ecaf6c0514b4431 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 6 Aug 2018 14:59:47 +1000 Subject: [PATCH 142/207] DLL build and tests passing --- Makefile | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index b3e4c4b2..84063208 100644 --- a/Makefile +++ b/Makefile @@ -26,9 +26,9 @@ SMALL_STATIC_STAMPS = pthreadVCE$(PTW32_VER).small_static_stamp pthreadVSE$(PTW CC = cl /errorReport:none /nologo CPPFLAGS = /I. /DHAVE_CONFIG_H -XCFLAGS = /W3 /MD /nologo -CFLAGS = /O2 /Ob2 $(XCFLAGS) -CFLAGSD = /Z7 $(XCFLAGS) +XCFLAGS = +CFLAGS = /W3 /O2 /Ob2 $(XCFLAGS) +CFLAGSD = /W3 /Z7 $(XCFLAGS) # Uncomment this if config.h defines RETAIN_WSALASTERROR #XLIBS = wsock32.lib @@ -95,28 +95,17 @@ all-tests: $(MAKE) all-tests-dll all-tests-static all-tests-dll: -# $(MAKE) /E realclean VC-small-static$(XDBG) -# cd tests && $(MAKE) /E clean VC-small-static$(XDBG) $(TEST_ENV) && $(MAKE) /E clean VCX-small-static$(XDBG) $(TEST_ENV) -# $(MAKE) /E realclean VCE-small-static$(XDBG) -# cd tests && $(MAKE) /E clean VCE-small-static$(XDBG) $(TEST_ENV) -# $(MAKE) /E realclean VSE-small-static$(XDBG) -# cd tests && $(MAKE) /E clean VSE-small-static$(XDBG) $(TEST_ENV) - $(MAKE) /E realclean VC$(XDBG) - cd tests && $(MAKE) /E clean VC$(XDBG) $(TEST_ENV) && $(MAKE) /E clean VCX$(XDBG) $(TEST_ENV) + $(MAKE) /E realclean VC$(XDBG) && cd tests + $(MAKE) /E clean VC$(XDBG) $(TEST_ENV) $(MAKE) /E realclean VCE$(XDBG) cd tests && $(MAKE) /E clean VCE$(XDBG) $(TEST_ENV) $(MAKE) /E realclean VSE$(XDBG) cd tests && $(MAKE) /E clean VSE$(XDBG) $(TEST_ENV) all-tests-static: -#!IF DEFINED(EXHAUSTIVE) - $(MAKE) /E realclean VC-static$(XDBG) - cd tests && $(MAKE) /E clean VC-static$(XDBG) $(TEST_ENV) && $(MAKE) /E clean VCX-static$(XDBG) $(TEST_ENV) - $(MAKE) /E realclean VCE-static$(XDBG) + cd tests && $(MAKE) /E clean VC-static$(XDBG) $(TEST_ENV) cd tests && $(MAKE) /E clean VCE-static$(XDBG) $(TEST_ENV) - $(MAKE) /E realclean VSE-static$(XDBG) cd tests && $(MAKE) /E clean VSE-static$(XDBG) $(TEST_ENV) -#!ENDIF $(MAKE) realclean @ echo $@ completed successfully. @@ -126,16 +115,16 @@ all-tests-cflags: all-tests-md: @ -$(SETENV) - $(MAKE) all-tests XCFLAGS="/W3 /WX /MD" -!IF DEFINED(MORE_EXHAUSTIVE) - $(MAKE) all-tests XCFLAGS="/W3 /WX /MDd" XDBG="-debug" + $(MAKE) all-tests-dll XCFLAGS="/W3 /WX /MD" +!IF DEFINED(EXHAUSTIVE) + $(MAKE) all-tests-dll XCFLAGS="/W3 /WX /MDd" XDBG="-debug" !ENDIF @ echo $@ completed successfully. all-tests-mt: @ -$(SETENV) $(MAKE) all-tests-static XCFLAGS="/W3 /WX /MT" -!IF DEFINED(MORE_EXHAUSTIVE) +!IF DEFINED(EXHAUSTIVE) $(MAKE) all-tests-static XCFLAGS="/W3 /WX /MTd" XDBG="-debug" !ENDIF @ echo $@ completed successfully. From 9b52fa4eebea76a92eab865eba6cd64e4a431ae9 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 6 Aug 2018 15:11:06 +1000 Subject: [PATCH 143/207] Fix target "all-tests" --- Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 84063208..c5b2d3dc 100644 --- a/Makefile +++ b/Makefile @@ -92,7 +92,7 @@ all: TEST_ENV = CFLAGS="$(CFLAGS) /DNO_ERROR_DIALOGS" all-tests: - $(MAKE) all-tests-dll all-tests-static + $(MAKE) all-tests-md all-tests-mt all-tests-dll: $(MAKE) /E realclean VC$(XDBG) && cd tests @@ -109,10 +109,6 @@ all-tests-static: $(MAKE) realclean @ echo $@ completed successfully. -all-tests-cflags: - $(MAKE) all-tests-md all-tests-mt - @ echo $@ completed successfully. - all-tests-md: @ -$(SETENV) $(MAKE) all-tests-dll XCFLAGS="/W3 /WX /MD" From 2ccd905d20e7187b22dc3e7c1f3675f325d5614c Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 6 Aug 2018 13:04:12 +1000 Subject: [PATCH 144/207] Apply Mark Pizzolato's full static linking changes; ignore .project file. This removes the PIMAGE_TLS_CALLBACK method, which does not work for us. errno just will not work when there are multiple CRT libs in use (static pthreads lib and application dll). I.e. we are insisting on either full DLL or full static linking exclusively. Conflicts: _ptw32.h dll.c need_errno.h pthread.h pthread_detach.c tests/Makefile --- _ptw32.h | 19 ++--------- dll.c | 50 ++--------------------------- need_errno.h | 5 ++- pthread.h | 4 +-- pthread_detach.c | 8 +++-- tests/Makefile | 82 +++++++++++++----------------------------------- 6 files changed, 36 insertions(+), 132 deletions(-) diff --git a/_ptw32.h b/_ptw32.h index 88ed0af1..a8ae9e44 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -66,23 +66,8 @@ # define __PTW32_END_C_DECLS #endif -#if defined (__PTW32_STATIC_LIB) && _MSC_VER >= 1400 -# undef __PTW32_STATIC_LIB -# define __PTW32_STATIC_TLSLIB -#endif - -/* When building the library, you should define __PTW32_BUILD so that - * the variables/functions are exported correctly. When using the library, - * do NOT define __PTW32_BUILD, and then the variables/functions will - * be imported correctly. - * - * FIXME: Used defined feature test macros, such as __PTW32_STATIC_LIB, (and - * maybe even __PTW32_BUILD), should be renamed with one initial underscore; - * internally defined macros, such as __PTW32_DLLPORT, should be renamed with - * two initial underscores ... perhaps __PTW32_DECLSPEC is nicer anyway? - */ -#if defined __PTW32_STATIC_LIB || defined __PTW32_STATIC_TLSLIB -# define __PTW32_DLLPORT +#if defined __PTW32_STATIC_LIB +# define __PTW32_DLLPORT #elif defined __PTW32_BUILD # define __PTW32_DLLPORT __declspec (dllexport) diff --git a/dll.c b/dll.c index cac31fc3..58982019 100644 --- a/dll.c +++ b/dll.c @@ -36,11 +36,6 @@ # include #endif -#if defined (__PTW32_STATIC_LIB) && defined(_MSC_VER) && _MSC_VER >= 1400 -# undef __PTW32_STATIC_LIB -# define __PTW32_STATIC_TLSLIB -#endif - #include "pthread.h" #include "implement.h" @@ -60,12 +55,7 @@ */ extern "C" #endif /* __cplusplus */ - BOOL WINAPI -#if defined (__PTW32_STATIC_TLSLIB) -__PTW32_StaticLibMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) -#else -DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) -#endif + BOOL WINAPI DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) { BOOL result = __PTW32_TRUE; @@ -109,34 +99,7 @@ DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) typedef int foo; #endif -/* Visual Studio 8+ can leverage PIMAGE_TLS_CALLBACK CRT segments, which - * give a static lib its very own DllMain. - */ -#ifdef __PTW32_STATIC_TLSLIB - -static void WINAPI -TlsMain(PVOID h, DWORD r, PVOID u) -{ - (void)__PTW32_StaticLibMain((HINSTANCE)h, r, u); -} - -#ifdef _M_X64 -# pragma comment (linker, "/INCLUDE:_tls_used") -# pragma comment (linker, "/INCLUDE:_xl_b") -# pragma const_seg(".CRT$XLB") -EXTERN_C const PIMAGE_TLS_CALLBACK _xl_b = TlsMain; -# pragma const_seg() -#else -# pragma comment (linker, "/INCLUDE:__tls_used") -# pragma comment (linker, "/INCLUDE:__xl_b") -# pragma data_seg(".CRT$XLB") -EXTERN_C PIMAGE_TLS_CALLBACK _xl_b = TlsMain; -# pragma data_seg() -#endif /* _M_X64 */ - -#endif /* __PTW32_STATIC_TLSLIB */ - -#if defined (__PTW32_STATIC_LIB) +#if defined(__PTW32_STATIC_LIB) /* * Note: MSVC 8 and higher use code in dll.c, which enables TLS cleanup @@ -163,13 +126,6 @@ EXTERN_C PIMAGE_TLS_CALLBACK _xl_b = TlsMain; static int on_process_init(void) { -#if defined(_MSC_VER) && !defined(_DLL) - extern int __cdecl _heap_init (void); - extern int __cdecl _mtinit (void); - - _heap_init(); - _mtinit(); -#endif pthread_win32_process_attach_np (); return 0; } @@ -185,7 +141,7 @@ static int on_process_exit(void) __attribute__((section(".ctors"), used)) static int (*gcc_ctor)(void) = on_process_init; __attribute__((section(".dtors"), used)) static int (*gcc_dtor)(void) = on_process_exit; #elif defined(_MSC_VER) -# if _MSC_VER >= 1400 /* MSVC8 */ +# if _MSC_VER >= 1400 /* MSVC8+ */ # pragma section(".CRT$XCU", long, read) # pragma section(".CRT$XPU", long, read) __declspec(allocate(".CRT$XCU")) static int (*msc_ctor)(void) = on_process_init; diff --git a/need_errno.h b/need_errno.h index a750e1e3..fc79f2ec 100644 --- a/need_errno.h +++ b/need_errno.h @@ -59,9 +59,8 @@ extern "C" { #endif #endif -#if defined (__PTW32_STATIC_LIB) && defined(_MSC_VER) && _MSC_VER >= 1400 -# undef __PTW32_STATIC_LIB -# define __PTW32_STATIC_TLSLIB +#if defined(__PTW32_STATIC_LIB) && defined(_MSC_VER) && _MSC_VER >= 1400 +# define __PTW32_STATIC_TLSLIB #endif #if defined (__PTW32_STATIC_LIB) || defined (__PTW32_STATIC_TLSLIB) diff --git a/pthread.h b/pthread.h index 37f0cef7..4245ff62 100644 --- a/pthread.h +++ b/pthread.h @@ -1161,8 +1161,8 @@ __PTW32_DLLPORT int __PTW32_CDECL pthreadCancelableTimedWait (void *waitHandle, * * Note: "_DLL" implies the /MD compiler flag. */ -#if defined(_MSC_VER) && !defined(_DLL) && !defined (__PTW32_STATIC_LIB) && !defined(__PTW32_STATIC_TLSLIB) -# define __PTW32_USES_SEPARATE_CRT +#if defined(_MSC_VER) && !defined(_DLL) && !defined(__PTW32_STATIC_LIB) +# define __PTW32_USES_SEPARATE_CRT #endif #if defined (__PTW32_USES_SEPARATE_CRT) && (defined(__PTW32_CLEANUP_CXX) || defined(__PTW32_CLEANUP_SEH)) diff --git a/pthread_detach.c b/pthread_detach.c index 6933d469..768e1e09 100644 --- a/pthread_detach.c +++ b/pthread_detach.c @@ -102,10 +102,14 @@ pthread_detach (pthread_t thread) */ result = 0; - __ptw32_mcs_lock_acquire (&tp->stateLock, &stateLock); - if (tp->state != PThreadStateLast) + ptw32_mcs_lock_acquire (&tp->stateLock, &stateLock); + if (tp->state < PThreadStateLast) { tp->detachState = PTHREAD_CREATE_DETACHED; + if (tp->state == PThreadStateExiting) + { + destroyIt = PTW32_TRUE; + } } else if (tp->detachState != PTHREAD_CREATE_DETACHED) { diff --git a/tests/Makefile b/tests/Makefile index 0368ca04..db2c856f 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,33 +1,5 @@ # Makefile for the pthreads test suite. # If all of the .pass files can be created, the test suite has passed. -# -# -------------------------------------------------------------------------- -# -# 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: -# 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 -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library in the file COPYING.LIB; -# if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA -# PTW32_VER = 2$(EXTRAVERSION) @@ -75,15 +47,15 @@ VCXFLAGS = /EHs /TP /D__PTW32_CLEANUP_C CPLIB = $(VCLIB) CPDLL = $(VCDLL) -CFLAGS = $(OPTIM) /W3 /MD /Z7 -CFLAGS_DEBUG = $(OPTIM) /W3 /MDd /Z7 -CFLAGS_STATIC = $(OPTIM) /W3 /MT /Z7 -CFLAGS_STATIC_DEBUG = $(OPTIM) /W3 /MTd /Z7 +CFLAGS = $(OPTIM) /W3 /Z7 +CFLAGS_DEBUG = $(OPTIM) /W3 /Z7 LFLAGS = /INCREMENTAL:NO INCLUDES = -I. BUILD_DIR = .. EHFLAGS = +EHFLAGS_STATIC = /MT /D__PTW32_STATIC_LIB -I.. /DHAVE_CONFIG_H /D__PTW32_BUILD_INLINED ..\pthread.c +EHFLAGS_STATIC_DEBUG = /MTd /D__PTW32_STATIC_LIB -I.. /DHAVE_CONFIG_H /D__PTW32_BUILD_INLINED ..\pthread.c # If a test case returns a non-zero exit code to the shell, make will # stop. @@ -160,64 +132,52 @@ VCX-bench: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCXFLAGS)" $(BENCHTESTS) VC-static VC-small-static: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB" allpassed - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCFLAGS) $(EHFLAGS_STATIC)" allpassed VCE-static VCE-small-static: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB" allpassed - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_STATIC)" allpassed VSE-static VSE-small-static: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB" allpassed - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_STATIC)" allpassed VCX-static VCX-small-static: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCXFLAGS) /D__PTW32_STATIC_LIB" allpassed - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCXFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_STATIC)" allpassed VC-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB" $(BENCHTESTS) - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) VCE-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB" $(BENCHTESTS) - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) VSE-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB" $(BENCHTESTS) - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) VCX-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCXFLAGS) /D__PTW32_STATIC_LIB" $(BENCHTESTS) - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC)" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCXFLAGS) /DPTW32_STATIC_LIB" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) VC-debug: - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_DEBUG)" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCFLAGS)" allpassed VC-static-debug VC-small-static-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB" allpassed - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC_DEBUG)" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed VCE-debug: - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_DEBUG)" CPLIB="$(VCELIBD)" CPDLL="$(VCEDLLD)" EHFLAGS="$(VCEFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIBD)" CPDLL="$(VCEDLLD)" EHFLAGS="$(VCEFLAGS)" allpassed VCE-static-debug VCE-small-static-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIBD)" CPDLL="" EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB" allpassed - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC_DEBUG)" CPLIB="$(VCELIBD)" CPDLL="" EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIBD)" CPDLL="" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed VSE-debug: - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_DEBUG)" CPLIB="$(VSELIBD)" CPDLL="$(VSEDLLD)" EHFLAGS="$(VSEFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIBD)" CPDLL="$(VSEDLLD)" EHFLAGS="$(VSEFLAGS)" allpassed VSE-static-debug VSE-small-static-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIBD)" CPDLL="" EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB" allpassed - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC_DEBUG)" CPLIB="$(VSELIBD)" CPDLL="" EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed VCX-debug: - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_DEBUG)" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCXFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCXFLAGS)" allpassed VCX-static-debug VCX-small-static-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCXFLAGS) /D__PTW32_STATIC_LIB" allpassed - @ $(MAKE) /E /nologo TEST="$@" CFLAGS="$(CFLAGS_STATIC_DEBUG)" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCXFLAGS) /DPTW32_STATIC_LIB" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed clean: if exist *.dll $(RM) *.dll @@ -241,7 +201,7 @@ realclean: clean if exist *.log $(RM) *.log .c.pass: - $(CC) $(EHFLAGS) $(CFLAGS) $(INCLUDES) $*.c /Fe$*.exe /link $(LFLAGS) $(CPLIB) $(XXLIBS) + $(CC) $(CFLAGS) $(INCLUDES) $(EHFLAGS) $*.c /Fe$*.exe /link $(LFLAGS) $(CPLIB) $(XXLIBS) @ $(ECHO) ... Running $(TEST) test: $*.exe @ .\$*.exe @ $(ECHO) ...... Passed From 8b89dd301a119387f7a2964a345e2b28f1ab830c Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 6 Aug 2018 17:12:10 +1000 Subject: [PATCH 145/207] Fix names after patching --- pthread_detach.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pthread_detach.c b/pthread_detach.c index 768e1e09..d4cbbb4b 100644 --- a/pthread_detach.c +++ b/pthread_detach.c @@ -102,13 +102,13 @@ pthread_detach (pthread_t thread) */ result = 0; - ptw32_mcs_lock_acquire (&tp->stateLock, &stateLock); + __ptw32_mcs_lock_acquire (&tp->stateLock, &stateLock); if (tp->state < PThreadStateLast) { tp->detachState = PTHREAD_CREATE_DETACHED; if (tp->state == PThreadStateExiting) { - destroyIt = PTW32_TRUE; + destroyIt = __PTW32_TRUE; } } else if (tp->detachState != PTHREAD_CREATE_DETACHED) From 8de5d353e8418c159969e3a3c8908d8855351fc7 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 6 Aug 2018 20:42:59 +1000 Subject: [PATCH 146/207] Fixing builds; use reasonable number of threads in test. --- Makefile | 85 ++++++++++++++++++----------------------------- tests/Makefile | 30 +++++++++-------- tests/sequence1.c | 3 +- 3 files changed, 50 insertions(+), 68 deletions(-) diff --git a/Makefile b/Makefile index f88edf8d..c74f8652 100644 --- a/Makefile +++ b/Makefile @@ -26,9 +26,9 @@ SMALL_STATIC_STAMPS = pthreadVCE$(PTW32_VER).small_static_stamp pthreadVSE$(PTW CC = cl /errorReport:none /nologo CPPFLAGS = /I. /DHAVE_CONFIG_H -XCFLAGS = /W3 /MD /nologo -CFLAGS = /O2 /Ob2 $(XCFLAGS) -CFLAGSD = /Z7 $(XCFLAGS) +XCFLAGS = +CFLAGS = /W3 /O2 /Ob2 $(XCFLAGS) +CFLAGSD = /W3 /Z7 $(XCFLAGS) # Uncomment this if config.h defines RETAIN_WSALASTERROR #XLIBS = wsock32.lib @@ -82,124 +82,105 @@ help: # @ echo nmake clean VSE-small-static-debug all: + $(MAKE) /E clean VC $(MAKE) /E clean VCE $(MAKE) /E clean VSE - $(MAKE) /E clean VC + $(MAKE) /E clean VC-debug $(MAKE) /E clean VCE-debug $(MAKE) /E clean VSE-debug - $(MAKE) /E clean VC-debug TEST_ENV = CFLAGS="$(CFLAGS) /DNO_ERROR_DIALOGS" all-tests: - $(MAKE) all-tests-dll all-tests-static + $(MAKE) all-tests-md all-tests-mt all-tests-dll: -# $(MAKE) /E realclean VC-small-static$(XDBG) -# cd tests && $(MAKE) /E clean VC-small-static$(XDBG) $(TEST_ENV) && $(MAKE) /E clean VCX-small-static$(XDBG) $(TEST_ENV) -# $(MAKE) /E realclean VCE-small-static$(XDBG) -# cd tests && $(MAKE) /E clean VCE-small-static$(XDBG) $(TEST_ENV) -# $(MAKE) /E realclean VSE-small-static$(XDBG) -# cd tests && $(MAKE) /E clean VSE-small-static$(XDBG) $(TEST_ENV) $(MAKE) /E realclean VC$(XDBG) - cd tests && $(MAKE) /E clean VC$(XDBG) $(TEST_ENV) && $(MAKE) /E clean VCX$(XDBG) $(TEST_ENV) + cd tests && $(MAKE) /E clean VC$(XDBG) $(TEST_ENV) $(MAKE) /E realclean VCE$(XDBG) cd tests && $(MAKE) /E clean VCE$(XDBG) $(TEST_ENV) $(MAKE) /E realclean VSE$(XDBG) cd tests && $(MAKE) /E clean VSE$(XDBG) $(TEST_ENV) all-tests-static: -#!IF DEFINED(EXHAUSTIVE) - $(MAKE) /E realclean VC-static$(XDBG) - cd tests && $(MAKE) /E clean VC-static$(XDBG) $(TEST_ENV) && $(MAKE) /E clean VCX-static$(XDBG) $(TEST_ENV) - $(MAKE) /E realclean VCE-static$(XDBG) + cd tests && $(MAKE) /E clean VC-static$(XDBG) $(TEST_ENV) cd tests && $(MAKE) /E clean VCE-static$(XDBG) $(TEST_ENV) - $(MAKE) /E realclean VSE-static$(XDBG) cd tests && $(MAKE) /E clean VSE-static$(XDBG) $(TEST_ENV) -#!ENDIF $(MAKE) realclean @ echo $@ completed successfully. -all-tests-cflags: - $(MAKE) all-tests-md all-tests-mt - @ echo $@ completed successfully. - -all-tests-md: - $(MAKE) all-tests-md all-tests-mt - @ echo $@ completed successfully. - all-tests-md: @ -$(SETENV) - $(MAKE) all-tests XCFLAGS="/W3 /WX /MD" -!IF DEFINED(MORE_EXHAUSTIVE) - $(MAKE) all-tests XCFLAGS="/W3 /WX /MDd" XDBG="-debug" + $(MAKE) all-tests-dll +!IF DEFINED(EXHAUSTIVE) + $(MAKE) all-tests-dll XDBG="-debug" !ENDIF @ echo $@ completed successfully. all-tests-mt: @ -$(SETENV) - $(MAKE) all-tests-static XCFLAGS="/W3 /WX /MT" -!IF DEFINED(MORE_EXHAUSTIVE) - $(MAKE) all-tests-static XCFLAGS="/W3 /WX /MTd" XDBG="-debug" + $(MAKE) all-tests-static +!IF DEFINED(EXHAUSTIVE) + $(MAKE) all-tests-static XDBG="-debug" !ENDIF @ echo $@ completed successfully. VCE: - @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).dll + @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VCEFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).dll VCE-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).dll + @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VCEFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).dll VSE: - @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).dll + @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VSEFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).dll VSE-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).dll + @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VSEFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).dll VC: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).dll + @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VCFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).dll VC-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).dll + @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VCFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).dll # # Static builds # #VCE-small-static: -# @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).small_static_stamp +# @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).small_static_stamp #VCE-small-static-debug: -# @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).small_static_stamp +# @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCEFLAGSD) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).small_static_stamp #VSE-small-static: -# @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).small_static_stamp +# @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).small_static_stamp #VSE-small-static-debug: -# @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).small_static_stamp +# @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).small_static_stamp #VC-small-static: -# @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).small_static_stamp +# @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).small_static_stamp #VC-small-static-debug: -# @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).small_static_stamp +# @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).small_static_stamp VCE-static: - @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).inlined_static_stamp + @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).inlined_static_stamp VCE-static-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).inlined_static_stamp + @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).inlined_static_stamp VSE-static: - @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).inlined_static_stamp + @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).inlined_static_stamp VSE-static-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).inlined_static_stamp + @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).inlined_static_stamp VC-static: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).inlined_static_stamp + @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).inlined_static_stamp VC-static-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).inlined_static_stamp + @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).inlined_static_stamp realclean: clean @@ -256,7 +237,7 @@ $(SMALL_STATIC_STAMPS): $(STATIC_OBJS) echo. >$@ .c.obj: - $(CC) $(EHFLAGS) /D$(CLEANUP) -c $< + $(CC) $(XCFLAGS) $(EHFLAGS) /D$(CLEANUP) -c $< # TARGET_CPU is an environment variable set by Visual Studio Command Prompt # as provided by the SDK (VS 2010 Express plus SDK 7.1) diff --git a/tests/Makefile b/tests/Makefile index db2c856f..6d747d91 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -54,8 +54,10 @@ INCLUDES = -I. BUILD_DIR = .. EHFLAGS = -EHFLAGS_STATIC = /MT /D__PTW32_STATIC_LIB -I.. /DHAVE_CONFIG_H /D__PTW32_BUILD_INLINED ..\pthread.c -EHFLAGS_STATIC_DEBUG = /MTd /D__PTW32_STATIC_LIB -I.. /DHAVE_CONFIG_H /D__PTW32_BUILD_INLINED ..\pthread.c +EHFLAGS_DLL = /MD +EHFLAGS_DLL_DEBUG = /MDd +EHFLAGS_STATIC = /MT /D__PTW32_STATIC_LIB -I$(BUILD_DIR) /DHAVE_CONFIG_H /D__PTW32_BUILD_INLINED $(BUILD_DIR)\pthread.c +EHFLAGS_STATIC_DEBUG = /MTd /D__PTW32_STATIC_LIB -I$(BUILD_DIR) /DHAVE_CONFIG_H /D__PTW32_BUILD_INLINED $(BUILD_DIR)\pthread.c # If a test case returns a non-zero exit code to the shell, make will # stop. @@ -108,28 +110,28 @@ help: @ $(ECHO) nmake clean VSE-small-static-debug VC: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCFLAGS) $(EHFLAGS_DLL)" allpassed VCE: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="$(VCEDLL)" EHFLAGS="$(VCEFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="$(VCEDLL)" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_DLL)" allpassed VSE: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="$(VSEDLL)" EHFLAGS="$(VSEFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="$(VSEDLL)" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_DLL)" allpassed VCX: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCXFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_DLL)" allpassed VC-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCFLAGS)" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCFLAGS) $(EHFLAGS_DLL)" $(BENCHTESTS) VCE-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="$(VCEDLL)" EHFLAGS="$(VCEFLAGS)" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="$(VCEDLL)" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_DLL)" $(BENCHTESTS) VSE-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="$(VSEDLL)" EHFLAGS="$(VSEFLAGS)" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="$(VSEDLL)" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_DLL)" $(BENCHTESTS) VCX-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCXFLAGS)" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_DLL)" $(BENCHTESTS) VC-static VC-small-static: @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCFLAGS) $(EHFLAGS_STATIC)" allpassed @@ -156,25 +158,25 @@ VCX-static-bench: @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) VC-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCFLAGS) $(EHFLAGS_DLL_DEBUG)" allpassed VC-static-debug VC-small-static-debug: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed VCE-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIBD)" CPDLL="$(VCEDLLD)" EHFLAGS="$(VCEFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIBD)" CPDLL="$(VCEDLLD)" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_DLL_DEBUG)" allpassed VCE-static-debug VCE-small-static-debug: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIBD)" CPDLL="" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed VSE-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIBD)" CPDLL="$(VSEDLLD)" EHFLAGS="$(VSEFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIBD)" CPDLL="$(VSEDLLD)" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_DLL_DEBUG)" allpassed VSE-static-debug VSE-small-static-debug: @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed VCX-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCXFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_DLL_DEBUG)" allpassed VCX-static-debug VCX-small-static-debug: @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed diff --git a/tests/sequence1.c b/tests/sequence1.c index b10030cc..1a307f49 100755 --- a/tests/sequence1.c +++ b/tests/sequence1.c @@ -33,7 +33,6 @@ * * Test Synopsis: * - that unique thread sequence numbers are generated. - * - Analyse thread struct reuse. * * Test Method (Validation or Falsification): * - @@ -78,7 +77,7 @@ */ enum { - NUMTHREADS = 10000 + NUMTHREADS = PTHREAD_THREADS_MAX }; From a44982adf59bb2d9d4e8bb6f1cd1778f6f57bacd Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 6 Aug 2018 20:47:15 +1000 Subject: [PATCH 147/207] Use reasonable number of threads in test --- tests/sequence1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sequence1.c b/tests/sequence1.c index 41f19a26..b68efc2c 100755 --- a/tests/sequence1.c +++ b/tests/sequence1.c @@ -80,7 +80,7 @@ */ enum { - NUMTHREADS = 10000 + NUMTHREADS = PTHREAD_THREADS_MAX }; From 58b020a634066d8213b3116ac5ffe3335d01496d Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 6 Aug 2018 20:50:37 +1000 Subject: [PATCH 148/207] Bump version minor number --- _ptw32.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_ptw32.h b/_ptw32.h index 30c3bb95..05ea4269 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -44,11 +44,11 @@ * leading underscore to the macro names. */ #define PTW32_VERSION_MAJOR 2 -#define PTW32_VERSION_MINOR 10 +#define PTW32_VERSION_MINOR 11 #define PTW32_VERSION_MICRO 0 #define PTW32_VERION_BUILD 0 -#define PTW32_VERSION 2,10,0,0 -#define PTW32_VERSION_STRING "2, 10, 0, 0\0" +#define PTW32_VERSION 2,11,0,0 +#define PTW32_VERSION_STRING "2, 11, 0, 0\0" #if defined(__GNUC__) # pragma GCC system_header From 0496f89899a203abf07695b1bf3c1f4c38eabe32 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 6 Aug 2018 21:04:17 +1000 Subject: [PATCH 149/207] Name change and copyright --- ANNOUNCE | 4 +- COPYING | 48 +++++++++++----------- ChangeLog | 14 +++---- FAQ | 34 +++++++-------- GNUmakefile.in | 14 +++---- NEWS | 30 +++++++------- PROGRESS | 2 +- README | 28 ++++++------- README.Borland | 4 +- README.CV | 16 ++++---- README.NONPORTABLE | 12 +++--- _ptw32.h | 18 ++++---- aclocal.m4 | 12 +++--- cleanup.c | 12 +++--- config.h | 4 +- configure.ac | 14 +++---- context.h | 12 +++--- create.c | 12 +++--- dll.c | 12 +++--- errno.c | 12 +++--- global.c | 12 +++--- implement.h | 12 +++--- manual/ChangeLog | 2 +- manual/PortabilityIssues.html | 10 ++--- manual/cpu_set.html | 2 +- manual/index.html | 8 ++-- manual/pthreadCancelableWait.html | 4 +- manual/pthread_attr_init.html | 18 ++++---- manual/pthread_attr_setstackaddr.html | 6 +-- manual/pthread_attr_setstacksize.html | 8 ++-- manual/pthread_barrier_init.html | 8 ++-- manual/pthread_barrier_wait.html | 6 +-- manual/pthread_barrierattr_init.html | 6 +-- manual/pthread_barrierattr_setpshared.html | 10 ++--- manual/pthread_cancel.html | 14 +++---- manual/pthread_cleanup_push.html | 4 +- manual/pthread_cond_init.html | 6 +-- manual/pthread_condattr_init.html | 6 +-- manual/pthread_condattr_setpshared.html | 10 ++--- manual/pthread_create.html | 6 +-- manual/pthread_delay_np.html | 4 +- manual/pthread_detach.html | 4 +- manual/pthread_getunique_np.html | 6 +-- manual/pthread_getw32threadhandle_np.html | 4 +- manual/pthread_join.html | 4 +- manual/pthread_key_create.html | 6 +-- manual/pthread_kill.html | 14 +++---- manual/pthread_mutex_init.html | 8 ++-- manual/pthread_mutexattr_init.html | 10 ++--- manual/pthread_mutexattr_setpshared.html | 6 +-- manual/pthread_num_processors_np.html | 4 +- manual/pthread_once.html | 4 +- manual/pthread_rwlock_init.html | 8 ++-- manual/pthread_rwlock_rdlock.html | 10 ++--- manual/pthread_rwlock_timedrdlock.html | 6 +-- manual/pthread_rwlock_timedwrlock.html | 6 +-- manual/pthread_rwlock_unlock.html | 8 ++-- manual/pthread_rwlock_wrlock.html | 8 ++-- manual/pthread_rwlockattr_init.html | 6 +-- manual/pthread_rwlockattr_setpshared.html | 8 ++-- manual/pthread_self.html | 8 ++-- manual/pthread_setaffinity_np.html | 6 +-- manual/pthread_setcancelstate.html | 16 ++++---- manual/pthread_setcanceltype.html | 16 ++++---- manual/pthread_setconcurrency.html | 6 +-- manual/pthread_setname_np.html | 2 +- manual/pthread_setschedparam.html | 6 +-- manual/pthread_spin_init.html | 10 ++--- manual/pthread_spin_lock.html | 6 +-- manual/pthread_spin_unlock.html | 8 ++-- manual/pthread_timechange_handler_np.html | 4 +- manual/pthread_win32_attach_detach_np.html | 8 ++-- manual/pthread_win32_getabstime_np.html | 4 +- manual/pthread_win32_test_features_np.html | 4 +- manual/sched_get_priority_max.html | 4 +- manual/sched_getscheduler.html | 6 +-- manual/sched_setaffinity.html | 6 +-- manual/sched_setscheduler.html | 6 +-- manual/sched_yield.html | 2 +- manual/sem_init.html | 8 ++-- pthread.c | 14 +++---- pthread.h | 22 +++++----- pthread_attr_destroy.c | 12 +++--- pthread_attr_getaffinity_np.c | 12 +++--- pthread_attr_getdetachstate.c | 12 +++--- pthread_attr_getinheritsched.c | 12 +++--- pthread_attr_getname_np.c | 12 +++--- pthread_attr_getschedparam.c | 12 +++--- pthread_attr_getschedpolicy.c | 12 +++--- pthread_attr_getscope.c | 12 +++--- pthread_attr_getstackaddr.c | 12 +++--- pthread_attr_getstacksize.c | 12 +++--- pthread_attr_init.c | 12 +++--- pthread_attr_setaffinity_np.c | 12 +++--- pthread_attr_setdetachstate.c | 12 +++--- pthread_attr_setinheritsched.c | 12 +++--- pthread_attr_setname_np.c | 12 +++--- pthread_attr_setschedparam.c | 12 +++--- pthread_attr_setschedpolicy.c | 12 +++--- pthread_attr_setscope.c | 12 +++--- pthread_attr_setstackaddr.c | 12 +++--- pthread_attr_setstacksize.c | 12 +++--- pthread_barrier_destroy.c | 12 +++--- pthread_barrier_init.c | 12 +++--- pthread_barrier_wait.c | 12 +++--- pthread_barrierattr_destroy.c | 12 +++--- pthread_barrierattr_getpshared.c | 12 +++--- pthread_barrierattr_init.c | 12 +++--- pthread_barrierattr_setpshared.c | 12 +++--- pthread_cancel.c | 14 +++---- pthread_cond_destroy.c | 12 +++--- pthread_cond_init.c | 12 +++--- pthread_cond_signal.c | 12 +++--- pthread_cond_wait.c | 12 +++--- pthread_condattr_destroy.c | 12 +++--- pthread_condattr_getpshared.c | 12 +++--- pthread_condattr_init.c | 12 +++--- pthread_condattr_setpshared.c | 12 +++--- pthread_delay_np.c | 12 +++--- pthread_detach.c | 12 +++--- pthread_equal.c | 12 +++--- pthread_exit.c | 14 +++---- pthread_getconcurrency.c | 12 +++--- pthread_getname_np.c | 14 +++---- pthread_getschedparam.c | 14 +++---- pthread_getspecific.c | 12 +++--- pthread_getunique_np.c | 12 +++--- pthread_getw32threadhandle_np.c | 12 +++--- pthread_join.c | 12 +++--- pthread_key_create.c | 12 +++--- pthread_key_delete.c | 12 +++--- pthread_kill.c | 12 +++--- pthread_mutex_consistent.c | 12 +++--- pthread_mutex_destroy.c | 12 +++--- pthread_mutex_init.c | 12 +++--- pthread_mutex_lock.c | 12 +++--- pthread_mutex_timedlock.c | 12 +++--- pthread_mutex_trylock.c | 12 +++--- pthread_mutex_unlock.c | 12 +++--- pthread_mutexattr_destroy.c | 12 +++--- pthread_mutexattr_getkind_np.c | 12 +++--- pthread_mutexattr_getpshared.c | 12 +++--- pthread_mutexattr_getrobust.c | 12 +++--- pthread_mutexattr_gettype.c | 12 +++--- pthread_mutexattr_init.c | 12 +++--- pthread_mutexattr_setkind_np.c | 12 +++--- pthread_mutexattr_setpshared.c | 12 +++--- pthread_mutexattr_setrobust.c | 12 +++--- pthread_mutexattr_settype.c | 12 +++--- pthread_num_processors_np.c | 12 +++--- pthread_once.c | 12 +++--- pthread_rwlock_destroy.c | 12 +++--- pthread_rwlock_init.c | 12 +++--- pthread_rwlock_rdlock.c | 12 +++--- pthread_rwlock_timedrdlock.c | 12 +++--- pthread_rwlock_timedwrlock.c | 12 +++--- pthread_rwlock_tryrdlock.c | 12 +++--- pthread_rwlock_trywrlock.c | 12 +++--- pthread_rwlock_unlock.c | 12 +++--- pthread_rwlock_wrlock.c | 12 +++--- pthread_rwlockattr_destroy.c | 12 +++--- pthread_rwlockattr_getpshared.c | 12 +++--- pthread_rwlockattr_init.c | 12 +++--- pthread_rwlockattr_setpshared.c | 12 +++--- pthread_self.c | 12 +++--- pthread_setaffinity.c | 12 +++--- pthread_setcancelstate.c | 12 +++--- pthread_setcanceltype.c | 12 +++--- pthread_setconcurrency.c | 12 +++--- pthread_setname_np.c | 16 ++++---- pthread_setschedparam.c | 14 +++---- pthread_setspecific.c | 12 +++--- pthread_spin_destroy.c | 12 +++--- pthread_spin_init.c | 12 +++--- pthread_spin_lock.c | 12 +++--- pthread_spin_trylock.c | 12 +++--- pthread_spin_unlock.c | 12 +++--- pthread_testcancel.c | 12 +++--- pthread_timechange_handler_np.c | 14 +++---- pthread_timedjoin_np.c | 12 +++--- pthread_tryjoin_np.c | 12 +++--- pthread_win32_attach_detach_np.c | 12 +++--- ptw32_MCS_lock.c | 12 +++--- ptw32_callUserDestroyRoutines.c | 12 +++--- ptw32_calloc.c | 12 +++--- ptw32_cond_check_need_init.c | 12 +++--- ptw32_getprocessors.c | 12 +++--- ptw32_is_attr.c | 12 +++--- ptw32_mutex_check_need_init.c | 12 +++--- ptw32_new.c | 12 +++--- ptw32_processInitialize.c | 12 +++--- ptw32_processTerminate.c | 12 +++--- ptw32_relmillisecs.c | 12 +++--- ptw32_reuse.c | 12 +++--- ptw32_rwlock_cancelwrwait.c | 12 +++--- ptw32_rwlock_check_need_init.c | 12 +++--- ptw32_semwait.c | 12 +++--- ptw32_spinlock_check_need_init.c | 12 +++--- ptw32_threadDestroy.c | 12 +++--- ptw32_threadStart.c | 12 +++--- ptw32_throw.c | 12 +++--- ptw32_timespec.c | 12 +++--- ptw32_tkAssocCreate.c | 12 +++--- ptw32_tkAssocDestroy.c | 12 +++--- sched.h | 12 +++--- sched_get_priority_max.c | 12 +++--- sched_get_priority_min.c | 12 +++--- sched_getscheduler.c | 12 +++--- sched_setaffinity.c | 12 +++--- sched_setscheduler.c | 12 +++--- sched_yield.c | 12 +++--- sem_close.c | 12 +++--- sem_destroy.c | 12 +++--- sem_getvalue.c | 12 +++--- sem_init.c | 12 +++--- sem_open.c | 12 +++--- sem_post.c | 12 +++--- sem_post_multiple.c | 12 +++--- sem_timedwait.c | 12 +++--- sem_trywait.c | 12 +++--- sem_unlink.c | 12 +++--- sem_wait.c | 12 +++--- semaphore.h | 14 +++---- signal.c | 12 +++--- tests/Bmakefile | 6 +-- tests/ChangeLog | 4 +- tests/GNUmakefile.in | 12 +++--- tests/Makefile | 6 +-- tests/README | 2 +- tests/Wmakefile | 6 +-- tests/affinity1.c | 12 +++--- tests/affinity2.c | 12 +++--- tests/affinity3.c | 12 +++--- tests/affinity4.c | 12 +++--- tests/affinity5.c | 12 +++--- tests/affinity6.c | 12 +++--- tests/barrier1.c | 12 +++--- tests/barrier2.c | 12 +++--- tests/barrier3.c | 12 +++--- tests/barrier4.c | 12 +++--- tests/barrier5.c | 12 +++--- tests/barrier6.c | 12 +++--- tests/benchlib.c | 12 +++--- tests/benchtest.h | 12 +++--- tests/benchtest1.c | 12 +++--- tests/benchtest2.c | 12 +++--- tests/benchtest3.c | 12 +++--- tests/benchtest4.c | 12 +++--- tests/benchtest5.c | 12 +++--- tests/cancel1.c | 12 +++--- tests/cancel2.c | 12 +++--- tests/cancel3.c | 12 +++--- tests/cancel4.c | 12 +++--- tests/cancel5.c | 12 +++--- tests/cancel6a.c | 12 +++--- tests/cancel6d.c | 12 +++--- tests/cancel7.c | 12 +++--- tests/cancel8.c | 12 +++--- tests/cancel9.c | 12 +++--- tests/cleanup0.c | 12 +++--- tests/cleanup1.c | 12 +++--- tests/cleanup2.c | 12 +++--- tests/cleanup3.c | 12 +++--- tests/condvar1.c | 12 +++--- tests/condvar1_1.c | 12 +++--- tests/condvar1_2.c | 12 +++--- tests/condvar2.c | 12 +++--- tests/condvar2_1.c | 12 +++--- tests/condvar3.c | 12 +++--- tests/condvar3_1.c | 12 +++--- tests/condvar3_2.c | 12 +++--- tests/condvar3_3.c | 12 +++--- tests/condvar4.c | 12 +++--- tests/condvar5.c | 12 +++--- tests/condvar6.c | 12 +++--- tests/condvar7.c | 12 +++--- tests/condvar8.c | 12 +++--- tests/condvar9.c | 12 +++--- tests/context1.c | 12 +++--- tests/context2.c | 12 +++--- tests/count1.c | 12 +++--- tests/create1.c | 12 +++--- tests/create2.c | 12 +++--- tests/create3.c | 12 +++--- tests/delay1.c | 12 +++--- tests/delay2.c | 12 +++--- tests/detach1.c | 14 +++---- tests/equal1.c | 12 +++--- tests/errno1.c | 12 +++--- tests/exception1.c | 12 +++--- tests/exception2.c | 12 +++--- tests/exception3.c | 14 +++---- tests/exception3_0.c | 14 +++---- tests/exit1.c | 12 +++--- tests/exit2.c | 12 +++--- tests/exit3.c | 12 +++--- tests/exit4.c | 12 +++--- tests/exit5.c | 12 +++--- tests/eyal1.c | 12 +++--- tests/inherit1.c | 12 +++--- tests/join0.c | 12 +++--- tests/join1.c | 12 +++--- tests/join2.c | 12 +++--- tests/join3.c | 12 +++--- tests/join4.c | 12 +++--- tests/kill1.c | 12 +++--- tests/mutex1.c | 12 +++--- tests/mutex1e.c | 12 +++--- tests/mutex1n.c | 12 +++--- tests/mutex1r.c | 12 +++--- tests/mutex2.c | 12 +++--- tests/mutex2e.c | 12 +++--- tests/mutex2r.c | 12 +++--- tests/mutex3.c | 12 +++--- tests/mutex3e.c | 12 +++--- tests/mutex3r.c | 12 +++--- tests/mutex4.c | 12 +++--- tests/mutex5.c | 12 +++--- tests/mutex6.c | 12 +++--- tests/mutex6e.c | 12 +++--- tests/mutex6es.c | 12 +++--- tests/mutex6n.c | 12 +++--- tests/mutex6r.c | 12 +++--- tests/mutex6rs.c | 12 +++--- tests/mutex6s.c | 12 +++--- tests/mutex7.c | 12 +++--- tests/mutex7e.c | 12 +++--- tests/mutex7n.c | 12 +++--- tests/mutex7r.c | 12 +++--- tests/mutex8.c | 12 +++--- tests/mutex8e.c | 12 +++--- tests/mutex8n.c | 12 +++--- tests/mutex8r.c | 12 +++--- tests/name_np1.c | 12 +++--- tests/name_np2.c | 12 +++--- tests/once1.c | 12 +++--- tests/once2.c | 12 +++--- tests/once3.c | 12 +++--- tests/once4.c | 12 +++--- tests/priority1.c | 12 +++--- tests/priority2.c | 12 +++--- tests/reuse1.c | 12 +++--- tests/reuse2.c | 12 +++--- tests/robust1.c | 12 +++--- tests/robust2.c | 12 +++--- tests/robust3.c | 12 +++--- tests/robust4.c | 12 +++--- tests/robust5.c | 12 +++--- tests/rwlock1.c | 12 +++--- tests/rwlock2.c | 12 +++--- tests/rwlock2_t.c | 12 +++--- tests/rwlock3.c | 12 +++--- tests/rwlock3_t.c | 12 +++--- tests/rwlock4.c | 12 +++--- tests/rwlock4_t.c | 12 +++--- tests/rwlock5.c | 12 +++--- tests/rwlock5_t.c | 12 +++--- tests/rwlock6.c | 12 +++--- tests/rwlock6_t.c | 12 +++--- tests/rwlock6_t2.c | 12 +++--- tests/self1.c | 12 +++--- tests/self2.c | 12 +++--- tests/semaphore1.c | 12 +++--- tests/semaphore2.c | 12 +++--- tests/semaphore3.c | 12 +++--- tests/semaphore4.c | 12 +++--- tests/semaphore4t.c | 12 +++--- tests/semaphore5.c | 12 +++--- tests/sequence1.c | 12 +++--- tests/sizes.c | 2 +- tests/spin1.c | 12 +++--- tests/spin2.c | 12 +++--- tests/spin3.c | 12 +++--- tests/spin4.c | 12 +++--- tests/stress1.c | 12 +++--- tests/test.h | 12 +++--- tests/timeouts.c | 12 +++--- tests/tryentercs.c | 12 +++--- tests/tryentercs2.c | 12 +++--- tests/tsd1.c | 12 +++--- tests/tsd2.c | 12 +++--- tests/tsd3.c | 12 +++--- tests/valid1.c | 12 +++--- tests/valid2.c | 12 +++--- version.rc | 14 +++---- w32_CancelableWait.c | 12 +++--- 386 files changed, 2203 insertions(+), 2203 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 270bef36..c565d0e3 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -7,7 +7,7 @@ Maintainer: Ross Johnson We are pleased to announce the availability of a new release of -Pthreads4w (a.k.a. Pthreads-win32), an Open Source Software implementation +Pthreads4w (a.k.a. Pthreads4w), an Open Source Software implementation of the Threads component of the SUSV3 Standard for Microsoft's Windows (x86 and x64). Some relevant functions from other sections of SUSV3 are also supported including semaphores and scheduling @@ -64,7 +64,7 @@ were extracted from it. There is also a separate CONTRIBUTORS file. This file and others are on the web site: - http://sourceware.org/pthreads-win32 + http://sourceware.org/Pthreads4w As much as possible, the ChangeLog file acknowledges contributions to the code base in more detail. diff --git a/COPYING b/COPYING index a186f3de..657c4e18 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ - pthreads-win32 - a POSIX threads library for Microsoft Windows + Pthreads4w - a POSIX threads library for Microsoft Windows This file is Copyrighted @@ -12,30 +12,30 @@ This file is Copyrighted Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. -Pthreads-win32 is covered by the GNU Lesser General Public License +Pthreads4w is covered by the GNU Lesser General Public License ------------------------------------------------------------------ - Pthreads-win32 is open software; you can redistribute it and/or + Pthreads4w is open software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation version 3 of the License. - Pthreads-win32 is several binary link libraries, several modules, + Pthreads4w is several binary link libraries, several modules, associated interface definition files and scripts used to control its compilation and installation. - Pthreads-win32 is distributed in the hope that it will be useful, + Pthreads4w is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public License is distributed with - pthreads-win32 under the filename: + Pthreads4w under the filename: COPYING.FSF You should have received a copy of the version 3 GNU Lesser General - Public License with pthreads-win32; if not, write to: + Public License with Pthreads4w; if not, write to: Free Software Foundation, Inc. 59 Temple Place @@ -43,7 +43,7 @@ Pthreads-win32 is covered by the GNU Lesser General Public License Boston, MA 02111-1307 USA - The contact addresses for pthreads-win32 is as follows: + The contact addresses for Pthreads4w is as follows: Homepage: http://sourceforge.net/projects/pthreads4w/ Email: Ross Johnson @@ -51,22 +51,22 @@ Pthreads-win32 is covered by the GNU Lesser General Public License -Pthreads-win32 copyrights and exception files +Pthreads4w copyrights and exception files --------------------------------------------- - With the exception of the files listed below, Pthreads-win32 + With the exception of the files listed below, Pthreads4w is covered under the following GNU Lesser General Public License Copyrights: - Pthreads-win32 - POSIX Threads Library for Win32 + Pthreads4w - POSIX Threads Library for Win32 Copyright(C) 1998 John E. Bossom - Copyright(C) 1999,2017 Pthreads-win32 contributors + Copyright(C) 1999,2017 Pthreads4w contributors The current list of contributors is contained in the file CONTRIBUTORS included with the source code distribution. The current list of CONTRIBUTORS can also be seen at the following WWW location: - http://sources.redhat.com/pthreads-win32/contributors.html + https://sourceforge.net/projects/pthreads4w//contributors.html Contact Email: Ross Johnson Please use: Firstname.Lastname@homemail.com.au @@ -86,8 +86,8 @@ Pthreads-win32 copyrights and exception files The file COPYING.FSF, which contains a copy of the version 3 GNU Lesser General Public License, is itself copyrighted by the Free Software Foundation, Inc. Please note that the Free Software - Foundation, Inc. does NOT have a copyright over Pthreads-win32, - only the COPYING.FSF that is supplied with pthreads-win32. + Foundation, Inc. does NOT have a copyright over Pthreads4w, + only the COPYING.FSF that is supplied with Pthreads4w. The file tests/rwlock7.c and tests/rwlock8.c are derived from code written by Dave Butenhof for his book 'Programming With POSIX(R) Threads'. @@ -98,7 +98,7 @@ Pthreads-win32 copyrights and exception files In all cases one may use and distribute these exception files freely. And because one may freely distribute the LGPL covered files, the - entire pthreads-win32 source may be freely used and distributed. + entire Pthreads4w source may be freely used and distributed. General Copyleft and License info @@ -114,10 +114,10 @@ General Copyleft and License info http://www.gnu.org/copyleft/lesser.txt -Why pthreads-win32 did not use the GNU Lesser General Public License +Why Pthreads4w did not use the GNU Lesser General Public License -------------------------------------------------------------------- - The goal of the pthreads-win32 project has been to + The goal of the Pthreads4w project has been to provide a quality and complete implementation of the POSIX threads API for Microsoft Windows within the limits imposed by virtue of it being a stand-alone library and not @@ -125,25 +125,25 @@ Why pthreads-win32 did not use the GNU Lesser General Public License example, some functions and features, such as those based on POSIX signals, are missing. - Pthreads-win32 is a library, available in several different + Pthreads4w is a library, available in several different versions depending on supported compilers, and may be used as a dynamically linked module or a statically linked set of binary modules. It is not an application on it's own. - It was fully intended that pthreads-win32 be usable with + It was fully intended that Pthreads4w be usable with commercial software not covered by either the GPL or the LGPL - licenses. Pthreads-win32 has many contributors to it's + licenses. Pthreads4w has many contributors to it's code base, many of whom have done so because they have used the library in commercial or proprietry software projects. - Releasing pthreads-win32 under the LGPL ensures that the + Releasing Pthreads4w under the LGPL ensures that the library can be used widely, while at the same time ensures - that bug fixes and improvements to the pthreads-win32 code + that bug fixes and improvements to the Pthreads4w code itself is returned to benefit all current and future users of the library. - Although pthreads-win32 makes it possible for applications + Although Pthreads4w makes it possible for applications that use POSIX threads to be ported to Win32 platforms, the broader goal of the project is to encourage the use of open standards, and in particular, to make it just a little easier diff --git a/ChangeLog b/ChangeLog index 6ebd0f29..29d77fbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1148,9 +1148,9 @@ NOTES: The design (based on pseudo code contributed by Gottlob Frege) avoids creating a kernel object if there is no contention. See URL for details:- - http://sources.redhat.com/ml/pthreads-win32/2005/msg00029.html + http://sources.redhat.com/ml/Pthreads4w/2005/msg00029.html This uses late initialisation similar to the technique already used for - pthreads-win32 mutexes and semaphores (from Alexander Terekhov). + Pthreads4w mutexes and semaphores (from Alexander Terekhov). The subsequent cancellation cleanup additions (by rpj) could not be implemented without sacrificing some of the efficiency in Gottlob's design. In particular, @@ -1398,7 +1398,7 @@ Drepper's paper at http://people.redhat.com/drepper/futex.pdf, but using the existing semaphore in place of the futex described in the paper. Idea suggested by Alexander Terekhov - see: - http://sources.redhat.com/ml/pthreads-win32/2003/msg00108.html + http://sources.redhat.com/ml/Pthreads4w/2003/msg00108.html * pthread_mutex_timedlock.c pthread_mutex_timedlock(): Similarly. * pthread_mutex_trylock.c (pthread_mutex_trylock): Similarly. * pthread_mutex_unlock.c (pthread_mutex_unlock): Similarly. @@ -1471,7 +1471,7 @@ location. This is consistent with GNU/Linux but different to Solaris or MKS (and possibly others), which accept NULL as meaning 'don't return the created thread's ID'. Applications that run - using pthreads-win32 will run on all other POSIX threads + using Pthreads4w will run on all other POSIX threads implementations, at least w.r.t. this feature. It was decided not to copy the Solaris et al behaviour because, @@ -1558,7 +1558,7 @@ * QueueUserAPCEx (separate contributed package): Provides preemptive APC feature. * pthread_cancel.c (pthread_cancel): Initial integration of - QueueUserAPCEx into pthreads-win32 to provide true pre-emptive + QueueUserAPCEx into Pthreads4w to provide true pre-emptive async cancellation of threads, including blocked threads. 2004-05-06 Makoto Kato @@ -2169,7 +2169,7 @@ 2002-02-04 Ross Johnson - The following extends the idea above to the rest of pthreads-win32 - rpj + The following extends the idea above to the rest of Pthreads4w - rpj * attr.c: All routines are now in separate compilation units; This file is used to congregate the separate modules for @@ -3896,7 +3896,7 @@ Fri Jan 29 11:56:28 1999 Ross Johnson * implement.h: Add semaphore function prototypes and rename all functions to prepend 'ptw32_'. They are - now private to the pthreads-win32 implementation. + now private to the Pthreads4w implementation. * private.c: Change #warning. Move ptw32_sem_timedwait() to semaphore.c. diff --git a/FAQ b/FAQ index be19609c..82c7abe0 100644 --- a/FAQ +++ b/FAQ @@ -1,5 +1,5 @@ ========================================= - PTHREADS-WIN32 Frequently Asked Questions + Pthreads4w Frequently Asked Questions ========================================= INDEX @@ -20,7 +20,7 @@ Q 5 Why is the default library version now less exception-friendly? Q 6 Should I use Cygwin or Mingw32 as a development environment? -Q 7 Now that pthreads-win32 builds under Mingw32, why do I get +Q 7 Now that Pthreads4w builds under Mingw32, why do I get memory access violations (segfaults)? Q 8 How do I use pthread.dll for Win32 (Visual C++ 5.0) @@ -38,7 +38,7 @@ Q 11 Why isn't pthread_t defined as a scalar (e.g. pointer or int) Q 1 What is it? --- -Pthreads-win32 is an Open Source Software implementation of the +Pthreads4w is an Open Source Software implementation of the Threads component of the POSIX 1003.1c 1995 Standard for Microsoft's Win32 environment. Some functions from POSIX 1003.1b are also supported including semaphores. Other related functions include @@ -78,7 +78,7 @@ There seems to be more opinion in favour of using the standard C version of the library (no EH) with C++ applications since this appears to be the assumption commercial pthreads implementations make. Therefore, if you use an EH version -of pthreads-win32 then you may be under the illusion that +of Pthreads4w then you may be under the illusion that your application will be portable, when in fact it is likely to behave very differently linked with other pthreads libraries. @@ -89,7 +89,7 @@ There are a couple of reasons: - there is division amongst the experts and so the code may be needed in the future. (Yes, it's in the repository and we can get it out anytime in the future, but ...) -- pthreads-win32 is one of the few implementations, and possibly +- Pthreads4w is one of the few implementations, and possibly the only freely available one, that has EH versions. It may be useful to people who want to play with or study application behaviour under these conditions. @@ -235,7 +235,7 @@ There are a few reasons: do the expected thing in that context. (There are equally respected people who believe it should not be easily accessible, if it's there at all.) -- because pthreads-win32 is one of the few implementations that has +- because Pthreads4w is one of the few implementations that has the choice, perhaps the only freely available one, and so offers a laboratory to people who may want to explore the effects; - although the code will always be around somewhere for anyone who @@ -258,7 +258,7 @@ Consult that project's documentation for more information. ------------------------------------------------------------------------------ -Q 7 Now that pthreads-win32 builds under Mingw32, why do I get +Q 7 Now that Pthreads4w builds under Mingw32, why do I get --- memory access violations (segfaults)? The latest Mingw32 package has thread-safe exception handling (see Q10). @@ -345,23 +345,23 @@ been able to get to it. If the thread you're trying to cancel is blocked (for instance, it could be waiting for data from the network), it will only get cancelled when it unblocks (when the data arrives). For true pre-emptive cancellation in these cases, -pthreads-win32 from snapshot 2004-05-16 can automatically recognise and use the +Pthreads4w from snapshot 2004-05-16 can automatically recognise and use the QueueUserAPCEx package by Panagiotis E. Hadjidoukas. This package is available -from the pthreads-win32 ftp site and is included in the pthreads-win32 +from the Pthreads4w ftp site and is included in the Pthreads4w self-unpacking zip from 2004-05-16 onwards. Using deferred cancellation would normally be the way to go, however, even though the POSIX threads standard lists a number of C library functions that are defined as deferred cancellation points, there is no hookup between those which are provided by Windows and the -pthreads-win32 library. +Pthreads4w library. Incidently, it's worth noting for code portability that the older POSIX threads standards cancellation point lists didn't include "select" because (as I read in Butenhof) it wasn't part of POSIX. However, it does appear in the SUSV3. -Effectively, the only mandatory cancellation points that pthreads-win32 +Effectively, the only mandatory cancellation points that Pthreads4w recognises are those the library implements itself, ie. pthread_testcancel @@ -373,18 +373,18 @@ recognises are those the library implements itself, ie. pthread_delay_np The following routines from the non-mandatory list in SUSV3 are -cancellation points in pthreads-win32: +cancellation points in Pthreads4w: pthread_rwlock_wrlock pthread_rwlock_timedwrlock The following routines from the non-mandatory list in SUSV3 are not -cancellation points in pthreads-win32: +cancellation points in Pthreads4w: pthread_rwlock_rdlock pthread_rwlock_timedrdlock -Pthreads-win32 also provides two functions that allow you to create +Pthreads4w also provides two functions that allow you to create cancellation points within your application, but only for cases where a thread is going to block on a Win32 handle. These are: @@ -401,7 +401,7 @@ Q 10 How do I create thread-safe applications using This should not be a problem with recent versions of MinGW32. For early versions, see Thomas Pfaff's email at: -http://sources.redhat.com/ml/pthreads-win32/2002/msg00000.html +http://sources.redhat.com/ml/Pthreads4w/2002/msg00000.html ------------------------------------------------------------------------------ Q 11 Why isn't pthread_t defined as a scalar (e.g. pointer or int) @@ -436,9 +436,9 @@ how well the internal management of these handles would scale as the number of threads and the fragmentation of the sequence numbering increased for applications where thousands or millions of threads are created and detached over time. The current management of threads within -pthreads-win32 using structs for pthread_t, and reusing without ever +Pthreads4w using structs for pthread_t, and reusing without ever freeing them, reduces the management time overheads to a constant, which -could be important given that pthreads-win32 threads are built on top of +could be important given that Pthreads4w threads are built on top of Win32 threads and will therefore include that management overhead on top of their own. The cost is that the memory resources used for thread handles will remain at the peak level until the process exits. diff --git a/GNUmakefile.in b/GNUmakefile.in index 4f399ee5..83ebeea7 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -1,9 +1,9 @@ # @configure_input@ # -------------------------------------------------------------------------- # -# Pthreads-win32 - POSIX Threads Library for Win32 +# Pthreads4w - POSIX Threads Library for Win32 # Copyright(C) 1998 John E. Bossom -# Copyright(C) 1999-2017, Pthreads-win32 contributors +# Copyright(C) 1999-2018, Pthreads4w contributors # # Homepage: https://sourceforge.net/projects/pthreads4w/ # @@ -13,20 +13,20 @@ # following World Wide Web location: # https://sourceforge.net/p/pthreads4w/wiki/Contributors/ # -# This file is part of Pthreads-win32. +# This file is part of Pthreads4w. # -# Pthreads-win32 is free software: you can redistribute it and/or modify +# Pthreads4w is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# Pthreads-win32 is distributed in the hope that it will be useful, +# Pthreads4w is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Pthreads-win32. If not, see . * +# along with Pthreads4w. If not, see . * # PACKAGE = @PACKAGE_TARNAME@ VERSION = @PACKAGE_VERSION@ @@ -148,7 +148,7 @@ LFLAGS = $(ARCH) # POSIX says that applications should assume that thread IDs can be # recycled. However, Solaris and some other systems use a [very large] # sequence number as the thread ID, which provides virtual uniqueness. -# Pthreads-win32 provides pseudo-unique IDs when the default increment +# Pthreads4w provides pseudo-unique IDs when the default increment # (1) is used, but pthread_t is not a scalar type like Solaris's. # # Usage: diff --git a/NEWS b/NEWS index 5d8a8666..889d1217 100644 --- a/NEWS +++ b/NEWS @@ -12,7 +12,7 @@ pre Windows 2000 systems. License Change to LGPL v3 ------------------------- -Pthreads-win32 version 2.11 and all future 2.x versions will be released +Pthreads4w version 2.11 and all future 2.x versions will be released under the Lesser GNU Public License version 3 (LGPLv3). Planned Release Under the Apache License v2 @@ -459,8 +459,8 @@ General The package now includes a reference documentation set consisting of HTML formatted Unix-style manual pages that have been edited for -consistency with Pthreads-w32. The set can also be read online at: -http://sources.redhat.com/pthreads-win32/manual/index.html +consistency with Pthreads4w. The set can also be read online at: +https://sourceforge.net/projects/pthreads4w//manual/index.html Thanks again to Tim Theisen for running the test suite pre-release on an MP system. @@ -557,7 +557,7 @@ semaphores, such as WinCE prior to version 3.0. An alternate implementation of POSIX semaphores is built using W32 events for these systems when NEED_SEM is defined. This code has been completely rewritten in this release to reuse most of the default POSIX semaphore code, and particularly, -to implement all of the sem_* routines supported by pthreads-win32. Tim +to implement all of the sem_* routines supported by Pthreads4w. Tim Theisen also run the test suite over the NEED_SEM code on his MP system. All tests passed. @@ -567,7 +567,7 @@ New features ------------ * pthread_mutex_timedlock() and all sem_* routines provided by -pthreads-win32 are now implemented for WinCE versions prior to 3.0. Those +Pthreads4w are now implemented for WinCE versions prior to 3.0. Those versions did not implement W32 semaphores. Define NEED_SEM in config.h when building the library for these systems. @@ -662,11 +662,11 @@ incremented from 1 to 2, e.g. pthreadVC2.dll. Version 1.4.0 back-ports the new functionality included in this release. Please distribute DLLs built from that version with updates -to applications built on pthreads-win32 version 1.x.x. +to applications built on Pthreads4w version 1.x.x. The package naming has changed, replacing the snapshot date with the version number + descriptive information. E.g. this -release is "pthreads-w32-2-0-0-release". +release is "Pthreads4w-2-0-0-release". Bugs fixed ---------- @@ -760,7 +760,7 @@ New features * A Microsoft-style version resource has been added to the DLL for applications that wish to check DLL compatibility at runtime. -* Pthreads-win32 DLL naming has been extended to allow incompatible DLL +* Pthreads4w DLL naming has been extended to allow incompatible DLL versions to co-exist in the same filesystem. See the README file for details, but briefly: while the version information inside the DLL will change with each release from now on, the DLL version names will only change if the new @@ -770,7 +770,7 @@ The versioning scheme has been borrowed from GNU Libtool, and the DLL naming scheme is from Cygwin. Provided the Libtool-style numbering rules are honoured, the Cygwin DLL naming scheme automatcally ensures that DLL name changes are minimal and that applications will not load an incompatible -pthreads-win32 DLL. +Pthreads4w DLL. Those who use the pre-built DLLs will find that the DLL/LIB names have a new suffix (1) in this snapshot. E.g. pthreadVC1.dll etc. @@ -788,7 +788,7 @@ Certain POSIX macros have changed. These changes are intended to conform to the Single Unix Specification version 3, which states that, if set to 0 (zero) or not defined, then applications may use -sysconf() to determine their values at runtime. Pthreads-win32 does not +sysconf() to determine their values at runtime. Pthreads4w does not implement sysconf(). The following macros are no longer undefined, but defined and set to -1 @@ -919,14 +919,14 @@ New features * True pre-emptive asynchronous cancellation of threads. This is optional and requires that Panagiotis E. Hadjidoukas's QueueUserAPCEx package be -installed. This package is included in the pthreads-win32 self-unpacking +installed. This package is included in the Pthreads4w self-unpacking Zip archive starting from this snapshot. See the README.txt file inside the package for installation details. Note: If you don't use async cancellation in your application, or don't need to cancel threads that are blocked on system resources such as network I/O, then the default non-preemptive async cancellation is probably good enough. -However, pthreads-win32 auto-detects the availability of these components +However, Pthreads4w auto-detects the availability of these components at run-time, so you don't need to rebuild the library from source if you change your mind later. @@ -983,7 +983,7 @@ for implicit POSIX threads. New feature - cancellation of/by Win32 (non-POSIX) threads --------------------------------------------------------- Since John Bossom's original implementation, the library has allowed non-POSIX -initialised threads (Win32 threads) to call pthreads-win32 routines and +initialised threads (Win32 threads) to call Pthreads4w routines and therefore interact with POSIX threads. This is done by creating an on-the-fly POSIX thread ID for the Win32 thread that, once created, allows fully reciprical interaction. This did not extend to thread cancellation (async or @@ -1193,7 +1193,7 @@ There are a few reasons: do the expected thing in that context. (There are equally respected people who believe it should not be easily accessible, if it's there at all, for unconditional conformity to other implementations.) -- because pthreads-win32 is one of the few implementations that has +- because Pthreads4w is one of the few implementations that has the choice, perhaps the only freely available one, and so offers a laboratory to people who may want to explore the effects; - although the code will always be around somewhere for anyone who @@ -1332,7 +1332,7 @@ return an error (ESRCH). * errno: An incorrect compiler directive caused a local version of errno to be used instead of the Win32 errno. Both instances are -thread-safe but applications checking errno after a pthreads-win32 +thread-safe but applications checking errno after a Pthreads4w call would be wrong. Fixing this also fixed a bad compiler option in the testsuite (/MT should have been /MD) which is needed to link with the correct library MSVCRT.LIB. diff --git a/PROGRESS b/PROGRESS index 9abf0bca..9eca3066 100644 --- a/PROGRESS +++ b/PROGRESS @@ -1,4 +1,4 @@ Please see the ANNOUNCE file "Level of Standards Conformance" or the web page: -http://sources.redhat.com/pthreads-win32/conformance.html +https://sourceforge.net/projects/pthreads4w//conformance.html diff --git a/README b/README index 958f645e..ae89c848 100644 --- a/README +++ b/README @@ -1,23 +1,23 @@ -PTHREADS-WIN32 (A.K.A. PTHREADS4W) +Pthreads4w (A.K.A. PTHREADS4W) ================================== -Pthreads-win32 is free software, distributed under the GNU Lesser +Pthreads4w is free software, distributed under the GNU Lesser General Public License (LGPL). See the file 'COPYING.LIB' for terms and conditions. Also see the file 'COPYING' for information -specific to pthreads-win32, copyrights and the LGPL. +specific to Pthreads4w, copyrights and the LGPL. What is it? ----------- -Pthreads-win32 (a.k.a. pthreads4w) is an Open Source Software +Pthreads4w (a.k.a. pthreads4w) is an Open Source Software implementation of the Threads component of the POSIX 1003.1c 1995 Standard (or later) for Microsoft's Windows environment. Some functions from POSIX 1003.1b are also supported, including semaphores. Other related functions include the set of read-write lock functions. The library also supports some of the functionality of the Open Group's Single Unix specification, namely mutex types, plus some common -and pthreads-win32 specific non-portable routines (see README.NONPORTABLE). +and Pthreads4w specific non-portable routines (see README.NONPORTABLE). See the file "ANNOUNCE" for more information including standards conformance details and the list of supported and unsupported @@ -37,15 +37,15 @@ QueueUserAPCEx by Panagiotis E. Hadjidoukas For true async cancellation of threads (including blocked threads). This is a DLL and Windows driver that provides pre-emptive APC by forcing threads into an alertable state when the APC is queued. - Both the DLL and driver are provided with the pthreads-win32.exe - self-unpacking ZIP, and on the pthreads-win32 FTP site (in source + Both the DLL and driver are provided with the Pthreads4w.exe + self-unpacking ZIP, and on the Pthreads4w FTP site (in source and pre-built forms). Currently this is a separate LGPL package to - pthreads-win32. See the README in the QueueUserAPCEx folder for + Pthreads4w. See the README in the QueueUserAPCEx folder for installation instructions. - Pthreads-win32 will automatically detect if the QueueUserAPCEx DLL + Pthreads4w will automatically detect if the QueueUserAPCEx DLL QuserEx.DLL is available and whether the driver AlertDrv.sys is - loaded. If it is not available, pthreads-win32 will simulate async + loaded. If it is not available, Pthreads4w will simulate async cancellation, which means that it can async cancel only threads that are runnable. The simulated async cancellation cannot cancel blocked threads. @@ -139,7 +139,7 @@ Microsoft version numbers use 4 integers: 0.0.0.0 -Pthreads-win32 uses the first 3 following the standard major.minor.micro +Pthreads4w uses the first 3 following the standard major.minor.micro system. We had claimed to follow the Libtool convention but this has not been the case with recent releases. Binary compatibility and consequently library file naming has not changed over this time either @@ -171,14 +171,14 @@ The numbers are changed as follows: DLL compatibility numbering is an attempt to ensure that applications -always load a compatible pthreads-win32 DLL by using a DLL naming system +always load a compatible Pthreads4w DLL by using a DLL naming system that is consistent with the version numbering system. It also allows older and newer DLLs to coexist in the same filesystem so that older applications can continue to be used. For pre .NET Windows systems, this inevitably requires incompatible versions of the same DLLs to have different names. -Pthreads-win32 has adopted the Cygwin convention of appending a single +Pthreads4w has adopted the Cygwin convention of appending a single integer number to the DLL name. The number used is simply the library's major version number. @@ -248,7 +248,7 @@ reservation of identifiers beginning with "_" and "__" for use by compiler implementations only. If you have written any applications and you are linking -statically with the pthreads-win32 library then you may have +statically with the Pthreads4w library then you may have included a call to _pthread_processInitialize. You will now have to change that to ptw32_processInitialize. diff --git a/README.Borland b/README.Borland index a130d2bd..7c8315fc 100644 --- a/README.Borland +++ b/README.Borland @@ -17,8 +17,8 @@ projects so I can't try that out, unfortunately.) [RPJ: Added tests\Bmakefile as well.] -Borland C++ doesn't define the ENOSYS constant used by pthreads-win32; -rather than make more extensive patches to the pthreads-win32 source I +Borland C++ doesn't define the ENOSYS constant used by Pthreads4w; +rather than make more extensive patches to the Pthreads4w source I have a mostly-arbitrary constant for it in the makefile. However this doesn't make it visible to the application using the library, so if anyone actually wants to use this constant in their apps (why?) diff --git a/README.CV b/README.CV index 735196c3..3625603c 100644 --- a/README.CV +++ b/README.CV @@ -2,14 +2,14 @@ README.CV -- Condition Variables -------------------------------- The original implementation of condition variables in -pthreads-win32 was based on a discussion paper: +Pthreads4w was based on a discussion paper: "Strategies for Implementing POSIX Condition Variables on Win32": http://www.cs.wustl.edu/~schmidt/win32-cv-1.html The changes suggested below were made on Feb 6 2001. This file is included in the package for the benefit of anyone -interested in understanding the pthreads-win32 implementation +interested in understanding the Pthreads4w implementation of condition variables and the (sometimes subtle) issues that it attempts to resolve. @@ -132,7 +132,7 @@ Subject: Implementation of POSIX CVs: spur.wakeups/lost See attached patch to pthread-win32.. well, I can not claim that it is completely bug free but at least my - test and tests provided by pthreads-win32 seem to work. + test and tests provided by Pthreads4w seem to work. Perhaps that will help. regards, @@ -658,7 +658,7 @@ to the source code of pthread-win32 implementation: http://sources.redhat.com/cgi-bin/cvsweb.cgi/pthreads/ condvar.c?rev=1.36&content-type=text/ -x-cvsweb-markup&cvsroot=pthreads-win32 +x-cvsweb-markup&cvsroot=Pthreads4w /* @@ -964,10 +964,10 @@ to the source code of pthread-win32 implementation: http://sources.redhat.com/cgi-bin/cvsweb.cgi/pthreads/ condvar.c?rev=1.36&content-type=text/ -x-cvsweb-markup&cvsroot=pthreads-win32 +x-cvsweb-markup&cvsroot=Pthreads4w if (wereWaiters) - {(wereWaiters)sroot=pthreads-win32eb.cgi/pthreads/Yem...m + {(wereWaiters)sroot=Pthreads4web.cgi/pthreads/Yem...m /* * Wake up all waiters */ @@ -1548,7 +1548,7 @@ TEREKHOV@de.ibm.com on 17.01.2001 01:00:57 Please respond to TEREKHOV@de.ibm.com -To: pthreads-win32@sourceware.cygnus.com +To: Pthreads4w@sourceware.cygnus.com cc: schmidt@uci.edu Subject: win32 conditions: sem+counter+event = broadcast_deadlock + spur.wakeup/unfairness/incorrectness ?? @@ -2838,7 +2838,7 @@ in a single call to post/release (e.g. POSIX realtime semaphores - 8c/8d) for WinCE prior to 3.0 (WinCE 3.0 does have semaphores) ok. so, which one is the 'final' algorithm(s) which we should use in -pthreads-win32?? +Pthreads4w?? regards, alexander. diff --git a/README.NONPORTABLE b/README.NONPORTABLE index 6a72f8f6..bbf40d57 100644 --- a/README.NONPORTABLE +++ b/README.NONPORTABLE @@ -1,6 +1,6 @@ This file documents non-portable functions and other issues. -Non-portable functions included in pthreads-win32 +Non-portable functions included in Pthreads4w ------------------------------------------------- BOOL @@ -149,7 +149,7 @@ pthread_getunique_np (pthread_t thr) pthread_t value may be assigned to different threads throughout the life of a process. - Because pthreads4w (pthreads-win32) threads can be uniquely identified by their + Because pthreads4w (Pthreads4w) threads can be uniquely identified by their pthread_t values this routine is provided only for source code compatibility. NOTE: if the library is re-initialised, i.e. by calling pthread_win32_process_detach_np() @@ -203,7 +203,7 @@ pthread_win32_thread_detach_np (void); These functions invariably return TRUE except for pthread_win32_process_attach_np() which will return FALSE - if pthreads-win32 initialisation fails. + if Pthreads4w initialisation fails. int @@ -349,7 +349,7 @@ Thread priority As you can see, the real priority levels available to any individual Win32 thread are non-contiguous. - An application using pthreads-win32 should not make assumptions about + 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(). E.g. Windows 95, 98, NT, 2000, XP make @@ -358,14 +358,14 @@ Thread priority (THREAD_PRIORITY_LOWEST) as 5, and the maximum priority (THREAD_PRIORITY_HIGHEST) as 1. - Internally, pthreads-win32 maps any priority levels between + 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 THREAD_PRIORITY_HIGHEST. Currently, this also applies to REALTIME_PRIORITY_CLASSi even if levels -7, -6, -5, -4, -3, 3, 4, 5, and 6 are supported. - If it wishes, a Win32 application using pthreads-win32 can use the Win32 + If it wishes, a Win32 application using Pthreads4w can use the Win32 defined priority macros THREAD_PRIORITY_IDLE through THREAD_PRIORITY_TIME_CRITICAL. diff --git a/_ptw32.h b/_ptw32.h index 05ea4269..d66da9af 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -2,14 +2,14 @@ * Module: _ptw32.h * * Purpose: - * Pthreads-win32 internal macros, to be shared by other headers - * comprising the pthreads-win32 package. + * Pthreads4w internal macros, to be shared by other headers + * comprising the Pthreads4w package. * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,25 +19,25 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifndef __PTW32_H #define __PTW32_H -/* See the README file for an explanation of the pthreads-win32 +/* See the README file for an explanation of the Pthreads4w * version numbering scheme and how the DLL is named etc. * * FIXME: consider moving this to <_ptw32.h>; maybe also add a diff --git a/aclocal.m4 b/aclocal.m4 index 57cc2233..99ce9f22 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,9 +1,9 @@ ## aclocal.m4 ## -------------------------------------------------------------------------- ## -## Pthreads-win32 - POSIX Threads Library for Win32 +## Pthreads4w - POSIX Threads Library for Win32 ## Copyright(C) 1998 John E. Bossom -## Copyright(C) 1999-2017, Pthreads-win32 contributors +## Copyright(C) 1999-2018, Pthreads4w contributors ## ## Homepage: https://sourceforge.net/projects/pthreads4w/ ## @@ -13,20 +13,20 @@ ## following World Wide Web location: ## https://sourceforge.net/p/pthreads4w/wiki/Contributors/ ## -## This file is part of Pthreads-win32. +## This file is part of Pthreads4w. ## -## Pthreads-win32 is free software: you can redistribute it and/or modify +## Pthreads4w is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## -## Pthreads-win32 is distributed in the hope that it will be useful, +## Pthreads4w is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License -## along with Pthreads-win32. If not, see . * +## along with Pthreads4w. If not, see . * ## # # PTW32_AC_CHECK_TYPEDEF( TYPENAME, [HEADER] ) diff --git a/cleanup.c b/cleanup.c index c0a509cc..90f81554 100644 --- a/cleanup.c +++ b/cleanup.c @@ -8,9 +8,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -20,20 +20,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/config.h b/config.h index 11321e83..091ccb32 100644 --- a/config.h +++ b/config.h @@ -7,7 +7,7 @@ * Defaults: see target specific redefinitions below. *********************************************************************/ -/* We're building the pthreads-win32 library */ +/* We're building the Pthreads4w library */ #define PTW32_BUILD /* CPU affinity */ @@ -109,7 +109,7 @@ * Target specific groups * * If you find that these are incorrect or incomplete please report it - * to the pthreads-win32 maintainer. Thanks. + * to the Pthreads4w maintainer. Thanks. *********************************************************************/ #if defined(WINCE) # undef HAVE_CPU_AFFINITY diff --git a/configure.ac b/configure.ac index 36f4f217..36e7cdde 100644 --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,9 @@ # configure.ac # -------------------------------------------------------------------------- # - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -13,22 +13,22 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * # -AC_INIT([pthreads-win32],[git]) +AC_INIT([Pthreads4w],[git]) AC_CONFIG_HEADERS([config.h]) # Checks for build tools. diff --git a/context.h b/context.h index 3d943e66..016066ab 100644 --- a/context.h +++ b/context.h @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifndef PTW32_CONTEXT_H diff --git a/create.c b/create.c index ffc41eca..cc59419b 100644 --- a/create.c +++ b/create.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/dll.c b/dll.c index 9c256d2c..bd3bbaea 100644 --- a/dll.c +++ b/dll.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/errno.c b/errno.c index d839fe47..9b99d838 100644 --- a/errno.c +++ b/errno.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/global.c b/global.c index f7b1b36c..92a0c86d 100644 --- a/global.c +++ b/global.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/implement.h b/implement.h index b85c3c37..dc1ef4d8 100644 --- a/implement.h +++ b/implement.h @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #if !defined(_IMPLEMENT_H) diff --git a/manual/ChangeLog b/manual/ChangeLog index 443e6c01..4140ea7e 100644 --- a/manual/ChangeLog +++ b/manual/ChangeLog @@ -38,7 +38,7 @@ * PortabilityIssues.html: Was nonPortableIssues.html. * index.html: Updated; add table of contents at top. - * *.html: Add Pthreads-win32 header info; add link back to the + * *.html: Add Pthreads4w header info; add link back to the index page 'index.html'. 2005-05-06 Ross Johnson diff --git a/manual/PortabilityIssues.html b/manual/PortabilityIssues.html index 9c1b0d07..78f8aa01 100644 --- a/manual/PortabilityIssues.html +++ b/manual/PortabilityIssues.html @@ -18,7 +18,7 @@

                                                              POSIX Threads for Windows – REFERENCE – -Pthreads-w32

                                                              +Pthreads4w

                                                              Reference Index

                                                              Table of Contents

                                                              Name

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

                                                              Thread priority

                                                              4, 5, and 6 are not supported.

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

                                                              -

                                                              An application using Pthreads-w32 should +

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

                                                              Thread priority

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

                                                              -

                                                              Internally, pthreads-win32 maps any +

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

                                                              Thread priority

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

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

                                                              Author

                                                              -

                                                              Ross Johnson for use with Pthreads-w32.

                                                              +

                                                              Ross Johnson for use with Pthreads4w.

                                                              See also



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

                                                              POSIX -Threads for Windows – REFERENCE - Pthreads-w32

                                                              +Threads for Windows – REFERENCE - Pthreads4w

                                                              Reference Index

                                                              Table of Contents

                                                              Name

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

                                                              POSIX Threads for Windows – REFERENCE - -Pthreads-w32

                                                              +Pthreads4w

                                                              Table of Contents

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

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

                                                              POSIX threads API reference

                                                              cpu_set

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

                                                              POSIX threads API

                                                              sem_wait

                                                              sigwait

                                                              Non-portable -Pthreads-w32 routines

                                                              +Pthreads4w routines

                                                              pthreadCancelableTimedWait

                                                              pthreadCancelableWait

                                                              pthread_attr_getaffinity_np

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

                                                              POSIX Threads for Windows – REFERENCE – -Pthreads-w32

                                                              +Pthreads4w

                                                              Reference Index

                                                              Table of Contents

                                                              Name

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

                                                              Errors

                                                              The interval timeout milliseconds elapsed before waitHandle was signalled.

                                                              Author

                                                              -

                                                              Ross Johnson for use with Pthreads-w32.

                                                              +

                                                              Ross Johnson for use with Pthreads4w.

                                                              See also

                                                              pthread_cancel(), pthread_self()

                                                              diff --git a/manual/pthread_attr_init.html b/manual/pthread_attr_init.html index 099a53bc..de58f566 100644 --- a/manual/pthread_attr_init.html +++ b/manual/pthread_attr_init.html @@ -20,7 +20,7 @@

                                                              POSIX Threads for Windows – REFERENCE – -Pthreads-w32

                                                              +Pthreads4w

                                                              Reference Index

                                                              Table of Contents

                                                              Name

                                                              @@ -151,11 +151,11 @@

                                                              schedpolicy

                                                              (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 +

                                                              Pthreads4w 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 +

                                                              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) @@ -164,7 +164,7 @@

                                                              schedpolicy

                                                              schedparam

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

                                                              -

                                                              Pthreads-w32 supports the priority levels defined by the +

                                                              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.

                                                              @@ -185,13 +185,13 @@

                                                              inheritsched

                                                              scope

                                                              Define the scheduling contention scope for the created thread. The -only value supported in the Pthreads-w32 implementation is +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.

                                                              -

                                                              Pthreads-w32 only supports PTHREAD_SCOPE_SYSTEM.

                                                              +

                                                              Pthreads4w only supports PTHREAD_SCOPE_SYSTEM.

                                                              Default value: PTHREAD_SCOPE_SYSTEM.

                                                              Return Value

                                                              @@ -246,7 +246,7 @@

                                                              Errors

                                                              ENOTSUP
                                                              policy is not SCHED_OTHER, the only value supported - by Pthreads-w32.
                                                              + by Pthreads4w.

                                                              The pthread_attr_setinheritsched function returns the @@ -272,14 +272,14 @@

                                                              Errors

                                                              ENOTSUP
                                                              the specified scope is PTHREAD_SCOPE_PROCESS (not - supported by Pthreads-w32). + supported by Pthreads4w).

                                                              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_attr_setstackaddr.html b/manual/pthread_attr_setstackaddr.html index 2e3497ea..0a8d145b 100644 --- a/manual/pthread_attr_setstackaddr.html +++ b/manual/pthread_attr_setstackaddr.html @@ -18,7 +18,7 @@

                                                              POSIX Threads for Windows – REFERENCE – -Pthreads-w32

                                                              +Pthreads4w

                                                              Reference Index

                                                              Table of Contents

                                                              Name

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

                                                              Description

                                                              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 +

                                                              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.

                                                              @@ -129,7 +129,7 @@

                                                              Copyright

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

                                                              -

                                                              Modified by Ross Johnson for use with Pthreads-w32.

                                                              +

                                                              Modified by Ross Johnson for use with Pthreads4w.


                                                              Table of Contents

                                                                diff --git a/manual/pthread_attr_setstacksize.html b/manual/pthread_attr_setstacksize.html index f8f52faf..b47ac6ad 100644 --- a/manual/pthread_attr_setstacksize.html +++ b/manual/pthread_attr_setstacksize.html @@ -5,7 +5,7 @@ PTHREAD_ATTR_SETSTACKSIZE(3) manual page -

                                                                POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                                +

                                                                POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                                                Reference Index

                                                                Table of Contents

                                                                Name

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

                                                                Description

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

                                                                -

                                                                Pthreads-w32 defines _POSIX_THREAD_ATTR_STACKSIZE in +

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

                                                                -

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

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

                                                                Return Value

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

                                                                Copyright

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

                                                                -

                                                                Modified by Ross Johnson for use with Pthreads-w32.

                                                                +

                                                                Modified by Ross Johnson for use with Pthreads4w.


                                                                Table of Contents

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

                                                                  POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                                  +

                                                                  POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                                                  Reference Index

                                                                  Table of Contents

                                                                  Name

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

                                                                  Application Usage

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

                                                                  -

                                                                  Pthreads-w32 defines _POSIX_BARRIERS to indicate +

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

                                                                  Rationale

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

                                                                  Future Directions

                                                                  Known Bugs

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

                                                                  Copyright

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

                                                                  -

                                                                  Modified by Ross Johnson for use with Pthreads-w32.

                                                                  +

                                                                  Modified by Ross Johnson for use with Pthreads4w.


                                                                  Table of Contents

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

                                                                    POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                                    +

                                                                    POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                                                    Reference Index

                                                                    Table of Contents

                                                                    Name

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

                                                                    Application Usage

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

                                                                    -

                                                                    Pthreads-w32 defines _POSIX_BARRIERS to indicate +

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

                                                                    Rationale

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

                                                                    Copyright

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

                                                                    -

                                                                    Modified by Ross Johnson for use with Pthreads-w32.

                                                                    +

                                                                    Modified by Ross Johnson for use with Pthreads4w.


                                                                    Table of Contents

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

                                                                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                                      +

                                                                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                                                      Reference Index

                                                                      Table of Contents

                                                                      Name

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

                                                                      Application Usage

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

                                                                      -

                                                                      Pthreads-w32 defines _POSIX_BARRIERS to indicate +

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

                                                                      Rationale

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

                                                                      Copyright

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

                                                                      -

                                                                      Modified by Ross Johnson for use with Pthreads-w32.

                                                                      +

                                                                      Modified by Ross Johnson for use with Pthreads4w.


                                                                      Table of Contents

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

                                                                        POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                                        +

                                                                        POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                                                        Reference Index

                                                                        Table of Contents

                                                                        Name

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

                                                                        Description

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

                                                                        -

                                                                        Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

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

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

                                                                        Errors

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

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

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

                                                                        Application Usage

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

                                                                        -

                                                                        Pthreads-w32 defines _POSIX_BARRIERS and +

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

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

                                                                        Copyright

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

                                                                        -

                                                                        Modified by Ross Johnson for use with Pthreads-w32.

                                                                        +

                                                                        Modified by Ross Johnson for use with Pthreads4w.


                                                                        Table of Contents

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

                                                                          POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                                          +

                                                                          POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                                                          Reference Index

                                                                          Table of Contents

                                                                          Name

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

                                                                          Description

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

                                                                          -

                                                                          Pthreads-w32 provides two levels of support for +

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

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

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

                                                                          Description


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

                                                                          -

                                                                          Pthreads-w32 provides two functions to enable additional +

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

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

                                                                          Errors

                                                                          Author

                                                                          Xavier Leroy <Xavier.Leroy@inria.fr>

                                                                          -

                                                                          Modified by Ross Johnson for use with Pthreads-w32.

                                                                          +

                                                                          Modified by Ross Johnson for use with Pthreads4w.

                                                                          See Also

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

                                                                          Bugs

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

                                                                          Bugs

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

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

                                                                          POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                                          +

                                                                          POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                                                          Reference Index

                                                                          Table of Contents

                                                                          Name

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

                                                                          Author

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

            See Also

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

            POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

            +

            POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

            Reference Index

            Table of Contents

            Name

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

            Description

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

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

            Author

            Xavier Leroy <Xavier.Leroy@inria.fr>

            -

            Modified by Ross Johnson for use with Pthreads-w32.

            +

            Modified by Ross Johnson for use with Pthreads4w.

            See Also

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

            POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

            +

            POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

            Reference Index

            Table of Contents

            Name

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

            Description

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

            -

            Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

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

            Return Value

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

            Author

            Xavier Leroy <Xavier.Leroy@inria.fr>

            -

            Modified by Ross Johnson for use with Pthreads-w32.

            +

            Modified by Ross Johnson for use with Pthreads4w.

            See Also

            pthread_cond_init(3) .

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

            POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

            +

            POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

            Reference Index

            Table of Contents

            Name

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

            Description

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

            -

            Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

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

            Return Value

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

            Errors

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

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

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

            Examples

            None.

            Application Usage

            -

            Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

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

            Rationale

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

            Copyright

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

            -

            Modified by Ross Johnson for use with Pthreads-w32.

            +

            Modified by Ross Johnson for use with Pthreads4w.


            Table of Contents

              diff --git a/manual/pthread_create.html b/manual/pthread_create.html index 70fd0266..6d1cb2ef 100644 --- a/manual/pthread_create.html +++ b/manual/pthread_create.html @@ -18,7 +18,7 @@

              POSIX Threads for Windows – REFERENCE - -Pthreads-w32

              +Pthreads4w

              Reference Index

              Table of Contents

              Name

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

              Description

              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 +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 @@ -80,7 +80,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) , pthread_join(3) , diff --git a/manual/pthread_delay_np.html b/manual/pthread_delay_np.html index fec6356c..fa85d302 100644 --- a/manual/pthread_delay_np.html +++ b/manual/pthread_delay_np.html @@ -5,7 +5,7 @@ PTHREAD_DELAY_NP(3) manual page -

              POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

              +

              POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

              Reference Index

              Table of Contents

              Name

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

              Errors

              The value specified by interval is invalid.

              Author

              -

              Ross Johnson for use with Pthreads-w32.

              +

              Ross Johnson for use with Pthreads4w.


              Table of Contents

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

                POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                +

                POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                Reference Index

                Table of Contents

                Name

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

                Author

                Xavier Leroy <Xavier.Leroy@inria.fr>

                -

                Modified by Ross Johnson for use with Pthreads-w32.

                +

                Modified by Ross Johnson for use with Pthreads4w.

                See Also

                pthread_create(3) , pthread_join(3) , diff --git a/manual/pthread_getunique_np.html b/manual/pthread_getunique_np.html index e13cf0a4..7d60dd52 100755 --- a/manual/pthread_getunique_np.html +++ b/manual/pthread_getunique_np.html @@ -14,7 +14,7 @@

                POSIX Threads for Windows ā€“ REFERENCE - -Pthreads-w32

                +Pthreads4w

                Reference Index

                Table of Contents

                Name

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

                Synopsis

                Description

                Returns the unique 64 bit sequence number assigned to thread.

                -

                In Pthreads-win32:

                +

                In Pthreads4w:

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

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

                  Return Value

                  Errors

                  None.

                  Author

                  -

                  Ross Johnson for use with Pthreads-w32.

                  +

                  Ross Johnson for use with Pthreads4w.


                  Table of Contents

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

                    POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                    +

                    POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                    Reference Index

                    Table of Contents

                    Name

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

                    Return Value

                    Errors

                    None.

                    Author

                    -

                    Ross Johnson for use with Pthreads-w32.

                    +

                    Ross Johnson for use with Pthreads4w.


                    Table of Contents

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

                      POSIX Threads for Windows – REFERENCE - -Pthreads-w32

                      +Pthreads4w

                      Reference Index

                      Table of Contents

                      Name

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

                      Author

                      Xavier Leroy <Xavier.Leroy@inria.fr>

                      -

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

                      Modified by Ross Johnson for use with Pthreads4w.

                      See Also

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

                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                      +

                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                      Reference Index

                      Table of Contents

                      Name

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

                      Description

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

                      -

                      Pthreads-w32 stops running key +

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

                      Errors

                      Author

                      Xavier Leroy <Xavier.Leroy@inria.fr>

                      -

                      Modified by Ross Johnson for use with Pthreads-w32.

                      +

                      Modified by Ross Johnson for use with Pthreads4w.

                      See Also

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

                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                      +

                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                      Reference Index

                      Table of Contents

                      Name

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

                      Description

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

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

                      Description

                      shared between all threads.

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

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

                      Description

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

                      Cancellation

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

                      Errors

                      Author

                      Xavier Leroy <Xavier.Leroy@inria.fr>

                      -

                      Modified by Ross Johnson for use with Pthreads-w32.

                      +

                      Modified by Ross Johnson for use with Pthreads4w.

                      See Also

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

                      Notes

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

                      Bugs

                      -

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

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


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

                      POSIX Threads for Windows Ć¢ā‚¬ā€œ REFERENCE - -Pthreads-w32

                      +Pthreads4w

                      Reference Index

                      Table of Contents

                      Name

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

                      Description

                      normal Ć¢ā‚¬Å“fastĆ¢ā‚¬ļæ½ mutexes), PTHREAD_RECURSIVE_MUTEX_INITIALIZER (for recursive mutexes), and PTHREAD_ERRORCHECK_MUTEX_INITIALIZER (for error checking mutexes). In -the Pthreads-w32 implementation, +the Pthreads4w implementation, an application should still call pthread_mutex_destroy at some point to ensure that any resources consumed by the mutex are released.

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

                      Description

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

                      Author

                      Xavier Leroy <Xavier.Leroy@inria.fr>

                      -

                      Modified by Ross Johnson for use with Pthreads-w32.

                      +

                      Modified by Ross Johnson for use with Pthreads4w.

                      See Also

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

                      POSIX Threads for Windows Ć¢ā‚¬ā€œ REFERENCE - -Pthreads-w32

                      +Pthreads4w

                      Reference Index

                      Table of Contents

                      Name

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

                      Description

                      the mutex kind attribute in attr and stores it in the location pointed to by type.

                      -

                      Pthreads-w32 also recognises the following equivalent +

                      Pthreads4w also recognises the following equivalent functions that are used in Linux:

                      pthread_mutexattr_setkind_np is an alias for pthread_mutexattr_settype. @@ -98,7 +98,7 @@

                      Description

                      state.

                      The default mutex type is PTHREAD_MUTEX_NORMAL

                      -

                      Pthreads-w32 also recognises the following equivalent types +

                      Pthreads4w also recognises the following equivalent types that are used by Linux:

                      PTHREAD_MUTEX_FAST_NP Ć¢ā‚¬ā€œ equivalent to PTHREAD_MUTEX_NORMAL

                      @@ -163,7 +163,7 @@

                      Return Value

                      Author

                      Xavier Leroy <Xavier.Leroy@inria.fr>

                      -

                      Modified by Ross Johnson for use with Pthreads-w32.

                      +

                      Modified by Ross Johnson for use with Pthreads4w.

                      See Also

                      pthread_mutex_init(3) , pthread_mutex_lock(3) @@ -171,7 +171,7 @@

                      See Also

                      .

                      Notes

                      -

                      For speed, Pthreads-w32 never checks the thread ownership +

                      For speed, Pthreads4w never checks the thread ownership of non-robust mutexes of type PTHREAD_MUTEX_NORMAL (or PTHREAD_MUTEX_FAST_NP) when performing operations on the mutex. It is therefore possible for one thread to lock such a mutex diff --git a/manual/pthread_mutexattr_setpshared.html b/manual/pthread_mutexattr_setpshared.html index 3a7df5c0..02d77dbf 100644 --- a/manual/pthread_mutexattr_setpshared.html +++ b/manual/pthread_mutexattr_setpshared.html @@ -5,7 +5,7 @@ PTHREAD_MUTEXATTR_SETPSHARED(3) manual page -

                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                      +

                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                      Reference Index

                      Table of Contents

                      Name

                      @@ -38,7 +38,7 @@

                      Description

                      operate on such a mutex, the behavior is undefined. The default value of the attribute shall be PTHREAD_PROCESS_PRIVATE.

                      -

                      Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

                      Pthreads4w defines _POSIX_THREAD_PROCESS_SHARED in pthread.h as -1 to indicate that these routines are implemented but the process shared option is not supported.

                      Return Value

                      @@ -111,7 +111,7 @@

                      Copyright

                      can be obtained online at http://www.opengroup.org/unix/online.html .

                      -

                      Modified by Ross Johnson for use with Pthreads-w32.

                      +

                      Modified by Ross Johnson for use with Pthreads4w.


                      Table of Contents

                        diff --git a/manual/pthread_num_processors_np.html b/manual/pthread_num_processors_np.html index f3e15116..b639c3d3 100644 --- a/manual/pthread_num_processors_np.html +++ b/manual/pthread_num_processors_np.html @@ -5,7 +5,7 @@ PTHREAD_NUM_PROCESSORS_NP(3) manual page -

                        POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                        +

                        POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                        Reference Index

                        Table of Contents

                        Name

                        @@ -28,7 +28,7 @@

                        Return ValueErrors

                        None.

                        Author

                        -

                        Ross Johnson for use with Pthreads-w32.

                        +

                        Ross Johnson for use with Pthreads4w.


                        Table of Contents

                          diff --git a/manual/pthread_once.html b/manual/pthread_once.html index 1597fa27..74e91035 100644 --- a/manual/pthread_once.html +++ b/manual/pthread_once.html @@ -5,7 +5,7 @@ PTHREAD_ONCE(3) manual page -

                          POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                          +

                          POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                          Reference Index

                          Table of Contents

                          Name

                          @@ -54,7 +54,7 @@

                          Errors

                          Author

                          Xavier Leroy <Xavier.Leroy@inria.fr>

                          -

                          Modified by Ross Johnson for use with Pthreads-w32.

                          +

                          Modified by Ross Johnson for use with Pthreads4w.


                          Table of Contents

                            diff --git a/manual/pthread_rwlock_init.html b/manual/pthread_rwlock_init.html index 3c58b027..8467236c 100644 --- a/manual/pthread_rwlock_init.html +++ b/manual/pthread_rwlock_init.html @@ -5,7 +5,7 @@ PTHREAD_RWLOCK_INIT(3) manual page -

                            POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                            +

                            POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                            Reference Index

                            Table of Contents

                            Name

                            @@ -48,7 +48,7 @@

                            Description

                            shall not be initialized and the contents of rwlock are undefined.

                            -

                            Pthreads-w32 supports statically initialized rwlock +

                            Pthreads4w supports statically initialized rwlock objects using PTHREAD_RWLOCK_INITIALIZER. An application should still call pthread_rwlock_destroy at some point to ensure that any resources consumed by the read/write @@ -61,7 +61,7 @@

                            Description

                            pthread_rwlock_trywrlock , pthread_rwlock_unlock , or pthread_rwlock_wrlock is undefined.

                            -

                            Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

                            Pthreads4w defines _POSIX_READER_WRITER_LOCKS in pthread.h as 200112L to indicate that the reader/writer routines are implemented and may be used.

                            Return Value

                            @@ -153,7 +153,7 @@

                            Copyright

                            can be obtained online at http://www.opengroup.org/unix/online.html .

                            -

                            Modified by Ross Johnson for use with Pthreads-w32.

                            +

                            Modified by Ross Johnson for use with Pthreads4w.


                            Table of Contents

                              diff --git a/manual/pthread_rwlock_rdlock.html b/manual/pthread_rwlock_rdlock.html index 43927a5f..0fdb45c8 100644 --- a/manual/pthread_rwlock_rdlock.html +++ b/manual/pthread_rwlock_rdlock.html @@ -5,7 +5,7 @@ PTHREAD_RWLOCK_RDLOCK(3) manual page -

                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                              +

                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                              Reference Index

                              Table of Contents

                              Name

                              @@ -25,7 +25,7 @@

                              Description

                              thread acquires the read lock if a writer does not hold the lock and there are no writers blocked on the lock.

                              -

                              Pthreads-win32 does not prefer either writers or readers in +

                              Pthreads4w does not prefer either writers or readers in acquiring the lock ā€“ all threads enter a single prioritised FIFO queue. While this may not be optimally efficient for some applications, it does ensure that one type does not starve the other.

                              @@ -47,9 +47,9 @@

                              Description

                              Results are undefined if any of these functions are called with an uninitialized read-write lock.

                              -

                              Pthreads-w32 does not detect deadlock if the thread already +

                              Pthreads4w does not detect deadlock if the thread already owns the lock for writing.

                              -

                              Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

                              Pthreads4w defines _POSIX_READER_WRITER_LOCKS in pthread.h as 200112L to indicate that the reader/writer routines are implemented and may be used.

                              Return Value

                              @@ -128,7 +128,7 @@

                              Copyright

                              can be obtained online at http://www.opengroup.org/unix/online.html .

                              -

                              Modified by Ross Johnson for use with Pthreads-w32.

                              +

                              Modified by Ross Johnson for use with Pthreads4w.


                              Table of Contents

                                diff --git a/manual/pthread_rwlock_timedrdlock.html b/manual/pthread_rwlock_timedrdlock.html index da570e58..58a94ae7 100644 --- a/manual/pthread_rwlock_timedrdlock.html +++ b/manual/pthread_rwlock_timedrdlock.html @@ -5,7 +5,7 @@ PTHREAD_RWLOCK_TIMEDRDLOCK(3) manual page -

                                POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                +

                                POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                Reference Index

                                Table of Contents

                                Name

                                @@ -41,7 +41,7 @@

                                Description

                                holds a write lock on rwlock. The results are undefined if this function is called with an uninitialized read-write lock.

                                -

                                Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

                                Pthreads4w defines _POSIX_READER_WRITER_LOCKS in pthread.h as 200112L to indicate that the reader/writer routines are implemented and may be used.

                                Return Value

                                @@ -116,7 +116,7 @@

                                Copyright

                                can be obtained online at http://www.opengroup.org/unix/online.html .

                                -

                                Modified by Ross Johnson for use with Pthreads-w32.

                                +

                                Modified by Ross Johnson for use with Pthreads4w.


                                Table of Contents

                                  diff --git a/manual/pthread_rwlock_timedwrlock.html b/manual/pthread_rwlock_timedwrlock.html index 5b439bbd..afc4581b 100644 --- a/manual/pthread_rwlock_timedwrlock.html +++ b/manual/pthread_rwlock_timedwrlock.html @@ -5,7 +5,7 @@ PTHREAD_RWLOCK_TIMEDWRLOCK(3) manual page -

                                  POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                  +

                                  POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                  Reference Index

                                  Table of Contents

                                  Name

                                  @@ -41,7 +41,7 @@

                                  Description

                                  holds the read-write lock. The results are undefined if this function is called with an uninitialized read-write lock.

                                  -

                                  Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

                                  Pthreads4w defines _POSIX_READER_WRITER_LOCKS in pthread.h as 200112L to indicate that the reader/writer routines are implemented and may be used.

                                  Return Value

                                  @@ -110,7 +110,7 @@

                                  Copyright

                                  can be obtained online at http://www.opengroup.org/unix/online.html .

                                  -

                                  Modified by Ross Johnson for use with Pthreads-w32.

                                  +

                                  Modified by Ross Johnson for use with Pthreads4w.


                                  Table of Contents

                                    diff --git a/manual/pthread_rwlock_unlock.html b/manual/pthread_rwlock_unlock.html index 88444254..41e61857 100644 --- a/manual/pthread_rwlock_unlock.html +++ b/manual/pthread_rwlock_unlock.html @@ -5,7 +5,7 @@ PTHREAD_RWLOCK_UNLOCK(3) manual page -

                                    POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                    +

                                    POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                    Reference Index

                                    Table of Contents

                                    Name

                                    @@ -34,14 +34,14 @@

                                    Description

                                    read-write lock object, the read-write lock object shall be put in the unlocked state.

                                    -

                                    Pthreads-win32 does not prefer either writers or readers in +

                                    Pthreads4w does not prefer either writers or readers in acquiring the lock ā€“ all threads enter a single prioritised FIFO queue. While this may not be optimally efficient for some applications, it does ensure that one type does not starve the other.

                                    Results are undefined if any of these functions are called with an uninitialized read-write lock.

                                    -

                                    Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

                                    Pthreads4w defines _POSIX_READER_WRITER_LOCKS in pthread.h as 200112L to indicate that the reader/writer routines are implemented and may be used.

                                    Return Value

                                    @@ -101,7 +101,7 @@

                                    Copyright

                                    can be obtained online at http://www.opengroup.org/unix/online.html .

                                    -

                                    Modified by Ross Johnson for use with Pthreads-w32.

                                    +

                                    Modified by Ross Johnson for use with Pthreads4w.


                                    Table of Contents

                                      diff --git a/manual/pthread_rwlock_wrlock.html b/manual/pthread_rwlock_wrlock.html index 16c32faf..c353fd39 100644 --- a/manual/pthread_rwlock_wrlock.html +++ b/manual/pthread_rwlock_wrlock.html @@ -5,7 +5,7 @@ PTHREAD_RWLOCK_WRLOCK(3) manual page -

                                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                      +

                                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                      Reference Index

                                      Table of Contents

                                      Name

                                      @@ -33,14 +33,14 @@

                                      Description

                                      if at the time the call is made it holds the read-write lock (whether a read or write lock).

                                      -

                                      Pthreads-win32 does not prefer either writers or readers in +

                                      Pthreads4w does not prefer either writers or readers in acquiring the lock ā€“ all threads enter a single prioritised FIFO queue. While this may not be optimally efficient for some applications, it does ensure that one type does not starve the other.

                                      Results are undefined if any of these functions are called with an uninitialized read-write lock.

                                      -

                                      Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

                                      Pthreads4w defines _POSIX_READER_WRITER_LOCKS in pthread.h as 200112L to indicate that the reader/writer routines are implemented and may be used.

                                      Return Value

                                      @@ -113,7 +113,7 @@

                                      Copyright

                                      can be obtained online at http://www.opengroup.org/unix/online.html .

                                      -

                                      Modified by Ross Johnson for use with Pthreads-w32.

                                      +

                                      Modified by Ross Johnson for use with Pthreads4w.


                                      Table of Contents

                                        diff --git a/manual/pthread_rwlockattr_init.html b/manual/pthread_rwlockattr_init.html index f5894c6e..ceb7f8a1 100644 --- a/manual/pthread_rwlockattr_init.html +++ b/manual/pthread_rwlockattr_init.html @@ -5,7 +5,7 @@ PTHREAD_RWLOCKATTR_INIT(3) manual page -

                                        POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                        +

                                        POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                        Reference Index

                                        Table of Contents

                                        Name

                                        @@ -40,7 +40,7 @@

                                        Description

                                        attributes object (including destruction) shall not affect any previously initialized read-write locks.

                                        -

                                        Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

                                        Pthreads4w defines _POSIX_READER_WRITER_LOCKS in pthread.h as 200112L to indicate that the reader/writer routines are implemented and may be used.

                                        Return Value

                                        @@ -101,7 +101,7 @@

                                        Copyright

                                        can be obtained online at http://www.opengroup.org/unix/online.html .

                                        -

                                        Modified by Ross Johnson for use with Pthreads-w32.

                                        +

                                        Modified by Ross Johnson for use with Pthreads4w.


                                        Table of Contents

                                          diff --git a/manual/pthread_rwlockattr_setpshared.html b/manual/pthread_rwlockattr_setpshared.html index d39d4343..86d8bfd3 100644 --- a/manual/pthread_rwlockattr_setpshared.html +++ b/manual/pthread_rwlockattr_setpshared.html @@ -5,7 +5,7 @@ PTHREAD_RWLOCKATTR_SETPSHARED(3) manual page -

                                          POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                          +

                                          POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                          Reference Index

                                          Table of Contents

                                          Name

                                          @@ -41,14 +41,14 @@

                                          Description

                                          read-write lock, the behavior is undefined. The default value of the process-shared attribute shall be PTHREAD_PROCESS_PRIVATE.

                                          -

                                          Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

                                          Pthreads4w defines _POSIX_THREAD_PROCESS_SHARED in pthread.h as -1 to indicate that these routines are implemented but they do not support the process shared option.

                                          Additional attributes, their default values, and the names of the associated functions to get and set those attribute values are implementation-defined.

                                          -

                                          Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

                                          Pthreads4w defines _POSIX_READER_WRITER_LOCKS in pthread.h as 200112L to indicate that the reader/writer routines are implemented and may be used.

                                          Return Value

                                          @@ -120,7 +120,7 @@

                                          Copyright

                                          can be obtained online at http://www.opengroup.org/unix/online.html .

                                          -

                                          Modified by Ross Johnson for use with Pthreads-w32.

                                          +

                                          Modified by Ross Johnson for use with Pthreads4w.


                                          Table of Contents

                                            diff --git a/manual/pthread_self.html b/manual/pthread_self.html index debf79b3..92f82dd5 100644 --- a/manual/pthread_self.html +++ b/manual/pthread_self.html @@ -5,7 +5,7 @@ PTHREAD_SELF(3) manual page -

                                            POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                            +

                                            POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                            Reference Index

                                            Table of Contents

                                            Name

                                            @@ -20,7 +20,7 @@

                                            Description

                                            pthread_self return the thread identifier for the calling thread.

                                            -

                                            Pthreads-w32 also provides support for Win32 native +

                                            Pthreads4w also provides support for Win32 native threads to interact with POSIX threads through the pthreads API. Whereas all threads created via a call to pthread_create have a POSIX thread ID and thread state, the library ensures that any Win32 native @@ -33,12 +33,12 @@

                                            Description

                                            Any Win32 native thread may call pthread_self directly to return it's POSIX thread identifier. The ID and state will be generated if it does not already exist. Win32 native threads do not -need to call pthread_self before calling Pthreads-w32 routines +need to call pthread_self before calling Pthreads4w routines unless that routine requires a pthread_t parameter.

                                            Author

                                            Xavier Leroy <Xavier.Leroy@inria.fr>

                                            -

                                            Modified by Ross Johnson for use with Pthreads-w32.

                                            +

                                            Modified by Ross Johnson for use with Pthreads4w.

                                            See Also

                                            pthread_equal(3) , pthread_join(3) , diff --git a/manual/pthread_setaffinity_np.html b/manual/pthread_setaffinity_np.html index e20e8e22..31e89cf3 100644 --- a/manual/pthread_setaffinity_np.html +++ b/manual/pthread_setaffinity_np.html @@ -13,7 +13,7 @@

                                            POSIX -Threads for Windows – REFERENCE - Pthreads-w32

                                            +Threads for Windows – REFERENCE - Pthreads4w

                                            Reference Index

                                            Table of Contents

                                            Name

                                            @@ -44,7 +44,7 @@

                                            Description

                                            whose ID is tid into the cpu_set_t structure pointed to by mask. The cpusetsize argument specifies the size (in bytes) of mask. -

                                            Pthreads-w32 currently ignores the cpusetsize +

                                            Pthreads4w currently ignores the cpusetsize parameter for either function because cpu_set_t is a direct typeset to the Windows affinity vector type DWORD_PTR.

                                            Return Value

                                            @@ -107,7 +107,7 @@

                                            See Also

                                            sched_getaffinity(3)

                                            Copyright

                                            Most of this is taken from the Linux manual page.

                                            -

                                            Modified by Ross Johnson for use with Pthreads-w32.

                                            +

                                            Modified by Ross Johnson for use with Pthreads4w.


                                            Table of Contents

                                              diff --git a/manual/pthread_setcancelstate.html b/manual/pthread_setcancelstate.html index b4e6ffd7..fdffa07a 100644 --- a/manual/pthread_setcancelstate.html +++ b/manual/pthread_setcancelstate.html @@ -5,7 +5,7 @@ PTHREAD_SETCANCELSTATE(3) manual page -

                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                              +

                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                              Reference Index

                                              Table of Contents

                                              Name

                                              @@ -64,14 +64,14 @@

                                              Description

                                              location pointed to by oldtype, and can thus be restored later by another call to pthread_setcanceltype.

                                              -

                                              Pthreads-w32 provides two levels of support for +

                                              Pthreads4w provides two levels of support for PTHREAD_CANCEL_ASYNCHRONOUS: full and partial. Full support requires an additional DLL and driver be installed on the Windows system (see the See Also section below) that allows blocked threads to be cancelled immediately. Partial support means that the target thread will not cancel until it resumes execution naturally. Partial support is provided if either the DLL or the driver are not -automatically detected by the pthreads-w32 library at run-time.

                                              +automatically detected by the Pthreads4w library at run-time.

                                              Threads are always created by pthread_create(3) with cancellation enabled and deferred. That is, the initial cancellation state is PTHREAD_CANCEL_ENABLE and the initial @@ -88,8 +88,8 @@

                                              Description


                                              pthread_testcancel(3)
                                              sem_wait(3)
                                              sem_timedwait(3)
                                              sigwait(3) (not supported under -Pthreads-w32)

                                              -

                                              Pthreads-w32 provides two functions to enable additional +Pthreads4w)

                                              +

                                              Pthreads4w provides two functions to enable additional cancellation points to be created in user functions that block on Win32 HANDLEs:

                                              pthreadCancelableWait() @@ -149,12 +149,12 @@

                                              Errors

                                              Author

                                              Xavier Leroy <Xavier.Leroy@inria.fr>

                                              -

                                              Modified by Ross Johnson for use with Pthreads-w32.

                                              +

                                              Modified by Ross Johnson for use with Pthreads4w.

                                              See Also

                                              pthread_exit(3) , pthread_cleanup_push(3) , pthread_cleanup_pop(3) -, Pthreads-w32 package README file 'Prerequisites' section. +, Pthreads4w package README file 'Prerequisites' section.

                                              Bugs

                                              POSIX specifies that a number of system calls (basically, all @@ -162,7 +162,7 @@

                                              Bugs

                                              , write(2) , wait(2) , etc.) and library functions that may call these system calls (e.g. fprintf(3) ) are cancellation -points. Pthreads-win32 is not integrated enough with the C +points. Pthreads4w is not integrated enough with the C library to implement this, and thus none of the C library functions is a cancellation point.

                                              diff --git a/manual/pthread_setcanceltype.html b/manual/pthread_setcanceltype.html index b4e6ffd7..fdffa07a 100644 --- a/manual/pthread_setcanceltype.html +++ b/manual/pthread_setcanceltype.html @@ -5,7 +5,7 @@ PTHREAD_SETCANCELSTATE(3) manual page -

                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                              +

                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                              Reference Index

                                              Table of Contents

                                              Name

                                              @@ -64,14 +64,14 @@

                                              Description

                                              location pointed to by oldtype, and can thus be restored later by another call to pthread_setcanceltype.

                                              -

                                              Pthreads-w32 provides two levels of support for +

                                              Pthreads4w provides two levels of support for PTHREAD_CANCEL_ASYNCHRONOUS: full and partial. Full support requires an additional DLL and driver be installed on the Windows system (see the See Also section below) that allows blocked threads to be cancelled immediately. Partial support means that the target thread will not cancel until it resumes execution naturally. Partial support is provided if either the DLL or the driver are not -automatically detected by the pthreads-w32 library at run-time.

                                              +automatically detected by the Pthreads4w library at run-time.

                                              Threads are always created by pthread_create(3) with cancellation enabled and deferred. That is, the initial cancellation state is PTHREAD_CANCEL_ENABLE and the initial @@ -88,8 +88,8 @@

                                              Description


                                              pthread_testcancel(3)
                                              sem_wait(3)
                                              sem_timedwait(3)
                                              sigwait(3) (not supported under -Pthreads-w32)

                                              -

                                              Pthreads-w32 provides two functions to enable additional +Pthreads4w)

                                              +

                                              Pthreads4w provides two functions to enable additional cancellation points to be created in user functions that block on Win32 HANDLEs:

                                              pthreadCancelableWait() @@ -149,12 +149,12 @@

                                              Errors

                                              Author

                                              Xavier Leroy <Xavier.Leroy@inria.fr>

                                              -

                                              Modified by Ross Johnson for use with Pthreads-w32.

                                              +

                                              Modified by Ross Johnson for use with Pthreads4w.

                                              See Also

                                              pthread_exit(3) , pthread_cleanup_push(3) , pthread_cleanup_pop(3) -, Pthreads-w32 package README file 'Prerequisites' section. +, Pthreads4w package README file 'Prerequisites' section.

                                              Bugs

                                              POSIX specifies that a number of system calls (basically, all @@ -162,7 +162,7 @@

                                              Bugs

                                              , write(2) , wait(2) , etc.) and library functions that may call these system calls (e.g. fprintf(3) ) are cancellation -points. Pthreads-win32 is not integrated enough with the C +points. Pthreads4w is not integrated enough with the C library to implement this, and thus none of the C library functions is a cancellation point.

                                              diff --git a/manual/pthread_setconcurrency.html b/manual/pthread_setconcurrency.html index f9dd9efc..5718e4dc 100644 --- a/manual/pthread_setconcurrency.html +++ b/manual/pthread_setconcurrency.html @@ -5,7 +5,7 @@ PTHREAD_SETCONCURRENCY(3) manual page -

                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                              +

                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                              Reference Index

                                              Table of Contents

                                              Name

                                              @@ -53,7 +53,7 @@

                                              Description

                                              is called so that a subsequent call to pthread_getconcurrency shall return the same value.

                                              -

                                              Pthreads-w32 provides these routines for source code +

                                              Pthreads4w provides these routines for source code compatibility only, as described in the previous paragraph.

                                              Return Value

                                              If successful, the pthread_setconcurrency function shall @@ -115,7 +115,7 @@

                                              Copyright

                                              can be obtained online at http://www.opengroup.org/unix/online.html .

                                              -

                                              Modified by Ross Johnson for use with Pthreads-w32.

                                              +

                                              Modified by Ross Johnson for use with Pthreads4w.


                                              Table of Contents

                                                diff --git a/manual/pthread_setname_np.html b/manual/pthread_setname_np.html index b86fed13..00ff6b02 100644 --- a/manual/pthread_setname_np.html +++ b/manual/pthread_setname_np.html @@ -23,7 +23,7 @@

                                                POSIX -Threads for Windows – REFERENCE - Pthreads-w32

                                                +Threads for Windows – REFERENCE - Pthreads4w

                                                Reference Index

                                                Table of Contents

                                                Name

                                                diff --git a/manual/pthread_setschedparam.html b/manual/pthread_setschedparam.html index aa755e9a..dbe1a9e1 100644 --- a/manual/pthread_setschedparam.html +++ b/manual/pthread_setschedparam.html @@ -5,7 +5,7 @@ PTHREAD_SETSCHEDPARAM(3) manual page -

                                                POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                +

                                                POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                                Reference Index

                                                Table of Contents

                                                Name

                                                @@ -31,7 +31,7 @@

                                                Description

                                                round-robin) or SCHED_FIFO (real-time, first-in first-out). param specifies the scheduling priority for the two real-time policies.

                                                -

                                                Pthreads-w32 only supports SCHED_OTHER and does not support +

                                                Pthreads4w only supports SCHED_OTHER and does not support the real-time scheduling policies SCHED_RR and SCHED_FIFO.

                                                pthread_getschedparam retrieves the scheduling policy and @@ -76,7 +76,7 @@

                                                Author

                                                Xavier Leroy <Xavier.Leroy@inria.fr>

                                                -

                                                Modified by Ross Johnson for use with Pthreads-w32.

                                                +

                                                Modified by Ross Johnson for use with Pthreads4w.

                                                See Also

                                                sched_setscheduler(2) , sched_getscheduler(2) diff --git a/manual/pthread_spin_init.html b/manual/pthread_spin_init.html index 8361ce52..76150bfe 100644 --- a/manual/pthread_spin_init.html +++ b/manual/pthread_spin_init.html @@ -5,7 +5,7 @@ PTHREAD_SPIN_INIT(3) manual page -

                                                POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                +

                                                POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                                Reference Index

                                                Table of Contents

                                                Name

                                                @@ -34,7 +34,7 @@

                                                Description

                                                required to use the spin lock referenced by lock and initialize the lock to an unlocked state.

                                                -

                                                Pthreads-w32 supports single and multiple processor systems +

                                                Pthreads4w supports single and multiple processor systems as well as process CPU affinity masking by checking the mask when the spin lock is initialized. If the process is using only a single processor at the time pthread_spin_init is called then the @@ -44,7 +44,7 @@

                                                Description

                                                mask is altered after the spin lock has been initialised, the spin lock is not modified, and may no longer be optimal for the number of CPUs available.

                                                -

                                                Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

                                                Pthreads4w defines _POSIX_THREAD_PROCESS_SHARED in pthread.h as -1 to indicate that these routines do not support the PTHREAD_PROCESS_SHARED attribute. pthread_spin_init will return the error ENOTSUP if the value of pshared @@ -65,7 +65,7 @@

                                                Description

                                                or pthread_spin_unlock(3) is undefined.

                                                -

                                                Pthreads-w32 supports statically initialized spin locks +

                                                Pthreads4w supports statically initialized spin locks using PTHREAD_SPINLOCK_INITIALIZER. An application should still call pthread_spin_destroy at some point to ensure that any resources consumed by the spin lock are released.

                                                @@ -136,7 +136,7 @@

                                                Copyright

                                                can be obtained online at http://www.opengroup.org/unix/online.html .

                                                -

                                                Modified by Ross Johnson for use with Pthreads-w32.

                                                +

                                                Modified by Ross Johnson for use with Pthreads4w.


                                                Table of Contents

                                                  diff --git a/manual/pthread_spin_lock.html b/manual/pthread_spin_lock.html index 53ab32aa..80f8e5a5 100644 --- a/manual/pthread_spin_lock.html +++ b/manual/pthread_spin_lock.html @@ -5,7 +5,7 @@ PTHREAD_SPIN_LOCK(3) manual page -

                                                  POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                  +

                                                  POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                                  Reference Index

                                                  Table of Contents

                                                  Name

                                                  @@ -26,7 +26,7 @@

                                                  Description

                                                  (that is, shall not return from the pthread_spin_lock call) until the lock becomes available. The results are undefined if the calling thread holds the lock at the time the call is made.

                                                  -

                                                  Pthreads-w32 supports single and multiple processor systems +

                                                  Pthreads4w supports single and multiple processor systems as well as process CPU affinity masking by checking the mask when the spin lock is initialized. If the process is using only a single processor at the time pthread_spin_init(3) @@ -101,7 +101,7 @@

                                                  Copyright

                                                  can be obtained online at http://www.opengroup.org/unix/online.html .

                                                  -

                                                  Modified by Ross Johnson for use with Pthreads-w32.

                                                  +

                                                  Modified by Ross Johnson for use with Pthreads4w.


                                                  Table of Contents

                                                    diff --git a/manual/pthread_spin_unlock.html b/manual/pthread_spin_unlock.html index 7f2b072f..673877fe 100644 --- a/manual/pthread_spin_unlock.html +++ b/manual/pthread_spin_unlock.html @@ -5,7 +5,7 @@ PTHREAD_SPIN_UNLOCK(3) manual page -

                                                    POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                    +

                                                    POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                                    Reference Index

                                                    Table of Contents

                                                    Name

                                                    @@ -27,7 +27,7 @@

                                                    Description

                                                    pthread_spin_unlock is called, the lock becomes available and an unspecified spinning thread shall acquire the lock.

                                                    -

                                                    Pthreads-w32 does not check ownership of the lock and it is +

                                                    Pthreads4w does not check ownership of the lock and it is therefore possible for a thread other than the locker to unlock the spin lock. This is not a feature that should be exploited.

                                                    The results are undefined if this function is called with an @@ -57,7 +57,7 @@

                                                    Examples

                                                    None.

                                                    Application Usage

                                                    -

                                                    Pthreads-w32 does not check ownership of the lock and it is +

                                                    Pthreads4w does not check ownership of the lock and it is therefore possible for a thread other than the locker to unlock the spin lock. This is not a feature that should be exploited.

                                                    Rationale

                                                    @@ -84,7 +84,7 @@

                                                    Copyright

                                                    can be obtained online at http://www.opengroup.org/unix/online.html .

                                                    -

                                                    Modified by Ross Johnson for use with Pthreads-w32.

                                                    +

                                                    Modified by Ross Johnson for use with Pthreads4w.


                                                    Table of Contents

                                                      diff --git a/manual/pthread_timechange_handler_np.html b/manual/pthread_timechange_handler_np.html index 872f0500..8cfffa46 100644 --- a/manual/pthread_timechange_handler_np.html +++ b/manual/pthread_timechange_handler_np.html @@ -5,7 +5,7 @@ PTHREAD_TIMECHANGE_HANDLER_NP(3) manual page -

                                                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                      +

                                                      POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                                      Reference Index

                                                      Table of Contents

                                                      Name

                                                      @@ -47,7 +47,7 @@

                                                      Errors

                                                      To indicate that not all condition variables were signalled for some reason.

                                                      Author

                                                      -

                                                      Ross Johnson for use with Pthreads-w32.

                                                      +

                                                      Ross Johnson for use with Pthreads4w.


                                                      Table of Contents

                                                        diff --git a/manual/pthread_win32_attach_detach_np.html b/manual/pthread_win32_attach_detach_np.html index 7f5090e6..8cbbca06 100644 --- a/manual/pthread_win32_attach_detach_np.html +++ b/manual/pthread_win32_attach_detach_np.html @@ -5,14 +5,14 @@ PTHREAD_WIN32_ATTACH_DETACH_NP(3) manual page -

                                                        POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                        +

                                                        POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                                        Reference Index

                                                        Table of Contents

                                                        Name

                                                        pthread_win32_process_attach_np, pthread_win32_process_detach_np, pthread_win32_thread_attach_np, pthread_win32_thread_detach_np ā€“ exposed versions of the -pthreads-w32 DLL dllMain() switch functionality for use when +Pthreads4w DLL dllMain() switch functionality for use when statically linking the library.

                                                        Synopsis

                                                        #include <pthread.h> @@ -36,7 +36,7 @@

                                                        Description

                                                        thread exits.

                                                        These functions invariably return TRUE except for pthread_win32_process_attach_np which will return FALSE if -pthreads-w32 initialisation fails.

                                                        +Pthreads4w initialisation fails.

                                                        Cancellation

                                                        None.

                                                        Return Value

                                                        @@ -45,7 +45,7 @@

                                                        Return ValueErrors

                                                        None.

                                                        Author

                                                        -

                                                        Ross Johnson for use with Pthreads-w32.

                                                        +

                                                        Ross Johnson for use with Pthreads4w.


                                                        Table of Contents

                                                          diff --git a/manual/pthread_win32_getabstime_np.html b/manual/pthread_win32_getabstime_np.html index f2fe03d2..29704f5f 100644 --- a/manual/pthread_win32_getabstime_np.html +++ b/manual/pthread_win32_getabstime_np.html @@ -18,7 +18,7 @@

                                                          POSIX Threads for Windows – REFERENCE - -Pthreads-w32

                                                          +Pthreads4w

                                                          Reference Index

                                                          Table of Contents

                                                          Name

                                                          @@ -47,7 +47,7 @@

                                                          Return

                                                          Errors

                                                          None.

                                                          Author

                                                          -

                                                          Ross Johnson for use with Pthreads-w32.

                                                          +

                                                          Ross Johnson for use with Pthreads4w.


                                                          Table of Contents

                                                            diff --git a/manual/pthread_win32_test_features_np.html b/manual/pthread_win32_test_features_np.html index 3ce0c047..29edb109 100644 --- a/manual/pthread_win32_test_features_np.html +++ b/manual/pthread_win32_test_features_np.html @@ -5,7 +5,7 @@ PTHREAD_WIN32_TEST_FEATURES_NP(3) manual page -

                                                            POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                            +

                                                            POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                                            Reference Index

                                                            Table of Contents

                                                            Name

                                                            @@ -39,7 +39,7 @@

                                                            Return ValueErrors

                                                            None.

                                                            Author

                                                            -

                                                            Ross Johnson for use with Pthreads-w32.

                                                            +

                                                            Ross Johnson for use with Pthreads4w.


                                                            Table of Contents

                                                              diff --git a/manual/sched_get_priority_max.html b/manual/sched_get_priority_max.html index 50c90d44..de818e1d 100644 --- a/manual/sched_get_priority_max.html +++ b/manual/sched_get_priority_max.html @@ -5,7 +5,7 @@ SCHED_GET_PRIORITY_MAX(3) manual page -

                                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                              +

                                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                                              Reference Index

                                                              Table of Contents

                                                              Name

                                                              @@ -75,7 +75,7 @@

                                                              Copyright

                                                              can be obtained online at http://www.opengroup.org/unix/online.html .

                                                              -

                                                              Modified by Ross Johnson for use with Pthreads-w32.

                                                              +

                                                              Modified by Ross Johnson for use with Pthreads4w.


                                                              Table of Contents

                                                                diff --git a/manual/sched_getscheduler.html b/manual/sched_getscheduler.html index 9b7594e7..df0e9e44 100644 --- a/manual/sched_getscheduler.html +++ b/manual/sched_getscheduler.html @@ -5,7 +5,7 @@ SCHED_GETSCHEDULER(3) manual page -

                                                                POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                                +

                                                                POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                                                Reference Index

                                                                Table of Contents

                                                                Name

                                                                @@ -25,7 +25,7 @@

                                                                Description

                                                                The values that can be returned by sched_getscheduler are defined in the <sched.h> header.

                                                                -

                                                                Pthreads-w32 only supports the SCHED_OTHER policy, +

                                                                Pthreads4w only supports the SCHED_OTHER policy, which is the only value that can be returned. However, checks on pid and permissions are performed first so that the other useful side effects of this routine are retained.

                                                                @@ -87,7 +87,7 @@

                                                                Copyright

                                                                can be obtained online at http://www.opengroup.org/unix/online.html .

                                                                -

                                                                Modified by Ross Johnson for use with Pthreads-w32.

                                                                +

                                                                Modified by Ross Johnson for use with Pthreads4w.


                                                                Table of Contents

                                                                  diff --git a/manual/sched_setaffinity.html b/manual/sched_setaffinity.html index f5ebbf5f..c3ea687a 100644 --- a/manual/sched_setaffinity.html +++ b/manual/sched_setaffinity.html @@ -13,7 +13,7 @@

                                                                  POSIX -Threads for Windows – REFERENCE - Pthreads-w32

                                                                  +Threads for Windows – REFERENCE - Pthreads4w

                                                          Reference Index

                                                          Table of Contents

                                                          Name

                                                          @@ -46,7 +46,7 @@

                                                          Description

                                                          mask. The cpusetsize argument specifies the size (in bytes) of mask. If pid is zero, then the mask of the calling process is returned.

                                                          -

                                                          Pthreads-w32 currently ignores the cpusetsize +

                                                          Pthreads4w currently ignores the cpusetsize parameter for either function because cpu_set_t is a direct typeset to the Windows affinity vector type DWORD_PTR.

                                                          Windows may require that the requesting process have permission to @@ -112,7 +112,7 @@

                                                          See Also

                                                          pthread_getaffinity_np(3)

                                                          Copyright

                                                          Most of this is taken from the Linux manual page.

                                                          -

                                                          Modified by Ross Johnson for use with Pthreads-w32.

                                                          +

                                                          Modified by Ross Johnson for use with Pthreads4w.


                                                          Table of Contents

                                                            diff --git a/manual/sched_setscheduler.html b/manual/sched_setscheduler.html index 10c19b66..442c7191 100644 --- a/manual/sched_setscheduler.html +++ b/manual/sched_setscheduler.html @@ -5,7 +5,7 @@ SCHED_SETSCHEDULER(3) manual page -

                                                            POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                            +

                                                            POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                                            Reference Index

                                                            Table of Contents

                                                            Name

                                                            @@ -32,7 +32,7 @@

                                                            Description

                                                            The possible values for the policy parameter are defined in the <sched.h> header.

                                                            -

                                                            Pthreads-w32 only supports the SCHED_OTHER policy. +

                                                            Pthreads4w only supports the SCHED_OTHER policy. Any other value for policy will return failure with errno set to ENOSYS. However, checks on pid and permissions are performed first so that the other useful side effects of this routine @@ -141,7 +141,7 @@

                                                            Copyright

                                                            can be obtained online at http://www.opengroup.org/unix/online.html .

                                                            -

                                                            Modified by Ross Johnson for use with Pthreads-w32.

                                                            +

                                                            Modified by Ross Johnson for use with Pthreads4w.


                                                            Table of Contents

                                                              diff --git a/manual/sched_yield.html b/manual/sched_yield.html index 75b95d9c..8741a078 100644 --- a/manual/sched_yield.html +++ b/manual/sched_yield.html @@ -5,7 +5,7 @@ SCHED_YIELD(3) manual page -

                                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                              +

                                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                                              Reference Index

                                                              Table of Contents

                                                              Name

                                                              diff --git a/manual/sem_init.html b/manual/sem_init.html index 61d82f18..b55f6881 100644 --- a/manual/sem_init.html +++ b/manual/sem_init.html @@ -5,7 +5,7 @@ SEM_INIT(3) manual page -

                                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads-w32

                                                              +

                                                              POSIX Threads for Windows ā€“ REFERENCE - Pthreads4w

                                                              Reference Index

                                                              Table of Contents

                                                              Name

                                                              @@ -45,7 +45,7 @@

                                                              Description

                                                              semaphore is local to the current process ( pshared is zero) or is to be shared between several processes ( pshared is not zero).

                                                              -

                                                              Pthreads-w32 currently does not support process-shared +

                                                              Pthreads4w currently does not support process-shared semaphores, thus sem_init always returns with error EPERM if pshared is not zero.

                                                              @@ -74,7 +74,7 @@

                                                              Description

                                                              waiters are released and sem's count is incremented by number minus n.

                                                              sem_getvalue stores in the location pointed to by sval -the current count of the semaphore sem. In the Pthreads-w32 +the current count of the semaphore sem. In the Pthreads4w implementation: if the value returned in sval is greater than or equal to 0 it was the sem's count at some point during the call to sem_getvalue. If the value returned in sval is @@ -161,7 +161,7 @@

                                                              Author

                                                              Xavier Leroy <Xavier.Leroy@inria.fr>

                                                              -

                                                              Modified by Ross Johnson for use with Pthreads-w32.

                                                              +

                                                              Modified by Ross Johnson for use with Pthreads4w.

                                                              See Also

                                                              pthread_mutex_init(3) , pthread_cond_init(3) , diff --git a/pthread.c b/pthread.c index 45b158bc..191405ca 100644 --- a/pthread.c +++ b/pthread.c @@ -2,15 +2,15 @@ * pthread.c * * Description: - * This translation unit agregates pthreads-win32 translation units. + * This translation unit agregates Pthreads4w translation units. * It is used for inline optimisation of the library, * maximising for speed at the expense of size. * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -20,20 +20,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread.h b/pthread.h index cf596ac2..488c8a08 100644 --- a/pthread.h +++ b/pthread.h @@ -2,9 +2,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -14,20 +14,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #if !defined( PTHREAD_H ) @@ -166,7 +166,7 @@ * The source code and other information about this library * are available from * - * http://sources.redhat.com/pthreads-win32/ + * https://sourceforge.net/projects/pthreads4w// * * ------------------------------------------------------------- */ @@ -186,7 +186,7 @@ enum * ========================= * * Options are normally set in , which is not provided - * with pthreads-win32. + * with Pthreads4w. * * For conformance with the Single Unix Specification (version 3), all of the * options below are defined, and have a value of either -1 (not supported) @@ -317,7 +317,7 @@ enum * =========================== * * These limits are normally set in , which is not provided with - * pthreads-win32. + * Pthreads4w. * * PTHREAD_DESTRUCTOR_ITERATIONS * Maximum number of attempts to destroy @@ -1130,7 +1130,7 @@ PTW32_DLLPORT int PTW32_CDECL pthreadCancelableTimedWait (void *waitHandle, #endif /* - * If pthreads-win32 is compiled as a DLL with MSVC, and + * If Pthreads4w is compiled as a DLL with MSVC, and * both it and the application are linked against the static * C runtime (i.e. with the /MT compiler flag), then the * application will not see the same C runtime globals as @@ -1143,7 +1143,7 @@ PTW32_DLLPORT int PTW32_CDECL pthreadCancelableTimedWait (void *waitHandle, * * http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/b4500c0d-1b69-40c7-9ef5-08da1025b5bf * - * When pthreads-win32 is built with PTW32_USES_SEPARATE_CRT + * When Pthreads4w is built with PTW32_USES_SEPARATE_CRT * defined, the following features are enabled: * * (1) In addition to setting the errno variable when errors diff --git a/pthread_attr_destroy.c b/pthread_attr_destroy.c index 41bc556c..b2c9a2d7 100644 --- a/pthread_attr_destroy.c +++ b/pthread_attr_destroy.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getaffinity_np.c b/pthread_attr_getaffinity_np.c index c86a7072..2bf5b064 100644 --- a/pthread_attr_getaffinity_np.c +++ b/pthread_attr_getaffinity_np.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getdetachstate.c b/pthread_attr_getdetachstate.c index ea5c4d41..91aeb495 100644 --- a/pthread_attr_getdetachstate.c +++ b/pthread_attr_getdetachstate.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getinheritsched.c b/pthread_attr_getinheritsched.c index b28a7a0e..aa3f9851 100644 --- a/pthread_attr_getinheritsched.c +++ b/pthread_attr_getinheritsched.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getname_np.c b/pthread_attr_getname_np.c index 1a3811a1..50dd5f6e 100644 --- a/pthread_attr_getname_np.c +++ b/pthread_attr_getname_np.c @@ -3,9 +3,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -15,20 +15,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getschedparam.c b/pthread_attr_getschedparam.c index 26bf4104..d9cef387 100644 --- a/pthread_attr_getschedparam.c +++ b/pthread_attr_getschedparam.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getschedpolicy.c b/pthread_attr_getschedpolicy.c index e714c3cb..e23ca0c3 100644 --- a/pthread_attr_getschedpolicy.c +++ b/pthread_attr_getschedpolicy.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getscope.c b/pthread_attr_getscope.c index 9e5a4c07..288740fa 100644 --- a/pthread_attr_getscope.c +++ b/pthread_attr_getscope.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getstackaddr.c b/pthread_attr_getstackaddr.c index a65ef79f..78157799 100644 --- a/pthread_attr_getstackaddr.c +++ b/pthread_attr_getstackaddr.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getstacksize.c b/pthread_attr_getstacksize.c index 5156d55e..a8809687 100644 --- a/pthread_attr_getstacksize.c +++ b/pthread_attr_getstacksize.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_init.c b/pthread_attr_init.c index f5e944aa..26aabb5d 100644 --- a/pthread_attr_init.c +++ b/pthread_attr_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setaffinity_np.c b/pthread_attr_setaffinity_np.c index bdfcac3a..4d67f501 100644 --- a/pthread_attr_setaffinity_np.c +++ b/pthread_attr_setaffinity_np.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setdetachstate.c b/pthread_attr_setdetachstate.c index 63c219cb..bd226a3f 100644 --- a/pthread_attr_setdetachstate.c +++ b/pthread_attr_setdetachstate.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setinheritsched.c b/pthread_attr_setinheritsched.c index 13b854ca..eb8341bb 100644 --- a/pthread_attr_setinheritsched.c +++ b/pthread_attr_setinheritsched.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setname_np.c b/pthread_attr_setname_np.c index 9217756e..9425d839 100644 --- a/pthread_attr_setname_np.c +++ b/pthread_attr_setname_np.c @@ -3,9 +3,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -15,20 +15,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setschedparam.c b/pthread_attr_setschedparam.c index 23ecaa19..cf70698a 100644 --- a/pthread_attr_setschedparam.c +++ b/pthread_attr_setschedparam.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setschedpolicy.c b/pthread_attr_setschedpolicy.c index 0b0874e2..6e55bfe8 100644 --- a/pthread_attr_setschedpolicy.c +++ b/pthread_attr_setschedpolicy.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setscope.c b/pthread_attr_setscope.c index c3621008..82d07d57 100644 --- a/pthread_attr_setscope.c +++ b/pthread_attr_setscope.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setstackaddr.c b/pthread_attr_setstackaddr.c index cfdd152d..46ba2eaa 100644 --- a/pthread_attr_setstackaddr.c +++ b/pthread_attr_setstackaddr.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setstacksize.c b/pthread_attr_setstacksize.c index ee13d21d..ea829eaf 100644 --- a/pthread_attr_setstacksize.c +++ b/pthread_attr_setstacksize.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrier_destroy.c b/pthread_barrier_destroy.c index 82584d14..e85beac1 100644 --- a/pthread_barrier_destroy.c +++ b/pthread_barrier_destroy.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrier_init.c b/pthread_barrier_init.c index 8f81053e..5d7be9b1 100644 --- a/pthread_barrier_init.c +++ b/pthread_barrier_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrier_wait.c b/pthread_barrier_wait.c index d4b17882..95776d80 100644 --- a/pthread_barrier_wait.c +++ b/pthread_barrier_wait.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrierattr_destroy.c b/pthread_barrierattr_destroy.c index d132a523..204b23ab 100644 --- a/pthread_barrierattr_destroy.c +++ b/pthread_barrierattr_destroy.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrierattr_getpshared.c b/pthread_barrierattr_getpshared.c index 149fb843..e34cc62b 100644 --- a/pthread_barrierattr_getpshared.c +++ b/pthread_barrierattr_getpshared.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrierattr_init.c b/pthread_barrierattr_init.c index 187b4fff..a6cb6463 100644 --- a/pthread_barrierattr_init.c +++ b/pthread_barrierattr_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrierattr_setpshared.c b/pthread_barrierattr_setpshared.c index e0226dc7..36b0d340 100644 --- a/pthread_barrierattr_setpshared.c +++ b/pthread_barrierattr_setpshared.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_cancel.c b/pthread_cancel.c index ec10e585..aa8c0a48 100644 --- a/pthread_cancel.c +++ b/pthread_cancel.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H @@ -106,7 +106,7 @@ pthread_cancel (pthread_t thread) ptw32_mcs_local_node_t stateLock; /* - * Validate the thread id. This method works for pthreads-win32 because + * Validate the thread id. This method works for Pthreads4w because * pthread_kill and pthread_t are designed to accommodate it, but the * method is not portable. */ diff --git a/pthread_cond_destroy.c b/pthread_cond_destroy.c index e3146261..9fa196fa 100644 --- a/pthread_cond_destroy.c +++ b/pthread_cond_destroy.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_cond_init.c b/pthread_cond_init.c index 970a2cdf..0233bd5f 100644 --- a/pthread_cond_init.c +++ b/pthread_cond_init.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_cond_signal.c b/pthread_cond_signal.c index b5ef5d0e..a7dd4af4 100644 --- a/pthread_cond_signal.c +++ b/pthread_cond_signal.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * ------------------------------------------------------------- * Algorithm: diff --git a/pthread_cond_wait.c b/pthread_cond_wait.c index fc42b013..06d3ee30 100644 --- a/pthread_cond_wait.c +++ b/pthread_cond_wait.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * ------------------------------------------------------------- * Algorithm: diff --git a/pthread_condattr_destroy.c b/pthread_condattr_destroy.c index e5af8ea2..85d87123 100644 --- a/pthread_condattr_destroy.c +++ b/pthread_condattr_destroy.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_condattr_getpshared.c b/pthread_condattr_getpshared.c index 4543bb7e..e4168c59 100644 --- a/pthread_condattr_getpshared.c +++ b/pthread_condattr_getpshared.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_condattr_init.c b/pthread_condattr_init.c index b247d2f0..4bda44a6 100644 --- a/pthread_condattr_init.c +++ b/pthread_condattr_init.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_condattr_setpshared.c b/pthread_condattr_setpshared.c index 4fceb2af..6c5f8482 100644 --- a/pthread_condattr_setpshared.c +++ b/pthread_condattr_setpshared.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_delay_np.c b/pthread_delay_np.c index ee725025..c6d0999f 100644 --- a/pthread_delay_np.c +++ b/pthread_delay_np.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_detach.c b/pthread_detach.c index e5215397..3bbe4a11 100644 --- a/pthread_detach.c +++ b/pthread_detach.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_equal.c b/pthread_equal.c index 5033db62..938a5f0f 100644 --- a/pthread_equal.c +++ b/pthread_equal.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_exit.c b/pthread_exit.c index e2cf8f15..b09ea015 100644 --- a/pthread_exit.c +++ b/pthread_exit.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H @@ -86,7 +86,7 @@ pthread_exit (void *value_ptr) { /* * A POSIX thread handle was never created. I.e. this is a - * Win32 thread that has never called a pthreads-win32 routine that + * Win32 thread that has never called a Pthreads4w routine that * required a POSIX handle. * * Implicit POSIX handles are cleaned up in ptw32_throw() now. diff --git a/pthread_getconcurrency.c b/pthread_getconcurrency.c index 3a7360b1..e8ec8379 100644 --- a/pthread_getconcurrency.c +++ b/pthread_getconcurrency.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getname_np.c b/pthread_getname_np.c index 10ed2d5d..2f7fb07d 100644 --- a/pthread_getname_np.c +++ b/pthread_getname_np.c @@ -3,9 +3,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -15,20 +15,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H @@ -47,7 +47,7 @@ pthread_getname_np(pthread_t thr, char *name, int len) int result; /* - * Validate the thread id. This method works for pthreads-win32 because + * Validate the thread id. This method works for Pthreads4w because * pthread_kill and pthread_t are designed to accommodate it, but the * method is not portable. */ diff --git a/pthread_getschedparam.c b/pthread_getschedparam.c index d6f254a4..05490fc1 100644 --- a/pthread_getschedparam.c +++ b/pthread_getschedparam.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H @@ -49,7 +49,7 @@ pthread_getschedparam (pthread_t thread, int *policy, int result; /* - * Validate the thread id. This method works for pthreads-win32 because + * Validate the thread id. This method works for Pthreads4w because * pthread_kill and pthread_t are designed to accommodate it, but the * method is not portable. */ diff --git a/pthread_getspecific.c b/pthread_getspecific.c index a13e0953..9a4c131c 100644 --- a/pthread_getspecific.c +++ b/pthread_getspecific.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getunique_np.c b/pthread_getunique_np.c index 8bf1bbd9..2692d8ba 100755 --- a/pthread_getunique_np.c +++ b/pthread_getunique_np.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getw32threadhandle_np.c b/pthread_getw32threadhandle_np.c index 6377d125..f3fe0b1f 100644 --- a/pthread_getw32threadhandle_np.c +++ b/pthread_getw32threadhandle_np.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_join.c b/pthread_join.c index ff3fc11a..27c6ccd3 100644 --- a/pthread_join.c +++ b/pthread_join.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_key_create.c b/pthread_key_create.c index 2a0bcb95..21e8b5f2 100644 --- a/pthread_key_create.c +++ b/pthread_key_create.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_key_delete.c b/pthread_key_delete.c index c6c44802..a713c9e7 100644 --- a/pthread_key_delete.c +++ b/pthread_key_delete.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_kill.c b/pthread_kill.c index d8da0aa0..4b5e481d 100644 --- a/pthread_kill.c +++ b/pthread_kill.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_consistent.c b/pthread_mutex_consistent.c index fddd6a73..c37e6898 100755 --- a/pthread_mutex_consistent.c +++ b/pthread_mutex_consistent.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_destroy.c b/pthread_mutex_destroy.c index ad6d2f3e..94366611 100644 --- a/pthread_mutex_destroy.c +++ b/pthread_mutex_destroy.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_init.c b/pthread_mutex_init.c index 9805af28..d3295a8d 100644 --- a/pthread_mutex_init.c +++ b/pthread_mutex_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_lock.c b/pthread_mutex_lock.c index 995a1483..eb8f0b4e 100644 --- a/pthread_mutex_lock.c +++ b/pthread_mutex_lock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_timedlock.c b/pthread_mutex_timedlock.c index 5f7e8a18..32850c93 100644 --- a/pthread_mutex_timedlock.c +++ b/pthread_mutex_timedlock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_trylock.c b/pthread_mutex_trylock.c index 75bb27d2..b1cb9913 100644 --- a/pthread_mutex_trylock.c +++ b/pthread_mutex_trylock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_unlock.c b/pthread_mutex_unlock.c index f9639851..27033b1c 100644 --- a/pthread_mutex_unlock.c +++ b/pthread_mutex_unlock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_destroy.c b/pthread_mutexattr_destroy.c index 48a231ee..4c9172c9 100644 --- a/pthread_mutexattr_destroy.c +++ b/pthread_mutexattr_destroy.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_getkind_np.c b/pthread_mutexattr_getkind_np.c index 6f54aaca..8bf8e3a5 100644 --- a/pthread_mutexattr_getkind_np.c +++ b/pthread_mutexattr_getkind_np.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_getpshared.c b/pthread_mutexattr_getpshared.c index 9350d36c..eb9a0a07 100644 --- a/pthread_mutexattr_getpshared.c +++ b/pthread_mutexattr_getpshared.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_getrobust.c b/pthread_mutexattr_getrobust.c index cfa1fca0..2e7d6528 100755 --- a/pthread_mutexattr_getrobust.c +++ b/pthread_mutexattr_getrobust.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_gettype.c b/pthread_mutexattr_gettype.c index 5ca487f0..aa859524 100644 --- a/pthread_mutexattr_gettype.c +++ b/pthread_mutexattr_gettype.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_init.c b/pthread_mutexattr_init.c index 71652bf5..565479b5 100644 --- a/pthread_mutexattr_init.c +++ b/pthread_mutexattr_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_setkind_np.c b/pthread_mutexattr_setkind_np.c index 44a05961..cf820daf 100644 --- a/pthread_mutexattr_setkind_np.c +++ b/pthread_mutexattr_setkind_np.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_setpshared.c b/pthread_mutexattr_setpshared.c index 0d0759c9..72c2ffab 100644 --- a/pthread_mutexattr_setpshared.c +++ b/pthread_mutexattr_setpshared.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_setrobust.c b/pthread_mutexattr_setrobust.c index e635194f..96f207f6 100755 --- a/pthread_mutexattr_setrobust.c +++ b/pthread_mutexattr_setrobust.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_settype.c b/pthread_mutexattr_settype.c index cd69a60f..53fa19cb 100644 --- a/pthread_mutexattr_settype.c +++ b/pthread_mutexattr_settype.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_num_processors_np.c b/pthread_num_processors_np.c index 1912672b..22051b4a 100644 --- a/pthread_num_processors_np.c +++ b/pthread_num_processors_np.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_once.c b/pthread_once.c index 48214e6f..80427937 100644 --- a/pthread_once.c +++ b/pthread_once.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_destroy.c b/pthread_rwlock_destroy.c index 0b519c99..14745a9e 100644 --- a/pthread_rwlock_destroy.c +++ b/pthread_rwlock_destroy.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_init.c b/pthread_rwlock_init.c index 57b9967b..4be992aa 100644 --- a/pthread_rwlock_init.c +++ b/pthread_rwlock_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_rdlock.c b/pthread_rwlock_rdlock.c index 33037243..a0e62b38 100644 --- a/pthread_rwlock_rdlock.c +++ b/pthread_rwlock_rdlock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_timedrdlock.c b/pthread_rwlock_timedrdlock.c index d025206e..903a8892 100644 --- a/pthread_rwlock_timedrdlock.c +++ b/pthread_rwlock_timedrdlock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_timedwrlock.c b/pthread_rwlock_timedwrlock.c index 9a1297e4..ee2e8a92 100644 --- a/pthread_rwlock_timedwrlock.c +++ b/pthread_rwlock_timedwrlock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_tryrdlock.c b/pthread_rwlock_tryrdlock.c index b0b46fdc..84e5dc58 100644 --- a/pthread_rwlock_tryrdlock.c +++ b/pthread_rwlock_tryrdlock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_trywrlock.c b/pthread_rwlock_trywrlock.c index b052add9..906f64a2 100644 --- a/pthread_rwlock_trywrlock.c +++ b/pthread_rwlock_trywrlock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_unlock.c b/pthread_rwlock_unlock.c index fd1b357b..d8dd98cc 100644 --- a/pthread_rwlock_unlock.c +++ b/pthread_rwlock_unlock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_wrlock.c b/pthread_rwlock_wrlock.c index a6c5b9bf..91b8a71f 100644 --- a/pthread_rwlock_wrlock.c +++ b/pthread_rwlock_wrlock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlockattr_destroy.c b/pthread_rwlockattr_destroy.c index 8c5e2f83..472f9cc5 100644 --- a/pthread_rwlockattr_destroy.c +++ b/pthread_rwlockattr_destroy.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlockattr_getpshared.c b/pthread_rwlockattr_getpshared.c index 68f34de0..3eb9060b 100644 --- a/pthread_rwlockattr_getpshared.c +++ b/pthread_rwlockattr_getpshared.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlockattr_init.c b/pthread_rwlockattr_init.c index 58f9fc56..652fe32e 100644 --- a/pthread_rwlockattr_init.c +++ b/pthread_rwlockattr_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlockattr_setpshared.c b/pthread_rwlockattr_setpshared.c index dbd64f29..2cbeea95 100644 --- a/pthread_rwlockattr_setpshared.c +++ b/pthread_rwlockattr_setpshared.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_self.c b/pthread_self.c index 2b582ebc..8eb4730e 100644 --- a/pthread_self.c +++ b/pthread_self.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setaffinity.c b/pthread_setaffinity.c index 9f33999a..81baaf87 100644 --- a/pthread_setaffinity.c +++ b/pthread_setaffinity.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setcancelstate.c b/pthread_setcancelstate.c index a3e9acd2..e27d3292 100644 --- a/pthread_setcancelstate.c +++ b/pthread_setcancelstate.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setcanceltype.c b/pthread_setcanceltype.c index 65550c82..e588ba26 100644 --- a/pthread_setcanceltype.c +++ b/pthread_setcanceltype.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setconcurrency.c b/pthread_setconcurrency.c index 83dfe078..df8d785e 100644 --- a/pthread_setconcurrency.c +++ b/pthread_setconcurrency.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setname_np.c b/pthread_setname_np.c index f0a80753..cca2bff7 100644 --- a/pthread_setname_np.c +++ b/pthread_setname_np.c @@ -3,9 +3,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -15,20 +15,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H @@ -88,7 +88,7 @@ pthread_setname_np(pthread_t thr, const char *name, void *arg) #endif /* - * Validate the thread id. This method works for pthreads-win32 because + * Validate the thread id. This method works for Pthreads4w because * pthread_kill and pthread_t are designed to accommodate it, but the * method is not portable. */ @@ -153,7 +153,7 @@ pthread_setname_np(pthread_t thr, const char *name) #endif /* - * Validate the thread id. This method works for pthreads-win32 because + * Validate the thread id. This method works for Pthreads4w because * pthread_kill and pthread_t are designed to accommodate it, but the * method is not portable. */ diff --git a/pthread_setschedparam.c b/pthread_setschedparam.c index 57b23e92..f69e4058 100644 --- a/pthread_setschedparam.c +++ b/pthread_setschedparam.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H @@ -49,7 +49,7 @@ pthread_setschedparam (pthread_t thread, int policy, int result; /* - * Validate the thread id. This method works for pthreads-win32 because + * Validate the thread id. This method works for Pthreads4w because * pthread_kill and pthread_t are designed to accommodate it, but the * method is not portable. */ diff --git a/pthread_setspecific.c b/pthread_setspecific.c index 7dd420c9..5dbf8643 100644 --- a/pthread_setspecific.c +++ b/pthread_setspecific.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_spin_destroy.c b/pthread_spin_destroy.c index c2a0acbb..a681fab5 100644 --- a/pthread_spin_destroy.c +++ b/pthread_spin_destroy.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_spin_init.c b/pthread_spin_init.c index 95c9f299..b49da6c3 100644 --- a/pthread_spin_init.c +++ b/pthread_spin_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_spin_lock.c b/pthread_spin_lock.c index df1ef0bc..d846014c 100644 --- a/pthread_spin_lock.c +++ b/pthread_spin_lock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_spin_trylock.c b/pthread_spin_trylock.c index 3387e0f3..026e627a 100644 --- a/pthread_spin_trylock.c +++ b/pthread_spin_trylock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_spin_unlock.c b/pthread_spin_unlock.c index 8e018866..93cd5c51 100644 --- a/pthread_spin_unlock.c +++ b/pthread_spin_unlock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_testcancel.c b/pthread_testcancel.c index 5c4e25b7..3ae79bbd 100644 --- a/pthread_testcancel.c +++ b/pthread_testcancel.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_timechange_handler_np.c b/pthread_timechange_handler_np.c index 7b197327..c34571d2 100644 --- a/pthread_timechange_handler_np.c +++ b/pthread_timechange_handler_np.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H @@ -51,7 +51,7 @@ * 1) The problem: threads doing a timedwait on a CV may expect to timeout * at a specific absolute time according to a system timer. If the * system clock is adjusted backwards then those threads sleep longer than - * expected. Also, pthreads-win32 converts absolute times to intervals in + * expected. Also, Pthreads4w converts absolute times to intervals in * order to make use of the underlying Win32, and so waiting threads may * awake before their proper abstimes. * diff --git a/pthread_timedjoin_np.c b/pthread_timedjoin_np.c index 6727bc4b..854ba0ab 100644 --- a/pthread_timedjoin_np.c +++ b/pthread_timedjoin_np.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_tryjoin_np.c b/pthread_tryjoin_np.c index ad01915f..d09bb72c 100644 --- a/pthread_tryjoin_np.c +++ b/pthread_tryjoin_np.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/pthread_win32_attach_detach_np.c b/pthread_win32_attach_detach_np.c index 9e3b884f..68a20f44 100644 --- a/pthread_win32_attach_detach_np.c +++ b/pthread_win32_attach_detach_np.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_MCS_lock.c b/ptw32_MCS_lock.c index cb60eb25..9116f353 100644 --- a/ptw32_MCS_lock.c +++ b/ptw32_MCS_lock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ /* diff --git a/ptw32_callUserDestroyRoutines.c b/ptw32_callUserDestroyRoutines.c index 4e986303..e28f6392 100644 --- a/ptw32_callUserDestroyRoutines.c +++ b/ptw32_callUserDestroyRoutines.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_calloc.c b/ptw32_calloc.c index 086a33c2..b5877111 100644 --- a/ptw32_calloc.c +++ b/ptw32_calloc.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_cond_check_need_init.c b/ptw32_cond_check_need_init.c index afc9e936..4cd84a87 100644 --- a/ptw32_cond_check_need_init.c +++ b/ptw32_cond_check_need_init.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_getprocessors.c b/ptw32_getprocessors.c index 788d619d..e0be2514 100644 --- a/ptw32_getprocessors.c +++ b/ptw32_getprocessors.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_is_attr.c b/ptw32_is_attr.c index e7b4865b..e4ebdfc6 100644 --- a/ptw32_is_attr.c +++ b/ptw32_is_attr.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_mutex_check_need_init.c b/ptw32_mutex_check_need_init.c index dea73fe2..f2258f01 100644 --- a/ptw32_mutex_check_need_init.c +++ b/ptw32_mutex_check_need_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_new.c b/ptw32_new.c index 0934f3e3..1708ee8d 100644 --- a/ptw32_new.c +++ b/ptw32_new.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_processInitialize.c b/ptw32_processInitialize.c index 3e3022a7..8697076b 100644 --- a/ptw32_processInitialize.c +++ b/ptw32_processInitialize.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_processTerminate.c b/ptw32_processTerminate.c index d6db0355..bc2ebe83 100644 --- a/ptw32_processTerminate.c +++ b/ptw32_processTerminate.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_relmillisecs.c b/ptw32_relmillisecs.c index dd4d8eaf..5d64094a 100644 --- a/ptw32_relmillisecs.c +++ b/ptw32_relmillisecs.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_reuse.c b/ptw32_reuse.c index b1879fea..f6270bb0 100644 --- a/ptw32_reuse.c +++ b/ptw32_reuse.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_rwlock_cancelwrwait.c b/ptw32_rwlock_cancelwrwait.c index 464181fc..160b84b8 100644 --- a/ptw32_rwlock_cancelwrwait.c +++ b/ptw32_rwlock_cancelwrwait.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_rwlock_check_need_init.c b/ptw32_rwlock_check_need_init.c index 9601e93a..d517847c 100644 --- a/ptw32_rwlock_check_need_init.c +++ b/ptw32_rwlock_check_need_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_semwait.c b/ptw32_semwait.c index ab0c2551..3c2ab535 100644 --- a/ptw32_semwait.c +++ b/ptw32_semwait.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_spinlock_check_need_init.c b/ptw32_spinlock_check_need_init.c index ba6c3424..f58e6b41 100644 --- a/ptw32_spinlock_check_need_init.c +++ b/ptw32_spinlock_check_need_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_threadDestroy.c b/ptw32_threadDestroy.c index fbd638ac..f80fc288 100644 --- a/ptw32_threadDestroy.c +++ b/ptw32_threadDestroy.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_threadStart.c b/ptw32_threadStart.c index 4263e091..b4eff82b 100644 --- a/ptw32_threadStart.c +++ b/ptw32_threadStart.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_throw.c b/ptw32_throw.c index c488b2e5..2dd1949d 100644 --- a/ptw32_throw.c +++ b/ptw32_throw.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_timespec.c b/ptw32_timespec.c index 65766728..ff284093 100644 --- a/ptw32_timespec.c +++ b/ptw32_timespec.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_tkAssocCreate.c b/ptw32_tkAssocCreate.c index 27751d78..67efb3a6 100644 --- a/ptw32_tkAssocCreate.c +++ b/ptw32_tkAssocCreate.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_tkAssocDestroy.c b/ptw32_tkAssocDestroy.c index 95de1952..e1ea0630 100644 --- a/ptw32_tkAssocDestroy.c +++ b/ptw32_tkAssocDestroy.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -19,20 +19,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sched.h b/sched.h index 06100b66..34a93003 100644 --- a/sched.h +++ b/sched.h @@ -9,9 +9,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -21,20 +21,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #if !defined(_SCHED_H) #define _SCHED_H diff --git a/sched_get_priority_max.c b/sched_get_priority_max.c index 2a34bb07..b74f101f 100644 --- a/sched_get_priority_max.c +++ b/sched_get_priority_max.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sched_get_priority_min.c b/sched_get_priority_min.c index 4b67ade3..b9f30684 100644 --- a/sched_get_priority_min.c +++ b/sched_get_priority_min.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sched_getscheduler.c b/sched_getscheduler.c index 954a7902..5fd951aa 100644 --- a/sched_getscheduler.c +++ b/sched_getscheduler.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sched_setaffinity.c b/sched_setaffinity.c index 1bbdf144..de44fd44 100644 --- a/sched_setaffinity.c +++ b/sched_setaffinity.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sched_setscheduler.c b/sched_setscheduler.c index 8d0e32ea..77d82ce6 100644 --- a/sched_setscheduler.c +++ b/sched_setscheduler.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sched_yield.c b/sched_yield.c index b986703f..17947884 100644 --- a/sched_yield.c +++ b/sched_yield.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_close.c b/sem_close.c index ec9a58f3..108d3515 100644 --- a/sem_close.c +++ b/sem_close.c @@ -13,9 +13,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -25,20 +25,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_destroy.c b/sem_destroy.c index 1c38d90f..d7b74e0c 100644 --- a/sem_destroy.c +++ b/sem_destroy.c @@ -13,9 +13,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -25,20 +25,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_getvalue.c b/sem_getvalue.c index 6896f0ad..d578596e 100644 --- a/sem_getvalue.c +++ b/sem_getvalue.c @@ -13,9 +13,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -25,20 +25,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_init.c b/sem_init.c index 07fd3fcc..a4fc0120 100644 --- a/sem_init.c +++ b/sem_init.c @@ -11,9 +11,9 @@ * * ------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -23,20 +23,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_open.c b/sem_open.c index bf5c6488..371f56e0 100644 --- a/sem_open.c +++ b/sem_open.c @@ -13,9 +13,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -25,20 +25,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_post.c b/sem_post.c index b6588a81..52485b23 100644 --- a/sem_post.c +++ b/sem_post.c @@ -13,9 +13,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -25,20 +25,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_post_multiple.c b/sem_post_multiple.c index 365da4f7..cab9c46a 100644 --- a/sem_post_multiple.c +++ b/sem_post_multiple.c @@ -13,9 +13,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -25,20 +25,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_timedwait.c b/sem_timedwait.c index 83dc0f36..d569746a 100644 --- a/sem_timedwait.c +++ b/sem_timedwait.c @@ -13,9 +13,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -25,20 +25,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_trywait.c b/sem_trywait.c index 7d24cb6b..48a3b113 100644 --- a/sem_trywait.c +++ b/sem_trywait.c @@ -13,9 +13,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -25,20 +25,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_unlink.c b/sem_unlink.c index b71a5528..2eb062df 100644 --- a/sem_unlink.c +++ b/sem_unlink.c @@ -13,9 +13,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -25,20 +25,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/sem_wait.c b/sem_wait.c index cf4ea5df..2844b273 100644 --- a/sem_wait.c +++ b/sem_wait.c @@ -13,9 +13,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -25,20 +25,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H diff --git a/semaphore.h b/semaphore.h index 1a2334a9..1288be89 100644 --- a/semaphore.h +++ b/semaphore.h @@ -9,9 +9,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -21,20 +21,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #if !defined( SEMAPHORE_H ) #define SEMAPHORE_H @@ -54,7 +54,7 @@ #define _POSIX_SEMAPHORES /* Internal macros, common to the public interfaces for various - * pthreads-win32 components, are defined in <_ptw32.h>; we must + * Pthreads4w components, are defined in <_ptw32.h>; we must * include them here. */ #include <_ptw32.h> diff --git a/signal.c b/signal.c index 74eb1ff8..6978d0b4 100644 --- a/signal.c +++ b/signal.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ /* diff --git a/tests/Bmakefile b/tests/Bmakefile index f4bdd9cc..e83fef48 100644 --- a/tests/Bmakefile +++ b/tests/Bmakefile @@ -3,9 +3,9 @@ # # -------------------------------------------------------------------------- # -# Pthreads-win32 - POSIX Threads Library for Win32 +# Pthreads4w - POSIX Threads Library for Win32 # Copyright(C) 1998 John E. Bossom -# Copyright(C) 1999,2012 Pthreads-win32 contributors +# Copyright(C) 1999,2012 Pthreads4w contributors # # Contact Email: rpj@callisto.canberra.edu.au # @@ -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 867f2d1b..b750da60 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -682,7 +682,7 @@ * exit code 3. * 2) A term_func() must not throw an exception. Therefore * term_func() should not call pthread_exit() if an - * an exception-using version of pthreads-win32 library + * an exception-using version of Pthreads4w library * is being used (i.e. either pthreadVCE or pthreadVSE). @@ -898,7 +898,7 @@ handle it under Mingw32. Mingw32 now builds the library correctly to pass all tests - see Thomas Pfaff's detailed instructions re needed changes - to Mingw32 in the Pthreads-Win32 FAQ. + to Mingw32 in the Pthreads4w FAQ. 2000-09-08 Ross Johnson diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index 0841d356..de8f45b4 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -3,9 +3,9 @@ # # -------------------------------------------------------------------------- # -# Pthreads-win32 - POSIX Threads Library for Win32 +# Pthreads4w - POSIX Threads Library for Win32 # Copyright(C) 1998 John E. Bossom -# Copyright(C) 1999-2017, Pthreads-win32 contributors +# Copyright(C) 1999-2018, Pthreads4w contributors # # Homepage: https://sourceforge.net/projects/pthreads4w/ # @@ -15,20 +15,20 @@ # following World Wide Web location: # https://sourceforge.net/p/pthreads4w/wiki/Contributors/ # -# This file is part of Pthreads-win32. +# This file is part of Pthreads4w. # -# Pthreads-win32 is free software: you can redistribute it and/or modify +# Pthreads4w is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# Pthreads-win32 is distributed in the hope that it will be useful, +# Pthreads4w is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with Pthreads-win32. If not, see . * +# along with Pthreads4w. If not, see . * # srcdir = @srcdir@ top_srcdir = @top_srcdir@ diff --git a/tests/Makefile b/tests/Makefile index 37ebd160..2bab8bde 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -3,15 +3,15 @@ # # -------------------------------------------------------------------------- # -# Pthreads-win32 - POSIX Threads Library for Win32 +# Pthreads4w - POSIX Threads Library for Win32 # Copyright(C) 1998 John E. Bossom -# Copyright(C) 1999,2012 Pthreads-win32 contributors +# Copyright(C) 1999,2012 Pthreads4w 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 +# 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/README b/tests/README index 65d46cc2..ee7d2cfd 100644 --- a/tests/README +++ b/tests/README @@ -3,7 +3,7 @@ Running test cases in this directory These make scripts expect to be able to copy the dll, library and header files from this directory's parent directory, -which should be the pthreads-win32 source directory. +which should be the Pthreads4w source directory. MS VC nmake ------------- diff --git a/tests/Wmakefile b/tests/Wmakefile index 284f326c..905f6100 100644 --- a/tests/Wmakefile +++ b/tests/Wmakefile @@ -3,9 +3,9 @@ # # -------------------------------------------------------------------------- # -# Pthreads-win32 - POSIX Threads Library for Win32 +# Pthreads4w - POSIX Threads Library for Win32 # Copyright(C) 1998 John E. Bossom -# Copyright(C) 1999,2012 Pthreads-win32 contributors +# Copyright(C) 1999,2012 Pthreads4w contributors # # Contact Email: rpj@callisto.canberra.edu.au # @@ -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 f74f3b00..d31f1b8b 100644 --- a/tests/affinity1.c +++ b/tests/affinity1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/affinity2.c b/tests/affinity2.c index b4f455f6..eb9c79cc 100644 --- a/tests/affinity2.c +++ b/tests/affinity2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/affinity3.c b/tests/affinity3.c index 809aaecc..caae4a26 100644 --- a/tests/affinity3.c +++ b/tests/affinity3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/affinity4.c b/tests/affinity4.c index a65c5a8a..29f95e4f 100644 --- a/tests/affinity4.c +++ b/tests/affinity4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/affinity5.c b/tests/affinity5.c index ec651692..f6780e44 100644 --- a/tests/affinity5.c +++ b/tests/affinity5.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/affinity6.c b/tests/affinity6.c index a69f88da..8260523c 100644 --- a/tests/affinity6.c +++ b/tests/affinity6.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/barrier1.c b/tests/barrier1.c index 98eb3b0f..89fdb455 100644 --- a/tests/barrier1.c +++ b/tests/barrier1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/barrier2.c b/tests/barrier2.c index ea883df2..45fc9a85 100644 --- a/tests/barrier2.c +++ b/tests/barrier2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/barrier3.c b/tests/barrier3.c index 65ebdbef..339358b5 100644 --- a/tests/barrier3.c +++ b/tests/barrier3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/barrier4.c b/tests/barrier4.c index 20e4a519..61badf43 100644 --- a/tests/barrier4.c +++ b/tests/barrier4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/barrier5.c b/tests/barrier5.c index 86731868..0ca1d0a4 100644 --- a/tests/barrier5.c +++ b/tests/barrier5.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/barrier6.c b/tests/barrier6.c index e912ceca..5fe1f21e 100755 --- a/tests/barrier6.c +++ b/tests/barrier6.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/benchlib.c b/tests/benchlib.c index 252da1dc..589e83eb 100644 --- a/tests/benchlib.c +++ b/tests/benchlib.c @@ -3,9 +3,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -15,20 +15,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * */ diff --git a/tests/benchtest.h b/tests/benchtest.h index b3fc6a08..33280aa8 100644 --- a/tests/benchtest.h +++ b/tests/benchtest.h @@ -3,9 +3,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -15,20 +15,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * */ diff --git a/tests/benchtest1.c b/tests/benchtest1.c index 0a714879..03e1164d 100644 --- a/tests/benchtest1.c +++ b/tests/benchtest1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/benchtest2.c b/tests/benchtest2.c index 168fc813..cf69c8bc 100644 --- a/tests/benchtest2.c +++ b/tests/benchtest2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/benchtest3.c b/tests/benchtest3.c index ed19e5c7..83fd4d6f 100644 --- a/tests/benchtest3.c +++ b/tests/benchtest3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/benchtest4.c b/tests/benchtest4.c index 5ed98385..70ba7ef8 100644 --- a/tests/benchtest4.c +++ b/tests/benchtest4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/benchtest5.c b/tests/benchtest5.c index 2eaab7bd..6de1cc73 100644 --- a/tests/benchtest5.c +++ b/tests/benchtest5.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cancel1.c b/tests/cancel1.c index 2dfe58b6..295c6d63 100644 --- a/tests/cancel1.c +++ b/tests/cancel1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cancel2.c b/tests/cancel2.c index 85400366..6d3ad1c7 100644 --- a/tests/cancel2.c +++ b/tests/cancel2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cancel3.c b/tests/cancel3.c index f94d59f2..4a1599fb 100644 --- a/tests/cancel3.c +++ b/tests/cancel3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cancel4.c b/tests/cancel4.c index f5400f63..e6addd45 100644 --- a/tests/cancel4.c +++ b/tests/cancel4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cancel5.c b/tests/cancel5.c index a5a360da..086c2b1b 100644 --- a/tests/cancel5.c +++ b/tests/cancel5.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cancel6a.c b/tests/cancel6a.c index 59fa6dc3..17267bfc 100644 --- a/tests/cancel6a.c +++ b/tests/cancel6a.c @@ -2,9 +2,9 @@ * File: cancel6a.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -14,20 +14,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cancel6d.c b/tests/cancel6d.c index b1dfc077..c0d1a526 100644 --- a/tests/cancel6d.c +++ b/tests/cancel6d.c @@ -2,9 +2,9 @@ * File: cancel6d.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -14,20 +14,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cancel7.c b/tests/cancel7.c index 5178d0b8..8236f6ef 100644 --- a/tests/cancel7.c +++ b/tests/cancel7.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cancel8.c b/tests/cancel8.c index 668ca02d..e7f3e783 100644 --- a/tests/cancel8.c +++ b/tests/cancel8.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cancel9.c b/tests/cancel9.c index dde26899..5c0c35d9 100644 --- a/tests/cancel9.c +++ b/tests/cancel9.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cleanup0.c b/tests/cleanup0.c index 4635658b..6be8b804 100644 --- a/tests/cleanup0.c +++ b/tests/cleanup0.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cleanup1.c b/tests/cleanup1.c index c6ca10ea..6bb866a7 100644 --- a/tests/cleanup1.c +++ b/tests/cleanup1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cleanup2.c b/tests/cleanup2.c index 19a21162..153d4106 100644 --- a/tests/cleanup2.c +++ b/tests/cleanup2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/cleanup3.c b/tests/cleanup3.c index dbd3351e..2c57904e 100644 --- a/tests/cleanup3.c +++ b/tests/cleanup3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar1.c b/tests/condvar1.c index 9cffb8bb..b07bbf10 100644 --- a/tests/condvar1.c +++ b/tests/condvar1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar1_1.c b/tests/condvar1_1.c index 49604494..63fb3fdb 100644 --- a/tests/condvar1_1.c +++ b/tests/condvar1_1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar1_2.c b/tests/condvar1_2.c index 916bd188..40894bdf 100644 --- a/tests/condvar1_2.c +++ b/tests/condvar1_2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar2.c b/tests/condvar2.c index 2ea45985..7d591c23 100644 --- a/tests/condvar2.c +++ b/tests/condvar2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar2_1.c b/tests/condvar2_1.c index 81b7e6d9..6130835f 100644 --- a/tests/condvar2_1.c +++ b/tests/condvar2_1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar3.c b/tests/condvar3.c index 0a28848a..92c98384 100644 --- a/tests/condvar3.c +++ b/tests/condvar3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar3_1.c b/tests/condvar3_1.c index 3d10a39d..f40ac42b 100644 --- a/tests/condvar3_1.c +++ b/tests/condvar3_1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar3_2.c b/tests/condvar3_2.c index ad895f05..359ff74c 100644 --- a/tests/condvar3_2.c +++ b/tests/condvar3_2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar3_3.c b/tests/condvar3_3.c index af4167eb..991ba90b 100644 --- a/tests/condvar3_3.c +++ b/tests/condvar3_3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar4.c b/tests/condvar4.c index a49a6348..9e073979 100644 --- a/tests/condvar4.c +++ b/tests/condvar4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar5.c b/tests/condvar5.c index daeb2ddf..fe5c62d9 100644 --- a/tests/condvar5.c +++ b/tests/condvar5.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar6.c b/tests/condvar6.c index efaa21f5..012c59bb 100644 --- a/tests/condvar6.c +++ b/tests/condvar6.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar7.c b/tests/condvar7.c index 5617b32e..08812617 100644 --- a/tests/condvar7.c +++ b/tests/condvar7.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar8.c b/tests/condvar8.c index 03202efa..280641bc 100644 --- a/tests/condvar8.c +++ b/tests/condvar8.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/condvar9.c b/tests/condvar9.c index ec8b67a8..c25a5c98 100644 --- a/tests/condvar9.c +++ b/tests/condvar9.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/context1.c b/tests/context1.c index b9eb805c..46ee3ce3 100644 --- a/tests/context1.c +++ b/tests/context1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/context2.c b/tests/context2.c index 0de6f3f7..99147051 100644 --- a/tests/context2.c +++ b/tests/context2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/count1.c b/tests/count1.c index 3a2fbcbc..bf40e7e2 100644 --- a/tests/count1.c +++ b/tests/count1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/create1.c b/tests/create1.c index f3a99471..62bd5afa 100644 --- a/tests/create1.c +++ b/tests/create1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/create2.c b/tests/create2.c index 7ff484e0..50a7d29b 100644 --- a/tests/create2.c +++ b/tests/create2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/create3.c b/tests/create3.c index e6a32529..cb8c9ea4 100644 --- a/tests/create3.c +++ b/tests/create3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/delay1.c b/tests/delay1.c index d4738de0..afe1affd 100644 --- a/tests/delay1.c +++ b/tests/delay1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/delay2.c b/tests/delay2.c index 141c9a60..c39c225e 100644 --- a/tests/delay2.c +++ b/tests/delay2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/detach1.c b/tests/detach1.c index 4aa318d5..2d7fc66c 100644 --- a/tests/detach1.c +++ b/tests/detach1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * @@ -81,7 +81,7 @@ main(int argc, char * argv[]) /* * Check that all threads are now invalid. * This relies on unique thread IDs - e.g. works with - * pthreads-w32 or Solaris, but may not work for Linux, BSD etc. + * Pthreads4w or Solaris, but may not work for Linux, BSD etc. */ for (i = 0; i < NUMTHREADS; i++) { diff --git a/tests/equal1.c b/tests/equal1.c index 18796cb4..5b684cc4 100644 --- a/tests/equal1.c +++ b/tests/equal1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/errno1.c b/tests/errno1.c index 2faaac6a..ccb9ec7c 100644 --- a/tests/errno1.c +++ b/tests/errno1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/exception1.c b/tests/exception1.c index 05639d82..cd78f996 100644 --- a/tests/exception1.c +++ b/tests/exception1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/exception2.c b/tests/exception2.c index 13ae0a10..ea7d1c90 100644 --- a/tests/exception2.c +++ b/tests/exception2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/exception3.c b/tests/exception3.c index dbcd7d9b..a521803b 100644 --- a/tests/exception3.c +++ b/tests/exception3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * @@ -125,7 +125,7 @@ terminateFunction () * 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 + * exception-using version of Pthreads4w library * is being used (i.e. either pthreadVCE or pthreadVSE). */ /* diff --git a/tests/exception3_0.c b/tests/exception3_0.c index bb6fa102..f8744200 100644 --- a/tests/exception3_0.c +++ b/tests/exception3_0.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * @@ -125,7 +125,7 @@ terminateFunction () * 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 + * exception-using version of Pthreads4w library * is being used (i.e. either pthreadVCE or pthreadVSE). */ exit(0); diff --git a/tests/exit1.c b/tests/exit1.c index 7e5350e1..e8a678f0 100644 --- a/tests/exit1.c +++ b/tests/exit1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/exit2.c b/tests/exit2.c index c3ab08b8..edc43c53 100644 --- a/tests/exit2.c +++ b/tests/exit2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/exit3.c b/tests/exit3.c index db6b4f5b..55a764f8 100644 --- a/tests/exit3.c +++ b/tests/exit3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/exit4.c b/tests/exit4.c index 8f3eee27..7e6e9c92 100644 --- a/tests/exit4.c +++ b/tests/exit4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/exit5.c b/tests/exit5.c index 648bb7ab..0e446614 100644 --- a/tests/exit5.c +++ b/tests/exit5.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/eyal1.c b/tests/eyal1.c index 411e6231..468f24df 100644 --- a/tests/eyal1.c +++ b/tests/eyal1.c @@ -3,9 +3,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -15,20 +15,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/inherit1.c b/tests/inherit1.c index 515f7ab5..d9fd772a 100644 --- a/tests/inherit1.c +++ b/tests/inherit1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/join0.c b/tests/join0.c index 5a432828..6d718b50 100644 --- a/tests/join0.c +++ b/tests/join0.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/join1.c b/tests/join1.c index 53993341..335c1201 100644 --- a/tests/join1.c +++ b/tests/join1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/join2.c b/tests/join2.c index 340970cf..fbdad9d0 100644 --- a/tests/join2.c +++ b/tests/join2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/join3.c b/tests/join3.c index 64ddb4d7..5032b0ee 100644 --- a/tests/join3.c +++ b/tests/join3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/join4.c b/tests/join4.c index aa80c887..26f0703d 100644 --- a/tests/join4.c +++ b/tests/join4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/kill1.c b/tests/kill1.c index 217488cb..b5beb5e2 100644 --- a/tests/kill1.c +++ b/tests/kill1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex1.c b/tests/mutex1.c index e3b64cc1..1186f9fa 100644 --- a/tests/mutex1.c +++ b/tests/mutex1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex1e.c b/tests/mutex1e.c index b49454b7..5a335e20 100644 --- a/tests/mutex1e.c +++ b/tests/mutex1e.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex1n.c b/tests/mutex1n.c index a8b666f2..8371fc17 100644 --- a/tests/mutex1n.c +++ b/tests/mutex1n.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex1r.c b/tests/mutex1r.c index a800ed40..189f93ff 100644 --- a/tests/mutex1r.c +++ b/tests/mutex1r.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex2.c b/tests/mutex2.c index 42bb66d5..e0eed543 100644 --- a/tests/mutex2.c +++ b/tests/mutex2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex2e.c b/tests/mutex2e.c index 8d3ac9de..3c2fe848 100644 --- a/tests/mutex2e.c +++ b/tests/mutex2e.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex2r.c b/tests/mutex2r.c index da3852bb..eb4b42e6 100644 --- a/tests/mutex2r.c +++ b/tests/mutex2r.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex3.c b/tests/mutex3.c index 3f327419..581cc2bb 100644 --- a/tests/mutex3.c +++ b/tests/mutex3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex3e.c b/tests/mutex3e.c index ed0b1cd8..9755a81d 100644 --- a/tests/mutex3e.c +++ b/tests/mutex3e.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex3r.c b/tests/mutex3r.c index 18fae5a6..8b773275 100644 --- a/tests/mutex3r.c +++ b/tests/mutex3r.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex4.c b/tests/mutex4.c index dadf50f5..a8a5f768 100644 --- a/tests/mutex4.c +++ b/tests/mutex4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex5.c b/tests/mutex5.c index 06522d38..e5ff205b 100644 --- a/tests/mutex5.c +++ b/tests/mutex5.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6.c b/tests/mutex6.c index 59ed0ea8..5ecf7a09 100644 --- a/tests/mutex6.c +++ b/tests/mutex6.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6e.c b/tests/mutex6e.c index 6d54ff9a..ab954d19 100644 --- a/tests/mutex6e.c +++ b/tests/mutex6e.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6es.c b/tests/mutex6es.c index 3a29826e..162ce6ef 100644 --- a/tests/mutex6es.c +++ b/tests/mutex6es.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6n.c b/tests/mutex6n.c index e066ebe3..3ec7116e 100644 --- a/tests/mutex6n.c +++ b/tests/mutex6n.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6r.c b/tests/mutex6r.c index a149ed6f..90216775 100644 --- a/tests/mutex6r.c +++ b/tests/mutex6r.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6rs.c b/tests/mutex6rs.c index 0662e3f0..8b81bed9 100644 --- a/tests/mutex6rs.c +++ b/tests/mutex6rs.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6s.c b/tests/mutex6s.c index bebd22f7..7be1c618 100644 --- a/tests/mutex6s.c +++ b/tests/mutex6s.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex7.c b/tests/mutex7.c index 5ea4126f..7f4f4d12 100644 --- a/tests/mutex7.c +++ b/tests/mutex7.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex7e.c b/tests/mutex7e.c index d2015331..a9a264c2 100644 --- a/tests/mutex7e.c +++ b/tests/mutex7e.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex7n.c b/tests/mutex7n.c index 302c26d0..6d62ba9e 100644 --- a/tests/mutex7n.c +++ b/tests/mutex7n.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex7r.c b/tests/mutex7r.c index f07c12c8..9eecabd0 100644 --- a/tests/mutex7r.c +++ b/tests/mutex7r.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex8.c b/tests/mutex8.c index 576d8089..e0be3691 100644 --- a/tests/mutex8.c +++ b/tests/mutex8.c @@ -2,9 +2,9 @@ * mutex8.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -14,20 +14,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex8e.c b/tests/mutex8e.c index c35a1748..a6e1f353 100644 --- a/tests/mutex8e.c +++ b/tests/mutex8e.c @@ -2,9 +2,9 @@ * mutex8e.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -14,20 +14,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex8n.c b/tests/mutex8n.c index d8d982fb..1f5a7c14 100644 --- a/tests/mutex8n.c +++ b/tests/mutex8n.c @@ -2,9 +2,9 @@ * mutex8n.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -14,20 +14,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/mutex8r.c b/tests/mutex8r.c index d688872f..55358ced 100644 --- a/tests/mutex8r.c +++ b/tests/mutex8r.c @@ -2,9 +2,9 @@ * mutex8r.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -14,20 +14,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/name_np1.c b/tests/name_np1.c index 93186741..d9741cd1 100644 --- a/tests/name_np1.c +++ b/tests/name_np1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/name_np2.c b/tests/name_np2.c index f5a8bc29..0fb4ade1 100644 --- a/tests/name_np2.c +++ b/tests/name_np2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/once1.c b/tests/once1.c index 214e0936..682e48d6 100644 --- a/tests/once1.c +++ b/tests/once1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/once2.c b/tests/once2.c index 72cc0f97..179a0771 100644 --- a/tests/once2.c +++ b/tests/once2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/once3.c b/tests/once3.c index 7ce6de52..fea75a19 100644 --- a/tests/once3.c +++ b/tests/once3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/once4.c b/tests/once4.c index 7006c126..0c71f037 100644 --- a/tests/once4.c +++ b/tests/once4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/priority1.c b/tests/priority1.c index 9de3d1b4..bd850113 100644 --- a/tests/priority1.c +++ b/tests/priority1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/priority2.c b/tests/priority2.c index fdc16a8e..a3be5632 100644 --- a/tests/priority2.c +++ b/tests/priority2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/reuse1.c b/tests/reuse1.c index 4394cca9..fdc90cd8 100644 --- a/tests/reuse1.c +++ b/tests/reuse1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/reuse2.c b/tests/reuse2.c index c27312e9..f58721c9 100644 --- a/tests/reuse2.c +++ b/tests/reuse2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/robust1.c b/tests/robust1.c index 127deb29..e680d38f 100755 --- a/tests/robust1.c +++ b/tests/robust1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/robust2.c b/tests/robust2.c index 083547d2..2bc59b4a 100755 --- a/tests/robust2.c +++ b/tests/robust2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/robust3.c b/tests/robust3.c index 1d80e2d7..053d3978 100755 --- a/tests/robust3.c +++ b/tests/robust3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/robust4.c b/tests/robust4.c index e27fcf07..80a165d7 100755 --- a/tests/robust4.c +++ b/tests/robust4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/robust5.c b/tests/robust5.c index 531fb034..2f084bed 100755 --- a/tests/robust5.c +++ b/tests/robust5.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock1.c b/tests/rwlock1.c index cca45c8d..d8c952f5 100644 --- a/tests/rwlock1.c +++ b/tests/rwlock1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock2.c b/tests/rwlock2.c index b6d9b07a..cb6a8a11 100644 --- a/tests/rwlock2.c +++ b/tests/rwlock2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock2_t.c b/tests/rwlock2_t.c index d7a4342c..3820bf03 100644 --- a/tests/rwlock2_t.c +++ b/tests/rwlock2_t.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock3.c b/tests/rwlock3.c index c8451c50..136041c0 100644 --- a/tests/rwlock3.c +++ b/tests/rwlock3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock3_t.c b/tests/rwlock3_t.c index 1fe0d0f2..b0e37b28 100644 --- a/tests/rwlock3_t.c +++ b/tests/rwlock3_t.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock4.c b/tests/rwlock4.c index a5a62d54..f3977d32 100644 --- a/tests/rwlock4.c +++ b/tests/rwlock4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock4_t.c b/tests/rwlock4_t.c index 5e13903b..7de251ff 100644 --- a/tests/rwlock4_t.c +++ b/tests/rwlock4_t.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock5.c b/tests/rwlock5.c index b9329feb..5f9f3713 100644 --- a/tests/rwlock5.c +++ b/tests/rwlock5.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock5_t.c b/tests/rwlock5_t.c index ecb099cc..95d416d9 100644 --- a/tests/rwlock5_t.c +++ b/tests/rwlock5_t.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock6.c b/tests/rwlock6.c index 22b50557..9689f04b 100644 --- a/tests/rwlock6.c +++ b/tests/rwlock6.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock6_t.c b/tests/rwlock6_t.c index 3c7ff959..c130ff6e 100644 --- a/tests/rwlock6_t.c +++ b/tests/rwlock6_t.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock6_t2.c b/tests/rwlock6_t2.c index 9d4095ad..7895d354 100644 --- a/tests/rwlock6_t2.c +++ b/tests/rwlock6_t2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/self1.c b/tests/self1.c index b91843d1..820b0781 100644 --- a/tests/self1.c +++ b/tests/self1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/self2.c b/tests/self2.c index 01b593db..7a6c99dc 100644 --- a/tests/self2.c +++ b/tests/self2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore1.c b/tests/semaphore1.c index 9622a86b..2dd49139 100644 --- a/tests/semaphore1.c +++ b/tests/semaphore1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore2.c b/tests/semaphore2.c index 33dbcebc..d75f97d6 100644 --- a/tests/semaphore2.c +++ b/tests/semaphore2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore3.c b/tests/semaphore3.c index edce9f43..5361e784 100644 --- a/tests/semaphore3.c +++ b/tests/semaphore3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore4.c b/tests/semaphore4.c index 6fcee5cc..def58bb1 100644 --- a/tests/semaphore4.c +++ b/tests/semaphore4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore4t.c b/tests/semaphore4t.c index 0cca292d..31c7946d 100644 --- a/tests/semaphore4t.c +++ b/tests/semaphore4t.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore5.c b/tests/semaphore5.c index a8bf4353..eb8171c0 100644 --- a/tests/semaphore5.c +++ b/tests/semaphore5.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/sequence1.c b/tests/sequence1.c index b68efc2c..761cbe49 100755 --- a/tests/sequence1.c +++ b/tests/sequence1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/sizes.c b/tests/sizes.c index 30ab601a..5c9004e3 100644 --- a/tests/sizes.c +++ b/tests/sizes.c @@ -8,7 +8,7 @@ int main() { - printf("Sizes of pthreads-win32 structs\n"); + printf("Sizes of Pthreads4w structs\n"); printf("-------------------------------\n"); printf("%30s %4d\n", "pthread_t", (int)sizeof(pthread_t)); printf("%30s %4d\n", "ptw32_thread_t", (int)sizeof(ptw32_thread_t)); diff --git a/tests/spin1.c b/tests/spin1.c index 542c5a02..ca02e96e 100644 --- a/tests/spin1.c +++ b/tests/spin1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/spin2.c b/tests/spin2.c index 53c8ac49..27bd77d6 100644 --- a/tests/spin2.c +++ b/tests/spin2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/spin3.c b/tests/spin3.c index 6e674d78..246ca3b0 100644 --- a/tests/spin3.c +++ b/tests/spin3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/spin4.c b/tests/spin4.c index fc95eb29..2117f8e5 100644 --- a/tests/spin4.c +++ b/tests/spin4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/stress1.c b/tests/stress1.c index 79ebc272..e600b08e 100644 --- a/tests/stress1.c +++ b/tests/stress1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/test.h b/tests/test.h index 6da1f148..42b8eae6 100644 --- a/tests/test.h +++ b/tests/test.h @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * */ diff --git a/tests/timeouts.c b/tests/timeouts.c index 7b198734..a75c1353 100644 --- a/tests/timeouts.c +++ b/tests/timeouts.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/tryentercs.c b/tests/tryentercs.c index b95eafd3..f8695cd9 100644 --- a/tests/tryentercs.c +++ b/tests/tryentercs.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/tryentercs2.c b/tests/tryentercs2.c index 0fdb42ac..8be78fa0 100644 --- a/tests/tryentercs2.c +++ b/tests/tryentercs2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/tsd1.c b/tests/tsd1.c index 34e28ad6..3f1fb4fd 100644 --- a/tests/tsd1.c +++ b/tests/tsd1.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * * -------------------------------------------------------------------------- diff --git a/tests/tsd2.c b/tests/tsd2.c index fd97edb6..c6bdaf64 100644 --- a/tests/tsd2.c +++ b/tests/tsd2.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * * -------------------------------------------------------------------------- diff --git a/tests/tsd3.c b/tests/tsd3.c index 600a3581..93cb3c4f 100644 --- a/tests/tsd3.c +++ b/tests/tsd3.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * * -------------------------------------------------------------------------- diff --git a/tests/valid1.c b/tests/valid1.c index df913f4e..1e89e2b2 100644 --- a/tests/valid1.c +++ b/tests/valid1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/tests/valid2.c b/tests/valid2.c index f88b9bd8..8b46c9e1 100644 --- a/tests/valid2.c +++ b/tests/valid2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -16,20 +16,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * * * -------------------------------------------------------------------------- * diff --git a/version.rc b/version.rc index 285c84d7..0b5be26a 100644 --- a/version.rc +++ b/version.rc @@ -2,9 +2,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -14,20 +14,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #include @@ -136,7 +136,7 @@ BEGIN 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 "Comments", "http://sourceware.org/Pthreads4w/\0" END END BLOCK "VarFileInfo" diff --git a/w32_CancelableWait.c b/w32_CancelableWait.c index 4649219e..5f7027f4 100644 --- a/w32_CancelableWait.c +++ b/w32_CancelableWait.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * Pthreads4w - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2017, Pthreads-win32 contributors + * Copyright(C) 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * @@ -18,20 +18,20 @@ * following World Wide Web location: * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This file is part of Pthreads-win32. + * This file is part of Pthreads4w. * - * Pthreads-win32 is free software: you can redistribute it and/or modify + * Pthreads4w is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Pthreads-win32 is distributed in the hope that it will be useful, + * Pthreads4w is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Pthreads-win32. If not, see . * + * along with Pthreads4w. If not, see . * */ #ifdef HAVE_CONFIG_H From 17cc6b13c0108bcd9d5375dc0139cc51ee9ab134 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 6 Aug 2018 21:27:17 +1000 Subject: [PATCH 150/207] Use BUILD_DIR --- tests/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 2bab8bde..a35fd1f8 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -82,8 +82,8 @@ INCLUDES = -I. BUILD_DIR = .. EHFLAGS = -EHFLAGS_STATIC = /MT /DPTW32_STATIC_LIB -I.. /DHAVE_CONFIG_H /DPTW32_BUILD_INLINED ..\pthread.c -EHFLAGS_STATIC_DEBUG = /MTd /DPTW32_STATIC_LIB -I.. /DHAVE_CONFIG_H /DPTW32_BUILD_INLINED ..\pthread.c +EHFLAGS_STATIC = /MT /DPTW32_STATIC_LIB -I$(BUILD_DIR) /DHAVE_CONFIG_H /DPTW32_BUILD_INLINED $(BUILD_DIR)\pthread.c +EHFLAGS_STATIC_DEBUG = /MTd /DPTW32_STATIC_LIB -I$(BUILD_DIR) /DHAVE_CONFIG_H /DPTW32_BUILD_INLINED $(BUILD_DIR)\pthread.c # If a test case returns a non-zero exit code to the shell, make will # stop. From 2f69e06b84f6c3963b6a1cd972a0455b3d782cb5 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 6 Aug 2018 23:10:50 +1000 Subject: [PATCH 151/207] DLL_VER becomes PTW32_VER; ChangeLog updates --- Bmakefile | 4 +-- ChangeLog | 17 ++++++++--- GNUmakefile.in | 69 ++++++++++++++++++++++---------------------- tests/Bmakefile | 10 +++---- tests/ChangeLog | 17 ++++++++--- tests/GNUmakefile.in | 36 +++++++++++------------ tests/Wmakefile | 10 +++---- 7 files changed, 90 insertions(+), 73 deletions(-) diff --git a/Bmakefile b/Bmakefile index c6bcf93d..4e1a4d45 100644 --- a/Bmakefile +++ b/Bmakefile @@ -7,14 +7,14 @@ # -DLL_VER = 2 +PTW32_VER = 2 DEVROOT = . DLLDEST = $(DEVROOT)\DLL LIBDEST = $(DEVROOT)\DLL -DLLS = pthreadBC$(DLL_VER).dll +DLLS = pthreadBC$(PTW32_VER).dll OPTIM = /O2 diff --git a/ChangeLog b/ChangeLog index 29d77fbe..b9867e5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2018-07-22 Mark Pizzolato + + * _ptw32.h: Restore support for compiling as static (with /MT or /MTd); + define int64_t and uint64_t as typedefs rather than #defines. + * dll.c: Likewise. + * implement.h: Likewise. + * need_errno.h: Likewise. + * pthread_detach.c: Likewise. + 2018-07-22 Ross Johnson * Makefile (all-tests-md): New; run the /MD build and tests from @@ -1225,10 +1234,10 @@ * pthread_cond_wait.c (ptw32_cond_wait_cleanup): Undo change from 2004-11-02. - * Makefile (DLL_VER): Added for DLL naming suffix - see README. - * GNUmakefile (DLL_VER): Likewise. - * Wmakefile (DLL_VER): Likewise. - * Bmakefile (DLL_VER): Likewise. + * Makefile (PTW32_VER): Added for DLL naming suffix - see README. + * GNUmakefile (PTW32_VER): Likewise. + * Wmakefile (PTW32_VER): Likewise. + * Bmakefile (PTW32_VER): Likewise. * pthread.dsw (version.rc): Added to MSVS workspace. 2004-11-20 Boudewijn Dekker diff --git a/GNUmakefile.in b/GNUmakefile.in index 83ebeea7..050fa665 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -31,10 +31,10 @@ PACKAGE = @PACKAGE_TARNAME@ VERSION = @PACKAGE_VERSION@ -DLL_VER = 2$(EXTRAVERSION) +PTW32_VER = 2$(EXTRAVERSION) # See pthread.h and README for the description of version numbering. -DLL_VERD = $(DLL_VER)d +PTW32_VERD = $(PTW32_VER)d srcdir = @srcdir@ builddir = @builddir@ @@ -129,7 +129,7 @@ LFLAGS = $(ARCH) # relies on C++ class destructors being called when leaving scope. # # NOTE 2: If you do this DO NOT distribute your pthreads DLLs with -# the official filenaming, i.e. pthreadVC2.dll, etc. Instead, change DLL_VER +# the official filenaming, i.e. pthreadVC2.dll, etc. Instead, change PTW32_VER # above to "2slgcc" for example, to build "pthreadGC2slgcc.dll", etc. # # FIXME: in this case, convention would have us use LDFLAGS; once again, if @@ -180,23 +180,23 @@ include ${srcdir}/common.mk DLL_OBJS += $(RESOURCE_OBJS) STATIC_OBJS += $(RESOURCE_OBJS) -GCE_DLL = pthreadGCE$(DLL_VER).dll -GCED_DLL= pthreadGCE$(DLL_VERD).dll -GCE_LIB = libpthreadGCE$(DLL_VER).a -GCED_LIB= libpthreadGCE$(DLL_VERD).a - -GC_DLL = pthreadGC$(DLL_VER).dll -GCD_DLL = pthreadGC$(DLL_VERD).dll -GC_LIB = libpthreadGC$(DLL_VER).a -GCD_LIB = libpthreadGC$(DLL_VERD).a -GC_INLINED_STATIC_STAMP = libpthreadGC$(DLL_VER).inlined_static_stamp -GCD_INLINED_STATIC_STAMP = libpthreadGC$(DLL_VERD).inlined_static_stamp -GCE_INLINED_STATIC_STAMP = libpthreadGCE$(DLL_VER).inlined_static_stamp -GCED_INLINED_STATIC_STAMP = libpthreadGCE$(DLL_VERD).inlined_static_stamp -GC_SMALL_STATIC_STAMP = libpthreadGC$(DLL_VER).small_static_stamp -GCD_SMALL_STATIC_STAMP = libpthreadGC$(DLL_VERD).small_static_stamp -GCE_SMALL_STATIC_STAMP = libpthreadGCE$(DLL_VER).small_static_stamp -GCED_SMALL_STATIC_STAMP = libpthreadGCE$(DLL_VERD).small_static_stamp +GCE_DLL = pthreadGCE$(PTW32_VER).dll +GCED_DLL= pthreadGCE$(PTW32_VERD).dll +GCE_LIB = libpthreadGCE$(PTW32_VER).a +GCED_LIB= libpthreadGCE$(PTW32_VERD).a + +GC_DLL = pthreadGC$(PTW32_VER).dll +GCD_DLL = pthreadGC$(PTW32_VERD).dll +GC_LIB = libpthreadGC$(PTW32_VER).a +GCD_LIB = libpthreadGC$(PTW32_VERD).a +GC_INLINED_STATIC_STAMP = libpthreadGC$(PTW32_VER).inlined_static_stamp +GCD_INLINED_STATIC_STAMP = libpthreadGC$(PTW32_VERD).inlined_static_stamp +GCE_INLINED_STATIC_STAMP = libpthreadGCE$(PTW32_VER).inlined_static_stamp +GCED_INLINED_STATIC_STAMP = libpthreadGCE$(PTW32_VERD).inlined_static_stamp +GC_SMALL_STATIC_STAMP = libpthreadGC$(PTW32_VER).small_static_stamp +GCD_SMALL_STATIC_STAMP = libpthreadGC$(PTW32_VERD).small_static_stamp +GCE_SMALL_STATIC_STAMP = libpthreadGCE$(PTW32_VER).small_static_stamp +GCED_SMALL_STATIC_STAMP = libpthreadGCE$(PTW32_VERD).small_static_stamp PTHREAD_DEF = pthread.def @@ -223,14 +223,9 @@ all: @ $(MAKE) clean GC-static @ $(MAKE) clean GCE-static -TEST_ENV = __PTW32_FLAGS="$(PTW32_FLAGS) -DNO_ERROR_DIALOGS" DLL_VER=$(DLL_VER) ARCH="$(ARCH)" +TEST_ENV = __PTW32_FLAGS="$(PTW32_FLAGS) -DNO_ERROR_DIALOGS" PTW32_VER=$(PTW32_VER) ARCH="$(ARCH)" all-tests: - $(MAKE) realclean GC-small-static - cd tests && $(MAKE) clean GC-small-static $(TEST_ENV) && $(MAKE) clean GCX-small-static $(TEST_ENV) - $(MAKE) realclean GCE-small-static - cd tests && $(MAKE) clean GCE-small-static $(TEST_ENV) - @ $(ECHO) "$@ completed successfully." $(MAKE) realclean GC cd tests && $(MAKE) clean GC $(TEST_ENV) && $(MAKE) clean GCX $(TEST_ENV) $(MAKE) realclean GCE @@ -239,6 +234,10 @@ all-tests: cd tests && $(MAKE) clean GC-static $(TEST_ENV) && $(MAKE) clean GCX-static $(TEST_ENV) $(MAKE) realclean GCE-static cd tests && $(MAKE) clean GCE-static $(TEST_ENV) + $(MAKE) realclean GC-small-static + cd tests && $(MAKE) clean GC-small-static $(TEST_ENV) && $(MAKE) clean GCX-small-static $(TEST_ENV) + $(MAKE) realclean GCE-small-static + cd tests && $(MAKE) clean GCE-small-static $(TEST_ENV) $(MAKE) realclean @ - $(GREP) Passed *.log | $(COUNT_UNIQ) @ - $(GREP) FAILED *.log @@ -251,37 +250,37 @@ GC: $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL) GC-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_DLL) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_DLL) GCE: $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL) GCE-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_CXX -g -O0" $(GCED_DLL) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__CLEANUP_CXX -g -O0" $(GCED_DLL) GC-static: $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_INLINED_STATIC_STAMP) GC-static-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) GC-small-static: $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GC_SMALL_STATIC_STAMP) GC-small-static-debug: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) GCE-static: $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_INLINED_STATIC_STAMP) GCE-static-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) GCE-small-static: $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_SMALL_STATIC_STAMP) GCE-small-static-debug: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) tests: @ cd tests @@ -309,11 +308,11 @@ install-libs: install-libs-specific install-libs-specific: $(wildcard ${builddir}/libpthreadGC*.a) $(INSTALL_DATA) $^ ${libdir} -default_libs = $(wildcard $(addprefix $1,$(DLL_VER)$2 $(DLL_VERD)$2)) +default_libs = $(wildcard $(addprefix $1,$(PTW32_VER)$2 $(PTW32_VERD)$2)) # FIXME: this is a ghastly, utterly non-deterministic hack; who knows # what it's going to install as the default libpthread.a? Better to -# just explicitly make it a copy of libpthreadGC$(DLL_VER).a +# just explicitly make it a copy of libpthreadGC$(PTW32_VER).a install-libs: install-lib-default install-lib-default: $(call default_libs,libpthreadGC,.a) install-lib-default: $(call default_libs,libpthreadGCE,.a) @@ -321,7 +320,7 @@ install-lib-default: $(call default_libs,libpthreadGCE,.a) # FIXME: similarly, who knows what this will install? Once again, it # would be better to explicitly install libpthread.dll.a as a copy of -# libpthreadGC$(DLL_VER).dll.a +# libpthreadGC$(PTW32_VER).dll.a install-libs: install-implib-default install-implib-default: $(call default_libs,libpthreadGC,.dll.a) install-implib-default: $(call default_libs,libpthreadGCE,.dll.a) diff --git a/tests/Bmakefile b/tests/Bmakefile index e83fef48..5cd4eca3 100644 --- a/tests/Bmakefile +++ b/tests/Bmakefile @@ -31,7 +31,7 @@ # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -DLL_VER = 2 +PTW32_VER = 2 CP = copy RM = erase @@ -51,12 +51,12 @@ XXLIBS = cw32mti.lib ws2_32.lib # C++ Exceptions BCEFLAGS = -P -DPtW32NoCatchWarn -D__CLEANUP_CXX -BCELIB = pthreadBCE$(DLL_VER).lib -BCEDLL = pthreadBCE$(DLL_VER).dll +BCELIB = pthreadBCE$(PTW32_VER).lib +BCEDLL = pthreadBCE$(PTW32_VER).dll # C cleanup code BCFLAGS = -D__CLEANUP_C -BCLIB = pthreadBC$(DLL_VER).lib -BCDLL = pthreadBC$(DLL_VER).dll +BCLIB = pthreadBC$(PTW32_VER).lib +BCDLL = pthreadBC$(PTW32_VER).dll # C++ Exceptions in application - using VC version of pthreads dll BCXFLAGS = -D__CLEANUP_C diff --git a/tests/ChangeLog b/tests/ChangeLog index b750da60..0e849b8d 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,12 @@ +2018-07-22 Mark Pizzolato + + * Makefile: Change the various static test runs to actually + compile with /MT or /MTd, i.e. No mixed /MT and /MD. Static + builds no longer create a separate pthreads*.lib static library + because errno does not work across that linkage. + * sequence1.c: Use more reasonable number of threads to avoid + resource limits. + 2018-07-22 Ross Johnson * reinit1.c: MSVC with /MT flag needs to explicitly call @@ -185,7 +194,7 @@ versions of nmake, $(MAKE) is a full path, which utterly futzes up the "make help" output; regularized the test targets, so we have e.g. VSE-static now; regularized the parentheticals; - removed a spurious use of $(DLL_VER); new test targets: VCX-debug + removed a spurious use of $(PTW32_VER); new test targets: VCX-debug {VSE,VCX}-static{,-debug}; fixed the {VC,VCE}-static-debug targets. * exception3.c: Narrowly exclude this test from the known-bad VS2005 configuration (By the way: I downloaded and tested with what is @@ -500,9 +509,9 @@ 2004-11-19 Ross Johnson * Bmakefile: New makefile for Borland. - * Makefile (DLL_VER): Added. - * GNUmakefile (DLL_VER): Added. - * Wmakefile (DLL_VER): Added. + * Makefile (PTW32_VER): Added. + * GNUmakefile (PTW32_VER): Added. + * Wmakefile (PTW32_VER): Added. 2004-10-29 Ross Johnson diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index de8f45b4..234f57b2 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -39,7 +39,7 @@ LOGFILE = testsuite.log builddir = @builddir@ top_builddir = @top_builddir@ -DLL_VER = 2$(EXTRAVERSION) +PTW32_VER = 2$(EXTRAVERSION) CP = cp -f MV = mv -f @@ -88,7 +88,7 @@ LFLAGS = $(ARCH) $(XXLFLAGS) # relies on C++ class destructors being called when leaving scope. # # NOTE 2: If you do this DO NOT distribute your pthreads DLLs with -# the official filenaming, i.e. pthreadVC2.dll, etc. Instead, change DLL_VER +# the official filenaming, i.e. pthreadVC2.dll, etc. Instead, change PTW32_VER # above to "2slgcc" for example, to build "pthreadGC2slgcc.dll", etc. # #LFLAGS += -static-libgcc -static-libstdc++ @@ -99,7 +99,7 @@ INCLUDES = -I ${top_srcdir} TEST = GC # Default lib version -GCX = GC$(DLL_VER) +GCX = GC$(PTW32_VER) # Files we need to run the tests # - paths are relative to pthreads build dir. @@ -151,49 +151,49 @@ help: @ $(ECHO) "$(MAKE) clean GC TESTS="foo bar" (to build individual tests \"foo.c and bar.c\" with C and run using GC dll)" GC: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" allpassed GC-asm: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" all-asm + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" all-asm GC-bench: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" all-bench + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" all-bench GC-bench-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" OPT="${DOPT}" all-bench + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" XXLIBS="benchlib.o" OPT="${DOPT}" all-bench GC-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed GC-static GC-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CC) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed GC-static-debug GC-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)d" CC=$(CC) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed GCE: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__CLEANUP_CXX" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(PTW32_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__CLEANUP_CXX" allpassed GCE-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(PTW32_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX" OPT="${DOPT}" allpassed GCE-static GCE-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(PTW32_VER)" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed GCE-static-debug GCE-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(PTW32_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_CXX -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed GCX: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__CLEANUP_C" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__CLEANUP_C" allpassed GCX-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C" OPT="${DOPT}" allpassed GCX-static GCX-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed GCX-static-debug GCX-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)d" CC=$(CXX) XXCFLAGS="-D__CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed all-asm: $(ASM) @ $(ECHO) "ALL TESTS COMPILED TO ASSEMBLER CODE" diff --git a/tests/Wmakefile b/tests/Wmakefile index 905f6100..c9c75606 100644 --- a/tests/Wmakefile +++ b/tests/Wmakefile @@ -32,7 +32,7 @@ # -DLL_VER = 2 +PTW32_VER = 2 .EXTENSIONS: @@ -53,12 +53,12 @@ XXLIBS = # C++ Exceptions WCEFLAGS = -xs -dPtW32NoCatchWarn -d__CLEANUP_CXX -WCELIB = pthreadWCE$(DLL_VER).lib -WCEDLL = pthreadWCE$(DLL_VER).dll +WCELIB = pthreadWCE$(PTW32_VER).lib +WCEDLL = pthreadWCE$(PTW32_VER).dll # C cleanup code WCFLAGS = -d__CLEANUP_C -WCLIB = pthreadWC$(DLL_VER).lib -WCDLL = pthreadWC$(DLL_VER).dll +WCLIB = pthreadWC$(PTW32_VER).lib +WCDLL = pthreadWC$(PTW32_VER).dll # C++ Exceptions in application - using WC version of pthreads dll WCXFLAGS = -xs -d__CLEANUP_C From 9f0a7e68e20c93aeaa2a3325dbe460a9709b6927 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Mon, 6 Aug 2018 23:15:23 +1000 Subject: [PATCH 152/207] Copyright dates --- GNUmakefile.in | 2 +- NOTICE | 2 +- _ptw32.h | 2 +- aclocal.m4 | 2 +- cleanup.c | 2 +- configure.ac | 2 +- context.h | 2 +- create.c | 2 +- dll.c | 2 +- errno.c | 2 +- global.c | 2 +- implement.h | 2 +- pthread.c | 2 +- pthread.h | 2 +- pthread_attr_destroy.c | 2 +- pthread_attr_getaffinity_np.c | 2 +- pthread_attr_getdetachstate.c | 2 +- pthread_attr_getinheritsched.c | 2 +- pthread_attr_getname_np.c | 2 +- pthread_attr_getschedparam.c | 2 +- pthread_attr_getschedpolicy.c | 2 +- pthread_attr_getscope.c | 2 +- pthread_attr_getstackaddr.c | 2 +- pthread_attr_getstacksize.c | 2 +- pthread_attr_init.c | 2 +- pthread_attr_setaffinity_np.c | 2 +- pthread_attr_setdetachstate.c | 2 +- pthread_attr_setinheritsched.c | 2 +- pthread_attr_setname_np.c | 2 +- pthread_attr_setschedparam.c | 2 +- pthread_attr_setschedpolicy.c | 2 +- pthread_attr_setscope.c | 2 +- pthread_attr_setstackaddr.c | 2 +- pthread_attr_setstacksize.c | 2 +- pthread_barrier_destroy.c | 2 +- pthread_barrier_init.c | 2 +- pthread_barrier_wait.c | 2 +- pthread_barrierattr_destroy.c | 2 +- pthread_barrierattr_getpshared.c | 2 +- pthread_barrierattr_init.c | 2 +- pthread_barrierattr_setpshared.c | 2 +- pthread_cancel.c | 2 +- pthread_cond_destroy.c | 2 +- pthread_cond_init.c | 2 +- pthread_cond_signal.c | 2 +- pthread_cond_wait.c | 2 +- pthread_condattr_destroy.c | 2 +- pthread_condattr_getpshared.c | 2 +- pthread_condattr_init.c | 2 +- pthread_condattr_setpshared.c | 2 +- pthread_delay_np.c | 2 +- pthread_detach.c | 2 +- pthread_equal.c | 2 +- pthread_exit.c | 2 +- pthread_getconcurrency.c | 2 +- pthread_getname_np.c | 2 +- pthread_getschedparam.c | 2 +- pthread_getspecific.c | 2 +- pthread_getunique_np.c | 2 +- pthread_getw32threadhandle_np.c | 2 +- pthread_join.c | 2 +- pthread_key_create.c | 2 +- pthread_key_delete.c | 2 +- pthread_kill.c | 2 +- pthread_mutex_consistent.c | 2 +- pthread_mutex_destroy.c | 2 +- pthread_mutex_init.c | 2 +- pthread_mutex_lock.c | 2 +- pthread_mutex_timedlock.c | 2 +- pthread_mutex_trylock.c | 2 +- pthread_mutex_unlock.c | 2 +- pthread_mutexattr_destroy.c | 2 +- pthread_mutexattr_getkind_np.c | 2 +- pthread_mutexattr_getpshared.c | 2 +- pthread_mutexattr_getrobust.c | 2 +- pthread_mutexattr_gettype.c | 2 +- pthread_mutexattr_init.c | 2 +- pthread_mutexattr_setkind_np.c | 2 +- pthread_mutexattr_setpshared.c | 2 +- pthread_mutexattr_setrobust.c | 2 +- pthread_mutexattr_settype.c | 2 +- pthread_num_processors_np.c | 2 +- pthread_once.c | 2 +- pthread_rwlock_destroy.c | 2 +- pthread_rwlock_init.c | 2 +- pthread_rwlock_rdlock.c | 2 +- pthread_rwlock_timedrdlock.c | 2 +- pthread_rwlock_timedwrlock.c | 2 +- pthread_rwlock_tryrdlock.c | 2 +- pthread_rwlock_trywrlock.c | 2 +- pthread_rwlock_unlock.c | 2 +- pthread_rwlock_wrlock.c | 2 +- pthread_rwlockattr_destroy.c | 2 +- pthread_rwlockattr_getpshared.c | 2 +- pthread_rwlockattr_init.c | 2 +- pthread_rwlockattr_setpshared.c | 2 +- pthread_self.c | 2 +- pthread_setaffinity.c | 2 +- pthread_setcancelstate.c | 2 +- pthread_setcanceltype.c | 2 +- pthread_setconcurrency.c | 2 +- pthread_setname_np.c | 2 +- pthread_setschedparam.c | 2 +- pthread_setspecific.c | 2 +- pthread_spin_destroy.c | 2 +- pthread_spin_init.c | 2 +- pthread_spin_lock.c | 2 +- pthread_spin_trylock.c | 2 +- pthread_spin_unlock.c | 2 +- pthread_testcancel.c | 2 +- pthread_timechange_handler_np.c | 2 +- pthread_timedjoin_np.c | 2 +- pthread_tryjoin_np.c | 2 +- pthread_win32_attach_detach_np.c | 2 +- ptw32_MCS_lock.c | 2 +- ptw32_callUserDestroyRoutines.c | 2 +- ptw32_calloc.c | 2 +- ptw32_cond_check_need_init.c | 2 +- ptw32_getprocessors.c | 2 +- ptw32_is_attr.c | 2 +- ptw32_mutex_check_need_init.c | 2 +- ptw32_new.c | 2 +- ptw32_processInitialize.c | 2 +- ptw32_processTerminate.c | 2 +- ptw32_relmillisecs.c | 2 +- ptw32_reuse.c | 2 +- ptw32_rwlock_cancelwrwait.c | 2 +- ptw32_rwlock_check_need_init.c | 2 +- ptw32_semwait.c | 2 +- ptw32_spinlock_check_need_init.c | 2 +- ptw32_threadDestroy.c | 2 +- ptw32_threadStart.c | 2 +- ptw32_throw.c | 2 +- ptw32_timespec.c | 2 +- ptw32_tkAssocCreate.c | 2 +- ptw32_tkAssocDestroy.c | 2 +- sched.h | 2 +- sched_get_priority_max.c | 2 +- sched_get_priority_min.c | 2 +- sched_getscheduler.c | 2 +- sched_setaffinity.c | 2 +- sched_setscheduler.c | 2 +- sched_yield.c | 2 +- sem_close.c | 2 +- sem_destroy.c | 2 +- sem_getvalue.c | 2 +- sem_init.c | 2 +- sem_open.c | 2 +- sem_post.c | 2 +- sem_post_multiple.c | 2 +- sem_timedwait.c | 2 +- sem_trywait.c | 2 +- sem_unlink.c | 2 +- sem_wait.c | 2 +- semaphore.h | 2 +- signal.c | 2 +- tests/GNUmakefile.in | 2 +- tests/affinity1.c | 2 +- tests/affinity2.c | 2 +- tests/affinity3.c | 2 +- tests/affinity4.c | 2 +- tests/affinity5.c | 2 +- tests/affinity6.c | 2 +- tests/barrier1.c | 2 +- tests/barrier2.c | 2 +- tests/barrier3.c | 2 +- tests/barrier4.c | 2 +- tests/barrier5.c | 2 +- tests/barrier6.c | 2 +- tests/benchlib.c | 2 +- tests/benchtest.h | 2 +- tests/benchtest1.c | 2 +- tests/benchtest2.c | 2 +- tests/benchtest3.c | 2 +- tests/benchtest4.c | 2 +- tests/benchtest5.c | 2 +- tests/cancel1.c | 2 +- tests/cancel2.c | 2 +- tests/cancel3.c | 2 +- tests/cancel4.c | 2 +- tests/cancel5.c | 2 +- tests/cancel6a.c | 2 +- tests/cancel6d.c | 2 +- tests/cancel7.c | 2 +- tests/cancel8.c | 2 +- tests/cancel9.c | 2 +- tests/cleanup0.c | 2 +- tests/cleanup1.c | 2 +- tests/cleanup2.c | 2 +- tests/cleanup3.c | 2 +- tests/condvar1.c | 2 +- tests/condvar1_1.c | 2 +- tests/condvar1_2.c | 2 +- tests/condvar2.c | 2 +- tests/condvar2_1.c | 2 +- tests/condvar3.c | 2 +- tests/condvar3_1.c | 2 +- tests/condvar3_2.c | 2 +- tests/condvar3_3.c | 2 +- tests/condvar4.c | 2 +- tests/condvar5.c | 2 +- tests/condvar6.c | 2 +- tests/condvar7.c | 2 +- tests/condvar8.c | 2 +- tests/condvar9.c | 2 +- tests/context1.c | 2 +- tests/context2.c | 2 +- tests/count1.c | 2 +- tests/create1.c | 2 +- tests/create2.c | 2 +- tests/create3.c | 2 +- tests/delay1.c | 2 +- tests/delay2.c | 2 +- tests/detach1.c | 2 +- tests/equal1.c | 2 +- tests/errno1.c | 2 +- tests/exception1.c | 2 +- tests/exception2.c | 2 +- tests/exception3.c | 2 +- tests/exception3_0.c | 2 +- tests/exit1.c | 2 +- tests/exit2.c | 2 +- tests/exit3.c | 2 +- tests/exit4.c | 2 +- tests/exit5.c | 2 +- tests/eyal1.c | 2 +- tests/inherit1.c | 2 +- tests/join0.c | 2 +- tests/join1.c | 2 +- tests/join2.c | 2 +- tests/join3.c | 2 +- tests/join4.c | 2 +- tests/kill1.c | 2 +- tests/mutex1.c | 2 +- tests/mutex1e.c | 2 +- tests/mutex1n.c | 2 +- tests/mutex1r.c | 2 +- tests/mutex2.c | 2 +- tests/mutex2e.c | 2 +- tests/mutex2r.c | 2 +- tests/mutex3.c | 2 +- tests/mutex3e.c | 2 +- tests/mutex3r.c | 2 +- tests/mutex4.c | 2 +- tests/mutex5.c | 2 +- tests/mutex6.c | 2 +- tests/mutex6e.c | 2 +- tests/mutex6es.c | 2 +- tests/mutex6n.c | 2 +- tests/mutex6r.c | 2 +- tests/mutex6rs.c | 2 +- tests/mutex6s.c | 2 +- tests/mutex7.c | 2 +- tests/mutex7e.c | 2 +- tests/mutex7n.c | 2 +- tests/mutex7r.c | 2 +- tests/mutex8.c | 2 +- tests/mutex8e.c | 2 +- tests/mutex8n.c | 2 +- tests/mutex8r.c | 2 +- tests/name_np1.c | 2 +- tests/name_np2.c | 2 +- tests/once1.c | 2 +- tests/once2.c | 2 +- tests/once3.c | 2 +- tests/once4.c | 2 +- tests/priority1.c | 2 +- tests/priority2.c | 2 +- tests/reuse1.c | 2 +- tests/reuse2.c | 2 +- tests/robust1.c | 2 +- tests/robust2.c | 2 +- tests/robust3.c | 2 +- tests/robust4.c | 2 +- tests/robust5.c | 2 +- tests/rwlock1.c | 2 +- tests/rwlock2.c | 2 +- tests/rwlock2_t.c | 2 +- tests/rwlock3.c | 2 +- tests/rwlock3_t.c | 2 +- tests/rwlock4.c | 2 +- tests/rwlock4_t.c | 2 +- tests/rwlock5.c | 2 +- tests/rwlock5_t.c | 2 +- tests/rwlock6.c | 2 +- tests/rwlock6_t.c | 2 +- tests/rwlock6_t2.c | 2 +- tests/self1.c | 2 +- tests/self2.c | 2 +- tests/semaphore1.c | 2 +- tests/semaphore2.c | 2 +- tests/semaphore3.c | 2 +- tests/semaphore4.c | 2 +- tests/semaphore4t.c | 2 +- tests/semaphore5.c | 2 +- tests/sequence1.c | 2 +- tests/spin1.c | 2 +- tests/spin2.c | 2 +- tests/spin3.c | 2 +- tests/spin4.c | 2 +- tests/stress1.c | 2 +- tests/test.h | 2 +- tests/timeouts.c | 2 +- tests/tryentercs.c | 2 +- tests/tryentercs2.c | 2 +- tests/tsd1.c | 2 +- tests/tsd2.c | 2 +- tests/tsd3.c | 2 +- tests/valid1.c | 2 +- tests/valid2.c | 2 +- version.rc | 2 +- w32_CancelableWait.c | 2 +- 312 files changed, 312 insertions(+), 312 deletions(-) diff --git a/GNUmakefile.in b/GNUmakefile.in index d75ccc33..58f9a953 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -3,7 +3,7 @@ # # Pthreads4w - POSIX Threads for Windows # Copyright 1998 John E. Bossom -# Copyright 1999-2016, Pthreads4w contributors +# Copyright 1999-2018, Pthreads4w contributors # # Homepage: https://sourceforge.net/projects/pthreads4w/ # diff --git a/NOTICE b/NOTICE index 5bd404a2..d73542d7 100644 --- a/NOTICE +++ b/NOTICE @@ -1,6 +1,6 @@ PThreads4W - POSIX threads for Windows Copyright 1998 John E. Bossom -Copyright 1999-2016, Pthreads4w contributors +Copyright 1999-2018, Pthreads4w contributors This product includes software developed through the colaborative effort of several individuals, each of whom is listed in the file diff --git a/_ptw32.h b/_ptw32.h index a8ae9e44..56b624be 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/aclocal.m4 b/aclocal.m4 index 5aa936ec..02c1ba19 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -3,7 +3,7 @@ ## ## Pthreads4w - POSIX Threads for Windows ## Copyright 1998 John E. Bossom -## Copyright 1999-2016, Pthreads4w contributors +## Copyright 1999-2018, Pthreads4w contributors ## ## Homepage: https://sourceforge.net/projects/pthreads4w/ ## diff --git a/cleanup.c b/cleanup.c index 9e746d9f..0c3b05bd 100644 --- a/cleanup.c +++ b/cleanup.c @@ -10,7 +10,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/configure.ac b/configure.ac index 1f5cc64b..4e7ae28e 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ # # Pthreads4w - POSIX Threads for Windows # Copyright 1998 John E. Bossom -# Copyright 1999-2016, Pthreads4w contributors +# Copyright 1999-2018, Pthreads4w contributors # # Homepage: https://sourceforge.net/projects/pthreads4w/ # diff --git a/context.h b/context.h index be609009..33294c15 100644 --- a/context.h +++ b/context.h @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/create.c b/create.c index 21e04ce3..3ed7ca91 100644 --- a/create.c +++ b/create.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/dll.c b/dll.c index 58982019..1dccfb0b 100644 --- a/dll.c +++ b/dll.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/errno.c b/errno.c index a4858c64..36eb301e 100644 --- a/errno.c +++ b/errno.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/global.c b/global.c index d346ba42..f1f0ecfc 100644 --- a/global.c +++ b/global.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/implement.h b/implement.h index 543c2044..efc5cf31 100644 --- a/implement.h +++ b/implement.h @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread.c b/pthread.c index 515adedd..61828f37 100644 --- a/pthread.c +++ b/pthread.c @@ -10,7 +10,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread.h b/pthread.h index 4245ff62..5ebd9172 100644 --- a/pthread.h +++ b/pthread.h @@ -4,7 +4,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_attr_destroy.c b/pthread_attr_destroy.c index 65b190b7..cc9a4717 100644 --- a/pthread_attr_destroy.c +++ b/pthread_attr_destroy.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_attr_getaffinity_np.c b/pthread_attr_getaffinity_np.c index 2227bca3..adec7305 100644 --- a/pthread_attr_getaffinity_np.c +++ b/pthread_attr_getaffinity_np.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_attr_getdetachstate.c b/pthread_attr_getdetachstate.c index 6c90f3b7..2d8bbb07 100644 --- a/pthread_attr_getdetachstate.c +++ b/pthread_attr_getdetachstate.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_attr_getinheritsched.c b/pthread_attr_getinheritsched.c index a97326b9..6a24862f 100644 --- a/pthread_attr_getinheritsched.c +++ b/pthread_attr_getinheritsched.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_attr_getname_np.c b/pthread_attr_getname_np.c index b083de66..cec14d42 100644 --- a/pthread_attr_getname_np.c +++ b/pthread_attr_getname_np.c @@ -5,7 +5,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_attr_getschedparam.c b/pthread_attr_getschedparam.c index 79228957..515a0af9 100644 --- a/pthread_attr_getschedparam.c +++ b/pthread_attr_getschedparam.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_attr_getschedpolicy.c b/pthread_attr_getschedpolicy.c index 996e63d6..85762f38 100644 --- a/pthread_attr_getschedpolicy.c +++ b/pthread_attr_getschedpolicy.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_attr_getscope.c b/pthread_attr_getscope.c index cdccd785..9f6c13fe 100644 --- a/pthread_attr_getscope.c +++ b/pthread_attr_getscope.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_attr_getstackaddr.c b/pthread_attr_getstackaddr.c index 0d5c1322..2a218059 100644 --- a/pthread_attr_getstackaddr.c +++ b/pthread_attr_getstackaddr.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_attr_getstacksize.c b/pthread_attr_getstacksize.c index 738146fc..3916a7c7 100644 --- a/pthread_attr_getstacksize.c +++ b/pthread_attr_getstacksize.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_attr_init.c b/pthread_attr_init.c index e1040df7..ff671e75 100644 --- a/pthread_attr_init.c +++ b/pthread_attr_init.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_attr_setaffinity_np.c b/pthread_attr_setaffinity_np.c index 62ea7b97..c3da27e5 100644 --- a/pthread_attr_setaffinity_np.c +++ b/pthread_attr_setaffinity_np.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_attr_setdetachstate.c b/pthread_attr_setdetachstate.c index 07c18f51..b12ff955 100644 --- a/pthread_attr_setdetachstate.c +++ b/pthread_attr_setdetachstate.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_attr_setinheritsched.c b/pthread_attr_setinheritsched.c index d02033bc..003a821d 100644 --- a/pthread_attr_setinheritsched.c +++ b/pthread_attr_setinheritsched.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_attr_setname_np.c b/pthread_attr_setname_np.c index a8d2ce2b..3161bf19 100644 --- a/pthread_attr_setname_np.c +++ b/pthread_attr_setname_np.c @@ -5,7 +5,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_attr_setschedparam.c b/pthread_attr_setschedparam.c index c1362c6a..36e64eb0 100644 --- a/pthread_attr_setschedparam.c +++ b/pthread_attr_setschedparam.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_attr_setschedpolicy.c b/pthread_attr_setschedpolicy.c index f3857f2e..af6fb9e9 100644 --- a/pthread_attr_setschedpolicy.c +++ b/pthread_attr_setschedpolicy.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_attr_setscope.c b/pthread_attr_setscope.c index 68f8178f..81765b87 100644 --- a/pthread_attr_setscope.c +++ b/pthread_attr_setscope.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_attr_setstackaddr.c b/pthread_attr_setstackaddr.c index f44b758f..20a53dd4 100644 --- a/pthread_attr_setstackaddr.c +++ b/pthread_attr_setstackaddr.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_attr_setstacksize.c b/pthread_attr_setstacksize.c index 33179944..fe930ef9 100644 --- a/pthread_attr_setstacksize.c +++ b/pthread_attr_setstacksize.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_barrier_destroy.c b/pthread_barrier_destroy.c index 69a0d372..a2904c0e 100644 --- a/pthread_barrier_destroy.c +++ b/pthread_barrier_destroy.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_barrier_init.c b/pthread_barrier_init.c index 8434b23f..ac5c07b3 100644 --- a/pthread_barrier_init.c +++ b/pthread_barrier_init.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_barrier_wait.c b/pthread_barrier_wait.c index 5038aa04..ad180f4b 100644 --- a/pthread_barrier_wait.c +++ b/pthread_barrier_wait.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_barrierattr_destroy.c b/pthread_barrierattr_destroy.c index 57285791..b4bf719a 100644 --- a/pthread_barrierattr_destroy.c +++ b/pthread_barrierattr_destroy.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_barrierattr_getpshared.c b/pthread_barrierattr_getpshared.c index 9600d85b..dd26705f 100644 --- a/pthread_barrierattr_getpshared.c +++ b/pthread_barrierattr_getpshared.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_barrierattr_init.c b/pthread_barrierattr_init.c index 1ae348c1..6aac0eb8 100644 --- a/pthread_barrierattr_init.c +++ b/pthread_barrierattr_init.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_barrierattr_setpshared.c b/pthread_barrierattr_setpshared.c index 30909b3b..6aa9314a 100644 --- a/pthread_barrierattr_setpshared.c +++ b/pthread_barrierattr_setpshared.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_cancel.c b/pthread_cancel.c index e3047857..fddf216c 100644 --- a/pthread_cancel.c +++ b/pthread_cancel.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_cond_destroy.c b/pthread_cond_destroy.c index acfeb523..f1928fd5 100644 --- a/pthread_cond_destroy.c +++ b/pthread_cond_destroy.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_cond_init.c b/pthread_cond_init.c index f8e92702..127c7b48 100644 --- a/pthread_cond_init.c +++ b/pthread_cond_init.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_cond_signal.c b/pthread_cond_signal.c index b5186d00..226fd133 100644 --- a/pthread_cond_signal.c +++ b/pthread_cond_signal.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_cond_wait.c b/pthread_cond_wait.c index 58909acc..fdb11ce2 100644 --- a/pthread_cond_wait.c +++ b/pthread_cond_wait.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_condattr_destroy.c b/pthread_condattr_destroy.c index e2d4075e..faaa97b7 100644 --- a/pthread_condattr_destroy.c +++ b/pthread_condattr_destroy.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_condattr_getpshared.c b/pthread_condattr_getpshared.c index 643d482f..8c3fea34 100644 --- a/pthread_condattr_getpshared.c +++ b/pthread_condattr_getpshared.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_condattr_init.c b/pthread_condattr_init.c index 7e21d892..56b89fed 100644 --- a/pthread_condattr_init.c +++ b/pthread_condattr_init.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_condattr_setpshared.c b/pthread_condattr_setpshared.c index ebff18b1..a9b5b9d6 100644 --- a/pthread_condattr_setpshared.c +++ b/pthread_condattr_setpshared.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_delay_np.c b/pthread_delay_np.c index a43d8a5b..9aad6409 100644 --- a/pthread_delay_np.c +++ b/pthread_delay_np.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_detach.c b/pthread_detach.c index d4cbbb4b..4062487f 100644 --- a/pthread_detach.c +++ b/pthread_detach.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_equal.c b/pthread_equal.c index 712d43b5..b94ec03c 100644 --- a/pthread_equal.c +++ b/pthread_equal.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_exit.c b/pthread_exit.c index f98230a7..58679af6 100644 --- a/pthread_exit.c +++ b/pthread_exit.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_getconcurrency.c b/pthread_getconcurrency.c index c848115e..7f6cdb4d 100644 --- a/pthread_getconcurrency.c +++ b/pthread_getconcurrency.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_getname_np.c b/pthread_getname_np.c index 84e729c1..8fc32b1c 100644 --- a/pthread_getname_np.c +++ b/pthread_getname_np.c @@ -5,7 +5,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_getschedparam.c b/pthread_getschedparam.c index dd3cc3df..5b10d6c7 100644 --- a/pthread_getschedparam.c +++ b/pthread_getschedparam.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_getspecific.c b/pthread_getspecific.c index 4173e2fc..ea6bef41 100644 --- a/pthread_getspecific.c +++ b/pthread_getspecific.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_getunique_np.c b/pthread_getunique_np.c index 1ae84061..51e11fb1 100755 --- a/pthread_getunique_np.c +++ b/pthread_getunique_np.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_getw32threadhandle_np.c b/pthread_getw32threadhandle_np.c index 8678ac46..3ecdaa80 100644 --- a/pthread_getw32threadhandle_np.c +++ b/pthread_getw32threadhandle_np.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_join.c b/pthread_join.c index b317bef0..a2dd8959 100644 --- a/pthread_join.c +++ b/pthread_join.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_key_create.c b/pthread_key_create.c index 2468c098..a23585c3 100644 --- a/pthread_key_create.c +++ b/pthread_key_create.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_key_delete.c b/pthread_key_delete.c index b983e282..0c44d058 100644 --- a/pthread_key_delete.c +++ b/pthread_key_delete.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_kill.c b/pthread_kill.c index b838352e..3efc421a 100644 --- a/pthread_kill.c +++ b/pthread_kill.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_mutex_consistent.c b/pthread_mutex_consistent.c index dd64d7d9..1253b0e2 100755 --- a/pthread_mutex_consistent.c +++ b/pthread_mutex_consistent.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_mutex_destroy.c b/pthread_mutex_destroy.c index c1b8b757..688201f1 100644 --- a/pthread_mutex_destroy.c +++ b/pthread_mutex_destroy.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_mutex_init.c b/pthread_mutex_init.c index 514df06c..bc61dfcd 100644 --- a/pthread_mutex_init.c +++ b/pthread_mutex_init.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_mutex_lock.c b/pthread_mutex_lock.c index 1e4c1774..fcfedaa8 100644 --- a/pthread_mutex_lock.c +++ b/pthread_mutex_lock.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_mutex_timedlock.c b/pthread_mutex_timedlock.c index 60a813c0..10d5bd15 100644 --- a/pthread_mutex_timedlock.c +++ b/pthread_mutex_timedlock.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_mutex_trylock.c b/pthread_mutex_trylock.c index 8c98abd7..405542a2 100644 --- a/pthread_mutex_trylock.c +++ b/pthread_mutex_trylock.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_mutex_unlock.c b/pthread_mutex_unlock.c index 88bf241f..740f443f 100644 --- a/pthread_mutex_unlock.c +++ b/pthread_mutex_unlock.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_mutexattr_destroy.c b/pthread_mutexattr_destroy.c index f384dc89..09b6bcbd 100644 --- a/pthread_mutexattr_destroy.c +++ b/pthread_mutexattr_destroy.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_mutexattr_getkind_np.c b/pthread_mutexattr_getkind_np.c index c91e0c2f..2f0799f6 100644 --- a/pthread_mutexattr_getkind_np.c +++ b/pthread_mutexattr_getkind_np.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_mutexattr_getpshared.c b/pthread_mutexattr_getpshared.c index 599482ec..dd43a09e 100644 --- a/pthread_mutexattr_getpshared.c +++ b/pthread_mutexattr_getpshared.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_mutexattr_getrobust.c b/pthread_mutexattr_getrobust.c index 0a0f1864..7ddd648b 100755 --- a/pthread_mutexattr_getrobust.c +++ b/pthread_mutexattr_getrobust.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_mutexattr_gettype.c b/pthread_mutexattr_gettype.c index ed7c6512..aaff4148 100644 --- a/pthread_mutexattr_gettype.c +++ b/pthread_mutexattr_gettype.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_mutexattr_init.c b/pthread_mutexattr_init.c index 2a98555e..88ac26ab 100644 --- a/pthread_mutexattr_init.c +++ b/pthread_mutexattr_init.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_mutexattr_setkind_np.c b/pthread_mutexattr_setkind_np.c index 29494454..fda1a91b 100644 --- a/pthread_mutexattr_setkind_np.c +++ b/pthread_mutexattr_setkind_np.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_mutexattr_setpshared.c b/pthread_mutexattr_setpshared.c index 50e556d4..6a5770ed 100644 --- a/pthread_mutexattr_setpshared.c +++ b/pthread_mutexattr_setpshared.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_mutexattr_setrobust.c b/pthread_mutexattr_setrobust.c index c2f00d9d..b5424a2c 100755 --- a/pthread_mutexattr_setrobust.c +++ b/pthread_mutexattr_setrobust.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_mutexattr_settype.c b/pthread_mutexattr_settype.c index d4def28a..698c566e 100644 --- a/pthread_mutexattr_settype.c +++ b/pthread_mutexattr_settype.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_num_processors_np.c b/pthread_num_processors_np.c index f8201e0e..3549f160 100644 --- a/pthread_num_processors_np.c +++ b/pthread_num_processors_np.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_once.c b/pthread_once.c index e9568f55..a1636253 100644 --- a/pthread_once.c +++ b/pthread_once.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_rwlock_destroy.c b/pthread_rwlock_destroy.c index 672e6788..359ad36f 100644 --- a/pthread_rwlock_destroy.c +++ b/pthread_rwlock_destroy.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_rwlock_init.c b/pthread_rwlock_init.c index bcf366cf..4903dd0d 100644 --- a/pthread_rwlock_init.c +++ b/pthread_rwlock_init.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_rwlock_rdlock.c b/pthread_rwlock_rdlock.c index 22be6a23..1d141c18 100644 --- a/pthread_rwlock_rdlock.c +++ b/pthread_rwlock_rdlock.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_rwlock_timedrdlock.c b/pthread_rwlock_timedrdlock.c index 90e43576..3099ad97 100644 --- a/pthread_rwlock_timedrdlock.c +++ b/pthread_rwlock_timedrdlock.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_rwlock_timedwrlock.c b/pthread_rwlock_timedwrlock.c index 2d227921..86f085f8 100644 --- a/pthread_rwlock_timedwrlock.c +++ b/pthread_rwlock_timedwrlock.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_rwlock_tryrdlock.c b/pthread_rwlock_tryrdlock.c index c1c6a498..f95c412d 100644 --- a/pthread_rwlock_tryrdlock.c +++ b/pthread_rwlock_tryrdlock.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_rwlock_trywrlock.c b/pthread_rwlock_trywrlock.c index 5aedae07..373d3a90 100644 --- a/pthread_rwlock_trywrlock.c +++ b/pthread_rwlock_trywrlock.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_rwlock_unlock.c b/pthread_rwlock_unlock.c index 22c6cfbb..a01e993f 100644 --- a/pthread_rwlock_unlock.c +++ b/pthread_rwlock_unlock.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_rwlock_wrlock.c b/pthread_rwlock_wrlock.c index d832867c..36037e06 100644 --- a/pthread_rwlock_wrlock.c +++ b/pthread_rwlock_wrlock.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_rwlockattr_destroy.c b/pthread_rwlockattr_destroy.c index e55acd61..18a7ea05 100644 --- a/pthread_rwlockattr_destroy.c +++ b/pthread_rwlockattr_destroy.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_rwlockattr_getpshared.c b/pthread_rwlockattr_getpshared.c index b297ec34..d7bb1421 100644 --- a/pthread_rwlockattr_getpshared.c +++ b/pthread_rwlockattr_getpshared.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_rwlockattr_init.c b/pthread_rwlockattr_init.c index 452bbf98..c1ab554a 100644 --- a/pthread_rwlockattr_init.c +++ b/pthread_rwlockattr_init.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_rwlockattr_setpshared.c b/pthread_rwlockattr_setpshared.c index d3bd618b..f5099587 100644 --- a/pthread_rwlockattr_setpshared.c +++ b/pthread_rwlockattr_setpshared.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_self.c b/pthread_self.c index bdfca470..67d45f6a 100644 --- a/pthread_self.c +++ b/pthread_self.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_setaffinity.c b/pthread_setaffinity.c index 22e157dd..badf2e5a 100644 --- a/pthread_setaffinity.c +++ b/pthread_setaffinity.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_setcancelstate.c b/pthread_setcancelstate.c index 2e541a4c..82272537 100644 --- a/pthread_setcancelstate.c +++ b/pthread_setcancelstate.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_setcanceltype.c b/pthread_setcanceltype.c index 06189f87..54d7cb68 100644 --- a/pthread_setcanceltype.c +++ b/pthread_setcanceltype.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_setconcurrency.c b/pthread_setconcurrency.c index 1c758040..2ba301eb 100644 --- a/pthread_setconcurrency.c +++ b/pthread_setconcurrency.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_setname_np.c b/pthread_setname_np.c index 41759c9c..2cfb0446 100644 --- a/pthread_setname_np.c +++ b/pthread_setname_np.c @@ -5,7 +5,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_setschedparam.c b/pthread_setschedparam.c index 2cdfd4d1..8ed2a6b8 100644 --- a/pthread_setschedparam.c +++ b/pthread_setschedparam.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_setspecific.c b/pthread_setspecific.c index 6894882b..f0d9747c 100644 --- a/pthread_setspecific.c +++ b/pthread_setspecific.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_spin_destroy.c b/pthread_spin_destroy.c index d6edd31e..c25873a6 100644 --- a/pthread_spin_destroy.c +++ b/pthread_spin_destroy.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_spin_init.c b/pthread_spin_init.c index 75e6eeef..ea760453 100644 --- a/pthread_spin_init.c +++ b/pthread_spin_init.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_spin_lock.c b/pthread_spin_lock.c index 64ad0e31..54e7281a 100644 --- a/pthread_spin_lock.c +++ b/pthread_spin_lock.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_spin_trylock.c b/pthread_spin_trylock.c index d9fd7197..b177f6af 100644 --- a/pthread_spin_trylock.c +++ b/pthread_spin_trylock.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_spin_unlock.c b/pthread_spin_unlock.c index 8d24d735..5c9d5481 100644 --- a/pthread_spin_unlock.c +++ b/pthread_spin_unlock.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_testcancel.c b/pthread_testcancel.c index 7a3ea69b..999f0e80 100644 --- a/pthread_testcancel.c +++ b/pthread_testcancel.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_timechange_handler_np.c b/pthread_timechange_handler_np.c index 88bab108..c1b92e2b 100644 --- a/pthread_timechange_handler_np.c +++ b/pthread_timechange_handler_np.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_timedjoin_np.c b/pthread_timedjoin_np.c index 6ae04a9d..ab2898ae 100644 --- a/pthread_timedjoin_np.c +++ b/pthread_timedjoin_np.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_tryjoin_np.c b/pthread_tryjoin_np.c index 4b62d1e9..aa9861d4 100644 --- a/pthread_tryjoin_np.c +++ b/pthread_tryjoin_np.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/pthread_win32_attach_detach_np.c b/pthread_win32_attach_detach_np.c index 2f7e0787..b7f16cb1 100644 --- a/pthread_win32_attach_detach_np.c +++ b/pthread_win32_attach_detach_np.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_MCS_lock.c b/ptw32_MCS_lock.c index 61609ec9..2f121073 100644 --- a/ptw32_MCS_lock.c +++ b/ptw32_MCS_lock.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_callUserDestroyRoutines.c b/ptw32_callUserDestroyRoutines.c index ec58ff71..9d85e050 100644 --- a/ptw32_callUserDestroyRoutines.c +++ b/ptw32_callUserDestroyRoutines.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_calloc.c b/ptw32_calloc.c index c583733a..926801c0 100644 --- a/ptw32_calloc.c +++ b/ptw32_calloc.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_cond_check_need_init.c b/ptw32_cond_check_need_init.c index 8c86b959..1e849d01 100644 --- a/ptw32_cond_check_need_init.c +++ b/ptw32_cond_check_need_init.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_getprocessors.c b/ptw32_getprocessors.c index 937383b8..1f524159 100644 --- a/ptw32_getprocessors.c +++ b/ptw32_getprocessors.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_is_attr.c b/ptw32_is_attr.c index be5f1664..f8fe0778 100644 --- a/ptw32_is_attr.c +++ b/ptw32_is_attr.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_mutex_check_need_init.c b/ptw32_mutex_check_need_init.c index a694a53e..c7b1301d 100644 --- a/ptw32_mutex_check_need_init.c +++ b/ptw32_mutex_check_need_init.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_new.c b/ptw32_new.c index fac6f73b..767fba6e 100644 --- a/ptw32_new.c +++ b/ptw32_new.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_processInitialize.c b/ptw32_processInitialize.c index 3fb6dddb..d7b85f94 100644 --- a/ptw32_processInitialize.c +++ b/ptw32_processInitialize.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_processTerminate.c b/ptw32_processTerminate.c index a3cc434c..b8cf9f15 100644 --- a/ptw32_processTerminate.c +++ b/ptw32_processTerminate.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_relmillisecs.c b/ptw32_relmillisecs.c index e084c238..92d859dc 100644 --- a/ptw32_relmillisecs.c +++ b/ptw32_relmillisecs.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_reuse.c b/ptw32_reuse.c index 0ddd2398..822e4bb2 100644 --- a/ptw32_reuse.c +++ b/ptw32_reuse.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_rwlock_cancelwrwait.c b/ptw32_rwlock_cancelwrwait.c index 5fe70801..8f15996c 100644 --- a/ptw32_rwlock_cancelwrwait.c +++ b/ptw32_rwlock_cancelwrwait.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_rwlock_check_need_init.c b/ptw32_rwlock_check_need_init.c index 937a6f81..014f8d1a 100644 --- a/ptw32_rwlock_check_need_init.c +++ b/ptw32_rwlock_check_need_init.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_semwait.c b/ptw32_semwait.c index c9f10779..ae21181b 100644 --- a/ptw32_semwait.c +++ b/ptw32_semwait.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_spinlock_check_need_init.c b/ptw32_spinlock_check_need_init.c index 41390227..1ca7afaf 100644 --- a/ptw32_spinlock_check_need_init.c +++ b/ptw32_spinlock_check_need_init.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_threadDestroy.c b/ptw32_threadDestroy.c index bd3835a5..5b135563 100644 --- a/ptw32_threadDestroy.c +++ b/ptw32_threadDestroy.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_threadStart.c b/ptw32_threadStart.c index 89635a30..31e36a7d 100644 --- a/ptw32_threadStart.c +++ b/ptw32_threadStart.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_throw.c b/ptw32_throw.c index a3993f2d..45337d25 100644 --- a/ptw32_throw.c +++ b/ptw32_throw.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_timespec.c b/ptw32_timespec.c index 94c7f3aa..e4868cce 100644 --- a/ptw32_timespec.c +++ b/ptw32_timespec.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_tkAssocCreate.c b/ptw32_tkAssocCreate.c index 9f350ed7..d860a0ac 100644 --- a/ptw32_tkAssocCreate.c +++ b/ptw32_tkAssocCreate.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/ptw32_tkAssocDestroy.c b/ptw32_tkAssocDestroy.c index fdf95578..63839ea7 100644 --- a/ptw32_tkAssocDestroy.c +++ b/ptw32_tkAssocDestroy.c @@ -9,7 +9,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/sched.h b/sched.h index 34800304..81630d94 100644 --- a/sched.h +++ b/sched.h @@ -11,7 +11,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/sched_get_priority_max.c b/sched_get_priority_max.c index 977889b5..10c6b3ba 100644 --- a/sched_get_priority_max.c +++ b/sched_get_priority_max.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/sched_get_priority_min.c b/sched_get_priority_min.c index fbd47571..24eb5af6 100644 --- a/sched_get_priority_min.c +++ b/sched_get_priority_min.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/sched_getscheduler.c b/sched_getscheduler.c index d2d091f8..28995d98 100644 --- a/sched_getscheduler.c +++ b/sched_getscheduler.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/sched_setaffinity.c b/sched_setaffinity.c index 95667f2c..39c4c0ea 100644 --- a/sched_setaffinity.c +++ b/sched_setaffinity.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/sched_setscheduler.c b/sched_setscheduler.c index df7f881b..8d9cf72f 100644 --- a/sched_setscheduler.c +++ b/sched_setscheduler.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/sched_yield.c b/sched_yield.c index 228d77dc..dd422725 100644 --- a/sched_yield.c +++ b/sched_yield.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/sem_close.c b/sem_close.c index 25dafc76..eef4c675 100644 --- a/sem_close.c +++ b/sem_close.c @@ -15,7 +15,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/sem_destroy.c b/sem_destroy.c index 478885a7..471741b2 100644 --- a/sem_destroy.c +++ b/sem_destroy.c @@ -15,7 +15,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/sem_getvalue.c b/sem_getvalue.c index cbe250af..2e043db5 100644 --- a/sem_getvalue.c +++ b/sem_getvalue.c @@ -15,7 +15,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/sem_init.c b/sem_init.c index a8500b66..bd9ec305 100644 --- a/sem_init.c +++ b/sem_init.c @@ -13,7 +13,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/sem_open.c b/sem_open.c index c11b3691..68021eb5 100644 --- a/sem_open.c +++ b/sem_open.c @@ -15,7 +15,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/sem_post.c b/sem_post.c index ec436980..786c5dd5 100644 --- a/sem_post.c +++ b/sem_post.c @@ -15,7 +15,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/sem_post_multiple.c b/sem_post_multiple.c index 43a7ad6a..a7a78df6 100644 --- a/sem_post_multiple.c +++ b/sem_post_multiple.c @@ -15,7 +15,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/sem_timedwait.c b/sem_timedwait.c index 84244839..5b22e863 100644 --- a/sem_timedwait.c +++ b/sem_timedwait.c @@ -15,7 +15,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/sem_trywait.c b/sem_trywait.c index a0dc96d8..a0e1cd12 100644 --- a/sem_trywait.c +++ b/sem_trywait.c @@ -15,7 +15,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/sem_unlink.c b/sem_unlink.c index ba0d86ab..f14fff1b 100644 --- a/sem_unlink.c +++ b/sem_unlink.c @@ -15,7 +15,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/sem_wait.c b/sem_wait.c index c80efc49..bceea5ab 100644 --- a/sem_wait.c +++ b/sem_wait.c @@ -15,7 +15,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/semaphore.h b/semaphore.h index ed0a86e5..f3eaa189 100644 --- a/semaphore.h +++ b/semaphore.h @@ -11,7 +11,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/signal.c b/signal.c index 37548dc2..86b6947c 100644 --- a/signal.c +++ b/signal.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index 80c86cfc..75f4deae 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -5,7 +5,7 @@ # # Pthreads4w - POSIX Threads for Windows # Copyright 1998 John E. Bossom -# Copyright 1999-2016, Pthreads4w contributors +# Copyright 1999-2018, Pthreads4w contributors # # Homepage: https://sourceforge.net/projects/pthreads4w/ # diff --git a/tests/affinity1.c b/tests/affinity1.c index 729b2014..4c4577e7 100644 --- a/tests/affinity1.c +++ b/tests/affinity1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/affinity2.c b/tests/affinity2.c index f5bfa352..73bfb4b2 100644 --- a/tests/affinity2.c +++ b/tests/affinity2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/affinity3.c b/tests/affinity3.c index 27c11e42..be3d61c4 100644 --- a/tests/affinity3.c +++ b/tests/affinity3.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/affinity4.c b/tests/affinity4.c index b189d443..eabf92a9 100644 --- a/tests/affinity4.c +++ b/tests/affinity4.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/affinity5.c b/tests/affinity5.c index 51ac7447..538ad9dd 100644 --- a/tests/affinity5.c +++ b/tests/affinity5.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/affinity6.c b/tests/affinity6.c index dceab703..4b9190c5 100644 --- a/tests/affinity6.c +++ b/tests/affinity6.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/barrier1.c b/tests/barrier1.c index 0e566911..677be2bb 100644 --- a/tests/barrier1.c +++ b/tests/barrier1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/barrier2.c b/tests/barrier2.c index 1b9c62ef..6d40c056 100644 --- a/tests/barrier2.c +++ b/tests/barrier2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/barrier3.c b/tests/barrier3.c index 8fc22055..1775c79c 100644 --- a/tests/barrier3.c +++ b/tests/barrier3.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/barrier4.c b/tests/barrier4.c index 27a5ef78..04756c11 100644 --- a/tests/barrier4.c +++ b/tests/barrier4.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/barrier5.c b/tests/barrier5.c index c4529160..ed41cd8d 100644 --- a/tests/barrier5.c +++ b/tests/barrier5.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/barrier6.c b/tests/barrier6.c index 1c3e1cee..d7a700e8 100755 --- a/tests/barrier6.c +++ b/tests/barrier6.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/benchlib.c b/tests/benchlib.c index 7c16390c..055ea042 100644 --- a/tests/benchlib.c +++ b/tests/benchlib.c @@ -5,7 +5,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/benchtest.h b/tests/benchtest.h index 781bffb3..6a22b4b3 100644 --- a/tests/benchtest.h +++ b/tests/benchtest.h @@ -5,7 +5,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/benchtest1.c b/tests/benchtest1.c index a442a051..23e8d727 100644 --- a/tests/benchtest1.c +++ b/tests/benchtest1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/benchtest2.c b/tests/benchtest2.c index 323807b0..e28c10e6 100644 --- a/tests/benchtest2.c +++ b/tests/benchtest2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/benchtest3.c b/tests/benchtest3.c index 244c81c7..1bc5a041 100644 --- a/tests/benchtest3.c +++ b/tests/benchtest3.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/benchtest4.c b/tests/benchtest4.c index 084ba1b5..51cd2568 100644 --- a/tests/benchtest4.c +++ b/tests/benchtest4.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/benchtest5.c b/tests/benchtest5.c index ed662af8..d4fd515a 100644 --- a/tests/benchtest5.c +++ b/tests/benchtest5.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/cancel1.c b/tests/cancel1.c index 2eb0c1d9..b6722303 100644 --- a/tests/cancel1.c +++ b/tests/cancel1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/cancel2.c b/tests/cancel2.c index 2c473246..a67fbd21 100644 --- a/tests/cancel2.c +++ b/tests/cancel2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/cancel3.c b/tests/cancel3.c index 9cbcc000..88e203dd 100644 --- a/tests/cancel3.c +++ b/tests/cancel3.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/cancel4.c b/tests/cancel4.c index e99bc756..7f31d6b6 100644 --- a/tests/cancel4.c +++ b/tests/cancel4.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/cancel5.c b/tests/cancel5.c index 6cfff573..9bc770b7 100644 --- a/tests/cancel5.c +++ b/tests/cancel5.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/cancel6a.c b/tests/cancel6a.c index cf60f970..7646458d 100644 --- a/tests/cancel6a.c +++ b/tests/cancel6a.c @@ -4,7 +4,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/cancel6d.c b/tests/cancel6d.c index 5c341050..2ead7dc1 100644 --- a/tests/cancel6d.c +++ b/tests/cancel6d.c @@ -4,7 +4,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/cancel7.c b/tests/cancel7.c index 6d647d29..cd3a5776 100644 --- a/tests/cancel7.c +++ b/tests/cancel7.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/cancel8.c b/tests/cancel8.c index 6cbe61e7..f2c20a25 100644 --- a/tests/cancel8.c +++ b/tests/cancel8.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/cancel9.c b/tests/cancel9.c index 6f21e7e7..52468ac4 100644 --- a/tests/cancel9.c +++ b/tests/cancel9.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/cleanup0.c b/tests/cleanup0.c index e547f7a6..742eaa72 100644 --- a/tests/cleanup0.c +++ b/tests/cleanup0.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/cleanup1.c b/tests/cleanup1.c index bf67f605..85d0e0d2 100644 --- a/tests/cleanup1.c +++ b/tests/cleanup1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/cleanup2.c b/tests/cleanup2.c index ed2f003e..95e893d5 100644 --- a/tests/cleanup2.c +++ b/tests/cleanup2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/cleanup3.c b/tests/cleanup3.c index 394f5f7e..9f4f7716 100644 --- a/tests/cleanup3.c +++ b/tests/cleanup3.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/condvar1.c b/tests/condvar1.c index be495d1d..12e1502f 100644 --- a/tests/condvar1.c +++ b/tests/condvar1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/condvar1_1.c b/tests/condvar1_1.c index d006c0fb..3eb61ed2 100644 --- a/tests/condvar1_1.c +++ b/tests/condvar1_1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/condvar1_2.c b/tests/condvar1_2.c index 7b806e4d..adb5b08d 100644 --- a/tests/condvar1_2.c +++ b/tests/condvar1_2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/condvar2.c b/tests/condvar2.c index ccae417c..453573a4 100644 --- a/tests/condvar2.c +++ b/tests/condvar2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/condvar2_1.c b/tests/condvar2_1.c index 5fe5eb32..75e6a12f 100644 --- a/tests/condvar2_1.c +++ b/tests/condvar2_1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/condvar3.c b/tests/condvar3.c index e55fa795..bd097e24 100644 --- a/tests/condvar3.c +++ b/tests/condvar3.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/condvar3_1.c b/tests/condvar3_1.c index d763e20f..2e5e81ef 100644 --- a/tests/condvar3_1.c +++ b/tests/condvar3_1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/condvar3_2.c b/tests/condvar3_2.c index 9aad4053..43a01f1e 100644 --- a/tests/condvar3_2.c +++ b/tests/condvar3_2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/condvar3_3.c b/tests/condvar3_3.c index 825ba312..51222dd2 100644 --- a/tests/condvar3_3.c +++ b/tests/condvar3_3.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/condvar4.c b/tests/condvar4.c index 70c04455..bf6516fa 100644 --- a/tests/condvar4.c +++ b/tests/condvar4.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/condvar5.c b/tests/condvar5.c index 7a579515..551ffa20 100644 --- a/tests/condvar5.c +++ b/tests/condvar5.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/condvar6.c b/tests/condvar6.c index 43873613..dc495485 100644 --- a/tests/condvar6.c +++ b/tests/condvar6.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/condvar7.c b/tests/condvar7.c index 9aff62c6..00eca82c 100644 --- a/tests/condvar7.c +++ b/tests/condvar7.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/condvar8.c b/tests/condvar8.c index 29a5cb4b..22f23a1a 100644 --- a/tests/condvar8.c +++ b/tests/condvar8.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/condvar9.c b/tests/condvar9.c index 1f3196b4..233f16f7 100644 --- a/tests/condvar9.c +++ b/tests/condvar9.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/context1.c b/tests/context1.c index cd6dd86c..ee5d33dc 100644 --- a/tests/context1.c +++ b/tests/context1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/context2.c b/tests/context2.c index f8a19429..4a4d9837 100644 --- a/tests/context2.c +++ b/tests/context2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/count1.c b/tests/count1.c index ac08017e..e8e4ed3c 100644 --- a/tests/count1.c +++ b/tests/count1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/create1.c b/tests/create1.c index c64b15fd..3ae0d7f6 100644 --- a/tests/create1.c +++ b/tests/create1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/create2.c b/tests/create2.c index 7d73d947..1c2bb8d0 100644 --- a/tests/create2.c +++ b/tests/create2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/create3.c b/tests/create3.c index 3986f091..3422bc20 100644 --- a/tests/create3.c +++ b/tests/create3.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/delay1.c b/tests/delay1.c index eedf79b8..a607fe6a 100644 --- a/tests/delay1.c +++ b/tests/delay1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/delay2.c b/tests/delay2.c index a510415a..7dc68ce1 100644 --- a/tests/delay2.c +++ b/tests/delay2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/detach1.c b/tests/detach1.c index df2dd6cd..d9ebe527 100644 --- a/tests/detach1.c +++ b/tests/detach1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/equal1.c b/tests/equal1.c index 60d3ac07..1b1e6dd0 100644 --- a/tests/equal1.c +++ b/tests/equal1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/errno1.c b/tests/errno1.c index 0a361d0c..29fabf20 100644 --- a/tests/errno1.c +++ b/tests/errno1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/exception1.c b/tests/exception1.c index 96984905..7ee37bdd 100644 --- a/tests/exception1.c +++ b/tests/exception1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/exception2.c b/tests/exception2.c index b155b2f8..ce61b059 100644 --- a/tests/exception2.c +++ b/tests/exception2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/exception3.c b/tests/exception3.c index 210e61a8..f7ae3118 100644 --- a/tests/exception3.c +++ b/tests/exception3.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/exception3_0.c b/tests/exception3_0.c index b791c2ee..b331de79 100644 --- a/tests/exception3_0.c +++ b/tests/exception3_0.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/exit1.c b/tests/exit1.c index e405ea78..73d917cc 100644 --- a/tests/exit1.c +++ b/tests/exit1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/exit2.c b/tests/exit2.c index 60f37f15..af25ec07 100644 --- a/tests/exit2.c +++ b/tests/exit2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/exit3.c b/tests/exit3.c index 0dfe2f3e..a4cb122b 100644 --- a/tests/exit3.c +++ b/tests/exit3.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/exit4.c b/tests/exit4.c index 1395f896..746bfc84 100644 --- a/tests/exit4.c +++ b/tests/exit4.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/exit5.c b/tests/exit5.c index 1c8b9e13..c33e8a9d 100644 --- a/tests/exit5.c +++ b/tests/exit5.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/eyal1.c b/tests/eyal1.c index c80b2f0c..e66fc57b 100644 --- a/tests/eyal1.c +++ b/tests/eyal1.c @@ -5,7 +5,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/inherit1.c b/tests/inherit1.c index 13fb2a89..8fc07764 100644 --- a/tests/inherit1.c +++ b/tests/inherit1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/join0.c b/tests/join0.c index ea628d8a..d7ec9d86 100644 --- a/tests/join0.c +++ b/tests/join0.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/join1.c b/tests/join1.c index d8a2549a..a797417b 100644 --- a/tests/join1.c +++ b/tests/join1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/join2.c b/tests/join2.c index 5ac6c571..fe0b8ea2 100644 --- a/tests/join2.c +++ b/tests/join2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/join3.c b/tests/join3.c index a3b6dd68..80dac319 100644 --- a/tests/join3.c +++ b/tests/join3.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/join4.c b/tests/join4.c index 16aa34dc..62ed56ec 100644 --- a/tests/join4.c +++ b/tests/join4.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/kill1.c b/tests/kill1.c index e9ef224b..2cb3266c 100644 --- a/tests/kill1.c +++ b/tests/kill1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex1.c b/tests/mutex1.c index e2579796..4b28d6d0 100644 --- a/tests/mutex1.c +++ b/tests/mutex1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex1e.c b/tests/mutex1e.c index a9996519..4e7c30f6 100644 --- a/tests/mutex1e.c +++ b/tests/mutex1e.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex1n.c b/tests/mutex1n.c index 41d31168..03caf1eb 100644 --- a/tests/mutex1n.c +++ b/tests/mutex1n.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex1r.c b/tests/mutex1r.c index 83ead94b..22416085 100644 --- a/tests/mutex1r.c +++ b/tests/mutex1r.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex2.c b/tests/mutex2.c index eba52f20..4a332437 100644 --- a/tests/mutex2.c +++ b/tests/mutex2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex2e.c b/tests/mutex2e.c index 293ec135..8748f494 100644 --- a/tests/mutex2e.c +++ b/tests/mutex2e.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex2r.c b/tests/mutex2r.c index 3d1931a7..63630450 100644 --- a/tests/mutex2r.c +++ b/tests/mutex2r.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex3.c b/tests/mutex3.c index f21fb1f2..40ee2666 100644 --- a/tests/mutex3.c +++ b/tests/mutex3.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex3e.c b/tests/mutex3e.c index b27c1142..27e9ab74 100644 --- a/tests/mutex3e.c +++ b/tests/mutex3e.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex3r.c b/tests/mutex3r.c index fa45d022..c2946f22 100644 --- a/tests/mutex3r.c +++ b/tests/mutex3r.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex4.c b/tests/mutex4.c index c04c91d6..b09969e7 100644 --- a/tests/mutex4.c +++ b/tests/mutex4.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex5.c b/tests/mutex5.c index 3fa14952..636adbf4 100644 --- a/tests/mutex5.c +++ b/tests/mutex5.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex6.c b/tests/mutex6.c index dd76166d..b42ed7d8 100644 --- a/tests/mutex6.c +++ b/tests/mutex6.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex6e.c b/tests/mutex6e.c index fb939ffc..7c2f5a73 100644 --- a/tests/mutex6e.c +++ b/tests/mutex6e.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex6es.c b/tests/mutex6es.c index e9541cae..e4059385 100644 --- a/tests/mutex6es.c +++ b/tests/mutex6es.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex6n.c b/tests/mutex6n.c index d55d926b..6d599896 100644 --- a/tests/mutex6n.c +++ b/tests/mutex6n.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex6r.c b/tests/mutex6r.c index 14439682..65827ff6 100644 --- a/tests/mutex6r.c +++ b/tests/mutex6r.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex6rs.c b/tests/mutex6rs.c index cf69c098..c38b0091 100644 --- a/tests/mutex6rs.c +++ b/tests/mutex6rs.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex6s.c b/tests/mutex6s.c index 3522bce7..44638f28 100644 --- a/tests/mutex6s.c +++ b/tests/mutex6s.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex7.c b/tests/mutex7.c index 94766d39..2385e01f 100644 --- a/tests/mutex7.c +++ b/tests/mutex7.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex7e.c b/tests/mutex7e.c index 76d76e95..ea6279cf 100644 --- a/tests/mutex7e.c +++ b/tests/mutex7e.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex7n.c b/tests/mutex7n.c index 145d68fe..d8f339f7 100644 --- a/tests/mutex7n.c +++ b/tests/mutex7n.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex7r.c b/tests/mutex7r.c index 3c046818..3f667ad4 100644 --- a/tests/mutex7r.c +++ b/tests/mutex7r.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex8.c b/tests/mutex8.c index b12eb148..055196ee 100644 --- a/tests/mutex8.c +++ b/tests/mutex8.c @@ -4,7 +4,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex8e.c b/tests/mutex8e.c index b1e559ba..8f59d5ae 100644 --- a/tests/mutex8e.c +++ b/tests/mutex8e.c @@ -4,7 +4,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex8n.c b/tests/mutex8n.c index dda005f6..96ea2e94 100644 --- a/tests/mutex8n.c +++ b/tests/mutex8n.c @@ -4,7 +4,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/mutex8r.c b/tests/mutex8r.c index 2a563993..e811cd85 100644 --- a/tests/mutex8r.c +++ b/tests/mutex8r.c @@ -4,7 +4,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/name_np1.c b/tests/name_np1.c index 9032525d..61bbdefa 100644 --- a/tests/name_np1.c +++ b/tests/name_np1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/name_np2.c b/tests/name_np2.c index fa3f0beb..4c098ec7 100644 --- a/tests/name_np2.c +++ b/tests/name_np2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/once1.c b/tests/once1.c index 68afc821..8a9ab552 100644 --- a/tests/once1.c +++ b/tests/once1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/once2.c b/tests/once2.c index d5dc8fd1..f8243aff 100644 --- a/tests/once2.c +++ b/tests/once2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/once3.c b/tests/once3.c index d21529bb..54073eca 100644 --- a/tests/once3.c +++ b/tests/once3.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/once4.c b/tests/once4.c index 5f57426c..af8d22c6 100644 --- a/tests/once4.c +++ b/tests/once4.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/priority1.c b/tests/priority1.c index 292fed4c..7f29a463 100644 --- a/tests/priority1.c +++ b/tests/priority1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/priority2.c b/tests/priority2.c index fca0b4c7..03963141 100644 --- a/tests/priority2.c +++ b/tests/priority2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/reuse1.c b/tests/reuse1.c index 0c8ff218..ac6158d0 100644 --- a/tests/reuse1.c +++ b/tests/reuse1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/reuse2.c b/tests/reuse2.c index 9ae44fdf..33a8fcbc 100644 --- a/tests/reuse2.c +++ b/tests/reuse2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/robust1.c b/tests/robust1.c index 74976e66..db597c84 100755 --- a/tests/robust1.c +++ b/tests/robust1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/robust2.c b/tests/robust2.c index eae452ed..afdd9b9b 100755 --- a/tests/robust2.c +++ b/tests/robust2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/robust3.c b/tests/robust3.c index b5fda18a..ee96eef3 100755 --- a/tests/robust3.c +++ b/tests/robust3.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/robust4.c b/tests/robust4.c index 182aabc0..9e38b012 100755 --- a/tests/robust4.c +++ b/tests/robust4.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/robust5.c b/tests/robust5.c index 4a51c155..b12b343e 100755 --- a/tests/robust5.c +++ b/tests/robust5.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/rwlock1.c b/tests/rwlock1.c index 63a321f1..1ce05b9f 100644 --- a/tests/rwlock1.c +++ b/tests/rwlock1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/rwlock2.c b/tests/rwlock2.c index 1ab766f5..4b2251ba 100644 --- a/tests/rwlock2.c +++ b/tests/rwlock2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/rwlock2_t.c b/tests/rwlock2_t.c index 82a0581b..e8797930 100644 --- a/tests/rwlock2_t.c +++ b/tests/rwlock2_t.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/rwlock3.c b/tests/rwlock3.c index 0eeafec6..dd46ea4d 100644 --- a/tests/rwlock3.c +++ b/tests/rwlock3.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/rwlock3_t.c b/tests/rwlock3_t.c index 11400053..318e5152 100644 --- a/tests/rwlock3_t.c +++ b/tests/rwlock3_t.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/rwlock4.c b/tests/rwlock4.c index 473b8119..3b71b17e 100644 --- a/tests/rwlock4.c +++ b/tests/rwlock4.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/rwlock4_t.c b/tests/rwlock4_t.c index 79bcd3a7..5dd206d7 100644 --- a/tests/rwlock4_t.c +++ b/tests/rwlock4_t.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/rwlock5.c b/tests/rwlock5.c index 331ad7d2..988e690f 100644 --- a/tests/rwlock5.c +++ b/tests/rwlock5.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/rwlock5_t.c b/tests/rwlock5_t.c index 7651fe44..8cf55c41 100644 --- a/tests/rwlock5_t.c +++ b/tests/rwlock5_t.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/rwlock6.c b/tests/rwlock6.c index 6e31be1d..50b96ec1 100644 --- a/tests/rwlock6.c +++ b/tests/rwlock6.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/rwlock6_t.c b/tests/rwlock6_t.c index aad34a6a..a590922e 100644 --- a/tests/rwlock6_t.c +++ b/tests/rwlock6_t.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/rwlock6_t2.c b/tests/rwlock6_t2.c index 5aaa0ad6..71e957f2 100644 --- a/tests/rwlock6_t2.c +++ b/tests/rwlock6_t2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/self1.c b/tests/self1.c index 145e9e08..ef3a7779 100644 --- a/tests/self1.c +++ b/tests/self1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/self2.c b/tests/self2.c index cf8fce5d..ee067ba9 100644 --- a/tests/self2.c +++ b/tests/self2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/semaphore1.c b/tests/semaphore1.c index f623dc7a..ca5051b1 100644 --- a/tests/semaphore1.c +++ b/tests/semaphore1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/semaphore2.c b/tests/semaphore2.c index 9b10a6a5..2ad3207a 100644 --- a/tests/semaphore2.c +++ b/tests/semaphore2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/semaphore3.c b/tests/semaphore3.c index b76ed2f5..881131f8 100644 --- a/tests/semaphore3.c +++ b/tests/semaphore3.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/semaphore4.c b/tests/semaphore4.c index 4166dff5..06bd1d49 100644 --- a/tests/semaphore4.c +++ b/tests/semaphore4.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/semaphore4t.c b/tests/semaphore4t.c index 11cac910..9ab75a88 100644 --- a/tests/semaphore4t.c +++ b/tests/semaphore4t.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/semaphore5.c b/tests/semaphore5.c index ee967da3..15ee340c 100644 --- a/tests/semaphore5.c +++ b/tests/semaphore5.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/sequence1.c b/tests/sequence1.c index 1a307f49..48e10060 100755 --- a/tests/sequence1.c +++ b/tests/sequence1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/spin1.c b/tests/spin1.c index 881a7913..8aa48203 100644 --- a/tests/spin1.c +++ b/tests/spin1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/spin2.c b/tests/spin2.c index e8d61825..50e1775a 100644 --- a/tests/spin2.c +++ b/tests/spin2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/spin3.c b/tests/spin3.c index fbc8d7c0..a666226a 100644 --- a/tests/spin3.c +++ b/tests/spin3.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/spin4.c b/tests/spin4.c index f9a42c99..0aea33f1 100644 --- a/tests/spin4.c +++ b/tests/spin4.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/stress1.c b/tests/stress1.c index c6be04fe..d6321079 100644 --- a/tests/stress1.c +++ b/tests/stress1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/test.h b/tests/test.h index 1a78c4da..db72214f 100644 --- a/tests/test.h +++ b/tests/test.h @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/timeouts.c b/tests/timeouts.c index e382f417..2a4e97e9 100644 --- a/tests/timeouts.c +++ b/tests/timeouts.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/tryentercs.c b/tests/tryentercs.c index 97d95f5a..51154e69 100644 --- a/tests/tryentercs.c +++ b/tests/tryentercs.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/tryentercs2.c b/tests/tryentercs2.c index 515be2ab..a747b0fb 100644 --- a/tests/tryentercs2.c +++ b/tests/tryentercs2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/tsd1.c b/tests/tsd1.c index 29d61437..ecae5a55 100644 --- a/tests/tsd1.c +++ b/tests/tsd1.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/tsd2.c b/tests/tsd2.c index a9c3bb74..38c8db60 100644 --- a/tests/tsd2.c +++ b/tests/tsd2.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/tsd3.c b/tests/tsd3.c index ef8eb44d..63ecf55c 100644 --- a/tests/tsd3.c +++ b/tests/tsd3.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/valid1.c b/tests/valid1.c index 9b09364d..7bf8f65b 100644 --- a/tests/valid1.c +++ b/tests/valid1.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/tests/valid2.c b/tests/valid2.c index 073fc071..c389c0d8 100644 --- a/tests/valid2.c +++ b/tests/valid2.c @@ -6,7 +6,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/version.rc b/version.rc index c87a9f76..aa0596cc 100644 --- a/version.rc +++ b/version.rc @@ -4,7 +4,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * diff --git a/w32_CancelableWait.c b/w32_CancelableWait.c index 58c11dec..72a0f183 100644 --- a/w32_CancelableWait.c +++ b/w32_CancelableWait.c @@ -8,7 +8,7 @@ * * Pthreads4w - POSIX Threads for Windows * Copyright 1998 John E. Bossom - * Copyright 1999-2016, Pthreads4w contributors + * Copyright 1999-2018, Pthreads4w contributors * * Homepage: https://sourceforge.net/projects/pthreads4w/ * From ca5279b0985f9ab9aabde1e721455310d0719e24 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 09:45:43 +1000 Subject: [PATCH 153/207] Bump library version number; rename macro --- GNUmakefile.in | 69 ++++++++++++++++++++++---------------------- tests/GNUmakefile.in | 36 +++++++++++------------ 2 files changed, 52 insertions(+), 53 deletions(-) diff --git a/GNUmakefile.in b/GNUmakefile.in index 58f9a953..f74b5303 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -32,10 +32,10 @@ PACKAGE = @PACKAGE_TARNAME@ VERSION = @PACKAGE_VERSION@ -DLL_VER = 2$(EXTRAVERSION) +PTW32_VER = 3$(EXTRAVERSION) # See pthread.h and README for the description of version numbering. -DLL_VERD = $(DLL_VER)d +PTW32_VERD = $(PTW32_VER)d srcdir = @srcdir@ builddir = @builddir@ @@ -130,7 +130,7 @@ LFLAGS = $(ARCH) # relies on C++ class destructors being called when leaving scope. # # NOTE 2: If you do this DO NOT distribute your pthreads DLLs with -# the official filenaming, i.e. pthreadVC2.dll, etc. Instead, change DLL_VER +# the official filenaming, i.e. pthreadVC2.dll, etc. Instead, change PTW32_VER # above to "2slgcc" for example, to build "pthreadGC2slgcc.dll", etc. # # FIXME: in this case, convention would have us use LDFLAGS; once again, if @@ -181,23 +181,23 @@ include ${srcdir}/common.mk DLL_OBJS += $(RESOURCE_OBJS) STATIC_OBJS += $(RESOURCE_OBJS) -GCE_DLL = pthreadGCE$(DLL_VER).dll -GCED_DLL= pthreadGCE$(DLL_VERD).dll -GCE_LIB = libpthreadGCE$(DLL_VER).a -GCED_LIB= libpthreadGCE$(DLL_VERD).a - -GC_DLL = pthreadGC$(DLL_VER).dll -GCD_DLL = pthreadGC$(DLL_VERD).dll -GC_LIB = libpthreadGC$(DLL_VER).a -GCD_LIB = libpthreadGC$(DLL_VERD).a -GC_INLINED_STATIC_STAMP = libpthreadGC$(DLL_VER).inlined_static_stamp -GCD_INLINED_STATIC_STAMP = libpthreadGC$(DLL_VERD).inlined_static_stamp -GCE_INLINED_STATIC_STAMP = libpthreadGCE$(DLL_VER).inlined_static_stamp -GCED_INLINED_STATIC_STAMP = libpthreadGCE$(DLL_VERD).inlined_static_stamp -GC_SMALL_STATIC_STAMP = libpthreadGC$(DLL_VER).small_static_stamp -GCD_SMALL_STATIC_STAMP = libpthreadGC$(DLL_VERD).small_static_stamp -GCE_SMALL_STATIC_STAMP = libpthreadGCE$(DLL_VER).small_static_stamp -GCED_SMALL_STATIC_STAMP = libpthreadGCE$(DLL_VERD).small_static_stamp +GCE_DLL = pthreadGCE$(PTW32_VER).dll +GCED_DLL= pthreadGCE$(PTW32_VERD).dll +GCE_LIB = libpthreadGCE$(PTW32_VER).a +GCED_LIB= libpthreadGCE$(PTW32_VERD).a + +GC_DLL = pthreadGC$(PTW32_VER).dll +GCD_DLL = pthreadGC$(PTW32_VERD).dll +GC_LIB = libpthreadGC$(PTW32_VER).a +GCD_LIB = libpthreadGC$(PTW32_VERD).a +GC_INLINED_STATIC_STAMP = libpthreadGC$(PTW32_VER).inlined_static_stamp +GCD_INLINED_STATIC_STAMP = libpthreadGC$(PTW32_VERD).inlined_static_stamp +GCE_INLINED_STATIC_STAMP = libpthreadGCE$(PTW32_VER).inlined_static_stamp +GCED_INLINED_STATIC_STAMP = libpthreadGCE$(PTW32_VERD).inlined_static_stamp +GC_SMALL_STATIC_STAMP = libpthreadGC$(PTW32_VER).small_static_stamp +GCD_SMALL_STATIC_STAMP = libpthreadGC$(PTW32_VERD).small_static_stamp +GCE_SMALL_STATIC_STAMP = libpthreadGCE$(PTW32_VER).small_static_stamp +GCED_SMALL_STATIC_STAMP = libpthreadGCE$(PTW32_VERD).small_static_stamp PTHREAD_DEF = pthread.def @@ -224,14 +224,9 @@ all: @ $(MAKE) clean GC-static @ $(MAKE) clean GCE-static -TEST_ENV = __PTW32_FLAGS="$(__PTW32_FLAGS) -DNO_ERROR_DIALOGS" DLL_VER=$(DLL_VER) ARCH="$(ARCH)" +TEST_ENV = __PTW32_FLAGS="$(__PTW32_FLAGS) -DNO_ERROR_DIALOGS" PTW32_VER=$(PTW32_VER) ARCH="$(ARCH)" all-tests: - $(MAKE) realclean GC-small-static - cd tests && $(MAKE) clean GC-small-static $(TEST_ENV) && $(MAKE) clean GCX-small-static $(TEST_ENV) - $(MAKE) realclean GCE-small-static - cd tests && $(MAKE) clean GCE-small-static $(TEST_ENV) - @ $(ECHO) "$@ completed successfully." $(MAKE) realclean GC cd tests && $(MAKE) clean GC $(TEST_ENV) && $(MAKE) clean GCX $(TEST_ENV) $(MAKE) realclean GCE @@ -240,6 +235,10 @@ all-tests: cd tests && $(MAKE) clean GC-static $(TEST_ENV) && $(MAKE) clean GCX-static $(TEST_ENV) $(MAKE) realclean GCE-static cd tests && $(MAKE) clean GCE-static $(TEST_ENV) + $(MAKE) realclean GC-small-static + cd tests && $(MAKE) clean GC-small-static $(TEST_ENV) && $(MAKE) clean GCX-small-static $(TEST_ENV) + $(MAKE) realclean GCE-small-static + cd tests && $(MAKE) clean GCE-small-static $(TEST_ENV) $(MAKE) realclean @ - $(GREP) Passed *.log | $(COUNT_UNIQ) @ - $(GREP) FAILED *.log @@ -252,37 +251,37 @@ GC: $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL) GC-debug: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_DLL) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_DLL) GCE: $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL) GCE-debug: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_CXX -g -O0" $(GCED_DLL) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_CXX -g -O0" $(GCED_DLL) GC-static: $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_INLINED_STATIC_STAMP) GC-static-debug: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) GC-small-static: $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GC_SMALL_STATIC_STAMP) GC-small-static-debug: - $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) GCE-static: $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_INLINED_STATIC_STAMP) GCE-static-debug: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) GCE-small-static: $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_SMALL_STATIC_STAMP) GCE-small-static-debug: - $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" DLL_VER=$(DLL_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) tests: @ cd tests @@ -310,11 +309,11 @@ install-libs: install-libs-specific install-libs-specific: $(wildcard ${builddir}/libpthreadGC*.a) $(INSTALL_DATA) $^ ${libdir} -default_libs = $(wildcard $(addprefix $1,$(DLL_VER)$2 $(DLL_VERD)$2)) +default_libs = $(wildcard $(addprefix $1,$(PTW32_VER)$2 $(PTW32_VERD)$2)) # FIXME: this is a ghastly, utterly non-deterministic hack; who knows # what it's going to install as the default libpthread.a? Better to -# just explicitly make it a copy of libpthreadGC$(DLL_VER).a +# just explicitly make it a copy of libpthreadGC$(PTW32_VER).a install-libs: install-lib-default install-lib-default: $(call default_libs,libpthreadGC,.a) install-lib-default: $(call default_libs,libpthreadGCE,.a) @@ -322,7 +321,7 @@ install-lib-default: $(call default_libs,libpthreadGCE,.a) # FIXME: similarly, who knows what this will install? Once again, it # would be better to explicitly install libpthread.dll.a as a copy of -# libpthreadGC$(DLL_VER).dll.a +# libpthreadGC$(PTW32_VER).dll.a install-libs: install-implib-default install-implib-default: $(call default_libs,libpthreadGC,.dll.a) install-implib-default: $(call default_libs,libpthreadGCE,.dll.a) diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index 75f4deae..7a4623db 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -40,7 +40,7 @@ LOGFILE = testsuite.log builddir = @builddir@ top_builddir = @top_builddir@ -DLL_VER = 2$(EXTRAVERSION) +PTW32_VER = 3$(EXTRAVERSION) CP = cp -f MV = mv -f @@ -89,7 +89,7 @@ LFLAGS = $(ARCH) $(XXLFLAGS) # relies on C++ class destructors being called when leaving scope. # # NOTE 2: If you do this DO NOT distribute your pthreads DLLs with -# the official filenaming, i.e. pthreadVC2.dll, etc. Instead, change DLL_VER +# the official filenaming, i.e. pthreadVC2.dll, etc. Instead, change PTW32_VER # above to "2slgcc" for example, to build "pthreadGC2slgcc.dll", etc. # #LFLAGS += -static-libgcc -static-libstdc++ @@ -100,7 +100,7 @@ INCLUDES = -I ${top_srcdir} TEST = GC # Default lib version -GCX = GC$(DLL_VER) +GCX = GC$(PTW32_VER) # Files we need to run the tests # - paths are relative to pthreads build dir. @@ -152,49 +152,49 @@ help: @ $(ECHO) "$(MAKE) clean GC TESTS="foo bar" (to build individual tests \"foo.c and bar.c\" with C and run using GC dll)" GC: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" allpassed GC-asm: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" all-asm + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" all-asm GC-bench: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" XXLIBS="benchlib.o" all-bench + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" XXLIBS="benchlib.o" all-bench GC-bench-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" XXLIBS="benchlib.o" OPT="${DOPT}" all-bench + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)d" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" XXLIBS="benchlib.o" OPT="${DOPT}" all-bench GC-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)d" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" OPT="${DOPT}" allpassed GC-static GC-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed GC-static-debug GC-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)d" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed GCE: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__PTW32_CLEANUP_CXX" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(PTW32_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__PTW32_CLEANUP_CXX" allpassed GCE-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_CXX" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(PTW32_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_CXX" OPT="${DOPT}" allpassed GCE-static GCE-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_CXX -D__PTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(PTW32_VER)" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_CXX -D__PTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed GCE-static-debug GCE-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_CXX -D__PTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(PTW32_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_CXX -D__PTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed GCX: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__PTW32_CLEANUP_C" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__PTW32_CLEANUP_C" allpassed GCX-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_C" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_C" OPT="${DOPT}" allpassed GCX-static GCX-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed GCX-static-debug GCX-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(DLL_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed all-asm: $(ASM) @ $(ECHO) "ALL TESTS COMPILED TO ASSEMBLER CODE" From 588dabc75c5ca87a8382937054685d41ef7c60a3 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 09:59:35 +1000 Subject: [PATCH 154/207] More version name and number updates --- Bmakefile | 4 ++-- ChangeLog | 20 +++++++++++++++----- Makefile | 2 +- tests/Bmakefile | 10 +++++----- tests/ChangeLog | 15 +++++++++++++++ tests/Makefile | 2 +- 6 files changed, 39 insertions(+), 14 deletions(-) diff --git a/Bmakefile b/Bmakefile index 8385fd17..80cf135e 100644 --- a/Bmakefile +++ b/Bmakefile @@ -7,14 +7,14 @@ # -DLL_VER = 2 +PTW32_VER = 3 DEVROOT = . DLLDEST = $(DEVROOT)\DLL LIBDEST = $(DEVROOT)\DLL -DLLS = pthreadBC$(DLL_VER).dll +DLLS = pthreadBC$(PTW32_VER).dll OPTIM = /O2 diff --git a/ChangeLog b/ChangeLog index 98a8d6c8..5a0dda81 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2018-08-07 Ross Johnson + + * GNUmakefile.in (DLL_VER): rename as PTW32_VER; increment version number. + * Makefile (DLL_VER): Likewise. + * Bmakefile (DLL_VER): Likewise; does anyone use this anymore? + +2018-07-22 Mark Pizzolato + + * _ptw32.h: Restore support for compiling as static (with /MT or /MTd); + define int64_t and uint64_t as typedefs rather than #defines. + * dll.c: Likewise. + * implement.h: Likewise. + * need_errno.h: Likewise. + * pthread_detach.c: Likewise. + 2018-07-22 Carlo Bramini * context.h (ARM): Additional macros checked for ARM processors. @@ -11,11 +26,6 @@ * Makefile (all-tests-cflags): retain; require all-tests-md and all-tests-mt. -2018-07-22 Mark Pizzolato - - * _ptw32.h (int64_t): change from #define to typedef. - * _ptw32.h (uint64_t): Likewise. - 2016-12-25 Ross Johnson * Change all license notices to the Apache License 2.0 diff --git a/Makefile b/Makefile index c74f8652..ae32a371 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ # PTW32_VER: # See pthread.h and README for the description of version numbering. -PTW32_VER = 2$(EXTRAVERSION) +PTW32_VER = 3$(EXTRAVERSION) PTW32_VER_DEBUG= $(PTW32_VER)d DESTROOT = ..\PTHREADS-BUILT diff --git a/tests/Bmakefile b/tests/Bmakefile index 15054992..a386861a 100644 --- a/tests/Bmakefile +++ b/tests/Bmakefile @@ -31,7 +31,7 @@ # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -DLL_VER = 2 +PTW32_VER = 3 CP = copy RM = erase @@ -51,12 +51,12 @@ XXLIBS = cw32mti.lib ws2_32.lib # C++ Exceptions BCEFLAGS = -P -D__PtW32NoCatchWarn -D__PTW32_CLEANUP_CXX -BCELIB = pthreadBCE$(DLL_VER).lib -BCEDLL = pthreadBCE$(DLL_VER).dll +BCELIB = pthreadBCE$(PTW32_VER).lib +BCEDLL = pthreadBCE$(PTW32_VER).dll # C cleanup code BCFLAGS = -D__PTW32_CLEANUP_C -BCLIB = pthreadBC$(DLL_VER).lib -BCDLL = pthreadBC$(DLL_VER).dll +BCLIB = pthreadBC$(PTW32_VER).lib +BCDLL = pthreadBC$(PTW32_VER).dll # C++ Exceptions in application - using VC version of pthreads dll BCXFLAGS = -D__PTW32_CLEANUP_C diff --git a/tests/ChangeLog b/tests/ChangeLog index fa94ae84..0fb705b9 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,18 @@ +2018-08-07 Ross Johnson + + * GNUmakefile.in (DLL_VER): rename as PTW32_VER; increment version number. + * Makefile (DLL_VER): Likewise. + * Bmakefile (DLL_VER): Likewise; does anyone use this anymore? + +2018-07-22 Mark Pizzolato + + * Makefile: Change the various static test runs to actually + compile with /MT or /MTd, i.e. No mixed /MT and /MD. Static + builds no longer create a separate pthreads*.lib static library + because errno does not work across that linkage. + * sequence1.c: Use more reasonable number of threads to avoid + resource limits. + 2018-07-22 Ross Johnson * reinit1.c: MSVC with /MT flag needs to explicitly call diff --git a/tests/Makefile b/tests/Makefile index 6d747d91..91214f95 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,7 +1,7 @@ # Makefile for the pthreads test suite. # If all of the .pass files can be created, the test suite has passed. -PTW32_VER = 2$(EXTRAVERSION) +PTW32_VER = 3$(EXTRAVERSION) CC = cl /errorReport:none /nologo From ab140a7231bed5d87c9bc82b362379c3a5752e8b Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 11:33:50 +1000 Subject: [PATCH 155/207] Add comment --- implement.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/implement.h b/implement.h index efc5cf31..ae8b49ac 100644 --- a/implement.h +++ b/implement.h @@ -60,6 +60,11 @@ typedef VOID (APIENTRY *PAPCFUNC)(DWORD dwParam); /* * Designed to allow error values to be set and retrieved in builds where * MSCRT libraries are statically linked to DLLs. + * + * This does not handle the case where a static pthreads4w lib is linked + * to a static linked app. Compiling and linking pthreads.c with app.c + * as one does work with the right macros defined. See tests/Makefile + * for clues or just "cd tests && nmake clean VC-static". */ #if ! defined(WINCE) && \ (( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0800 ) || \ From 2dbbd2e111f789c288ff917c1102c46fce6e0608 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 11:35:25 +1000 Subject: [PATCH 156/207] Move internal stuff from pthread.h to _ptw32.h; revert reinit1.c --- _ptw32.h | 36 ++++++++++++++++++++++++++++++++++++ pthread.h | 36 ------------------------------------ tests/ChangeLog | 5 ----- tests/Makefile | 3 +++ tests/reinit1.c | 6 ------ 5 files changed, 39 insertions(+), 47 deletions(-) diff --git a/_ptw32.h b/_ptw32.h index 56b624be..321319db 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -101,6 +101,42 @@ # endif #endif +/* + * If pthreads-win32 is compiled as a DLL with MSVC, and + * both it and the application are linked against the static + * C runtime (i.e. with the /MT compiler flag), then the + * application will not see the same C runtime globals as + * the library. These include the errno variable, and the + * termination routine called by terminate(). For details, + * refer to the following links: + * + * http://support.microsoft.com/kb/94248 + * (Section 4: Problems Encountered When Using Multiple CRT Libraries) + * + * http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/b4500c0d-1b69-40c7-9ef5-08da1025b5bf + * + * When pthreads4w is built with __PTW32_USES_SEPARATE_CRT + * defined, the following features are enabled: + * + * (1) In addition to setting the errno variable when errors + * occur, the library will also call SetLastError() with the + * same value. The application can then use GetLastError() + * to obtain the value of errno. (This pair of routines are + * in kernel32.dll, and so are not affected by the use of + * multiple CRT libraries.) + * + * (2) When C++ or SEH cleanup is used, the library defines + * a function pthread_win32_set_terminate_np(), which can be + * used to set the termination routine that should be called + * when an unhandled exception occurs in a thread function + * (or otherwise inside the library). + * + * Note: "_DLL" implies the /MD compiler flag. + */ +#if defined(_MSC_VER) && !defined(_DLL) && !defined(__PTW32_STATIC_LIB) +# define __PTW32_USES_SEPARATE_CRT +#endif + /* * This is more or less a duplicate of what is in the autoconf config.h, * which is only used when building the pthread-win32 libraries. They diff --git a/pthread.h b/pthread.h index 5ebd9172..4b1e5db1 100644 --- a/pthread.h +++ b/pthread.h @@ -1129,42 +1129,6 @@ __PTW32_DLLPORT int __PTW32_CDECL pthreadCancelableTimedWait (void *waitHandle, # endif #endif -/* - * If pthreads-win32 is compiled as a DLL with MSVC, and - * both it and the application are linked against the static - * C runtime (i.e. with the /MT compiler flag), then the - * application will not see the same C runtime globals as - * the library. These include the errno variable, and the - * termination routine called by terminate(). For details, - * refer to the following links: - * - * http://support.microsoft.com/kb/94248 - * (Section 4: Problems Encountered When Using Multiple CRT Libraries) - * - * http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/b4500c0d-1b69-40c7-9ef5-08da1025b5bf - * - * When pthreads4w is built with __PTW32_USES_SEPARATE_CRT - * defined, the following features are enabled: - * - * (1) In addition to setting the errno variable when errors - * occur, the library will also call SetLastError() with the - * same value. The application can then use GetLastError() - * to obtain the value of errno. (This pair of routines are - * in kernel32.dll, and so are not affected by the use of - * multiple CRT libraries.) - * - * (2) When C++ or SEH cleanup is used, the library defines - * a function pthread_win32_set_terminate_np(), which can be - * used to set the termination routine that should be called - * when an unhandled exception occurs in a thread function - * (or otherwise inside the library). - * - * Note: "_DLL" implies the /MD compiler flag. - */ -#if defined(_MSC_VER) && !defined(_DLL) && !defined(__PTW32_STATIC_LIB) -# define __PTW32_USES_SEPARATE_CRT -#endif - #if defined (__PTW32_USES_SEPARATE_CRT) && (defined(__PTW32_CLEANUP_CXX) || defined(__PTW32_CLEANUP_SEH)) typedef void (*__ptw32_terminate_handler)(); __PTW32_DLLPORT __ptw32_terminate_handler __PTW32_CDECL pthread_win32_set_terminate_np(__ptw32_terminate_handler termFunction); diff --git a/tests/ChangeLog b/tests/ChangeLog index 0fb705b9..07b14d8e 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -13,11 +13,6 @@ * sequence1.c: Use more reasonable number of threads to avoid resource limits. -2018-07-22 Ross Johnson - - * reinit1.c: MSVC with /MT flag needs to explicitly call - pthread_win32_thread_detach_np(). - 2016-12-25 Ross Johnson * Change all license notices to the Apache License 2.0 diff --git a/tests/Makefile b/tests/Makefile index 91214f95..bb1a4724 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -133,6 +133,9 @@ VSE-bench: VCX-bench: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_DLL)" $(BENCHTESTS) +VC-static-lib VC-small-static-lib: + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) /MT" allpassed + VC-static VC-small-static: @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCFLAGS) $(EHFLAGS_STATIC)" allpassed diff --git a/tests/reinit1.c b/tests/reinit1.c index 815ac6d1..81fc4ffb 100644 --- a/tests/reinit1.c +++ b/tests/reinit1.c @@ -146,12 +146,6 @@ main (int argc, char *argv[]) assert(pthread_join (threads[count].thread_id, NULL) == 0); } -#if defined(_MSC_VER) && !defined(_DLL) - /* - * We need this when compiling with MSVC and /MT or /MTd flag - */ - pthread_win32_thread_detach_np(); -#endif pthread_win32_process_detach_np(); pthread_win32_process_attach_np(); } From be94a7ed072d72bb3a4a278db74b804776560d8e Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 13:42:08 +1000 Subject: [PATCH 157/207] Move internal stuff out of pthread.h; remove static non-fix in reinit.c; update changelogs --- ChangeLog | 8 ++++++++ _ptw32.h | 36 ++++++++++++++++++++++++++++++++++++ pthread.h | 36 ------------------------------------ tests/ChangeLog | 11 ++++++----- tests/reinit1.c | 6 ------ 5 files changed, 50 insertions(+), 47 deletions(-) diff --git a/ChangeLog b/ChangeLog index b9867e5d..9ddd94cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2018-08-07 Ross Johnson + + * GNUmakefile.in (DLL_VER): rename as PTW32_VER. + * Makefile (DLL_VER): Likewise. + * Bmakefile (DLL_VER): Likewise; does anyone use this anymore? + * pthread.h: Move internal library stuff from pthread.h to _pthw32.h + * _ptw32.h: As above. + 2018-07-22 Mark Pizzolato * _ptw32.h: Restore support for compiling as static (with /MT or /MTd); diff --git a/_ptw32.h b/_ptw32.h index d66da9af..28bf445d 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -100,6 +100,42 @@ # endif #endif +/* + * If Pthreads4w is compiled as a DLL with MSVC, and + * both it and the application are linked against the static + * C runtime (i.e. with the /MT compiler flag), then the + * application will not see the same C runtime globals as + * the library. These include the errno variable, and the + * termination routine called by terminate(). For details, + * refer to the following links: + * + * http://support.microsoft.com/kb/94248 + * (Section 4: Problems Encountered When Using Multiple CRT Libraries) + * + * http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/b4500c0d-1b69-40c7-9ef5-08da1025b5bf + * + * When Pthreads4w is built with PTW32_USES_SEPARATE_CRT + * defined, the following features are enabled: + * + * (1) In addition to setting the errno variable when errors + * occur, the library will also call SetLastError() with the + * same value. The application can then use GetLastError() + * to obtain the value of errno. (This pair of routines are + * in kernel32.dll, and so are not affected by the use of + * multiple CRT libraries.) + * + * (2) When C++ or SEH cleanup is used, the library defines + * a function pthread_win32_set_terminate_np(), which can be + * used to set the termination routine that should be called + * when an unhandled exception occurs in a thread function + * (or otherwise inside the library). + * + * Note: "_DLL" implies the /MD compiler flag. + */ +#if defined(_MSC_VER) && !defined(_DLL) && !defined(PTW32_STATIC_LIB) +# define PTW32_USES_SEPARATE_CRT +#endif + /* * This is more or less a duplicate of what is in the autoconf config.h, * which is only used when building the pthread-win32 libraries. They diff --git a/pthread.h b/pthread.h index 488c8a08..7108b303 100644 --- a/pthread.h +++ b/pthread.h @@ -1129,42 +1129,6 @@ PTW32_DLLPORT int PTW32_CDECL pthreadCancelableTimedWait (void *waitHandle, # endif #endif -/* - * If Pthreads4w is compiled as a DLL with MSVC, and - * both it and the application are linked against the static - * C runtime (i.e. with the /MT compiler flag), then the - * application will not see the same C runtime globals as - * the library. These include the errno variable, and the - * termination routine called by terminate(). For details, - * refer to the following links: - * - * http://support.microsoft.com/kb/94248 - * (Section 4: Problems Encountered When Using Multiple CRT Libraries) - * - * http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/b4500c0d-1b69-40c7-9ef5-08da1025b5bf - * - * When Pthreads4w is built with PTW32_USES_SEPARATE_CRT - * defined, the following features are enabled: - * - * (1) In addition to setting the errno variable when errors - * occur, the library will also call SetLastError() with the - * same value. The application can then use GetLastError() - * to obtain the value of errno. (This pair of routines are - * in kernel32.dll, and so are not affected by the use of - * multiple CRT libraries.) - * - * (2) When C++ or SEH cleanup is used, the library defines - * a function pthread_win32_set_terminate_np(), which can be - * used to set the termination routine that should be called - * when an unhandled exception occurs in a thread function - * (or otherwise inside the library). - * - * Note: "_DLL" implies the /MD compiler flag. - */ -#if defined(_MSC_VER) && !defined(_DLL) && !defined(PTW32_STATIC_LIB) -# define PTW32_USES_SEPARATE_CRT -#endif - #if defined(PTW32_USES_SEPARATE_CRT) && (defined(__CLEANUP_CXX) || defined(__CLEANUP_SEH)) typedef void (*ptw32_terminate_handler)(); PTW32_DLLPORT ptw32_terminate_handler PTW32_CDECL pthread_win32_set_terminate_np(ptw32_terminate_handler termFunction); diff --git a/tests/ChangeLog b/tests/ChangeLog index 0e849b8d..c83d3ca0 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,9 @@ +2018-08-07 Ross Johnson + + * GNUmakefile.in (DLL_VER): rename as PTW32_VER. + * Makefile (DLL_VER): Likewise. + * Bmakefile (DLL_VER): Likewise; does anyone use this anymore? + 2018-07-22 Mark Pizzolato * Makefile: Change the various static test runs to actually @@ -7,11 +13,6 @@ * sequence1.c: Use more reasonable number of threads to avoid resource limits. -2018-07-22 Ross Johnson - - * reinit1.c: MSVC with /MT flag needs to explicitly call - pthread_win32_thread_detach_np(). - 2016-12-21 Ross Johnson * mutex6.c: fix random failures by using a polling loop to replace diff --git a/tests/reinit1.c b/tests/reinit1.c index 815ac6d1..81fc4ffb 100644 --- a/tests/reinit1.c +++ b/tests/reinit1.c @@ -146,12 +146,6 @@ main (int argc, char *argv[]) assert(pthread_join (threads[count].thread_id, NULL) == 0); } -#if defined(_MSC_VER) && !defined(_DLL) - /* - * We need this when compiling with MSVC and /MT or /MTd flag - */ - pthread_win32_thread_detach_np(); -#endif pthread_win32_process_detach_np(); pthread_win32_process_attach_np(); } From 2d731b4e0eccd93c14f84f9194bfab0f53fdaa0f Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 16:39:07 +1000 Subject: [PATCH 158/207] Call both _set_errno() and SetLastError() --- implement.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/implement.h b/implement.h index dc1ef4d8..58114dc6 100644 --- a/implement.h +++ b/implement.h @@ -71,26 +71,18 @@ __attribute__((unused)) # endif static int ptw32_get_errno(void) { int err = 0; _get_errno(&err); return err; } # define PTW32_GET_ERRNO() ptw32_get_errno() -# if defined(PTW32_USES_SEPARATE_CRT) -# if defined(__MINGW32__) +# if defined(__MINGW32__) __attribute__((unused)) -# endif +# endif static void ptw32_set_errno(int err) { _set_errno(err); SetLastError(err); } # define PTW32_SET_ERRNO(err) ptw32_set_errno(err) -# else -# define PTW32_SET_ERRNO(err) _set_errno(err) -# endif #else # define PTW32_GET_ERRNO() (errno) -# if defined(PTW32_USES_SEPARATE_CRT) -# if defined(__MINGW32__) +# if defined(__MINGW32__) __attribute__((unused)) -# endif +# endif static void ptw32_set_errno(int err) { errno = err; SetLastError(err); } # define PTW32_SET_ERRNO(err) ptw32_set_errno(err) -# else -# define PTW32_SET_ERRNO(err) (errno = (err)) -# endif #endif #if !defined(malloc) From e3b9eeb481f2583d8e8826331c2ab5cbb41cf65a Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 16:40:50 +1000 Subject: [PATCH 159/207] Remove attempt to conditionally set macro; require user to define it if needed --- _ptw32.h | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/_ptw32.h b/_ptw32.h index 28bf445d..d66da9af 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -100,42 +100,6 @@ # endif #endif -/* - * If Pthreads4w is compiled as a DLL with MSVC, and - * both it and the application are linked against the static - * C runtime (i.e. with the /MT compiler flag), then the - * application will not see the same C runtime globals as - * the library. These include the errno variable, and the - * termination routine called by terminate(). For details, - * refer to the following links: - * - * http://support.microsoft.com/kb/94248 - * (Section 4: Problems Encountered When Using Multiple CRT Libraries) - * - * http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/b4500c0d-1b69-40c7-9ef5-08da1025b5bf - * - * When Pthreads4w is built with PTW32_USES_SEPARATE_CRT - * defined, the following features are enabled: - * - * (1) In addition to setting the errno variable when errors - * occur, the library will also call SetLastError() with the - * same value. The application can then use GetLastError() - * to obtain the value of errno. (This pair of routines are - * in kernel32.dll, and so are not affected by the use of - * multiple CRT libraries.) - * - * (2) When C++ or SEH cleanup is used, the library defines - * a function pthread_win32_set_terminate_np(), which can be - * used to set the termination routine that should be called - * when an unhandled exception occurs in a thread function - * (or otherwise inside the library). - * - * Note: "_DLL" implies the /MD compiler flag. - */ -#if defined(_MSC_VER) && !defined(_DLL) && !defined(PTW32_STATIC_LIB) -# define PTW32_USES_SEPARATE_CRT -#endif - /* * This is more or less a duplicate of what is in the autoconf config.h, * which is only used when building the pthread-win32 libraries. They From 1b76eab50a7c2ef0759f6f61a9d57e1c9d1e1323 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 17:02:48 +1000 Subject: [PATCH 160/207] Add new test --- tests/common.mk | 2 +- tests/runorder.mk | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/common.mk b/tests/common.mk index 61a49505..cd810676 100644 --- a/tests/common.mk +++ b/tests/common.mk @@ -19,7 +19,7 @@ ALL_KNOWN_TESTS = \ delay1 delay2 \ detach1 \ equal1 \ - errno1 \ + errno1 errno0 \ exception1 exception2 exception3_0 exception3 \ exit1 exit2 exit3 exit4 exit5 exit6 \ eyal1 \ diff --git a/tests/runorder.mk b/tests/runorder.mk index b16be2e0..54bf0be8 100644 --- a/tests/runorder.mk +++ b/tests/runorder.mk @@ -7,7 +7,7 @@ benchtest3.bench: benchtest4.bench: benchtest5.bench: -affinity1.pass: +affinity1.pass: errno0.pass affinity2.pass: affinity1.pass affinity3.pass: affinity2.pass self1.pass create3.pass affinity4.pass: affinity3.pass @@ -57,6 +57,7 @@ delay1.pass: self1.pass create3.pass delay2.pass: delay1.pass detach1.pass: join0.pass equal1.pass: self1.pass create1.pass +errno0.pass: sizes.pass errno1.pass: mutex3.pass exception1.pass: cancel4.pass exception2.pass: exception1.pass From 566751f8a968d8cdbba078b0973934c8d70171e5 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 18:07:28 +1000 Subject: [PATCH 161/207] Rename static libraries as libpthreadV*.lib to differentiate them from DLL import libs. --- ChangeLog | 3 +++ Makefile | 53 +++++++++++++++++++++++--------------- tests/ChangeLog | 3 +++ tests/Makefile | 68 +++++++++++++++++++++++++++---------------------- 4 files changed, 76 insertions(+), 51 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9ddd94cd..6b7aafef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ * Bmakefile (DLL_VER): Likewise; does anyone use this anymore? * pthread.h: Move internal library stuff from pthread.h to _pthw32.h * _ptw32.h: As above. + * ANNOUNCE: Update. + * NEWS: Update. + * Makefile: Static libraries renamed to libpthreadV* 2018-07-22 Mark Pizzolato diff --git a/Makefile b/Makefile index c5b2d3dc..4be5d570 100644 --- a/Makefile +++ b/Makefile @@ -82,12 +82,20 @@ help: # @ echo nmake clean VSE-small-static-debug all: + $(MAKE) /E clean VC-static + $(MAKE) /E clean VCE-static + $(MAKE) /E clean VSE-static + $(MAKE) /E clean VC-static-debug + $(MAKE) /E clean VCE-static-debug + $(MAKE) /E clean VSE-static-debug + $(MAKE) /E clean + $(MAKE) /E clean VC $(MAKE) /E clean VCE $(MAKE) /E clean VSE - $(MAKE) /E clean VC + $(MAKE) /E clean VC-debug $(MAKE) /E clean VCE-debug $(MAKE) /E clean VSE-debug - $(MAKE) /E clean VC-debug + $(MAKE) /E clean TEST_ENV = CFLAGS="$(CFLAGS) /DNO_ERROR_DIALOGS" @@ -95,16 +103,19 @@ all-tests: $(MAKE) all-tests-md all-tests-mt all-tests-dll: - $(MAKE) /E realclean VC$(XDBG) && cd tests - $(MAKE) /E clean VC$(XDBG) $(TEST_ENV) + $(MAKE) /E realclean VC$(XDBG) + cd tests && $(MAKE) /E clean VC$(XDBG) $(TEST_ENV) $(MAKE) /E realclean VCE$(XDBG) cd tests && $(MAKE) /E clean VCE$(XDBG) $(TEST_ENV) $(MAKE) /E realclean VSE$(XDBG) cd tests && $(MAKE) /E clean VSE$(XDBG) $(TEST_ENV) all-tests-static: + $(MAKE) /E realclean VC-static$(XDBG) cd tests && $(MAKE) /E clean VC-static$(XDBG) $(TEST_ENV) + $(MAKE) /E realclean VCE-static$(XDBG) cd tests && $(MAKE) /E clean VCE-static$(XDBG) $(TEST_ENV) + $(MAKE) /E realclean VSE-static$(XDBG) cd tests && $(MAKE) /E clean VSE-static$(XDBG) $(TEST_ENV) $(MAKE) realclean @ echo $@ completed successfully. @@ -126,22 +137,22 @@ all-tests-mt: @ echo $@ completed successfully. VCE: - @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(PTW32_VER).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /MD /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(PTW32_VER).dll VCE-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /MDd /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).dll VSE: - @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(PTW32_VER).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /MD /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(PTW32_VER).dll VSE-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /MDd /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).dll VC: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(PTW32_VER).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /MD /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(PTW32_VER).dll VC-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).dll + @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /MDd /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).dll # # Static builds @@ -165,22 +176,22 @@ VC-debug: # @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).small_static_stamp VCE-static: - @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(PTW32_VER).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /MT /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(PTW32_VER).inlined_static_stamp VCE-static-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /MTd /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).inlined_static_stamp VSE-static: - @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(PTW32_VER).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGS) /MT /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(PTW32_VER).inlined_static_stamp VSE-static-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VSEFLAGSD) /MTd /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).inlined_static_stamp VC-static: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(PTW32_VER).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /MT /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(PTW32_VER).inlined_static_stamp VC-static-debug: - @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).inlined_static_stamp + @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /MTd /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).inlined_static_stamp realclean: clean @@ -188,7 +199,6 @@ realclean: clean if exist *.lib del *.lib if exist *.a del *.a if exist *.manifest del *.manifest - if exist *_stamp del *_stamp if exist make.log.txt del make.log.txt cd tests && $(MAKE) clean @@ -202,6 +212,7 @@ clean: if exist *.o del *.o if exist *.i del *.i if exist *.res del *.res + if exist *_stamp del *_stamp # Very basic install. It assumes "realclean" was done just prior to build target if # you want the installed $(DEVDEST_LIB_NAME) to match that build. @@ -226,13 +237,13 @@ $(DLLS): $(DLL_OBJS) $(CC) /LDd /Zi $(DLL_OBJS) /link /implib:$*.lib $(XLIBS) /out:$@ $(INLINED_STATIC_STAMPS): $(DLL_OBJS) - if exist $*.lib del $*.lib - lib $(DLL_OBJS) /out:$*.lib + if exist lib$*.lib del lib$*.lib + lib $(DLL_OBJS) /out:lib$*.lib echo. >$@ $(SMALL_STATIC_STAMPS): $(STATIC_OBJS) - if exist $*.lib del $*.lib - lib $(STATIC_OBJS) /out:$*.lib + if exist lib$*.lib del lib$*.lib + lib $(STATIC_OBJS) /out:lib$*.lib echo. >$@ .c.obj: diff --git a/tests/ChangeLog b/tests/ChangeLog index c83d3ca0..5d765d4a 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -3,6 +3,9 @@ * GNUmakefile.in (DLL_VER): rename as PTW32_VER. * Makefile (DLL_VER): Likewise. * Bmakefile (DLL_VER): Likewise; does anyone use this anymore? + * Makefile: Variable renaming: e.g. VCLIB to VCIMP for DLL import + library pthreadVC2.lib and VCLIB now holds static library name + libpthreadVC2.lib, and similar for the other cleanup method versions. 2018-07-22 Mark Pizzolato diff --git a/tests/Makefile b/tests/Makefile index a35fd1f8..857d8775 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -52,21 +52,27 @@ XXLIBS = ws2_32.lib # C++ Exceptions VCEFLAGS = /EHs /TP /DPtW32NoCatchWarn /D__CLEANUP_CXX -VCELIB = pthreadVCE$(PTW32_VER).lib +VCELIB = libpthreadVCE$(PTW32_VER).lib +VCEIMP = pthreadVCE$(PTW32_VER).lib VCEDLL = pthreadVCE$(PTW32_VER).dll -VCELIBD = pthreadVCE$(PTW32_VER)d.lib +VCELIBD = libpthreadVCE$(PTW32_VER)d.lib +VCEIMPD = pthreadVCE$(PTW32_VER)d.lib VCEDLLD = pthreadVCE$(PTW32_VER)d.dll # Structured Exceptions VSEFLAGS = /D__CLEANUP_SEH -VSELIB = pthreadVSE$(PTW32_VER).lib +VSELIB = libpthreadVSE$(PTW32_VER).lib +VSEIMP = pthreadVSE$(PTW32_VER).lib VSEDLL = pthreadVSE$(PTW32_VER).dll -VSELIBD = pthreadVSE$(PTW32_VER)d.lib +VSELIBD = libpthreadVSE$(PTW32_VER)d.lib +VSEIMPD = pthreadVSE$(PTW32_VER)d.lib VSEDLLD = pthreadVSE$(PTW32_VER)d.dll # C cleanup code VCFLAGS = /D__CLEANUP_C -VCLIB = pthreadVC$(PTW32_VER).lib +VCLIB = libpthreadVC$(PTW32_VER).lib +VCIMP = pthreadVC$(PTW32_VER).lib VCDLL = pthreadVC$(PTW32_VER).dll -VCLIBD = pthreadVC$(PTW32_VER)d.lib +VCLIBD = libpthreadVC$(PTW32_VER)d.lib +VCIMPD = pthreadVC$(PTW32_VER)d.lib VCDLLD = pthreadVC$(PTW32_VER)d.dll # C++ Exceptions in application - using VC version of pthreads dll VCXFLAGS = /EHs /TP /D__CLEANUP_C @@ -82,8 +88,10 @@ INCLUDES = -I. BUILD_DIR = .. EHFLAGS = -EHFLAGS_STATIC = /MT /DPTW32_STATIC_LIB -I$(BUILD_DIR) /DHAVE_CONFIG_H /DPTW32_BUILD_INLINED $(BUILD_DIR)\pthread.c -EHFLAGS_STATIC_DEBUG = /MTd /DPTW32_STATIC_LIB -I$(BUILD_DIR) /DHAVE_CONFIG_H /DPTW32_BUILD_INLINED $(BUILD_DIR)\pthread.c +EHFLAGS_DLL = /MD +EHFLAGS_DLL_DEBUG = /MDd +EHFLAGS_STATIC = /MT +EHFLAGS_STATIC_DEBUG = /MTd # If a test case returns a non-zero exit code to the shell, make will # stop. @@ -136,76 +144,76 @@ help: @ $(ECHO) nmake clean VSE-small-static-debug VC: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCIMP)" CPDLL="$(VCDLL)" EHFLAGS="$(VCFLAGS) $(EHFLAGS_DLL)" allpassed VCE: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="$(VCEDLL)" EHFLAGS="$(VCEFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCEIMP)" CPDLL="$(VCEDLL)" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_DLL)" allpassed VSE: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="$(VSEDLL)" EHFLAGS="$(VSEFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSEIMP)" CPDLL="$(VSEDLL)" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_DLL)" allpassed VCX: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCXFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCIMP)" CPDLL="$(VCDLL)" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_DLL)" allpassed VC-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCFLAGS)" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCIMP)" CPDLL="$(VCDLL)" EHFLAGS="$(VCFLAGS) $(EHFLAGS_DLL)" $(BENCHTESTS) VCE-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="$(VCEDLL)" EHFLAGS="$(VCEFLAGS)" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCEIMP)" CPDLL="$(VCEDLL)" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_DLL)" $(BENCHTESTS) VSE-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="$(VSEDLL)" EHFLAGS="$(VSEFLAGS)" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSEIMP)" CPDLL="$(VSEDLL)" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_DLL)" $(BENCHTESTS) VCX-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCXFLAGS)" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCIMP)" CPDLL="$(VCDLL)" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_DLL)" $(BENCHTESTS) VC-static VC-small-static: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCFLAGS) $(EHFLAGS_STATIC)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) $(EHFLAGS_STATIC)" allpassed VCE-static VCE-small-static: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_STATIC)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_STATIC)" allpassed VSE-static VSE-small-static: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_STATIC)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_STATIC)" allpassed VCX-static VCX-small-static: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_STATIC)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_STATIC)" allpassed VC-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) VCE-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) VSE-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) VCX-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) VC-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCIMPD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCFLAGS) $(EHFLAGS_DLL_DEBUG)" allpassed VC-static-debug VC-small-static-debug: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed VCE-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIBD)" CPDLL="$(VCEDLLD)" EHFLAGS="$(VCEFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCEIMPD)" CPDLL="$(VCEDLLD)" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_DLL_DEBUG)" allpassed VCE-static-debug VCE-small-static-debug: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIBD)" CPDLL="" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed VSE-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIBD)" CPDLL="$(VSEDLLD)" EHFLAGS="$(VSEFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSEIMPD)" CPDLL="$(VSEDLLD)" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_DLL_DEBUG)" allpassed VSE-static-debug VSE-small-static-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIBD)" CPDLL="" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed VCX-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCXFLAGS)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCIMPD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_DLL_DEBUG)" allpassed VCX-static-debug VCX-small-static-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed clean: if exist *.dll $(RM) *.dll From 7bb0f2414c91af91be54a3ca6a35286c7256a0d9 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 18:08:20 +1000 Subject: [PATCH 162/207] Add asserts to all pthreads calls --- tests/timeouts.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/timeouts.c b/tests/timeouts.c index a75c1353..057da7f0 100644 --- a/tests/timeouts.c +++ b/tests/timeouts.c @@ -182,19 +182,19 @@ 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_); + assert(0 == pthread_mutexattr_init(&mattr_)); + assert(0 == pthread_mutex_init(&mutex_, &mattr_)); + assert(0 == pthread_condattr_init(&cattr_)); + assert(0 == 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_); + assert(0 == pthread_cond_destroy(&cv_)); + assert(0 == pthread_mutex_destroy(&mutex_)); + assert(0 == pthread_mutexattr_destroy(&mattr_)); + assert(0 == pthread_condattr_destroy(&cattr_)); return 0; } @@ -210,12 +210,12 @@ int Wait(time_t sec, long nsec) abstime.tv_sec += sc; abstime.tv_nsec %= 1000000000L; } - pthread_mutex_lock(&mutex_); + assert(0 == pthread_mutex_lock(&mutex_)); /* * We don't need to check the CV. */ - result = pthread_cond_timedwait(&cv_, &mutex_, &abstime); - pthread_mutex_unlock(&mutex_); + assert(ETIMEDOUT == (result = pthread_cond_timedwait(&cv_, &mutex_, &abstime))); + assert(0 == pthread_mutex_unlock(&mutex_)); return result; } From df26ff6ea89e874578b6de4ffc0554c32db3fdd7 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 18:09:32 +1000 Subject: [PATCH 163/207] New test --- tests/errno0.c | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 tests/errno0.c diff --git a/tests/errno0.c b/tests/errno0.c new file mode 100644 index 00000000..108b038e --- /dev/null +++ b/tests/errno0.c @@ -0,0 +1,99 @@ +/* + * File: errno2.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2018, 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/ + * + * This file is part of Pthreads4w. + * + * Pthreads4w is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads4w is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads4w. If not, see . * + * + * -------------------------------------------------------------------------- + * + * Test Synopsis: Test transmissibility of errno between library and exe + * - + * + * Test Method (Validation or Falsification): + * - Validation + * + * 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: + * - + * + * Pass Criteria: + * - Process returns zero exit status. + * + * Fail Criteria: + * - Process returns non-zero exit status. + */ + +#include "test.h" + +int +main() +{ + int err = 0; + errno = 0; + + assert(errno == 0); + assert(0 != sem_destroy(NULL)); + + err = +#if defined(PTW32_USES_SEPARATE_CRT) + GetLastError(); +#else + errno; +#endif + + assert(err != 0); + assert(err == EINVAL); + + /* + * Success. + */ + return 0; +} From 81967b5f47f9091e4e70d1050dacf318ed3b0572 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 18:11:19 +1000 Subject: [PATCH 164/207] Fix preprocessor conditional --- ptw32_threadStart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ptw32_threadStart.c b/ptw32_threadStart.c index b4eff82b..fb1ced9b 100644 --- a/ptw32_threadStart.c +++ b/ptw32_threadStart.c @@ -318,7 +318,7 @@ ptw32_threadStart (void *vthreadParms) # pragma optimize("", on) #endif -#if defined (PTW32_USES_SEPARATE_CRT) && defined (__cplusplus) +#if defined (PTW32_USES_SEPARATE_CRT) && (defined(__CLEANUP_CXX) || defined(__CLEANUP_SEH)) ptw32_terminate_handler pthread_win32_set_terminate_np(ptw32_terminate_handler termFunction) { From 1939993764aba49d3a00fd8ea79ce15d0b5fb9b5 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 18:11:52 +1000 Subject: [PATCH 165/207] Add description for errno handling features --- README.NONPORTABLE | 1759 ++++++++++++++++++++++---------------------- 1 file changed, 899 insertions(+), 860 deletions(-) diff --git a/README.NONPORTABLE b/README.NONPORTABLE index bbf40d57..8e89ad1c 100644 --- a/README.NONPORTABLE +++ b/README.NONPORTABLE @@ -1,860 +1,899 @@ -This file documents non-portable functions and other issues. - -Non-portable functions included in Pthreads4w -------------------------------------------------- - -BOOL -pthread_win32_test_features_np(int mask) - - This routine allows an application to check which - run-time auto-detected features are available within - the library. - - The possible features are: - - PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE - Return TRUE if the native version of - InterlockedCompareExchange() is being used. - This feature is not meaningful in recent - library versions as MSVC builds only support - system implemented ICE. Note that all Mingw - builds use inlined asm versions of all the - Interlocked routines. - PTW32_ALERTABLE_ASYNC_CANCEL - Return TRUE is the QueueUserAPCEx package - QUSEREX.DLL is available and the AlertDrv.sys - driver is loaded into Windows, providing - alertable (pre-emptive) asyncronous threads - cancellation. If this feature returns FALSE - then the default async cancel scheme is in - use, which cannot cancel blocked threads. - - Features may be Or'ed into the mask parameter, in which case - the routine returns TRUE if any of the Or'ed features would - return TRUE. At this stage it doesn't make sense to Or features - but it may some day. - - -void * -pthread_timechange_handler_np(void *) - - To improve tolerance against operator or time service - initiated system clock changes. - - This routine can be called by an application when it - receives a WM_TIMECHANGE message from the system. At - present it broadcasts all condition variables so that - waiting threads can wake up and re-evaluate their - conditions and restart their timed waits if required. - - It has the same return type and argument type as a - thread routine so that it may be called directly - through pthread_create(), i.e. as a separate thread. - - Parameters - - Although a parameter must be supplied, it is ignored. - The value NULL can be used. - - Return values - - It can return an error EAGAIN to indicate that not - all condition variables were broadcast for some reason. - Otherwise, 0 is returned. - - If run as a thread, the return value is returned - through pthread_join(). - - The return value should be cast to an integer. - - -HANDLE -pthread_getw32threadhandle_np(pthread_t thread); - - Returns the win32 thread handle that the POSIX - thread "thread" is running as. - - Applications can use the win32 handle to set - win32 specific attributes of the thread. - -DWORD -pthread_getw32threadid_np (pthread_t thread) - - Returns the Windows native thread ID that the POSIX - thread "thread" is running as. - - Only valid when the library is built where - ! (defined(__MINGW64__) || defined(__MINGW32__)) || defined (__MSVCRT__) || defined (__DMC__) - and otherwise returns 0. - - -int -pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, int kind) - -int -pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, int *kind) - - These two routines are included for Linux compatibility - and are direct equivalents to the standard routines - pthread_mutexattr_settype - pthread_mutexattr_gettype - - pthread_mutexattr_setkind_np accepts the following - mutex kinds: - PTHREAD_MUTEX_FAST_NP - PTHREAD_MUTEX_ERRORCHECK_NP - PTHREAD_MUTEX_RECURSIVE_NP - - These are really just equivalent to (respectively): - PTHREAD_MUTEX_NORMAL - PTHREAD_MUTEX_ERRORCHECK - PTHREAD_MUTEX_RECURSIVE - - -int -pthread_delay_np (const struct timespec *interval) - - This routine causes a thread to delay execution for a specific period of time. - This period ends at the current time plus the specified interval. The routine - will not return before the end of the period is reached, but may return an - arbitrary amount of time after the period has gone by. This can be due to - system load, thread priorities, and system timer granularity. - - Specifying an interval of zero (0) seconds and zero (0) nanoseconds is - allowed and can be used to force the thread to give up the processor or to - deliver a pending cancellation request. - - This routine is a cancellation point. - - The timespec structure contains the following two fields: - - tv_sec is an integer number of seconds. - tv_nsec is an integer number of nanoseconds. - - Return Values - - If an error condition occurs, this routine returns an integer value - indicating the type of error. Possible return values are as follows: - - 0 Successful completion. - [EINVAL] The value specified by interval is invalid. - - -__int64 -pthread_getunique_np (pthread_t thr) - - Returns the unique number associated with thread thr. - The unique numbers are a simple way of positively identifying a thread when - pthread_t cannot be relied upon to identify the true thread instance. I.e. a - pthread_t value may be assigned to different threads throughout the life of a - process. - - Because pthreads4w (Pthreads4w) threads can be uniquely identified by their - pthread_t values this routine is provided only for source code compatibility. - - NOTE: if the library is re-initialised, i.e. by calling pthread_win32_process_detach_np() - followed by pthread_win32_process_attach_np(), then the unique number is reset along with - several other library global values. Library reinitialisation should not be required, - however, some older applications may still call these routines as they were once required to - do when statically linking the library. - -int -pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec *abstime) - -int -pthread_tryjoin_np (pthread_t thread, void **value_ptr) - - These function is added for compatibility with Linux. - - -int -pthread_num_processors_np (void) - - This routine (found on HPUX systems) returns the number of processors - in the system. This implementation actually returns the number of - processors available to the process, which can be a lower number - than the system's number, depending on the process's affinity mask. - - -BOOL -pthread_win32_process_attach_np (void); - -BOOL -pthread_win32_process_detach_np (void); - -BOOL -pthread_win32_thread_attach_np (void); - -BOOL -pthread_win32_thread_detach_np (void); - - These functions contain the code normally run via DllMain - when the library is used as a dll. As of version 2.9.0 of the - library, static builds using either MSC or GCC will call - pthread_win32_process_* automatically at application startup and - exit respectively. - - pthread_win32_thread_attach_np() is currently a no-op. - - pthread_win32_thread_detach_np() is not a no-op. It cleans up the - implicit pthread handle that is allocated to any thread not started - via pthread_create(). Such non-posix threads should call this routine - when they exit, or call pthread_exit() to both cleanup and exit. - - These functions invariably return TRUE except for - pthread_win32_process_attach_np() which will return FALSE - if Pthreads4w initialisation fails. - - -int -pthread_attr_getaffinity_np (pthread_attr_t * attr, size_t cpusetsize, cpu_set_t * cpuset); - -int -pthread_attr_setaffinity_np (pthread_attr_t * attr, size_t cpusetsize, const cpu_set_t * cpuset); - -int -pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t * cpuset); - -int -pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, const cpu_set_t * cpuset); - - Manipulate the CPU affinity of threads. Compatibility with libgcc-based pthreads - implementations. - - -int -pthreadCancelableWait (HANDLE waitHandle); - -int -pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout); - - These two functions provide hooks into the pthread_cancel - mechanism that will allow you to wait on a Windows handle - and make it a cancellation point. Both functions block - until either the given w32 handle is signaled, or - pthread_cancel has been called. It is implemented using - WaitForMultipleObjects on 'waitHandle' and a manually - reset w32 event used to implement pthread_cancel. - -int -pthread_getname_np(pthread_t thr, char *name, int len); - -If PTW32_COMPATIBILITY_BSD or PTW32_COMPATIBILITY_TRU64 defined -int -pthread_setname_np(pthread_t thr, const char *name, void *arg); - -Otherwise: -int -pthread_setname_np(pthread_t thr, const char *name); - - Set and get thread names. Compatibility. - - -struct timespec * -pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * relative); - - Primarily to facilitate writing unit tests but exported for convenience. - The struct timespec pointed to by the first parameter is modified to represent the - time 'now' plus an optional offset value timespec in a platform optimal way. - Returns the first parameter so is compatible as the struct timespec * parameter in - POSIX timed function calls, e.g. - - struct timespec abstime, reltime = { 0, 5000000 } /* 5 ms */; - pthread_mutex_timedwait(&mtx, pthread_win32_getabstime_np(&abstime, &reltime)); - - -Non-portable issues -------------------- - -Thread priority - - POSIX defines a single contiguous range of numbers that determine a - thread's priority. Win32 defines priority classes and priority - levels relative to these classes. Classes are simply priority base - levels that the defined priority levels are relative to such that, - changing a process's priority class will change the priority of all - of it's threads, while the threads retain the same relativity to each - other. - - A Win32 system defines a single contiguous monotonic range of values - that define system priority levels, just like POSIX. However, Win32 - restricts individual threads to a subset of this range on a - per-process basis. - - The following table shows the base priority levels for combinations - of priority class and priority value in Win32. - - Process Priority Class Thread Priority Level - ----------------------------------------------------------------- - 1 IDLE_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 HIGH_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 2 IDLE_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 3 IDLE_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 4 IDLE_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 4 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 5 IDLE_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 5 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 5 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 6 IDLE_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 6 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 6 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 7 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 7 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 7 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 8 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 8 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 8 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 8 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 9 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 9 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 9 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 10 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 10 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 11 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 11 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 11 HIGH_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 12 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 12 HIGH_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 13 HIGH_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 14 HIGH_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 IDLE_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 16 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 17 REALTIME_PRIORITY_CLASS -7 - 18 REALTIME_PRIORITY_CLASS -6 - 19 REALTIME_PRIORITY_CLASS -5 - 20 REALTIME_PRIORITY_CLASS -4 - 21 REALTIME_PRIORITY_CLASS -3 - 22 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 23 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 24 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 25 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 26 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 27 REALTIME_PRIORITY_CLASS 3 - 28 REALTIME_PRIORITY_CLASS 4 - 29 REALTIME_PRIORITY_CLASS 5 - 30 REALTIME_PRIORITY_CLASS 6 - 31 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - - Windows NT: Values -7, -6, -5, -4, -3, 3, 4, 5, and 6 are not supported. - - - As you can see, the real priority levels available to any individual - Win32 thread are non-contiguous. - - An application using 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(). E.g. Windows 95, 98, NT, 2000, XP make - available a non-contiguous range of numbers between -15 and 15, while - at least one version of WinCE (3.0) defines the minimum priority - (THREAD_PRIORITY_LOWEST) as 5, and the maximum priority - (THREAD_PRIORITY_HIGHEST) as 1. - - Internally, 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 - THREAD_PRIORITY_HIGHEST. Currently, this also applies to - REALTIME_PRIORITY_CLASSi even if levels -7, -6, -5, -4, -3, 3, 4, 5, and 6 - are supported. - - If it wishes, a Win32 application using Pthreads4w can use the Win32 - defined priority macros THREAD_PRIORITY_IDLE through - THREAD_PRIORITY_TIME_CRITICAL. - - -The opacity of the pthread_t datatype -------------------------------------- -and possible solutions for portable null/compare/hash, etc ----------------------------------------------------------- - -Because pthread_t is an opague datatype an implementation is permitted to define -pthread_t in any way it wishes. That includes defining some bits, if it is -scalar, or members, if it is an aggregate, to store information that may be -extra to the unique identifying value of the ID. As a result, pthread_t values -may not be directly comparable. - -If you want your code to be portable you must adhere to the following contraints: - -1) Don't assume it is a scalar data type, e.g. an integer or pointer value. There -are several other implementations where pthread_t is also a struct. See our FAQ -Question 11 for our reasons for defining pthread_t as a struct. - -2) You must not compare them using relational or equality operators. You must use -the API function pthread_equal() to test for equality. - -3) Never attempt to reference individual members. - - -The problem - -Certain applications would like to be able to access a scalar pthread_t, -primarily to use as keys into data structures to manage threads or -thread-related data, but this is not possible in a maximally portable and -standards compliant way for current POSIX threads implementations. - -This use is often required because pthread_t values are not unique through -the life of the process and so it is necessary for the application to keep -track of a threads status itself, and ironically this is because they are -scalar types in the first place. - -To my knowledge the only platform that provides a scalar pthread_t that is -unique through the life of a process is Solaris. Other platforms, including -HPUX, will not provide support to applications that do this. - -For implementations that define pthread_t as a scalar, programmers often -employ direct relational and equality operators with pthread_t. This code -will break when ported to a standard-comforming implementation that defines -pthread_t as an aggregate type. - -For implementations that define pthread_t as an aggregate, e.g. a struct, -programmers can use memcmp etc., but then face the prospect that the struct may -include alignment padding bytes or bits as well as extra implementation-specific -members that are not part of the unique identifying value. - -Opacity also means that an implementation is free to change the definition, -which should generally only require that applications be recompiled and relinked, -not rewritten. - - -Doesn't the compiler take care of padding? - -The C89 and later standards only effectively guarantee element-by-element -equivalence following an assignment or pass by value of a struct or union, -therefore undefined areas of any two otherwise equivalent pthread_t instances -can still compare differently, e.g. attempting to compare two such pthread_t -variables byte-by-byte, e.g. memcmp(&t1, &t2, sizeof(pthread_t) may give an -incorrect result. In practice I'm reasonably confident that compilers routinely -also copy the padding bytes, mainly because assignment of unions would be far -too complicated otherwise. But it just isn't guarranteed by the standard. - -Illustration: - -We have two thread IDs t1 and t2 - -pthread_t t1, t2; - -In an application we create the threads and intend to store the thread IDs in an -ordered data structure (linked list, tree, etc) so we need to be able to compare -them in order to insert them initially and also to traverse. - -Suppose pthread_t contains undefined padding bits and our compiler copies our -pthread_t [struct] element-by-element, then for the assignment: - -pthread_t temp = t1; - -temp and t1 will be equivalent and correct but a byte-for-byte comparison such as -memcmp(&temp, &t1, sizeof(pthread_t)) == 0 may not return true as we expect because -the undefined bits may not have the same values in the two variable instances. - -Similarly if passing by value under the same conditions. - -If, on the other hand, the undefined bits are at least constant through every -assignment and pass-by-value then the byte-for-byte comparison -memcmp(&temp, &t1, sizeof(pthread_t)) == 0 will always return the expected result. -How can we force the behaviour we need? - - -Solutions - -Adding new functions to the standard API or as non-portable extentions is -the only reliable to provide the necessary operations. Remember also that -POSIX is not tied to the C language. The most common functions that have -been suggested are: - -pthread_null() -pthread_compare() -pthread_hash() - -A single more general purpose function could also be defined as a -basis for at least the last two of the above functions. - -First we need to list the freedoms and constraints with respect -to pthread_t so that we can be sure our solution is compatible with the -standard. - -What is known or may be deduced from the standard: -1) pthread_t must be able to be passed by value, so it must be a single object. -2) from (1) it must be copyable so cannot embed thread-state information, locks -or other volatile objects required to manage the thread it associates with. -3) pthread_t may carry additional information, e.g. for debugging or to manage -itself. -4) there is an implicit requirement that the size of pthread_t is determinable -at compile-time and size-invariant, because it must be able to copy the object -(i.e. through assignment and pass-by-value). Such copies must be genuine -duplicates, not merely a copy of a pointer to a common instance such as -would be the case if pthread_t were defined as an array. - - -Suppose we define the following function: - -/* This function shall return it's argument */ -pthread_t* pthread_normalize(pthread_t* thread); - -For scalar or aggregate pthread_t types this function would simply zero any bits -within the pthread_t that don't uniquely identify the thread, including padding, -such that client code can return consistent results from operations done on the -result. If the additional bits are a pointer to an associate structure then -this function would ensure that the memory used to store that associate -structure does not leak. With normalization the following compare would be -valid and repeatable: - -memcmp(pthread_normalize(&t1),pthread_normalize(&t2),sizeof(pthread_t)) - -Note 1: such comparisons are intended merely to order and sort pthread_t values -and allow them to index various data structures. They are not intended to reveal -anything about the relationships between threads, like startup order. - -Note 2: the normalized pthread_t is also a valid pthread_t that uniquely -identifies the same thread. - -Advantages: -1) In most existing implementations this function would reduce to a no-op that -emits no additional instructions, i.e after in-lining or optimisation, or if -defined as a macro: -#define pthread_normalise(tptr) (tptr) - -2) This single function allows an application to portably derive -application-level versions of any of the other required functions. - -3) It is a generic function that could enable unanticipated uses. - -Disadvantages: -1) Less efficient than dedicated compare or hash functions for implementations -that include significant extra non-id elements in pthread_t. - -2) Still need to be concerned about padding if copying normalized pthread_t. -See the later section on defining pthread_t to neutralise padding issues. - -Generally a pthread_t may need to be normalized every time it is used, -which could have a significant impact. However, this is a design decision -for the implementor in a competitive environment. An implementation is free -to define a pthread_t in a way that minimises or eliminates padding or -renders this function a no-op. - -Hazards: -1) Pass-by-reference directly modifies 'thread' so the application must -synchronise access or ensure that the pointer refers to a copy. The alternative -of pass-by-value/return-by-value was considered but then this requires two copy -operations, disadvantaging implementations where this function is not a no-op -in terms of speed of execution. This function is intended to be used in high -frequency situations and needs to be efficient, or at least not unnecessarily -inefficient. The alternative also sits awkwardly with functions like memcmp. - -2) [Non-compliant] code that uses relational and equality operators on -arithmetic or pointer style pthread_t types would need to be rewritten, but it -should be rewritten anyway. - - -C implementation of null/compare/hash functions using pthread_normalize(): - -/* In pthread.h */ -pthread_t* pthread_normalize(pthread_t* thread); - -/* In user code */ -/* User-level bitclear function - clear bits in loc corresponding to mask */ -void* bitclear (void* loc, void* mask, size_t count); - -typedef unsigned int hash_t; - -/* User-level hash function */ -hash_t hash(void* ptr, size_t count); - -/* - * User-level pthr_null function - modifies the origin thread handle. - * The concept of a null pthread_t is highly implementation dependent - * and this design may be far from the mark. For example, in an - * implementation "null" may mean setting a special value inside one - * element of pthread_t to mean "INVALID". However, if that value was zero and - * formed part of the id component then we may get away with this design. - */ -pthread_t* pthr_null(pthread_t* tp) -{ - /* - * This should have the same effect as memset(tp, 0, sizeof(pthread_t)) - * We're just showing that we can do it. - */ - void* p = (void*) pthread_normalize(tp); - return (pthread_t*) bitclear(p, p, sizeof(pthread_t)); -} - -/* - * Safe user-level pthr_compare function - modifies temporary thread handle copies - */ -int pthr_compare_safe(pthread_t thread1, pthread_t thread2) -{ - return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); -} - -/* - * Fast user-level pthr_compare function - modifies origin thread handles - */ -int pthr_compare_fast(pthread_t* thread1, pthread_t* thread2) -{ - return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); -} - -/* - * Safe user-level pthr_hash function - modifies temporary thread handle copy - */ -hash_t pthr_hash_safe(pthread_t thread) -{ - return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); -} - -/* - * Fast user-level pthr_hash function - modifies origin thread handle - */ -hash_t pthr_hash_fast(pthread_t thread) -{ - return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); -} - -/* User-level bitclear function - modifies the origin array */ -void* bitclear(void* loc, void* mask, size_t count) -{ - int i; - for (i=0; i < count; i++) { - (unsigned char) *loc++ &= ~((unsigned char) *mask++); - } -} - -/* Donald Knuth hash */ -hash_t hash(void* str, size_t count) -{ - hash_t hash = (hash_t) count; - unsigned int i = 0; - - for(i = 0; i < len; str++, i++) - { - hash = ((hash << 5) ^ (hash >> 27)) ^ (*str); - } - return hash; -} - -/* Example of advantage point (3) - split a thread handle into its id and non-id values */ -pthread_t id = thread, non-id = thread; -bitclear((void*) &non-id, (void*) pthread_normalize(&id), sizeof(pthread_t)); - - -A pthread_t type change proposal to neutralise the effects of padding - -Even if pthread_normalize() is available, padding is still a problem because -the standard only garrantees element-by-element equivalence through -copy operations (assignment and pass-by-value). So padding bit values can -still change randomly after calls to pthread_normalize(). - -[I suspect that most compilers take the easy path and always byte-copy anyway, -partly because it becomes too complex to do (e.g. unions that contain sub-aggregates) -but also because programmers can easily design their aggregates to minimise and -often eliminate padding]. - -How can we eliminate the problem of padding bytes in structs? Could -defining pthread_t as a union rather than a struct provide a solution? - -In fact, the Linux pthread.h defines most of it's pthread_*_t objects (but not -pthread_t itself) as unions, possibly for this and/or other reasons. We'll -borrow some element naming from there but the ideas themselves are well known -- the __align element used to force alignment of the union comes from K&R's -storage allocator example. - -/* Essentially our current pthread_t renamed */ -typedef struct { - struct thread_state_t * __p; - long __x; /* sequence counter */ -} thread_id_t; - -Ensuring that the last element in the above struct is a long ensures that the -overall struct size is a multiple of sizeof(long), so there should be no trailing -padding in this struct or the union we define below. -(Later we'll see that we can handle internal but not trailing padding.) - -/* New pthread_t */ -typedef union { - char __size[sizeof(thread_id_t)]; /* array as the first element */ - thread_id_t __tid; - long __align; /* Ensure that the union starts on long boundary */ -} pthread_t; - -This guarrantees that, during an assignment or pass-by-value, the compiler copies -every byte in our thread_id_t because the compiler guarrantees that the __size -array, which we have ensured is the equal-largest element in the union, retains -equivalence. - -This means that pthread_t values stored, assigned and passed by value will at least -carry the value of any undefined padding bytes along and therefore ensure that -those values remain consistent. Our comparisons will return consistent results and -our hashes of [zero initialised] pthread_t values will also return consistent -results. - -We have also removed the need for a pthread_null() function; we can initialise -at declaration time or easily create our own const pthread_t to use in assignments -later: - -const pthread_t null_tid = {0}; /* braces are required */ - -pthread_t t; -... -t = null_tid; - - -Note that we don't have to explicitly make use of the __size array at all. It's -there just to force the compiler behaviour we want. - - -Partial solutions without a pthread_normalize function - - -An application-level pthread_null and pthread_compare proposal -(and pthread_hash proposal by extention) - -In order to deal with the problem of scalar/aggregate pthread_t type disparity in -portable code I suggest using an old-fashioned union, e.g.: - -Contraints: -- there is no padding, or padding values are preserved through assignment and - pass-by-value (see above); -- there are no extra non-id values in the pthread_t. - - -Example 1: A null initialiser for pthread_t variables... - -typedef union { - unsigned char b[sizeof(pthread_t)]; - pthread_t t; -} init_t; - -const init_t initial = {0}; - -pthread_t tid = initial.t; /* init tid to all zeroes */ - - -Example 2: A comparison function for pthread_t values - -typedef union { - unsigned char b[sizeof(pthread_t)]; - pthread_t t; -} pthcmp_t; - -int pthcmp(pthread_t left, pthread_t right) -{ - /* - * Compare two pthread handles in a way that imposes a repeatable but arbitrary - * ordering on them. - * I.e. given the same set of pthread_t handles the ordering should be the same - * each time but the order has no particular meaning other than that. E.g. - * the ordering does not imply the thread start sequence, or any other - * relationship between threads. - * - * Return values are: - * 1 : left is greater than right - * 0 : left is equal to right - * -1 : left is less than right - */ - int i; - pthcmp_t L, R; - L.t = left; - R.t = right; - for (i = 0; i < sizeof(pthread_t); i++) - { - if (L.b[i] > R.b[i]) - return 1; - else if (L.b[i] < R.b[i]) - return -1; - } - return 0; -} - -It has been pointed out that the C99 standard allows for the possibility that -integer types also may include padding bits, which could invalidate the above -method. This addition to C99 was specifically included after it was pointed -out that there was one, presumably not particularly well known, architecture -that included a padding bit in it's 32 bit integer type. See section 6.2.6.2 -of both the standard and the rationale, specifically the paragraph starting at -line 16 on page 43 of the rationale. - - -An aside - -Certain compilers, e.g. gcc and one of the IBM compilers, include a feature -extention: provided the union contains a member of the same type as the -object then the object may be cast to the union itself. - -We could use this feature to speed up the pthrcmp() function from example 2 -above by directly referencing rather than copying the pthread_t arguments to -the local union variables, e.g.: - -int pthcmp(pthread_t left, pthread_t right) -{ - /* - * Compare two pthread handles in a way that imposes a repeatable but arbitrary - * ordering on them. - * I.e. given the same set of pthread_t handles the ordering should be the same - * each time but the order has no particular meaning other than that. E.g. - * the ordering does not imply the thread start sequence, or any other - * relationship between threads. - * - * Return values are: - * 1 : left is greater than right - * 0 : left is equal to right - * -1 : left is less than right - */ - int i; - for (i = 0; i < sizeof(pthread_t); i++) - { - if (((pthcmp_t)left).b[i] > ((pthcmp_t)right).b[i]) - return 1; - else if (((pthcmp_t)left).b[i] < ((pthcmp_t)right).b[i]) - return -1; - } - return 0; -} - - -Result thus far - -We can't remove undefined bits if they are there in pthread_t already, but we have -attempted to render them inert for comparison and hashing functions by making them -consistent through assignment, copy and pass-by-value. - -Note: Hashing pthread_t values requires that all pthread_t variables be initialised -to the same value (usually all zeros) before being assigned a proper thread ID, i.e. -to ensure that any padding bits are zero, or at least the same value for all -pthread_t. Since all pthread_t values are generated by the library in the first -instance this need not be an application-level operation. - - -Conclusion - -I've attempted to resolve the multiple issues of type opacity and the possible -presence of undefined bits and bytes in pthread_t values, which prevent -applications from comparing or hashing pthread handles. - -Two complimentary partial solutions have been proposed, one an application-level -scheme to handle both scalar and aggregate pthread_t types equally, plus a -definition of pthread_t itself that neutralises padding bits and bytes by -coercing semantics out of the compiler to eliminate variations in the values of -padding bits. - -I have not provided any solution to the problem of handling extra values embedded -in pthread_t, e.g. debugging or trap information that an implementation is entitled -to include. Therefore none of this replaces the portability and flexibility of API -functions but what functions are needed? The threads standard is unlikely to -include new functions that can be implemented by a combination of existing features -and more generic functions (several references in the threads rationale suggest this). -Therefore I propose that the following function could replace the several functions -that have been suggested in conversations: - -pthread_t * pthread_normalize(pthread_t * handle); - -For most existing pthreads implementations this function, or macro, would reduce to -a no-op with zero call overhead. Most of the other desired operations on pthread_t -values (null, compare, hash, etc.) can be trivially derived from this and other -standard functions. +This file documents non-portable functions and other issues. + + +MSVC: Errno and GetLastError +---------------------------- + +If Pthreads4w is compiled as a DLL with MSVC, and +both it and the application are linked against the static +C runtime (i.e. with the /MT compiler flag), then the +application will not see the same C runtime globals as +the library. These include the errno variable, and the +termination routine called by terminate(). For details, +refer to the following links: + +http://support.microsoft.com/kb/94248 +(Section 4: Problems Encountered When Using Multiple CRT Libraries) + +http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/b4500c0d-1b69-40c7-9ef5-08da1025b5bf + +Therefore the library does the following: + +(1) In addition to setting the errno variable when errors +occur, the library will also call SetLastError() with the +same value. The application can then use GetLastError() +to obtain the value of errno. (This pair of routines are +in kernel32.dll, and so are not affected by the use of +multiple CRT libraries.) + +(2) If PTW32_USES_SEPARATE_CRT is defined, when C++ or SEH +cleanup is used, the library defines a function +pthread_win32_set_terminate_np(), which can be used to set +the termination routine that should be called when an unhandled +exception occurs in a thread function (or otherwise inside the +library). E.g. see tests/exception3.c for usage. + +Note: The test suite recognises PTW32_USES_SEPARATE_CRT for +the case (1) above but it still needs to be defined explicitly. +At present there are no runs of the test suite that require +that to be set because they use either /MD or /MT everywhere +not mixed. E.g. see tests/errno0.c + +Non-portable functions included in Pthreads4w +------------------------------------------------- + +BOOL +pthread_win32_test_features_np(int mask) + + This routine allows an application to check which + run-time auto-detected features are available within + the library. + + The possible features are: + + PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE + Return TRUE if the native version of + InterlockedCompareExchange() is being used. + This feature is not meaningful in recent + library versions as MSVC builds only support + system implemented ICE. Note that all Mingw + builds use inlined asm versions of all the + Interlocked routines. + PTW32_ALERTABLE_ASYNC_CANCEL + Return TRUE is the QueueUserAPCEx package + QUSEREX.DLL is available and the AlertDrv.sys + driver is loaded into Windows, providing + alertable (pre-emptive) asyncronous threads + cancellation. If this feature returns FALSE + then the default async cancel scheme is in + use, which cannot cancel blocked threads. + + Features may be Or'ed into the mask parameter, in which case + the routine returns TRUE if any of the Or'ed features would + return TRUE. At this stage it doesn't make sense to Or features + but it may some day. + + +void * +pthread_timechange_handler_np(void *) + + To improve tolerance against operator or time service + initiated system clock changes. + + This routine can be called by an application when it + receives a WM_TIMECHANGE message from the system. At + present it broadcasts all condition variables so that + waiting threads can wake up and re-evaluate their + conditions and restart their timed waits if required. + + It has the same return type and argument type as a + thread routine so that it may be called directly + through pthread_create(), i.e. as a separate thread. + + Parameters + + Although a parameter must be supplied, it is ignored. + The value NULL can be used. + + Return values + + It can return an error EAGAIN to indicate that not + all condition variables were broadcast for some reason. + Otherwise, 0 is returned. + + If run as a thread, the return value is returned + through pthread_join(). + + The return value should be cast to an integer. + + +HANDLE +pthread_getw32threadhandle_np(pthread_t thread); + + Returns the win32 thread handle that the POSIX + thread "thread" is running as. + + Applications can use the win32 handle to set + win32 specific attributes of the thread. + +DWORD +pthread_getw32threadid_np (pthread_t thread) + + Returns the Windows native thread ID that the POSIX + thread "thread" is running as. + + Only valid when the library is built where + ! (defined(__MINGW64__) || defined(__MINGW32__)) || defined (__MSVCRT__) || defined (__DMC__) + and otherwise returns 0. + + +int +pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, int kind) + +int +pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, int *kind) + + These two routines are included for Linux compatibility + and are direct equivalents to the standard routines + pthread_mutexattr_settype + pthread_mutexattr_gettype + + pthread_mutexattr_setkind_np accepts the following + mutex kinds: + PTHREAD_MUTEX_FAST_NP + PTHREAD_MUTEX_ERRORCHECK_NP + PTHREAD_MUTEX_RECURSIVE_NP + + These are really just equivalent to (respectively): + PTHREAD_MUTEX_NORMAL + PTHREAD_MUTEX_ERRORCHECK + PTHREAD_MUTEX_RECURSIVE + + +int +pthread_delay_np (const struct timespec *interval) + + This routine causes a thread to delay execution for a specific period of time. + This period ends at the current time plus the specified interval. The routine + will not return before the end of the period is reached, but may return an + arbitrary amount of time after the period has gone by. This can be due to + system load, thread priorities, and system timer granularity. + + Specifying an interval of zero (0) seconds and zero (0) nanoseconds is + allowed and can be used to force the thread to give up the processor or to + deliver a pending cancellation request. + + This routine is a cancellation point. + + The timespec structure contains the following two fields: + + tv_sec is an integer number of seconds. + tv_nsec is an integer number of nanoseconds. + + Return Values + + If an error condition occurs, this routine returns an integer value + indicating the type of error. Possible return values are as follows: + + 0 Successful completion. + [EINVAL] The value specified by interval is invalid. + + +__int64 +pthread_getunique_np (pthread_t thr) + + Returns the unique number associated with thread thr. + The unique numbers are a simple way of positively identifying a thread when + pthread_t cannot be relied upon to identify the true thread instance. I.e. a + pthread_t value may be assigned to different threads throughout the life of a + process. + + Because pthreads4w (Pthreads4w) threads can be uniquely identified by their + pthread_t values this routine is provided only for source code compatibility. + + NOTE: if the library is re-initialised, i.e. by calling pthread_win32_process_detach_np() + followed by pthread_win32_process_attach_np(), then the unique number is reset along with + several other library global values. Library reinitialisation should not be required, + however, some older applications may still call these routines as they were once required to + do when statically linking the library. + +int +pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec *abstime) + +int +pthread_tryjoin_np (pthread_t thread, void **value_ptr) + + These function is added for compatibility with Linux. + + +int +pthread_num_processors_np (void) + + This routine (found on HPUX systems) returns the number of processors + in the system. This implementation actually returns the number of + processors available to the process, which can be a lower number + than the system's number, depending on the process's affinity mask. + + +BOOL +pthread_win32_process_attach_np (void); + +BOOL +pthread_win32_process_detach_np (void); + +BOOL +pthread_win32_thread_attach_np (void); + +BOOL +pthread_win32_thread_detach_np (void); + + These functions contain the code normally run via DllMain + when the library is used as a dll. As of version 2.9.0 of the + library, static builds using either MSC or GCC will call + pthread_win32_process_* automatically at application startup and + exit respectively. + + pthread_win32_thread_attach_np() is currently a no-op. + + pthread_win32_thread_detach_np() is not a no-op. It cleans up the + implicit pthread handle that is allocated to any thread not started + via pthread_create(). Such non-posix threads should call this routine + when they exit, or call pthread_exit() to both cleanup and exit. + + These functions invariably return TRUE except for + pthread_win32_process_attach_np() which will return FALSE + if Pthreads4w initialisation fails. + + +int +pthread_attr_getaffinity_np (pthread_attr_t * attr, size_t cpusetsize, cpu_set_t * cpuset); + +int +pthread_attr_setaffinity_np (pthread_attr_t * attr, size_t cpusetsize, const cpu_set_t * cpuset); + +int +pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t * cpuset); + +int +pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, const cpu_set_t * cpuset); + + Manipulate the CPU affinity of threads. Compatibility with libgcc-based pthreads + implementations. + + +int +pthreadCancelableWait (HANDLE waitHandle); + +int +pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout); + + These two functions provide hooks into the pthread_cancel + mechanism that will allow you to wait on a Windows handle + and make it a cancellation point. Both functions block + until either the given w32 handle is signaled, or + pthread_cancel has been called. It is implemented using + WaitForMultipleObjects on 'waitHandle' and a manually + reset w32 event used to implement pthread_cancel. + +int +pthread_getname_np(pthread_t thr, char *name, int len); + +If PTW32_COMPATIBILITY_BSD or PTW32_COMPATIBILITY_TRU64 defined +int +pthread_setname_np(pthread_t thr, const char *name, void *arg); + +Otherwise: +int +pthread_setname_np(pthread_t thr, const char *name); + + Set and get thread names. Compatibility. + + +struct timespec * +pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * relative); + + Primarily to facilitate writing unit tests but exported for convenience. + The struct timespec pointed to by the first parameter is modified to represent the + time 'now' plus an optional offset value timespec in a platform optimal way. + Returns the first parameter so is compatible as the struct timespec * parameter in + POSIX timed function calls, e.g. + + struct timespec abstime, reltime = { 0, 5000000 } /* 5 ms */; + pthread_mutex_timedwait(&mtx, pthread_win32_getabstime_np(&abstime, &reltime)); + + +Non-portable issues +------------------- + +Thread priority + + POSIX defines a single contiguous range of numbers that determine a + thread's priority. Win32 defines priority classes and priority + levels relative to these classes. Classes are simply priority base + levels that the defined priority levels are relative to such that, + changing a process's priority class will change the priority of all + of it's threads, while the threads retain the same relativity to each + other. + + A Win32 system defines a single contiguous monotonic range of values + that define system priority levels, just like POSIX. However, Win32 + restricts individual threads to a subset of this range on a + per-process basis. + + The following table shows the base priority levels for combinations + of priority class and priority value in Win32. + + Process Priority Class Thread Priority Level + ----------------------------------------------------------------- + 1 IDLE_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 HIGH_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 2 IDLE_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 3 IDLE_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 4 IDLE_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 4 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 5 IDLE_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 5 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 5 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 6 IDLE_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 6 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 6 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 7 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 7 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 7 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 8 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 8 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 8 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 8 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 9 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 9 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 9 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 10 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 10 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 11 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 11 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 11 HIGH_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 12 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 12 HIGH_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 13 HIGH_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 14 HIGH_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 IDLE_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 16 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 17 REALTIME_PRIORITY_CLASS -7 + 18 REALTIME_PRIORITY_CLASS -6 + 19 REALTIME_PRIORITY_CLASS -5 + 20 REALTIME_PRIORITY_CLASS -4 + 21 REALTIME_PRIORITY_CLASS -3 + 22 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 23 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 24 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 25 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 26 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 27 REALTIME_PRIORITY_CLASS 3 + 28 REALTIME_PRIORITY_CLASS 4 + 29 REALTIME_PRIORITY_CLASS 5 + 30 REALTIME_PRIORITY_CLASS 6 + 31 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + + Windows NT: Values -7, -6, -5, -4, -3, 3, 4, 5, and 6 are not supported. + + + As you can see, the real priority levels available to any individual + Win32 thread are non-contiguous. + + An application using 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(). E.g. Windows 95, 98, NT, 2000, XP make + available a non-contiguous range of numbers between -15 and 15, while + at least one version of WinCE (3.0) defines the minimum priority + (THREAD_PRIORITY_LOWEST) as 5, and the maximum priority + (THREAD_PRIORITY_HIGHEST) as 1. + + Internally, 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 + THREAD_PRIORITY_HIGHEST. Currently, this also applies to + REALTIME_PRIORITY_CLASSi even if levels -7, -6, -5, -4, -3, 3, 4, 5, and 6 + are supported. + + If it wishes, a Win32 application using Pthreads4w can use the Win32 + defined priority macros THREAD_PRIORITY_IDLE through + THREAD_PRIORITY_TIME_CRITICAL. + + +The opacity of the pthread_t datatype +------------------------------------- +and possible solutions for portable null/compare/hash, etc +---------------------------------------------------------- + +Because pthread_t is an opague datatype an implementation is permitted to define +pthread_t in any way it wishes. That includes defining some bits, if it is +scalar, or members, if it is an aggregate, to store information that may be +extra to the unique identifying value of the ID. As a result, pthread_t values +may not be directly comparable. + +If you want your code to be portable you must adhere to the following contraints: + +1) Don't assume it is a scalar data type, e.g. an integer or pointer value. There +are several other implementations where pthread_t is also a struct. See our FAQ +Question 11 for our reasons for defining pthread_t as a struct. + +2) You must not compare them using relational or equality operators. You must use +the API function pthread_equal() to test for equality. + +3) Never attempt to reference individual members. + + +The problem + +Certain applications would like to be able to access a scalar pthread_t, +primarily to use as keys into data structures to manage threads or +thread-related data, but this is not possible in a maximally portable and +standards compliant way for current POSIX threads implementations. + +This use is often required because pthread_t values are not unique through +the life of the process and so it is necessary for the application to keep +track of a threads status itself, and ironically this is because they are +scalar types in the first place. + +To my knowledge the only platform that provides a scalar pthread_t that is +unique through the life of a process is Solaris. Other platforms, including +HPUX, will not provide support to applications that do this. + +For implementations that define pthread_t as a scalar, programmers often +employ direct relational and equality operators with pthread_t. This code +will break when ported to a standard-comforming implementation that defines +pthread_t as an aggregate type. + +For implementations that define pthread_t as an aggregate, e.g. a struct, +programmers can use memcmp etc., but then face the prospect that the struct may +include alignment padding bytes or bits as well as extra implementation-specific +members that are not part of the unique identifying value. + +Opacity also means that an implementation is free to change the definition, +which should generally only require that applications be recompiled and relinked, +not rewritten. + + +Doesn't the compiler take care of padding? + +The C89 and later standards only effectively guarantee element-by-element +equivalence following an assignment or pass by value of a struct or union, +therefore undefined areas of any two otherwise equivalent pthread_t instances +can still compare differently, e.g. attempting to compare two such pthread_t +variables byte-by-byte, e.g. memcmp(&t1, &t2, sizeof(pthread_t) may give an +incorrect result. In practice I'm reasonably confident that compilers routinely +also copy the padding bytes, mainly because assignment of unions would be far +too complicated otherwise. But it just isn't guarranteed by the standard. + +Illustration: + +We have two thread IDs t1 and t2 + +pthread_t t1, t2; + +In an application we create the threads and intend to store the thread IDs in an +ordered data structure (linked list, tree, etc) so we need to be able to compare +them in order to insert them initially and also to traverse. + +Suppose pthread_t contains undefined padding bits and our compiler copies our +pthread_t [struct] element-by-element, then for the assignment: + +pthread_t temp = t1; + +temp and t1 will be equivalent and correct but a byte-for-byte comparison such as +memcmp(&temp, &t1, sizeof(pthread_t)) == 0 may not return true as we expect because +the undefined bits may not have the same values in the two variable instances. + +Similarly if passing by value under the same conditions. + +If, on the other hand, the undefined bits are at least constant through every +assignment and pass-by-value then the byte-for-byte comparison +memcmp(&temp, &t1, sizeof(pthread_t)) == 0 will always return the expected result. +How can we force the behaviour we need? + + +Solutions + +Adding new functions to the standard API or as non-portable extentions is +the only reliable to provide the necessary operations. Remember also that +POSIX is not tied to the C language. The most common functions that have +been suggested are: + +pthread_null() +pthread_compare() +pthread_hash() + +A single more general purpose function could also be defined as a +basis for at least the last two of the above functions. + +First we need to list the freedoms and constraints with respect +to pthread_t so that we can be sure our solution is compatible with the +standard. + +What is known or may be deduced from the standard: +1) pthread_t must be able to be passed by value, so it must be a single object. +2) from (1) it must be copyable so cannot embed thread-state information, locks +or other volatile objects required to manage the thread it associates with. +3) pthread_t may carry additional information, e.g. for debugging or to manage +itself. +4) there is an implicit requirement that the size of pthread_t is determinable +at compile-time and size-invariant, because it must be able to copy the object +(i.e. through assignment and pass-by-value). Such copies must be genuine +duplicates, not merely a copy of a pointer to a common instance such as +would be the case if pthread_t were defined as an array. + + +Suppose we define the following function: + +/* This function shall return it's argument */ +pthread_t* pthread_normalize(pthread_t* thread); + +For scalar or aggregate pthread_t types this function would simply zero any bits +within the pthread_t that don't uniquely identify the thread, including padding, +such that client code can return consistent results from operations done on the +result. If the additional bits are a pointer to an associate structure then +this function would ensure that the memory used to store that associate +structure does not leak. With normalization the following compare would be +valid and repeatable: + +memcmp(pthread_normalize(&t1),pthread_normalize(&t2),sizeof(pthread_t)) + +Note 1: such comparisons are intended merely to order and sort pthread_t values +and allow them to index various data structures. They are not intended to reveal +anything about the relationships between threads, like startup order. + +Note 2: the normalized pthread_t is also a valid pthread_t that uniquely +identifies the same thread. + +Advantages: +1) In most existing implementations this function would reduce to a no-op that +emits no additional instructions, i.e after in-lining or optimisation, or if +defined as a macro: +#define pthread_normalise(tptr) (tptr) + +2) This single function allows an application to portably derive +application-level versions of any of the other required functions. + +3) It is a generic function that could enable unanticipated uses. + +Disadvantages: +1) Less efficient than dedicated compare or hash functions for implementations +that include significant extra non-id elements in pthread_t. + +2) Still need to be concerned about padding if copying normalized pthread_t. +See the later section on defining pthread_t to neutralise padding issues. + +Generally a pthread_t may need to be normalized every time it is used, +which could have a significant impact. However, this is a design decision +for the implementor in a competitive environment. An implementation is free +to define a pthread_t in a way that minimises or eliminates padding or +renders this function a no-op. + +Hazards: +1) Pass-by-reference directly modifies 'thread' so the application must +synchronise access or ensure that the pointer refers to a copy. The alternative +of pass-by-value/return-by-value was considered but then this requires two copy +operations, disadvantaging implementations where this function is not a no-op +in terms of speed of execution. This function is intended to be used in high +frequency situations and needs to be efficient, or at least not unnecessarily +inefficient. The alternative also sits awkwardly with functions like memcmp. + +2) [Non-compliant] code that uses relational and equality operators on +arithmetic or pointer style pthread_t types would need to be rewritten, but it +should be rewritten anyway. + + +C implementation of null/compare/hash functions using pthread_normalize(): + +/* In pthread.h */ +pthread_t* pthread_normalize(pthread_t* thread); + +/* In user code */ +/* User-level bitclear function - clear bits in loc corresponding to mask */ +void* bitclear (void* loc, void* mask, size_t count); + +typedef unsigned int hash_t; + +/* User-level hash function */ +hash_t hash(void* ptr, size_t count); + +/* + * User-level pthr_null function - modifies the origin thread handle. + * The concept of a null pthread_t is highly implementation dependent + * and this design may be far from the mark. For example, in an + * implementation "null" may mean setting a special value inside one + * element of pthread_t to mean "INVALID". However, if that value was zero and + * formed part of the id component then we may get away with this design. + */ +pthread_t* pthr_null(pthread_t* tp) +{ + /* + * This should have the same effect as memset(tp, 0, sizeof(pthread_t)) + * We're just showing that we can do it. + */ + void* p = (void*) pthread_normalize(tp); + return (pthread_t*) bitclear(p, p, sizeof(pthread_t)); +} + +/* + * Safe user-level pthr_compare function - modifies temporary thread handle copies + */ +int pthr_compare_safe(pthread_t thread1, pthread_t thread2) +{ + return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); +} + +/* + * Fast user-level pthr_compare function - modifies origin thread handles + */ +int pthr_compare_fast(pthread_t* thread1, pthread_t* thread2) +{ + return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); +} + +/* + * Safe user-level pthr_hash function - modifies temporary thread handle copy + */ +hash_t pthr_hash_safe(pthread_t thread) +{ + return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); +} + +/* + * Fast user-level pthr_hash function - modifies origin thread handle + */ +hash_t pthr_hash_fast(pthread_t thread) +{ + return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); +} + +/* User-level bitclear function - modifies the origin array */ +void* bitclear(void* loc, void* mask, size_t count) +{ + int i; + for (i=0; i < count; i++) { + (unsigned char) *loc++ &= ~((unsigned char) *mask++); + } +} + +/* Donald Knuth hash */ +hash_t hash(void* str, size_t count) +{ + hash_t hash = (hash_t) count; + unsigned int i = 0; + + for(i = 0; i < len; str++, i++) + { + hash = ((hash << 5) ^ (hash >> 27)) ^ (*str); + } + return hash; +} + +/* Example of advantage point (3) - split a thread handle into its id and non-id values */ +pthread_t id = thread, non-id = thread; +bitclear((void*) &non-id, (void*) pthread_normalize(&id), sizeof(pthread_t)); + + +A pthread_t type change proposal to neutralise the effects of padding + +Even if pthread_normalize() is available, padding is still a problem because +the standard only garrantees element-by-element equivalence through +copy operations (assignment and pass-by-value). So padding bit values can +still change randomly after calls to pthread_normalize(). + +[I suspect that most compilers take the easy path and always byte-copy anyway, +partly because it becomes too complex to do (e.g. unions that contain sub-aggregates) +but also because programmers can easily design their aggregates to minimise and +often eliminate padding]. + +How can we eliminate the problem of padding bytes in structs? Could +defining pthread_t as a union rather than a struct provide a solution? + +In fact, the Linux pthread.h defines most of it's pthread_*_t objects (but not +pthread_t itself) as unions, possibly for this and/or other reasons. We'll +borrow some element naming from there but the ideas themselves are well known +- the __align element used to force alignment of the union comes from K&R's +storage allocator example. + +/* Essentially our current pthread_t renamed */ +typedef struct { + struct thread_state_t * __p; + long __x; /* sequence counter */ +} thread_id_t; + +Ensuring that the last element in the above struct is a long ensures that the +overall struct size is a multiple of sizeof(long), so there should be no trailing +padding in this struct or the union we define below. +(Later we'll see that we can handle internal but not trailing padding.) + +/* New pthread_t */ +typedef union { + char __size[sizeof(thread_id_t)]; /* array as the first element */ + thread_id_t __tid; + long __align; /* Ensure that the union starts on long boundary */ +} pthread_t; + +This guarrantees that, during an assignment or pass-by-value, the compiler copies +every byte in our thread_id_t because the compiler guarrantees that the __size +array, which we have ensured is the equal-largest element in the union, retains +equivalence. + +This means that pthread_t values stored, assigned and passed by value will at least +carry the value of any undefined padding bytes along and therefore ensure that +those values remain consistent. Our comparisons will return consistent results and +our hashes of [zero initialised] pthread_t values will also return consistent +results. + +We have also removed the need for a pthread_null() function; we can initialise +at declaration time or easily create our own const pthread_t to use in assignments +later: + +const pthread_t null_tid = {0}; /* braces are required */ + +pthread_t t; +... +t = null_tid; + + +Note that we don't have to explicitly make use of the __size array at all. It's +there just to force the compiler behaviour we want. + + +Partial solutions without a pthread_normalize function + + +An application-level pthread_null and pthread_compare proposal +(and pthread_hash proposal by extention) + +In order to deal with the problem of scalar/aggregate pthread_t type disparity in +portable code I suggest using an old-fashioned union, e.g.: + +Contraints: +- there is no padding, or padding values are preserved through assignment and + pass-by-value (see above); +- there are no extra non-id values in the pthread_t. + + +Example 1: A null initialiser for pthread_t variables... + +typedef union { + unsigned char b[sizeof(pthread_t)]; + pthread_t t; +} init_t; + +const init_t initial = {0}; + +pthread_t tid = initial.t; /* init tid to all zeroes */ + + +Example 2: A comparison function for pthread_t values + +typedef union { + unsigned char b[sizeof(pthread_t)]; + pthread_t t; +} pthcmp_t; + +int pthcmp(pthread_t left, pthread_t right) +{ + /* + * Compare two pthread handles in a way that imposes a repeatable but arbitrary + * ordering on them. + * I.e. given the same set of pthread_t handles the ordering should be the same + * each time but the order has no particular meaning other than that. E.g. + * the ordering does not imply the thread start sequence, or any other + * relationship between threads. + * + * Return values are: + * 1 : left is greater than right + * 0 : left is equal to right + * -1 : left is less than right + */ + int i; + pthcmp_t L, R; + L.t = left; + R.t = right; + for (i = 0; i < sizeof(pthread_t); i++) + { + if (L.b[i] > R.b[i]) + return 1; + else if (L.b[i] < R.b[i]) + return -1; + } + return 0; +} + +It has been pointed out that the C99 standard allows for the possibility that +integer types also may include padding bits, which could invalidate the above +method. This addition to C99 was specifically included after it was pointed +out that there was one, presumably not particularly well known, architecture +that included a padding bit in it's 32 bit integer type. See section 6.2.6.2 +of both the standard and the rationale, specifically the paragraph starting at +line 16 on page 43 of the rationale. + + +An aside + +Certain compilers, e.g. gcc and one of the IBM compilers, include a feature +extention: provided the union contains a member of the same type as the +object then the object may be cast to the union itself. + +We could use this feature to speed up the pthrcmp() function from example 2 +above by directly referencing rather than copying the pthread_t arguments to +the local union variables, e.g.: + +int pthcmp(pthread_t left, pthread_t right) +{ + /* + * Compare two pthread handles in a way that imposes a repeatable but arbitrary + * ordering on them. + * I.e. given the same set of pthread_t handles the ordering should be the same + * each time but the order has no particular meaning other than that. E.g. + * the ordering does not imply the thread start sequence, or any other + * relationship between threads. + * + * Return values are: + * 1 : left is greater than right + * 0 : left is equal to right + * -1 : left is less than right + */ + int i; + for (i = 0; i < sizeof(pthread_t); i++) + { + if (((pthcmp_t)left).b[i] > ((pthcmp_t)right).b[i]) + return 1; + else if (((pthcmp_t)left).b[i] < ((pthcmp_t)right).b[i]) + return -1; + } + return 0; +} + + +Result thus far + +We can't remove undefined bits if they are there in pthread_t already, but we have +attempted to render them inert for comparison and hashing functions by making them +consistent through assignment, copy and pass-by-value. + +Note: Hashing pthread_t values requires that all pthread_t variables be initialised +to the same value (usually all zeros) before being assigned a proper thread ID, i.e. +to ensure that any padding bits are zero, or at least the same value for all +pthread_t. Since all pthread_t values are generated by the library in the first +instance this need not be an application-level operation. + + +Conclusion + +I've attempted to resolve the multiple issues of type opacity and the possible +presence of undefined bits and bytes in pthread_t values, which prevent +applications from comparing or hashing pthread handles. + +Two complimentary partial solutions have been proposed, one an application-level +scheme to handle both scalar and aggregate pthread_t types equally, plus a +definition of pthread_t itself that neutralises padding bits and bytes by +coercing semantics out of the compiler to eliminate variations in the values of +padding bits. + +I have not provided any solution to the problem of handling extra values embedded +in pthread_t, e.g. debugging or trap information that an implementation is entitled +to include. Therefore none of this replaces the portability and flexibility of API +functions but what functions are needed? The threads standard is unlikely to +include new functions that can be implemented by a combination of existing features +and more generic functions (several references in the threads rationale suggest this). +Therefore I propose that the following function could replace the several functions +that have been suggested in conversations: + +pthread_t * pthread_normalize(pthread_t * handle); + +For most existing pthreads implementations this function, or macro, would reduce to +a no-op with zero call overhead. Most of the other desired operations on pthread_t +values (null, compare, hash, etc.) can be trivially derived from this and other +standard functions. From e9b26bc3cb83f7ce7080bdfc6002d769f2d41efd Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 18:12:19 +1000 Subject: [PATCH 166/207] Update --- ANNOUNCE | 14 ++++++++------ NEWS | 30 +++++++++++++++++++++++++----- 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index c565d0e3..a7d1cd0e 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,4 +1,4 @@ -PTHREADS4W RELEASE 2.10.0 (2016-09-18) +PTHREADS4W RELEASE 2.11.0 (2018-08-07) -------------------------------------- Web Site: https://sourceforge.net/projects/pthreads4w/ Repository: https://sourceforge.net/p/pthreads4w/code @@ -13,12 +13,14 @@ Windows (x86 and x64). Some relevant functions from other sections of SUSV3 are also supported including semaphores and scheduling functions. See the Conformance section below for details. -Some common non-portable functions are also implemented for -additional compatibility, as are a few functions specific -to pthreads4w for easier integration with Windows applications. +Some common non-portable functions are also implemented for additional +compatibility, as are a few functions specific to pthreads4w for easier +integration with Windows applications. -Pthreads4w is free software, distributed under the GNU Lesser -General Public License (LGPL). +Pthreads4w is free software, distributed under the GNU Lesser General +Public License (LGPL). Version 2.11.0 moves to the LGPL v3 for compatibility +with Pthreads4w version 3 which will be released under the Apache Licence +v2.0. For those who want to try the most recent changes, the SourceForge Git repository is the one to use. The Sourceware CVS repository is synchronised much less often diff --git a/NEWS b/NEWS index 889d1217..26f8f38e 100644 --- a/NEWS +++ b/NEWS @@ -48,14 +48,34 @@ successfully. We recommend MinGW64 over MinGW32 for both 64 and 32 bit GNU CC builds. MinGW64 also includes its own independent pthreads implementation, which you may prefer to use. -New Features ------------- -The autoconf configuration added in 2.10.0 should be used for all GNU -builds (MinGW, MinGW64, etc). The redundant GNUmakefiles have been -removed. +New Features or Changes +----------------------- +For Microsoft toolchain builds: +(1) Static linking requires both this library and any linking +libraries or applications to be compiled with /MT consistently. + +(2) Static libraries have been renamed as libpthreadV*.lib +to differentiate them from DLL import libs pthreadV*.lib. + +(3) If you are using mixed linkage, e.g. linking the static /MT version +of the library to an application linked with /MD you may be able to use +GetLastError() to interrogate the error code because the library sets +both errno (via _set_errno()) and SetLastError(). Bug Fixes --------- +Remove the attempt to set PTW32_USES_SEPARATE_CRT in the headers which +can cause unexpected results. In certain situations a user may want to +define it explicitly in their environment to invoke it's effects, either +when buidling the library or an application or both. See README.NONPORTABLE. +-- Ross Johnson + +The library should be more reliable under fully statically linked +scenarios. Note: we have removed the PIMAGE_TLS_CALLBACK code and +reverted to the earlier method that appears to be more reliable +across all compiler editions. +- Mark Pizzolato + Various corrections to GNUmakefile. Although this file has been removed, for completeness the changes have been recorded as commits to the repository. From bbf85c8e1c65eefec08e352409d44b4d5a9cb393 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 18:08:20 +1000 Subject: [PATCH 167/207] Apply latest changes from version 2.11.0 Conflicts: tests/timeouts.c --- ChangeLog | 7 +- NEWS | 70 +- _ptw32.h | 36 - implement.h | 1958 +++++++++++++++++++++---------------------- ptw32_threadStart.c | 2 +- tests/ChangeLog | 5 +- tests/Makefile | 75 +- tests/common.mk | 59 ++ tests/runorder.mk | 317 ++++--- tests/timeouts.c | 18 +- 10 files changed, 1308 insertions(+), 1239 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5a0dda81..fab7551e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,13 @@ 2018-08-07 Ross Johnson - * GNUmakefile.in (DLL_VER): rename as PTW32_VER; increment version number. + * GNUmakefile.in (DLL_VER): rename as PTW32_VER. * Makefile (DLL_VER): Likewise. * Bmakefile (DLL_VER): Likewise; does anyone use this anymore? + * pthread.h: Move internal library stuff from pthread.h to _pthw32.h + * _ptw32.h: As above. + * ANNOUNCE: Update. + * NEWS: Update. + * Makefile: Static libraries renamed to libpthreadV* 2018-07-22 Mark Pizzolato diff --git a/NEWS b/NEWS index 145dd020..7a101ddc 100644 --- a/NEWS +++ b/NEWS @@ -107,6 +107,30 @@ New bug fixes in all releases since 2.8.0 have NOT been applied to the Some changes from 2011-02-26 onward may not be compatible with pre Windows 2000 systems. +License Change to LGPL v3 +------------------------- +Pthreads4w version 2.11 and all future 2.x versions will be released +under the Lesser GNU Public License version 3 (LGPLv3). + +Planned Release Under the Apache License v2 +------------------------------------------- +The next major version of this software (version 3) will be released +under the Apache License version 2.0 (ALv2). Releasing 2.11 under LGPLv3 +will allow modifications to version 3 of this software to be backported +to version 2 going forward. Further to this, any GPL projects currently +using this library will be able to continue to use either version 2 or 3 +of this code in their projects. + +For more information please see: +https://www.apache.org/licenses/GPL-compatibility.html + +In order to remain consistent with this change, from this point on +modifications to this library will only be accepted against version 3 +of this software under the terms of the ALv2. They will then, where +appropriate, be backported to version 2. + +We hope to release version 3 at the same time as we release version 2.11. + Testing and verification ------------------------ This version has been tested on SMP architecture (Intel x64 Hex Core) @@ -121,14 +145,34 @@ successfully. We recommend MinGW64 over MinGW32 for both 64 and 32 bit GNU CC builds. MinGW64 also includes its own independent pthreads implementation, which you may prefer to use. -New Features ------------- -The autoconf configuration added in 2.10.0 should be used for all GNU -builds (MinGW, MinGW64, etc). The redundant GNUmakefiles have been -removed. +New Features or Changes +----------------------- +For Microsoft toolchain builds: +(1) Static linking requires both this library and any linking +libraries or applications to be compiled with /MT consistently. + +(2) Static libraries have been renamed as libpthreadV*.lib +to differentiate them from DLL import libs pthreadV*.lib. + +(3) If you are using mixed linkage, e.g. linking the static /MT version +of the library to an application linked with /MD you may be able to use +GetLastError() to interrogate the error code because the library sets +both errno (via _set_errno()) and SetLastError(). Bug Fixes --------- +Remove the attempt to set PTW32_USES_SEPARATE_CRT in the headers which +can cause unexpected results. In certain situations a user may want to +define it explicitly in their environment to invoke it's effects, either +when buidling the library or an application or both. See README.NONPORTABLE. +-- Ross Johnson + +The library should be more reliable under fully statically linked +scenarios. Note: we have removed the PIMAGE_TLS_CALLBACK code and +reverted to the earlier method that appears to be more reliable +across all compiler editions. +- Mark Pizzolato + Various corrections to GNUmakefile. Although this file has been removed, for completeness the changes have been recorded as commits to the repository. @@ -630,7 +674,7 @@ semaphores, such as WinCE prior to version 3.0. An alternate implementation of POSIX semaphores is built using W32 events for these systems when NEED_SEM is defined. This code has been completely rewritten in this release to reuse most of the default POSIX semaphore code, and particularly, -to implement all of the sem_* routines supported by pthreads-win32. Tim +to implement all of the sem_* routines supported by Pthreads4w. Tim Theisen also run the test suite over the NEED_SEM code on his MP system. All tests passed. @@ -640,7 +684,7 @@ New features ------------ * pthread_mutex_timedlock() and all sem_* routines provided by -pthreads-win32 are now implemented for WinCE versions prior to 3.0. Those +Pthreads4w are now implemented for WinCE versions prior to 3.0. Those versions did not implement W32 semaphores. Define NEED_SEM in config.h when building the library for these systems. @@ -833,7 +877,7 @@ New features * A Microsoft-style version resource has been added to the DLL for applications that wish to check DLL compatibility at runtime. -* Pthreads-win32 DLL naming has been extended to allow incompatible DLL +* Pthreads4w DLL naming has been extended to allow incompatible DLL versions to co-exist in the same filesystem. See the README file for details, but briefly: while the version information inside the DLL will change with each release from now on, the DLL version names will only change if the new @@ -843,7 +887,7 @@ The versioning scheme has been borrowed from GNU Libtool, and the DLL naming scheme is from Cygwin. Provided the Libtool-style numbering rules are honoured, the Cygwin DLL naming scheme automatcally ensures that DLL name changes are minimal and that applications will not load an incompatible -pthreads-win32 DLL. +Pthreads4w DLL. Those who use the pre-built DLLs will find that the DLL/LIB names have a new suffix (1) in this snapshot. E.g. pthreadVC1.dll etc. @@ -861,7 +905,7 @@ Certain POSIX macros have changed. These changes are intended to conform to the Single Unix Specification version 3, which states that, if set to 0 (zero) or not defined, then applications may use -sysconf() to determine their values at runtime. Pthreads-win32 does not +sysconf() to determine their values at runtime. Pthreads4w does not implement sysconf(). The following macros are no longer undefined, but defined and set to -1 @@ -1056,7 +1100,7 @@ for implicit POSIX threads. New feature - cancellation of/by Win32 (non-POSIX) threads --------------------------------------------------------- Since John Bossom's original implementation, the library has allowed non-POSIX -initialised threads (Win32 threads) to call pthreads-win32 routines and +initialised threads (Win32 threads) to call Pthreads4w routines and therefore interact with POSIX threads. This is done by creating an on-the-fly POSIX thread ID for the Win32 thread that, once created, allows fully reciprical interaction. This did not extend to thread cancellation (async or @@ -1266,7 +1310,7 @@ There are a few reasons: do the expected thing in that context. (There are equally respected people who believe it should not be easily accessible, if it's there at all, for unconditional conformity to other implementations.) -- because pthreads-win32 is one of the few implementations that has +- because Pthreads4w is one of the few implementations that has the choice, perhaps the only freely available one, and so offers a laboratory to people who may want to explore the effects; - although the code will always be around somewhere for anyone who @@ -1405,7 +1449,7 @@ return an error (ESRCH). * errno: An incorrect compiler directive caused a local version of errno to be used instead of the Win32 errno. Both instances are -thread-safe but applications checking errno after a pthreads-win32 +thread-safe but applications checking errno after a Pthreads4w call would be wrong. Fixing this also fixed a bad compiler option in the testsuite (/MT should have been /MD) which is needed to link with the correct library MSVCRT.LIB. diff --git a/_ptw32.h b/_ptw32.h index 321319db..56b624be 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -101,42 +101,6 @@ # endif #endif -/* - * If pthreads-win32 is compiled as a DLL with MSVC, and - * both it and the application are linked against the static - * C runtime (i.e. with the /MT compiler flag), then the - * application will not see the same C runtime globals as - * the library. These include the errno variable, and the - * termination routine called by terminate(). For details, - * refer to the following links: - * - * http://support.microsoft.com/kb/94248 - * (Section 4: Problems Encountered When Using Multiple CRT Libraries) - * - * http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/b4500c0d-1b69-40c7-9ef5-08da1025b5bf - * - * When pthreads4w is built with __PTW32_USES_SEPARATE_CRT - * defined, the following features are enabled: - * - * (1) In addition to setting the errno variable when errors - * occur, the library will also call SetLastError() with the - * same value. The application can then use GetLastError() - * to obtain the value of errno. (This pair of routines are - * in kernel32.dll, and so are not affected by the use of - * multiple CRT libraries.) - * - * (2) When C++ or SEH cleanup is used, the library defines - * a function pthread_win32_set_terminate_np(), which can be - * used to set the termination routine that should be called - * when an unhandled exception occurs in a thread function - * (or otherwise inside the library). - * - * Note: "_DLL" implies the /MD compiler flag. - */ -#if defined(_MSC_VER) && !defined(_DLL) && !defined(__PTW32_STATIC_LIB) -# define __PTW32_USES_SEPARATE_CRT -#endif - /* * This is more or less a duplicate of what is in the autoconf config.h, * which is only used when building the pthread-win32 libraries. They diff --git a/implement.h b/implement.h index ae8b49ac..e49404af 100644 --- a/implement.h +++ b/implement.h @@ -1,983 +1,975 @@ -/* - * implement.h - * - * Definitions that don't need to be public. - * - * Keeps all the internals out of pthread.h - * - * -------------------------------------------------------------------------- - * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, 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. - */ - -#if !defined(_IMPLEMENT_H) -#define _IMPLEMENT_H - -#if !defined (__PTW32_CONFIG_H) -# error "config.h was not #included" -#endif - -#include <_ptw32.h> - -#if !defined(_WIN32_WINNT) -# define _WIN32_WINNT 0x0400 -#endif - -#define WIN32_LEAN_AND_MEAN - -#include -#include -/* - * In case windows.h doesn't define it (e.g. WinCE perhaps) - */ -#if defined(WINCE) -typedef VOID (APIENTRY *PAPCFUNC)(DWORD dwParam); -#endif - -/* - * Designed to allow error values to be set and retrieved in builds where - * MSCRT libraries are statically linked to DLLs. - * - * This does not handle the case where a static pthreads4w lib is linked - * to a static linked app. Compiling and linking pthreads.c with app.c - * as one does work with the right macros defined. See tests/Makefile - * for clues or just "cd tests && nmake clean VC-static". - */ -#if ! defined(WINCE) && \ - (( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0800 ) || \ - ( defined(_MSC_VER) && _MSC_VER >= 1400 )) /* MSVC8+ */ -# if defined(__MINGW32__) -__attribute__((unused)) -# endif -static int __ptw32_get_errno(void) { int err = 0; _get_errno(&err); return err; } -# define __PTW32_GET_ERRNO() __ptw32_get_errno() -# if defined (__PTW32_USES_SEPARATE_CRT) -# if defined(__MINGW32__) -__attribute__((unused)) -# endif -static void __ptw32_set_errno(int err) { _set_errno(err); SetLastError(err); } -# define __PTW32_SET_ERRNO(err) __ptw32_set_errno(err) -# else -# define __PTW32_SET_ERRNO(err) _set_errno(err) -# endif -#else -# define __PTW32_GET_ERRNO() (errno) -# if defined (__PTW32_USES_SEPARATE_CRT) -# if defined(__MINGW32__) -__attribute__((unused)) -# endif -static void __ptw32_set_errno(int err) { errno = err; SetLastError(err); } -# define __PTW32_SET_ERRNO(err) __ptw32_set_errno(err) -# else -# define __PTW32_SET_ERRNO(err) (errno = (err)) -# endif -#endif - -#if !defined(malloc) -# include -#endif - -#if defined(__PTW32_CLEANUP_C) -# include -#endif - -#if !defined(INT_MAX) -# include -#endif - -/* use local include files during development */ -#include "semaphore.h" -#include "sched.h" - -/* MSVC 7.1 doesn't like complex #if expressions */ -#define INLINE -#if defined (__PTW32_BUILD_INLINED) -# if defined(HAVE_C_INLINE) || defined(__cplusplus) -# undef INLINE -# define INLINE inline -# endif -#endif - -#if defined (__PTW32_CONFIG_MSVC6) -# define __PTW32_INTERLOCKED_VOLATILE -#else -# define __PTW32_INTERLOCKED_VOLATILE volatile -#endif - -#define __PTW32_INTERLOCKED_LONG long -#define __PTW32_INTERLOCKED_PVOID PVOID -#define __PTW32_INTERLOCKED_LONGPTR __PTW32_INTERLOCKED_VOLATILE long* -#define __PTW32_INTERLOCKED_PVOID_PTR __PTW32_INTERLOCKED_VOLATILE PVOID* -#if defined(_WIN64) -# define __PTW32_INTERLOCKED_SIZE LONGLONG -# define __PTW32_INTERLOCKED_SIZEPTR __PTW32_INTERLOCKED_VOLATILE LONGLONG* -#else -# define __PTW32_INTERLOCKED_SIZE long -# define __PTW32_INTERLOCKED_SIZEPTR __PTW32_INTERLOCKED_VOLATILE long* -#endif - -/* - * Don't allow the linker to optimize away dll.obj (dll.o) in static builds. - */ -#if defined (__PTW32_STATIC_LIB) && defined (__PTW32_BUILD) && !defined (__PTW32_TEST_SNEAK_PEEK) - void __ptw32_autostatic_anchor(void); -# if defined(__GNUC__) - __attribute__((unused, used)) -# endif - static void (*local_autostatic_anchor)(void) = __ptw32_autostatic_anchor; -#endif - -typedef enum -{ - /* - * This enumeration represents the state of the thread; - * The thread is still valid if the numeric value of the - * state is greater or equal "PThreadStateRunning". - */ - PThreadStateInitial = 0, /* Thread not running */ - PThreadStateReuse, /* In reuse pool. */ - PThreadStateRunning, /* Thread alive & kicking */ - PThreadStateSuspended, /* Thread alive but suspended */ - PThreadStateCancelPending, /* Thread alive but */ - /* has cancellation pending. */ - PThreadStateCanceling, /* Thread alive but is */ - /* in the process of terminating */ - /* due to a cancellation request */ - PThreadStateExiting, /* Thread alive but exiting */ - /* due to an exception */ - PThreadStateLast /* All handlers have been run and now */ - /* final cleanup can be done. */ -} -PThreadState; - -typedef struct __ptw32_mcs_node_t_ __ptw32_mcs_local_node_t; -typedef struct __ptw32_mcs_node_t_* __ptw32_mcs_lock_t; -typedef struct __ptw32_robust_node_t_ __ptw32_robust_node_t; -typedef struct __ptw32_thread_t_ __ptw32_thread_t; - -struct __ptw32_thread_t_ -{ - unsigned __int64 seqNumber; /* Process-unique thread sequence number */ - HANDLE threadH; /* Win32 thread handle - POSIX thread is invalid if threadH == 0 */ - pthread_t ptHandle; /* This thread's permanent pthread_t handle */ - __ptw32_thread_t * prevReuse; /* Links threads on reuse stack */ - volatile PThreadState state; - __ptw32_mcs_lock_t threadLock; /* Used for serialised access to public thread state */ - __ptw32_mcs_lock_t stateLock; /* Used for async-cancel safety */ - HANDLE cancelEvent; - void *exitStatus; - void *parms; - void *keys; - void *nextAssoc; -#if defined(__PTW32_CLEANUP_C) - jmp_buf start_mark; /* Jump buffer follows void* so should be aligned */ -#endif /* __PTW32_CLEANUP_C */ -#if defined(HAVE_SIGSET_T) - sigset_t sigmask; -#endif /* HAVE_SIGSET_T */ - __ptw32_mcs_lock_t - robustMxListLock; /* robustMxList lock */ - __ptw32_robust_node_t* - robustMxList; /* List of currenty held robust mutexes */ - int ptErrno; - int detachState; - int sched_priority; /* As set, not as currently is */ - int cancelState; - int cancelType; - int implicit:1; - DWORD thread; /* Windows thread ID */ -#if defined(HAVE_CPU_AFFINITY) - size_t cpuset; /* Thread CPU affinity set */ -#endif - char * name; /* Thread name */ -#if defined(_UWIN) - DWORD dummy[5]; -#endif - size_t align; /* Force alignment if this struct is packed */ -}; - - -/* - * Special value to mark attribute objects as valid. - */ -#define __PTW32_ATTR_VALID ((unsigned long) 0xC4C0FFEE) - -struct pthread_attr_t_ -{ - unsigned long valid; - void *stackaddr; - size_t stacksize; - int detachstate; - struct sched_param param; - int inheritsched; - int contentionscope; - size_t cpuset; - char * thrname; -#if defined(HAVE_SIGSET_T) - sigset_t sigmask; -#endif /* HAVE_SIGSET_T */ -}; - - -/* - * ==================== - * ==================== - * Semaphores, Mutexes and Condition Variables - * ==================== - * ==================== - */ - -struct sem_t_ -{ - int value; - __ptw32_mcs_lock_t lock; - HANDLE sem; -#if defined(NEED_SEM) - int leftToUnblock; -#endif -}; - -#define __PTW32_OBJECT_AUTO_INIT ((void *)(size_t) -1) -#define __PTW32_OBJECT_INVALID NULL - -struct pthread_mutex_t_ -{ - LONG lock_idx; /* Provides exclusive access to mutex state - via the Interlocked* mechanism. - 0: unlocked/free. - 1: locked - no other waiters. - -1: locked - with possible other waiters. - */ - int recursive_count; /* Number of unlocks a thread needs to perform - before the lock is released (recursive - mutexes only). */ - int kind; /* Mutex type. */ - pthread_t ownerThread; - HANDLE event; /* Mutex release notification to waiting - threads. */ - __ptw32_robust_node_t* - robustNode; /* Extra state for robust mutexes */ -}; - -enum __ptw32_robust_state_t_ -{ - __PTW32_ROBUST_CONSISTENT, - __PTW32_ROBUST_INCONSISTENT, - __PTW32_ROBUST_NOTRECOVERABLE -}; - -typedef enum __ptw32_robust_state_t_ __ptw32_robust_state_t; - -/* - * Node used to manage per-thread lists of currently-held robust mutexes. - */ -struct __ptw32_robust_node_t_ -{ - pthread_mutex_t mx; - __ptw32_robust_state_t stateInconsistent; - __ptw32_robust_node_t* prev; - __ptw32_robust_node_t* next; -}; - -struct pthread_mutexattr_t_ -{ - int pshared; - int kind; - int robustness; -}; - -/* - * Possible values, other than __PTW32_OBJECT_INVALID, - * for the "interlock" element in a spinlock. - * - * In this implementation, when a spinlock is initialised, - * the number of cpus available to the process is checked. - * If there is only one cpu then "interlock" is set equal to - * __PTW32_SPIN_USE_MUTEX and u.mutex is an initialised mutex. - * If the number of cpus is greater than 1 then "interlock" - * is set equal to __PTW32_SPIN_UNLOCKED and the number is - * stored in u.cpus. This arrangement allows the spinlock - * routines to attempt an InterlockedCompareExchange on "interlock" - * immediately and, if that fails, to try the inferior mutex. - * - * "u.cpus" isn't used for anything yet, but could be used at - * some point to optimise spinlock behaviour. - */ -#define __PTW32_SPIN_INVALID (0) -#define __PTW32_SPIN_UNLOCKED (1) -#define __PTW32_SPIN_LOCKED (2) -#define __PTW32_SPIN_USE_MUTEX (3) - -struct pthread_spinlock_t_ -{ - long interlock; /* Locking element for multi-cpus. */ - union - { - int cpus; /* No. of cpus if multi cpus, or */ - pthread_mutex_t mutex; /* mutex if single cpu. */ - } u; -}; - -/* - * MCS lock queue node - see ptw32_MCS_lock.c - */ -struct __ptw32_mcs_node_t_ -{ - struct __ptw32_mcs_node_t_ **lock; /* ptr to tail of queue */ - struct __ptw32_mcs_node_t_ *next; /* ptr to successor in queue */ - HANDLE readyFlag; /* set after lock is released by - predecessor */ - HANDLE nextFlag; /* set after 'next' ptr is set by - successor */ -}; - - -struct pthread_barrier_t_ -{ - unsigned int nCurrentBarrierHeight; - unsigned int nInitialBarrierHeight; - int pshared; - sem_t semBarrierBreeched; - __ptw32_mcs_lock_t lock; - __ptw32_mcs_local_node_t proxynode; -}; - -struct pthread_barrierattr_t_ -{ - int pshared; -}; - -struct pthread_key_t_ -{ - DWORD key; - void (__PTW32_CDECL *destructor) (void *); - __ptw32_mcs_lock_t keyLock; - void *threads; -}; - - -typedef struct ThreadParms ThreadParms; - -struct ThreadParms -{ - pthread_t tid; - void * (__PTW32_CDECL *start) (void *); - void *arg; -}; - - -struct pthread_cond_t_ -{ - long nWaitersBlocked; /* Number of threads blocked */ - long nWaitersGone; /* Number of threads timed out */ - long nWaitersToUnblock; /* Number of threads to unblock */ - sem_t semBlockQueue; /* Queue up threads waiting for the */ - /* condition to become signalled */ - sem_t semBlockLock; /* Semaphore that guards access to */ - /* | waiters blocked count/block queue */ - /* +-> Mandatory Sync.LEVEL-1 */ - pthread_mutex_t mtxUnblockLock; /* Mutex that guards access to */ - /* | waiters (to)unblock(ed) counts */ - /* +-> Optional* Sync.LEVEL-2 */ - pthread_cond_t next; /* Doubly linked list */ - pthread_cond_t prev; -}; - - -struct pthread_condattr_t_ -{ - int pshared; -}; - -#define __PTW32_RWLOCK_MAGIC 0xfacade2 - -struct pthread_rwlock_t_ -{ - pthread_mutex_t mtxExclusiveAccess; - pthread_mutex_t mtxSharedAccessCompleted; - pthread_cond_t cndSharedAccessCompleted; - int nSharedAccessCount; - int nExclusiveAccessCount; - int nCompletedSharedAccessCount; - int nMagic; -}; - -struct pthread_rwlockattr_t_ -{ - int pshared; -}; - -typedef union -{ - char cpuset[CPU_SETSIZE/8]; - size_t _cpuset; -} _sched_cpu_set_vector_; - -typedef struct ThreadKeyAssoc ThreadKeyAssoc; - -struct ThreadKeyAssoc -{ - /* - * Purpose: - * This structure creates an association between a thread and a key. - * It is used to implement the implicit invocation of a user defined - * destroy routine for thread specific data registered by a user upon - * exiting a thread. - * - * Graphically, the arrangement is as follows, where: - * - * K - Key with destructor - * (head of chain is key->threads) - * T - Thread that has called pthread_setspecific(Kn) - * (head of chain is thread->keys) - * A - Association. Each association is a node at the - * intersection of two doubly-linked lists. - * - * T1 T2 T3 - * | | | - * | | | - * K1 -----+-----A-----A-----> - * | | | - * | | | - * K2 -----A-----A-----+-----> - * | | | - * | | | - * K3 -----A-----+-----A-----> - * | | | - * | | | - * V V V - * - * Access to the association is guarded by two locks: the key's - * general lock (guarding the row) and the thread's general - * lock (guarding the column). This avoids the need for a - * dedicated lock for each association, which not only consumes - * more handles but requires that the lock resources persist - * until both the key is deleted and the thread has called the - * destructor. The two-lock arrangement allows those resources - * to be freed as soon as either thread or key is concluded. - * - * To avoid deadlock, whenever both locks are required both the - * key and thread locks are acquired consistently in the order - * "key lock then thread lock". An exception to this exists - * when a thread calls the destructors, however, this is done - * carefully (but inelegantly) to avoid deadlock. - * - * An association is created when a thread first calls - * pthread_setspecific() on a key that has a specified - * destructor. - * - * An association is destroyed either immediately after the - * thread calls the key destructor function on thread exit, or - * when the key is deleted. - * - * Attributes: - * thread - * reference to the thread that owns the - * association. This is actually the pointer to the - * thread struct itself. Since the association is - * destroyed before the thread exits, this can never - * point to a different logical thread to the one that - * created the assoc, i.e. after thread struct reuse. - * - * key - * reference to the key that owns the association. - * - * nextKey - * The pthread_t->keys attribute is the head of a - * chain of associations that runs through the nextKey - * link. This chain provides the 1 to many relationship - * between a pthread_t and all pthread_key_t on which - * it called pthread_setspecific. - * - * prevKey - * Similarly. - * - * nextThread - * The pthread_key_t->threads attribute is the head of - * a chain of associations that runs through the - * nextThreads link. This chain provides the 1 to many - * relationship between a pthread_key_t and all the - * PThreads that have called pthread_setspecific for - * this pthread_key_t. - * - * prevThread - * Similarly. - * - * Notes: - * 1) As soon as either the key or the thread is no longer - * referencing the association, it can be destroyed. The - * association will be removed from both chains. - * - * 2) Under WIN32, an association is only created by - * pthread_setspecific if the user provided a - * destroyRoutine when they created the key. - * - * - */ - __ptw32_thread_t * thread; - pthread_key_t key; - ThreadKeyAssoc *nextKey; - ThreadKeyAssoc *nextThread; - ThreadKeyAssoc *prevKey; - ThreadKeyAssoc *prevThread; -}; - - -#if defined(__PTW32_CLEANUP_SEH) -/* - * -------------------------------------------------------------- - * MAKE_SOFTWARE_EXCEPTION - * This macro constructs a software exception code following - * the same format as the standard Win32 error codes as defined - * in WINERROR.H - * Values are 32 bit values laid out as follows: - * - * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 - * +---+-+-+-----------------------+-------------------------------+ - * |Sev|C|R| Facility | Code | - * +---+-+-+-----------------------+-------------------------------+ - * - * Severity Values: - */ -#define SE_SUCCESS 0x00 -#define SE_INFORMATION 0x01 -#define SE_WARNING 0x02 -#define SE_ERROR 0x03 - -#define MAKE_SOFTWARE_EXCEPTION( _severity, _facility, _exception ) \ -( (DWORD) ( ( (_severity) << 30 ) | /* Severity code */ \ - ( 1 << 29 ) | /* MS=0, User=1 */ \ - ( 0 << 28 ) | /* Reserved */ \ - ( (_facility) << 16 ) | /* Facility Code */ \ - ( (_exception) << 0 ) /* Exception Code */ \ - ) ) - -/* - * We choose one specific Facility/Error code combination to - * identify our software exceptions vs. WIN32 exceptions. - * We store our actual component and error code within - * the optional information array. - */ -#define EXCEPTION_PTW32_SERVICES \ - MAKE_SOFTWARE_EXCEPTION( SE_ERROR, \ - __PTW32_SERVICES_FACILITY, \ - __PTW32_SERVICES_ERROR ) - -#define __PTW32_SERVICES_FACILITY 0xBAD -#define __PTW32_SERVICES_ERROR 0xDEED - -#endif /* __PTW32_CLEANUP_SEH */ - -/* - * Services available through EXCEPTION_PTW32_SERVICES - * and also used [as parameters to __ptw32_throw()] as - * generic exception selectors. - */ - -#define __PTW32_EPS_EXIT (1) -#define __PTW32_EPS_CANCEL (2) - - -/* Useful macros */ -#define __PTW32_MAX(a,b) ((a)<(b)?(b):(a)) -#define __PTW32_MIN(a,b) ((a)>(b)?(b):(a)) - - -/* Declared in pthread_cancel.c */ -extern DWORD (*__ptw32_register_cancellation) (PAPCFUNC, HANDLE, DWORD); - -/* Thread Reuse stack bottom marker. Must not be NULL or any valid pointer to memory. */ -#define __PTW32_THREAD_REUSE_EMPTY ((__ptw32_thread_t *)(size_t) 1) - -extern int __ptw32_processInitialized; -extern __ptw32_thread_t * __ptw32_threadReuseTop; -extern __ptw32_thread_t * __ptw32_threadReuseBottom; -extern pthread_key_t __ptw32_selfThreadKey; -extern pthread_key_t __ptw32_cleanupKey; -extern pthread_cond_t __ptw32_cond_list_head; -extern pthread_cond_t __ptw32_cond_list_tail; - -extern int __ptw32_mutex_default_kind; - -extern unsigned __int64 __ptw32_threadSeqNumber; - -extern int __ptw32_concurrency; - -extern int __ptw32_features; - -extern __ptw32_mcs_lock_t __ptw32_thread_reuse_lock; -extern __ptw32_mcs_lock_t __ptw32_mutex_test_init_lock; -extern __ptw32_mcs_lock_t __ptw32_cond_list_lock; -extern __ptw32_mcs_lock_t __ptw32_cond_test_init_lock; -extern __ptw32_mcs_lock_t __ptw32_rwlock_test_init_lock; -extern __ptw32_mcs_lock_t __ptw32_spinlock_test_init_lock; - -#if defined(_UWIN) -extern int pthread_count; -#endif - -__PTW32_BEGIN_C_DECLS - -/* - * ===================== - * ===================== - * Forward Declarations - * ===================== - * ===================== - */ - - int __ptw32_is_attr (const pthread_attr_t * attr); - - int __ptw32_cond_check_need_init (pthread_cond_t * cond); - int __ptw32_mutex_check_need_init (pthread_mutex_t * mutex); - int __ptw32_rwlock_check_need_init (pthread_rwlock_t * rwlock); - int __ptw32_spinlock_check_need_init (pthread_spinlock_t * lock); - - int __ptw32_robust_mutex_inherit(pthread_mutex_t * mutex); - void __ptw32_robust_mutex_add(pthread_mutex_t* mutex, pthread_t self); - void __ptw32_robust_mutex_remove(pthread_mutex_t* mutex, __ptw32_thread_t* otp); - - DWORD - __ptw32_Registercancellation (PAPCFUNC callback, - HANDLE threadH, DWORD callback_arg); - - int __ptw32_processInitialize (void); - - void __ptw32_processTerminate (void); - - void __ptw32_threadDestroy (pthread_t tid); - - void __ptw32_pop_cleanup_all (int execute); - - pthread_t __ptw32_new (void); - - pthread_t __ptw32_threadReusePop (void); - - void __ptw32_threadReusePush (pthread_t thread); - - int __ptw32_getprocessors (int *count); - - int __ptw32_setthreadpriority (pthread_t thread, int policy, int priority); - - void __ptw32_rwlock_cancelwrwait (void *arg); - -#if ! defined (__MINGW32__) || (defined (__MSVCRT__) && ! defined (__DMC__)) - unsigned __stdcall -#else - void -#endif - __ptw32_threadStart (void *vthreadParms); - - void __ptw32_callUserDestroyRoutines (pthread_t thread); - - int __ptw32_tkAssocCreate (__ptw32_thread_t * thread, pthread_key_t key); - - void __ptw32_tkAssocDestroy (ThreadKeyAssoc * assoc); - - int __ptw32_semwait (sem_t * sem); - - DWORD __ptw32_relmillisecs (const struct timespec * abstime); - - void __ptw32_mcs_lock_acquire (__ptw32_mcs_lock_t * lock, __ptw32_mcs_local_node_t * node); - - int __ptw32_mcs_lock_try_acquire (__ptw32_mcs_lock_t * lock, __ptw32_mcs_local_node_t * node); - - void __ptw32_mcs_lock_release (__ptw32_mcs_local_node_t * node); - - void __ptw32_mcs_node_transfer (__ptw32_mcs_local_node_t * new_node, __ptw32_mcs_local_node_t * old_node); - -#if defined(NEED_FTIME) - void __ptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft); - void __ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts); -#endif - -/* Declared in pthw32_calloc.c */ -#if defined(NEED_CALLOC) -#define calloc(n, s) __ptw32_calloc(n, s) - void *__ptw32_calloc (size_t n, size_t s); -#endif - -/* Declared in ptw32_throw.c */ -void __ptw32_throw (DWORD exception); - -__PTW32_END_C_DECLS - -#if defined(_UWIN_) -# if defined(_MT) - -__PTW32_BEGIN_C_DECLS - - _CRTIMP unsigned long __cdecl _beginthread (void (__cdecl *) (void *), - unsigned, void *); - _CRTIMP void __cdecl _endthread (void); - _CRTIMP unsigned long __cdecl _beginthreadex (void *, unsigned, - unsigned (__stdcall *) (void *), - void *, unsigned, unsigned *); - _CRTIMP void __cdecl _endthreadex (unsigned); - -__PTW32_END_C_DECLS - -# endif -#else -# if ! defined(WINCE) -# include -# endif -#endif - - -/* - * Use intrinsic versions wherever possible. VC will do this - * automatically where possible and GCC define these if available: - * __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 - * __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 - * __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 - * __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 - * __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 - * - * The full set of Interlocked intrinsics in GCC are (check versions): - * type __sync_fetch_and_add (type *ptr, type value, ...) - * type __sync_fetch_and_sub (type *ptr, type value, ...) - * type __sync_fetch_and_or (type *ptr, type value, ...) - * type __sync_fetch_and_and (type *ptr, type value, ...) - * type __sync_fetch_and_xor (type *ptr, type value, ...) - * type __sync_fetch_and_nand (type *ptr, type value, ...) - * type __sync_add_and_fetch (type *ptr, type value, ...) - * type __sync_sub_and_fetch (type *ptr, type value, ...) - * type __sync_or_and_fetch (type *ptr, type value, ...) - * type __sync_and_and_fetch (type *ptr, type value, ...) - * type __sync_xor_and_fetch (type *ptr, type value, ...) - * type __sync_nand_and_fetch (type *ptr, type value, ...) - * bool __sync_bool_compare_and_swap (type *ptr, type oldval type newval, ...) - * type __sync_val_compare_and_swap (type *ptr, type oldval type newval, ...) - * __sync_synchronize (...) // Full memory barrier - * type __sync_lock_test_and_set (type *ptr, type value, ...) // Acquire barrier - * void __sync_lock_release (type *ptr, ...) // Release barrier - * - * These are all overloaded and take 1,2,4,8 byte scalar or pointer types. - * - * The above aren't available in Mingw32 as of gcc 4.5.2 so define our own. - */ -#if defined(__cplusplus) -# define __PTW32_TO_VLONG64PTR(ptr) reinterpret_cast(ptr) -#else -# define __PTW32_TO_VLONG64PTR(ptr) (ptr) -#endif - -#if defined(__GNUC__) -# if defined(_WIN64) -# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_64(location, value, comparand) \ - ({ \ - __typeof (value) _result; \ - __asm__ __volatile__ \ - ( \ - "lock\n\t" \ - "cmpxchgq %2,(%1)" \ - :"=a" (_result) \ - :"r" (location), "r" (value), "a" (comparand) \ - :"memory", "cc"); \ - _result; \ - }) -# define __PTW32_INTERLOCKED_EXCHANGE_64(location, value) \ - ({ \ - __typeof (value) _result; \ - __asm__ __volatile__ \ - ( \ - "xchgq %0,(%1)" \ - :"=r" (_result) \ - :"r" (location), "0" (value) \ - :"memory", "cc"); \ - _result; \ - }) -# define __PTW32_INTERLOCKED_EXCHANGE_ADD_64(location, value) \ - ({ \ - __typeof (value) _result; \ - __asm__ __volatile__ \ - ( \ - "lock\n\t" \ - "xaddq %0,(%1)" \ - :"=r" (_result) \ - :"r" (location), "0" (value) \ - :"memory", "cc"); \ - _result; \ - }) -# define __PTW32_INTERLOCKED_INCREMENT_64(location) \ - ({ \ - __PTW32_INTERLOCKED_LONG _temp = 1; \ - __asm__ __volatile__ \ - ( \ - "lock\n\t" \ - "xaddq %0,(%1)" \ - :"+r" (_temp) \ - :"r" (location) \ - :"memory", "cc"); \ - ++_temp; \ - }) -# define __PTW32_INTERLOCKED_DECREMENT_64(location) \ - ({ \ - __PTW32_INTERLOCKED_LONG _temp = -1; \ - __asm__ __volatile__ \ - ( \ - "lock\n\t" \ - "xaddq %2,(%1)" \ - :"+r" (_temp) \ - :"r" (location) \ - :"memory", "cc"); \ - --_temp; \ - }) -#endif -# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG(location, value, comparand) \ - ({ \ - __typeof (value) _result; \ - __asm__ __volatile__ \ - ( \ - "lock\n\t" \ - "cmpxchgl %2,(%1)" \ - :"=a" (_result) \ - :"r" (location), "r" (value), "a" (comparand) \ - :"memory", "cc"); \ - _result; \ - }) -# define __PTW32_INTERLOCKED_EXCHANGE_LONG(location, value) \ - ({ \ - __typeof (value) _result; \ - __asm__ __volatile__ \ - ( \ - "xchgl %0,(%1)" \ - :"=r" (_result) \ - :"r" (location), "0" (value) \ - :"memory", "cc"); \ - _result; \ - }) -# define __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG(location, value) \ - ({ \ - __typeof (value) _result; \ - __asm__ __volatile__ \ - ( \ - "lock\n\t" \ - "xaddl %0,(%1)" \ - :"=r" (_result) \ - :"r" (location), "0" (value) \ - :"memory", "cc"); \ - _result; \ - }) -# define __PTW32_INTERLOCKED_INCREMENT_LONG(location) \ - ({ \ - __PTW32_INTERLOCKED_LONG _temp = 1; \ - __asm__ __volatile__ \ - ( \ - "lock\n\t" \ - "xaddl %0,(%1)" \ - :"+r" (_temp) \ - :"r" (location) \ - :"memory", "cc"); \ - ++_temp; \ - }) -# define __PTW32_INTERLOCKED_DECREMENT_LONG(location) \ - ({ \ - __PTW32_INTERLOCKED_LONG _temp = -1; \ - __asm__ __volatile__ \ - ( \ - "lock\n\t" \ - "xaddl %0,(%1)" \ - :"+r" (_temp) \ - :"r" (location) \ - :"memory", "cc"); \ - --_temp; \ - }) -# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR(location, value, comparand) \ - __PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE ((__PTW32_INTERLOCKED_SIZEPTR)location, \ - (__PTW32_INTERLOCKED_SIZE)value, \ - (__PTW32_INTERLOCKED_SIZE)comparand) -# define __PTW32_INTERLOCKED_EXCHANGE_PTR(location, value) \ - __PTW32_INTERLOCKED_EXCHANGE_SIZE ((__PTW32_INTERLOCKED_SIZEPTR)location, \ - (__PTW32_INTERLOCKED_SIZE)value) -#else -# if defined(_WIN64) -# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_64(p,v,c) InterlockedCompareExchange64 (__PTW32_TO_VLONG64PTR(p),(v),(c)) -# define __PTW32_INTERLOCKED_EXCHANGE_64(p,v) InterlockedExchange64 (__PTW32_TO_VLONG64PTR(p),(v)) -# define __PTW32_INTERLOCKED_EXCHANGE_ADD_64(p,v) InterlockedExchangeAdd64 (__PTW32_TO_VLONG64PTR(p),(v)) -# define __PTW32_INTERLOCKED_INCREMENT_64(p) InterlockedIncrement64 (__PTW32_TO_VLONG64PTR(p)) -# define __PTW32_INTERLOCKED_DECREMENT_64(p) InterlockedDecrement64 (__PTW32_TO_VLONG64PTR(p)) -# endif -# if defined (__PTW32_CONFIG_MSVC6) && !defined(_WIN64) -# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG(location, value, comparand) \ - ((LONG)InterlockedCompareExchange((PVOID *)(location), (PVOID)(value), (PVOID)(comparand))) -# else -# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG InterlockedCompareExchange -# endif -# define __PTW32_INTERLOCKED_EXCHANGE_LONG(p,v) InterlockedExchange((p),(v)) -# define __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG(p,v) InterlockedExchangeAdd((p),(v)) -# define __PTW32_INTERLOCKED_INCREMENT_LONG(p) InterlockedIncrement((p)) -# define __PTW32_INTERLOCKED_DECREMENT_LONG(p) InterlockedDecrement((p)) -# if defined (__PTW32_CONFIG_MSVC6) && !defined(_WIN64) -# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR InterlockedCompareExchange -# define __PTW32_INTERLOCKED_EXCHANGE_PTR(location, value) \ - ((PVOID)InterlockedExchange((LPLONG)(location), (LONG)(value))) -# else -# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR(p,v,c) InterlockedCompareExchangePointer((p),(v),(c)) -# define __PTW32_INTERLOCKED_EXCHANGE_PTR(p,v) InterlockedExchangePointer((p),(v)) -# endif -#endif -#if defined(_WIN64) -# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE(p,v,c) __PTW32_INTERLOCKED_COMPARE_EXCHANGE_64 (__PTW32_TO_VLONG64PTR(p),(v),(c)) -# define __PTW32_INTERLOCKED_EXCHANGE_SIZE(p,v) __PTW32_INTERLOCKED_EXCHANGE_64 (__PTW32_TO_VLONG64PTR(p),(v)) -# define __PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE(p,v) __PTW32_INTERLOCKED_EXCHANGE_ADD_64 (__PTW32_TO_VLONG64PTR(p),(v)) -# define __PTW32_INTERLOCKED_INCREMENT_SIZE(p) __PTW32_INTERLOCKED_INCREMENT_64 (__PTW32_TO_VLONG64PTR(p)) -# define __PTW32_INTERLOCKED_DECREMENT_SIZE(p) __PTW32_INTERLOCKED_DECREMENT_64 (__PTW32_TO_VLONG64PTR(p)) -#else -# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE(p,v,c) __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG((p),(v),(c)) -# define __PTW32_INTERLOCKED_EXCHANGE_SIZE(p,v) __PTW32_INTERLOCKED_EXCHANGE_LONG((p),(v)) -# define __PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE(p,v) __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG((p),(v)) -# define __PTW32_INTERLOCKED_INCREMENT_SIZE(p) __PTW32_INTERLOCKED_INCREMENT_LONG((p)) -# define __PTW32_INTERLOCKED_DECREMENT_SIZE(p) __PTW32_INTERLOCKED_DECREMENT_LONG((p)) -#endif - -#if defined(NEED_CREATETHREAD) - -/* - * Macro uses args so we can cast start_proc to LPTHREAD_START_ROUTINE - * in order to avoid warnings because of return type - */ - -#define _beginthreadex(security, \ - stack_size, \ - start_proc, \ - arg, \ - flags, \ - pid) \ - CreateThread(security, \ - stack_size, \ - (LPTHREAD_START_ROUTINE) start_proc, \ - arg, \ - flags, \ - pid) - -#define _endthreadex ExitThread - -#endif /* NEED_CREATETHREAD */ - - -#endif /* _IMPLEMENT_H */ +/* + * implement.h + * + * Definitions that don't need to be public. + * + * Keeps all the internals out of pthread.h + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2018, 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. + */ + +#if !defined(_IMPLEMENT_H) +#define _IMPLEMENT_H + +#if !defined (__PTW32_CONFIG_H) +# error "config.h was not #included" +#endif + +#include <_ptw32.h> + +#if !defined(_WIN32_WINNT) +# define _WIN32_WINNT 0x0400 +#endif + +#define WIN32_LEAN_AND_MEAN + +#include +#include +/* + * In case windows.h doesn't define it (e.g. WinCE perhaps) + */ +#if defined(WINCE) +typedef VOID (APIENTRY *PAPCFUNC)(DWORD dwParam); +#endif + +/* + * Designed to allow error values to be set and retrieved in builds where + * MSCRT libraries are statically linked to DLLs. + * + * This does not handle the case where a static pthreads4w lib is linked + * to a static linked app. Compiling and linking pthreads.c with app.c + * as one does work with the right macros defined. See tests/Makefile + * for clues or just "cd tests && nmake clean VC-static". + */ +#if ! defined(WINCE) && \ + (( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0800 ) || \ + ( defined(_MSC_VER) && _MSC_VER >= 1400 )) /* MSVC8+ */ +# if defined(__MINGW32__) +__attribute__((unused)) +# endif +static int ptw32_get_errno(void) { int err = 0; _get_errno(&err); return err; } +# define PTW32_GET_ERRNO() ptw32_get_errno() +# if defined(__MINGW32__) +__attribute__((unused)) +# endif +static void ptw32_set_errno(int err) { _set_errno(err); SetLastError(err); } +# define PTW32_SET_ERRNO(err) ptw32_set_errno(err) +#else +# define PTW32_GET_ERRNO() (errno) +# if defined(__MINGW32__) +__attribute__((unused)) +# endif +static void ptw32_set_errno(int err) { errno = err; SetLastError(err); } +# define PTW32_SET_ERRNO(err) ptw32_set_errno(err) +#endif + +#if !defined(malloc) +# include +#endif + +#if defined(__PTW32_CLEANUP_C) +# include +#endif + +#if !defined(INT_MAX) +# include +#endif + +/* use local include files during development */ +#include "semaphore.h" +#include "sched.h" + +/* MSVC 7.1 doesn't like complex #if expressions */ +#define INLINE +#if defined (__PTW32_BUILD_INLINED) +# if defined(HAVE_C_INLINE) || defined(__cplusplus) +# undef INLINE +# define INLINE inline +# endif +#endif + +#if defined (__PTW32_CONFIG_MSVC6) +# define __PTW32_INTERLOCKED_VOLATILE +#else +# define __PTW32_INTERLOCKED_VOLATILE volatile +#endif + +#define __PTW32_INTERLOCKED_LONG long +#define __PTW32_INTERLOCKED_PVOID PVOID +#define __PTW32_INTERLOCKED_LONGPTR __PTW32_INTERLOCKED_VOLATILE long* +#define __PTW32_INTERLOCKED_PVOID_PTR __PTW32_INTERLOCKED_VOLATILE PVOID* +#if defined(_WIN64) +# define __PTW32_INTERLOCKED_SIZE LONGLONG +# define __PTW32_INTERLOCKED_SIZEPTR __PTW32_INTERLOCKED_VOLATILE LONGLONG* +#else +# define __PTW32_INTERLOCKED_SIZE long +# define __PTW32_INTERLOCKED_SIZEPTR __PTW32_INTERLOCKED_VOLATILE long* +#endif + +/* + * Don't allow the linker to optimize away dll.obj (dll.o) in static builds. + */ +#if defined (__PTW32_STATIC_LIB) && defined (__PTW32_BUILD) && !defined (__PTW32_TEST_SNEAK_PEEK) + void __ptw32_autostatic_anchor(void); +# if defined(__GNUC__) + __attribute__((unused, used)) +# endif + static void (*local_autostatic_anchor)(void) = __ptw32_autostatic_anchor; +#endif + +typedef enum +{ + /* + * This enumeration represents the state of the thread; + * The thread is still valid if the numeric value of the + * state is greater or equal "PThreadStateRunning". + */ + PThreadStateInitial = 0, /* Thread not running */ + PThreadStateReuse, /* In reuse pool. */ + PThreadStateRunning, /* Thread alive & kicking */ + PThreadStateSuspended, /* Thread alive but suspended */ + PThreadStateCancelPending, /* Thread alive but */ + /* has cancellation pending. */ + PThreadStateCanceling, /* Thread alive but is */ + /* in the process of terminating */ + /* due to a cancellation request */ + PThreadStateExiting, /* Thread alive but exiting */ + /* due to an exception */ + PThreadStateLast /* All handlers have been run and now */ + /* final cleanup can be done. */ +} +PThreadState; + +typedef struct __ptw32_mcs_node_t_ __ptw32_mcs_local_node_t; +typedef struct __ptw32_mcs_node_t_* __ptw32_mcs_lock_t; +typedef struct __ptw32_robust_node_t_ __ptw32_robust_node_t; +typedef struct __ptw32_thread_t_ __ptw32_thread_t; + +struct __ptw32_thread_t_ +{ + unsigned __int64 seqNumber; /* Process-unique thread sequence number */ + HANDLE threadH; /* Win32 thread handle - POSIX thread is invalid if threadH == 0 */ + pthread_t ptHandle; /* This thread's permanent pthread_t handle */ + __ptw32_thread_t * prevReuse; /* Links threads on reuse stack */ + volatile PThreadState state; + __ptw32_mcs_lock_t threadLock; /* Used for serialised access to public thread state */ + __ptw32_mcs_lock_t stateLock; /* Used for async-cancel safety */ + HANDLE cancelEvent; + void *exitStatus; + void *parms; + void *keys; + void *nextAssoc; +#if defined(__PTW32_CLEANUP_C) + jmp_buf start_mark; /* Jump buffer follows void* so should be aligned */ +#endif /* __PTW32_CLEANUP_C */ +#if defined(HAVE_SIGSET_T) + sigset_t sigmask; +#endif /* HAVE_SIGSET_T */ + __ptw32_mcs_lock_t + robustMxListLock; /* robustMxList lock */ + __ptw32_robust_node_t* + robustMxList; /* List of currenty held robust mutexes */ + int ptErrno; + int detachState; + int sched_priority; /* As set, not as currently is */ + int cancelState; + int cancelType; + int implicit:1; + DWORD thread; /* Windows thread ID */ +#if defined(HAVE_CPU_AFFINITY) + size_t cpuset; /* Thread CPU affinity set */ +#endif + char * name; /* Thread name */ +#if defined(_UWIN) + DWORD dummy[5]; +#endif + size_t align; /* Force alignment if this struct is packed */ +}; + + +/* + * Special value to mark attribute objects as valid. + */ +#define __PTW32_ATTR_VALID ((unsigned long) 0xC4C0FFEE) + +struct pthread_attr_t_ +{ + unsigned long valid; + void *stackaddr; + size_t stacksize; + int detachstate; + struct sched_param param; + int inheritsched; + int contentionscope; + size_t cpuset; + char * thrname; +#if defined(HAVE_SIGSET_T) + sigset_t sigmask; +#endif /* HAVE_SIGSET_T */ +}; + + +/* + * ==================== + * ==================== + * Semaphores, Mutexes and Condition Variables + * ==================== + * ==================== + */ + +struct sem_t_ +{ + int value; + __ptw32_mcs_lock_t lock; + HANDLE sem; +#if defined(NEED_SEM) + int leftToUnblock; +#endif +}; + +#define __PTW32_OBJECT_AUTO_INIT ((void *)(size_t) -1) +#define __PTW32_OBJECT_INVALID NULL + +struct pthread_mutex_t_ +{ + LONG lock_idx; /* Provides exclusive access to mutex state + via the Interlocked* mechanism. + 0: unlocked/free. + 1: locked - no other waiters. + -1: locked - with possible other waiters. + */ + int recursive_count; /* Number of unlocks a thread needs to perform + before the lock is released (recursive + mutexes only). */ + int kind; /* Mutex type. */ + pthread_t ownerThread; + HANDLE event; /* Mutex release notification to waiting + threads. */ + __ptw32_robust_node_t* + robustNode; /* Extra state for robust mutexes */ +}; + +enum __ptw32_robust_state_t_ +{ + __PTW32_ROBUST_CONSISTENT, + __PTW32_ROBUST_INCONSISTENT, + __PTW32_ROBUST_NOTRECOVERABLE +}; + +typedef enum __ptw32_robust_state_t_ __ptw32_robust_state_t; + +/* + * Node used to manage per-thread lists of currently-held robust mutexes. + */ +struct __ptw32_robust_node_t_ +{ + pthread_mutex_t mx; + __ptw32_robust_state_t stateInconsistent; + __ptw32_robust_node_t* prev; + __ptw32_robust_node_t* next; +}; + +struct pthread_mutexattr_t_ +{ + int pshared; + int kind; + int robustness; +}; + +/* + * Possible values, other than __PTW32_OBJECT_INVALID, + * for the "interlock" element in a spinlock. + * + * In this implementation, when a spinlock is initialised, + * the number of cpus available to the process is checked. + * If there is only one cpu then "interlock" is set equal to + * __PTW32_SPIN_USE_MUTEX and u.mutex is an initialised mutex. + * If the number of cpus is greater than 1 then "interlock" + * is set equal to __PTW32_SPIN_UNLOCKED and the number is + * stored in u.cpus. This arrangement allows the spinlock + * routines to attempt an InterlockedCompareExchange on "interlock" + * immediately and, if that fails, to try the inferior mutex. + * + * "u.cpus" isn't used for anything yet, but could be used at + * some point to optimise spinlock behaviour. + */ +#define __PTW32_SPIN_INVALID (0) +#define __PTW32_SPIN_UNLOCKED (1) +#define __PTW32_SPIN_LOCKED (2) +#define __PTW32_SPIN_USE_MUTEX (3) + +struct pthread_spinlock_t_ +{ + long interlock; /* Locking element for multi-cpus. */ + union + { + int cpus; /* No. of cpus if multi cpus, or */ + pthread_mutex_t mutex; /* mutex if single cpu. */ + } u; +}; + +/* + * MCS lock queue node - see ptw32_MCS_lock.c + */ +struct __ptw32_mcs_node_t_ +{ + struct __ptw32_mcs_node_t_ **lock; /* ptr to tail of queue */ + struct __ptw32_mcs_node_t_ *next; /* ptr to successor in queue */ + HANDLE readyFlag; /* set after lock is released by + predecessor */ + HANDLE nextFlag; /* set after 'next' ptr is set by + successor */ +}; + + +struct pthread_barrier_t_ +{ + unsigned int nCurrentBarrierHeight; + unsigned int nInitialBarrierHeight; + int pshared; + sem_t semBarrierBreeched; + __ptw32_mcs_lock_t lock; + __ptw32_mcs_local_node_t proxynode; +}; + +struct pthread_barrierattr_t_ +{ + int pshared; +}; + +struct pthread_key_t_ +{ + DWORD key; + void (__PTW32_CDECL *destructor) (void *); + __ptw32_mcs_lock_t keyLock; + void *threads; +}; + + +typedef struct ThreadParms ThreadParms; + +struct ThreadParms +{ + pthread_t tid; + void * (__PTW32_CDECL *start) (void *); + void *arg; +}; + + +struct pthread_cond_t_ +{ + long nWaitersBlocked; /* Number of threads blocked */ + long nWaitersGone; /* Number of threads timed out */ + long nWaitersToUnblock; /* Number of threads to unblock */ + sem_t semBlockQueue; /* Queue up threads waiting for the */ + /* condition to become signalled */ + sem_t semBlockLock; /* Semaphore that guards access to */ + /* | waiters blocked count/block queue */ + /* +-> Mandatory Sync.LEVEL-1 */ + pthread_mutex_t mtxUnblockLock; /* Mutex that guards access to */ + /* | waiters (to)unblock(ed) counts */ + /* +-> Optional* Sync.LEVEL-2 */ + pthread_cond_t next; /* Doubly linked list */ + pthread_cond_t prev; +}; + + +struct pthread_condattr_t_ +{ + int pshared; +}; + +#define __PTW32_RWLOCK_MAGIC 0xfacade2 + +struct pthread_rwlock_t_ +{ + pthread_mutex_t mtxExclusiveAccess; + pthread_mutex_t mtxSharedAccessCompleted; + pthread_cond_t cndSharedAccessCompleted; + int nSharedAccessCount; + int nExclusiveAccessCount; + int nCompletedSharedAccessCount; + int nMagic; +}; + +struct pthread_rwlockattr_t_ +{ + int pshared; +}; + +typedef union +{ + char cpuset[CPU_SETSIZE/8]; + size_t _cpuset; +} _sched_cpu_set_vector_; + +typedef struct ThreadKeyAssoc ThreadKeyAssoc; + +struct ThreadKeyAssoc +{ + /* + * Purpose: + * This structure creates an association between a thread and a key. + * It is used to implement the implicit invocation of a user defined + * destroy routine for thread specific data registered by a user upon + * exiting a thread. + * + * Graphically, the arrangement is as follows, where: + * + * K - Key with destructor + * (head of chain is key->threads) + * T - Thread that has called pthread_setspecific(Kn) + * (head of chain is thread->keys) + * A - Association. Each association is a node at the + * intersection of two doubly-linked lists. + * + * T1 T2 T3 + * | | | + * | | | + * K1 -----+-----A-----A-----> + * | | | + * | | | + * K2 -----A-----A-----+-----> + * | | | + * | | | + * K3 -----A-----+-----A-----> + * | | | + * | | | + * V V V + * + * Access to the association is guarded by two locks: the key's + * general lock (guarding the row) and the thread's general + * lock (guarding the column). This avoids the need for a + * dedicated lock for each association, which not only consumes + * more handles but requires that the lock resources persist + * until both the key is deleted and the thread has called the + * destructor. The two-lock arrangement allows those resources + * to be freed as soon as either thread or key is concluded. + * + * To avoid deadlock, whenever both locks are required both the + * key and thread locks are acquired consistently in the order + * "key lock then thread lock". An exception to this exists + * when a thread calls the destructors, however, this is done + * carefully (but inelegantly) to avoid deadlock. + * + * An association is created when a thread first calls + * pthread_setspecific() on a key that has a specified + * destructor. + * + * An association is destroyed either immediately after the + * thread calls the key destructor function on thread exit, or + * when the key is deleted. + * + * Attributes: + * thread + * reference to the thread that owns the + * association. This is actually the pointer to the + * thread struct itself. Since the association is + * destroyed before the thread exits, this can never + * point to a different logical thread to the one that + * created the assoc, i.e. after thread struct reuse. + * + * key + * reference to the key that owns the association. + * + * nextKey + * The pthread_t->keys attribute is the head of a + * chain of associations that runs through the nextKey + * link. This chain provides the 1 to many relationship + * between a pthread_t and all pthread_key_t on which + * it called pthread_setspecific. + * + * prevKey + * Similarly. + * + * nextThread + * The pthread_key_t->threads attribute is the head of + * a chain of associations that runs through the + * nextThreads link. This chain provides the 1 to many + * relationship between a pthread_key_t and all the + * PThreads that have called pthread_setspecific for + * this pthread_key_t. + * + * prevThread + * Similarly. + * + * Notes: + * 1) As soon as either the key or the thread is no longer + * referencing the association, it can be destroyed. The + * association will be removed from both chains. + * + * 2) Under WIN32, an association is only created by + * pthread_setspecific if the user provided a + * destroyRoutine when they created the key. + * + * + */ + __ptw32_thread_t * thread; + pthread_key_t key; + ThreadKeyAssoc *nextKey; + ThreadKeyAssoc *nextThread; + ThreadKeyAssoc *prevKey; + ThreadKeyAssoc *prevThread; +}; + + +#if defined(__PTW32_CLEANUP_SEH) +/* + * -------------------------------------------------------------- + * MAKE_SOFTWARE_EXCEPTION + * This macro constructs a software exception code following + * the same format as the standard Win32 error codes as defined + * in WINERROR.H + * Values are 32 bit values laid out as follows: + * + * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 + * +---+-+-+-----------------------+-------------------------------+ + * |Sev|C|R| Facility | Code | + * +---+-+-+-----------------------+-------------------------------+ + * + * Severity Values: + */ +#define SE_SUCCESS 0x00 +#define SE_INFORMATION 0x01 +#define SE_WARNING 0x02 +#define SE_ERROR 0x03 + +#define MAKE_SOFTWARE_EXCEPTION( _severity, _facility, _exception ) \ +( (DWORD) ( ( (_severity) << 30 ) | /* Severity code */ \ + ( 1 << 29 ) | /* MS=0, User=1 */ \ + ( 0 << 28 ) | /* Reserved */ \ + ( (_facility) << 16 ) | /* Facility Code */ \ + ( (_exception) << 0 ) /* Exception Code */ \ + ) ) + +/* + * We choose one specific Facility/Error code combination to + * identify our software exceptions vs. WIN32 exceptions. + * We store our actual component and error code within + * the optional information array. + */ +#define EXCEPTION_PTW32_SERVICES \ + MAKE_SOFTWARE_EXCEPTION( SE_ERROR, \ + __PTW32_SERVICES_FACILITY, \ + __PTW32_SERVICES_ERROR ) + +#define __PTW32_SERVICES_FACILITY 0xBAD +#define __PTW32_SERVICES_ERROR 0xDEED + +#endif /* __PTW32_CLEANUP_SEH */ + +/* + * Services available through EXCEPTION_PTW32_SERVICES + * and also used [as parameters to __ptw32_throw()] as + * generic exception selectors. + */ + +#define __PTW32_EPS_EXIT (1) +#define __PTW32_EPS_CANCEL (2) + + +/* Useful macros */ +#define __PTW32_MAX(a,b) ((a)<(b)?(b):(a)) +#define __PTW32_MIN(a,b) ((a)>(b)?(b):(a)) + + +/* Declared in pthread_cancel.c */ +extern DWORD (*__ptw32_register_cancellation) (PAPCFUNC, HANDLE, DWORD); + +/* Thread Reuse stack bottom marker. Must not be NULL or any valid pointer to memory. */ +#define __PTW32_THREAD_REUSE_EMPTY ((__ptw32_thread_t *)(size_t) 1) + +extern int __ptw32_processInitialized; +extern __ptw32_thread_t * __ptw32_threadReuseTop; +extern __ptw32_thread_t * __ptw32_threadReuseBottom; +extern pthread_key_t __ptw32_selfThreadKey; +extern pthread_key_t __ptw32_cleanupKey; +extern pthread_cond_t __ptw32_cond_list_head; +extern pthread_cond_t __ptw32_cond_list_tail; + +extern int __ptw32_mutex_default_kind; + +extern unsigned __int64 __ptw32_threadSeqNumber; + +extern int __ptw32_concurrency; + +extern int __ptw32_features; + +extern __ptw32_mcs_lock_t __ptw32_thread_reuse_lock; +extern __ptw32_mcs_lock_t __ptw32_mutex_test_init_lock; +extern __ptw32_mcs_lock_t __ptw32_cond_list_lock; +extern __ptw32_mcs_lock_t __ptw32_cond_test_init_lock; +extern __ptw32_mcs_lock_t __ptw32_rwlock_test_init_lock; +extern __ptw32_mcs_lock_t __ptw32_spinlock_test_init_lock; + +#if defined(_UWIN) +extern int pthread_count; +#endif + +__PTW32_BEGIN_C_DECLS + +/* + * ===================== + * ===================== + * Forward Declarations + * ===================== + * ===================== + */ + + int __ptw32_is_attr (const pthread_attr_t * attr); + + int __ptw32_cond_check_need_init (pthread_cond_t * cond); + int __ptw32_mutex_check_need_init (pthread_mutex_t * mutex); + int __ptw32_rwlock_check_need_init (pthread_rwlock_t * rwlock); + int __ptw32_spinlock_check_need_init (pthread_spinlock_t * lock); + + int __ptw32_robust_mutex_inherit(pthread_mutex_t * mutex); + void __ptw32_robust_mutex_add(pthread_mutex_t* mutex, pthread_t self); + void __ptw32_robust_mutex_remove(pthread_mutex_t* mutex, __ptw32_thread_t* otp); + + DWORD + __ptw32_Registercancellation (PAPCFUNC callback, + HANDLE threadH, DWORD callback_arg); + + int __ptw32_processInitialize (void); + + void __ptw32_processTerminate (void); + + void __ptw32_threadDestroy (pthread_t tid); + + void __ptw32_pop_cleanup_all (int execute); + + pthread_t __ptw32_new (void); + + pthread_t __ptw32_threadReusePop (void); + + void __ptw32_threadReusePush (pthread_t thread); + + int __ptw32_getprocessors (int *count); + + int __ptw32_setthreadpriority (pthread_t thread, int policy, int priority); + + void __ptw32_rwlock_cancelwrwait (void *arg); + +#if ! defined (__MINGW32__) || (defined (__MSVCRT__) && ! defined (__DMC__)) + unsigned __stdcall +#else + void +#endif + __ptw32_threadStart (void *vthreadParms); + + void __ptw32_callUserDestroyRoutines (pthread_t thread); + + int __ptw32_tkAssocCreate (__ptw32_thread_t * thread, pthread_key_t key); + + void __ptw32_tkAssocDestroy (ThreadKeyAssoc * assoc); + + int __ptw32_semwait (sem_t * sem); + + DWORD __ptw32_relmillisecs (const struct timespec * abstime); + + void __ptw32_mcs_lock_acquire (__ptw32_mcs_lock_t * lock, __ptw32_mcs_local_node_t * node); + + int __ptw32_mcs_lock_try_acquire (__ptw32_mcs_lock_t * lock, __ptw32_mcs_local_node_t * node); + + void __ptw32_mcs_lock_release (__ptw32_mcs_local_node_t * node); + + void __ptw32_mcs_node_transfer (__ptw32_mcs_local_node_t * new_node, __ptw32_mcs_local_node_t * old_node); + +#if defined(NEED_FTIME) + void __ptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft); + void __ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts); +#endif + +/* Declared in pthw32_calloc.c */ +#if defined(NEED_CALLOC) +#define calloc(n, s) __ptw32_calloc(n, s) + void *__ptw32_calloc (size_t n, size_t s); +#endif + +/* Declared in ptw32_throw.c */ +void __ptw32_throw (DWORD exception); + +__PTW32_END_C_DECLS + +#if defined(_UWIN_) +# if defined(_MT) + +__PTW32_BEGIN_C_DECLS + + _CRTIMP unsigned long __cdecl _beginthread (void (__cdecl *) (void *), + unsigned, void *); + _CRTIMP void __cdecl _endthread (void); + _CRTIMP unsigned long __cdecl _beginthreadex (void *, unsigned, + unsigned (__stdcall *) (void *), + void *, unsigned, unsigned *); + _CRTIMP void __cdecl _endthreadex (unsigned); + +__PTW32_END_C_DECLS + +# endif +#else +# if ! defined(WINCE) +# include +# endif +#endif + + +/* + * Use intrinsic versions wherever possible. VC will do this + * automatically where possible and GCC define these if available: + * __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 + * __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 + * __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 + * __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 + * __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 + * + * The full set of Interlocked intrinsics in GCC are (check versions): + * type __sync_fetch_and_add (type *ptr, type value, ...) + * type __sync_fetch_and_sub (type *ptr, type value, ...) + * type __sync_fetch_and_or (type *ptr, type value, ...) + * type __sync_fetch_and_and (type *ptr, type value, ...) + * type __sync_fetch_and_xor (type *ptr, type value, ...) + * type __sync_fetch_and_nand (type *ptr, type value, ...) + * type __sync_add_and_fetch (type *ptr, type value, ...) + * type __sync_sub_and_fetch (type *ptr, type value, ...) + * type __sync_or_and_fetch (type *ptr, type value, ...) + * type __sync_and_and_fetch (type *ptr, type value, ...) + * type __sync_xor_and_fetch (type *ptr, type value, ...) + * type __sync_nand_and_fetch (type *ptr, type value, ...) + * bool __sync_bool_compare_and_swap (type *ptr, type oldval type newval, ...) + * type __sync_val_compare_and_swap (type *ptr, type oldval type newval, ...) + * __sync_synchronize (...) // Full memory barrier + * type __sync_lock_test_and_set (type *ptr, type value, ...) // Acquire barrier + * void __sync_lock_release (type *ptr, ...) // Release barrier + * + * These are all overloaded and take 1,2,4,8 byte scalar or pointer types. + * + * The above aren't available in Mingw32 as of gcc 4.5.2 so define our own. + */ +#if defined(__cplusplus) +# define __PTW32_TO_VLONG64PTR(ptr) reinterpret_cast(ptr) +#else +# define __PTW32_TO_VLONG64PTR(ptr) (ptr) +#endif + +#if defined(__GNUC__) +# if defined(_WIN64) +# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_64(location, value, comparand) \ + ({ \ + __typeof (value) _result; \ + __asm__ __volatile__ \ + ( \ + "lock\n\t" \ + "cmpxchgq %2,(%1)" \ + :"=a" (_result) \ + :"r" (location), "r" (value), "a" (comparand) \ + :"memory", "cc"); \ + _result; \ + }) +# define __PTW32_INTERLOCKED_EXCHANGE_64(location, value) \ + ({ \ + __typeof (value) _result; \ + __asm__ __volatile__ \ + ( \ + "xchgq %0,(%1)" \ + :"=r" (_result) \ + :"r" (location), "0" (value) \ + :"memory", "cc"); \ + _result; \ + }) +# define __PTW32_INTERLOCKED_EXCHANGE_ADD_64(location, value) \ + ({ \ + __typeof (value) _result; \ + __asm__ __volatile__ \ + ( \ + "lock\n\t" \ + "xaddq %0,(%1)" \ + :"=r" (_result) \ + :"r" (location), "0" (value) \ + :"memory", "cc"); \ + _result; \ + }) +# define __PTW32_INTERLOCKED_INCREMENT_64(location) \ + ({ \ + __PTW32_INTERLOCKED_LONG _temp = 1; \ + __asm__ __volatile__ \ + ( \ + "lock\n\t" \ + "xaddq %0,(%1)" \ + :"+r" (_temp) \ + :"r" (location) \ + :"memory", "cc"); \ + ++_temp; \ + }) +# define __PTW32_INTERLOCKED_DECREMENT_64(location) \ + ({ \ + __PTW32_INTERLOCKED_LONG _temp = -1; \ + __asm__ __volatile__ \ + ( \ + "lock\n\t" \ + "xaddq %2,(%1)" \ + :"+r" (_temp) \ + :"r" (location) \ + :"memory", "cc"); \ + --_temp; \ + }) +#endif +# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG(location, value, comparand) \ + ({ \ + __typeof (value) _result; \ + __asm__ __volatile__ \ + ( \ + "lock\n\t" \ + "cmpxchgl %2,(%1)" \ + :"=a" (_result) \ + :"r" (location), "r" (value), "a" (comparand) \ + :"memory", "cc"); \ + _result; \ + }) +# define __PTW32_INTERLOCKED_EXCHANGE_LONG(location, value) \ + ({ \ + __typeof (value) _result; \ + __asm__ __volatile__ \ + ( \ + "xchgl %0,(%1)" \ + :"=r" (_result) \ + :"r" (location), "0" (value) \ + :"memory", "cc"); \ + _result; \ + }) +# define __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG(location, value) \ + ({ \ + __typeof (value) _result; \ + __asm__ __volatile__ \ + ( \ + "lock\n\t" \ + "xaddl %0,(%1)" \ + :"=r" (_result) \ + :"r" (location), "0" (value) \ + :"memory", "cc"); \ + _result; \ + }) +# define __PTW32_INTERLOCKED_INCREMENT_LONG(location) \ + ({ \ + __PTW32_INTERLOCKED_LONG _temp = 1; \ + __asm__ __volatile__ \ + ( \ + "lock\n\t" \ + "xaddl %0,(%1)" \ + :"+r" (_temp) \ + :"r" (location) \ + :"memory", "cc"); \ + ++_temp; \ + }) +# define __PTW32_INTERLOCKED_DECREMENT_LONG(location) \ + ({ \ + __PTW32_INTERLOCKED_LONG _temp = -1; \ + __asm__ __volatile__ \ + ( \ + "lock\n\t" \ + "xaddl %0,(%1)" \ + :"+r" (_temp) \ + :"r" (location) \ + :"memory", "cc"); \ + --_temp; \ + }) +# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR(location, value, comparand) \ + __PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE ((__PTW32_INTERLOCKED_SIZEPTR)location, \ + (__PTW32_INTERLOCKED_SIZE)value, \ + (__PTW32_INTERLOCKED_SIZE)comparand) +# define __PTW32_INTERLOCKED_EXCHANGE_PTR(location, value) \ + __PTW32_INTERLOCKED_EXCHANGE_SIZE ((__PTW32_INTERLOCKED_SIZEPTR)location, \ + (__PTW32_INTERLOCKED_SIZE)value) +#else +# if defined(_WIN64) +# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_64(p,v,c) InterlockedCompareExchange64 (__PTW32_TO_VLONG64PTR(p),(v),(c)) +# define __PTW32_INTERLOCKED_EXCHANGE_64(p,v) InterlockedExchange64 (__PTW32_TO_VLONG64PTR(p),(v)) +# define __PTW32_INTERLOCKED_EXCHANGE_ADD_64(p,v) InterlockedExchangeAdd64 (__PTW32_TO_VLONG64PTR(p),(v)) +# define __PTW32_INTERLOCKED_INCREMENT_64(p) InterlockedIncrement64 (__PTW32_TO_VLONG64PTR(p)) +# define __PTW32_INTERLOCKED_DECREMENT_64(p) InterlockedDecrement64 (__PTW32_TO_VLONG64PTR(p)) +# endif +# if defined (__PTW32_CONFIG_MSVC6) && !defined(_WIN64) +# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG(location, value, comparand) \ + ((LONG)InterlockedCompareExchange((PVOID *)(location), (PVOID)(value), (PVOID)(comparand))) +# else +# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG InterlockedCompareExchange +# endif +# define __PTW32_INTERLOCKED_EXCHANGE_LONG(p,v) InterlockedExchange((p),(v)) +# define __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG(p,v) InterlockedExchangeAdd((p),(v)) +# define __PTW32_INTERLOCKED_INCREMENT_LONG(p) InterlockedIncrement((p)) +# define __PTW32_INTERLOCKED_DECREMENT_LONG(p) InterlockedDecrement((p)) +# if defined (__PTW32_CONFIG_MSVC6) && !defined(_WIN64) +# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR InterlockedCompareExchange +# define __PTW32_INTERLOCKED_EXCHANGE_PTR(location, value) \ + ((PVOID)InterlockedExchange((LPLONG)(location), (LONG)(value))) +# else +# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR(p,v,c) InterlockedCompareExchangePointer((p),(v),(c)) +# define __PTW32_INTERLOCKED_EXCHANGE_PTR(p,v) InterlockedExchangePointer((p),(v)) +# endif +#endif +#if defined(_WIN64) +# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE(p,v,c) __PTW32_INTERLOCKED_COMPARE_EXCHANGE_64 (__PTW32_TO_VLONG64PTR(p),(v),(c)) +# define __PTW32_INTERLOCKED_EXCHANGE_SIZE(p,v) __PTW32_INTERLOCKED_EXCHANGE_64 (__PTW32_TO_VLONG64PTR(p),(v)) +# define __PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE(p,v) __PTW32_INTERLOCKED_EXCHANGE_ADD_64 (__PTW32_TO_VLONG64PTR(p),(v)) +# define __PTW32_INTERLOCKED_INCREMENT_SIZE(p) __PTW32_INTERLOCKED_INCREMENT_64 (__PTW32_TO_VLONG64PTR(p)) +# define __PTW32_INTERLOCKED_DECREMENT_SIZE(p) __PTW32_INTERLOCKED_DECREMENT_64 (__PTW32_TO_VLONG64PTR(p)) +#else +# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE(p,v,c) __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG((p),(v),(c)) +# define __PTW32_INTERLOCKED_EXCHANGE_SIZE(p,v) __PTW32_INTERLOCKED_EXCHANGE_LONG((p),(v)) +# define __PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE(p,v) __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG((p),(v)) +# define __PTW32_INTERLOCKED_INCREMENT_SIZE(p) __PTW32_INTERLOCKED_INCREMENT_LONG((p)) +# define __PTW32_INTERLOCKED_DECREMENT_SIZE(p) __PTW32_INTERLOCKED_DECREMENT_LONG((p)) +#endif + +#if defined(NEED_CREATETHREAD) + +/* + * Macro uses args so we can cast start_proc to LPTHREAD_START_ROUTINE + * in order to avoid warnings because of return type + */ + +#define _beginthreadex(security, \ + stack_size, \ + start_proc, \ + arg, \ + flags, \ + pid) \ + CreateThread(security, \ + stack_size, \ + (LPTHREAD_START_ROUTINE) start_proc, \ + arg, \ + flags, \ + pid) + +#define _endthreadex ExitThread + +#endif /* NEED_CREATETHREAD */ + + +#endif /* _IMPLEMENT_H */ diff --git a/ptw32_threadStart.c b/ptw32_threadStart.c index 31e36a7d..fc41ca24 100644 --- a/ptw32_threadStart.c +++ b/ptw32_threadStart.c @@ -316,7 +316,7 @@ __ptw32_threadStart (void *vthreadParms) # pragma optimize("", on) #endif -#if defined (__PTW32_USES_SEPARATE_CRT) && defined (__cplusplus) +#if defined (__PTW32_USES_SEPARATE_CRT) && (defined(__PTW32_CLEANUP_CXX) || defined(__PTW32_CLEANUP_SEH)) __ptw32_terminate_handler pthread_win32_set_terminate_np(__ptw32_terminate_handler termFunction) { diff --git a/tests/ChangeLog b/tests/ChangeLog index 07b14d8e..c6c69cfc 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,8 +1,11 @@ 2018-08-07 Ross Johnson - * GNUmakefile.in (DLL_VER): rename as PTW32_VER; increment version number. + * GNUmakefile.in (DLL_VER): rename as PTW32_VER. * Makefile (DLL_VER): Likewise. * Bmakefile (DLL_VER): Likewise; does anyone use this anymore? + * Makefile: Variable renaming: e.g. VCLIB to VCIMP for DLL import + library pthreadVC2.lib and VCLIB now holds static library name + libpthreadVC2.lib, and similar for the other cleanup method versions. 2018-07-22 Mark Pizzolato diff --git a/tests/Makefile b/tests/Makefile index bb1a4724..ee845330 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -23,22 +23,28 @@ OPTIM = /O2 /Ob0 XXLIBS = ws2_32.lib # C++ Exceptions -VCEFLAGS = /EHs /TP /D__PtW32NoCatchWarn /D__PTW32_CLEANUP_CXX -VCELIB = pthreadVCE$(PTW32_VER).lib +VCEFLAGS = /EHs /TP /DPtW32NoCatchWarn /D__CLEANUP_CXX +VCELIB = libpthreadVCE$(PTW32_VER).lib +VCEIMP = pthreadVCE$(PTW32_VER).lib VCEDLL = pthreadVCE$(PTW32_VER).dll -VCELIBD = pthreadVCE$(PTW32_VER)d.lib +VCELIBD = libpthreadVCE$(PTW32_VER)d.lib +VCEIMPD = pthreadVCE$(PTW32_VER)d.lib VCEDLLD = pthreadVCE$(PTW32_VER)d.dll # Structured Exceptions -VSEFLAGS = /D__PTW32_CLEANUP_SEH -VSELIB = pthreadVSE$(PTW32_VER).lib +VSEFLAGS = /D__CLEANUP_SEH +VSELIB = libpthreadVSE$(PTW32_VER).lib +VSEIMP = pthreadVSE$(PTW32_VER).lib VSEDLL = pthreadVSE$(PTW32_VER).dll -VSELIBD = pthreadVSE$(PTW32_VER)d.lib +VSELIBD = libpthreadVSE$(PTW32_VER)d.lib +VSEIMPD = pthreadVSE$(PTW32_VER)d.lib VSEDLLD = pthreadVSE$(PTW32_VER)d.dll # C cleanup code -VCFLAGS = /D__PTW32_CLEANUP_C -VCLIB = pthreadVC$(PTW32_VER).lib +VCFLAGS = /D__CLEANUP_C +VCLIB = libpthreadVC$(PTW32_VER).lib +VCIMP = pthreadVC$(PTW32_VER).lib VCDLL = pthreadVC$(PTW32_VER).dll -VCLIBD = pthreadVC$(PTW32_VER)d.lib +VCLIBD = libpthreadVC$(PTW32_VER)d.lib +VCIMPD = pthreadVC$(PTW32_VER)d.lib VCDLLD = pthreadVC$(PTW32_VER)d.dll # C++ Exceptions in application - using VC version of pthreads dll VCXFLAGS = /EHs /TP /D__PTW32_CLEANUP_C @@ -56,8 +62,8 @@ BUILD_DIR = .. EHFLAGS = EHFLAGS_DLL = /MD EHFLAGS_DLL_DEBUG = /MDd -EHFLAGS_STATIC = /MT /D__PTW32_STATIC_LIB -I$(BUILD_DIR) /DHAVE_CONFIG_H /D__PTW32_BUILD_INLINED $(BUILD_DIR)\pthread.c -EHFLAGS_STATIC_DEBUG = /MTd /D__PTW32_STATIC_LIB -I$(BUILD_DIR) /DHAVE_CONFIG_H /D__PTW32_BUILD_INLINED $(BUILD_DIR)\pthread.c +EHFLAGS_STATIC = /MT +EHFLAGS_STATIC_DEBUG = /MTd # If a test case returns a non-zero exit code to the shell, make will # stop. @@ -110,79 +116,76 @@ help: @ $(ECHO) nmake clean VSE-small-static-debug VC: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCFLAGS) $(EHFLAGS_DLL)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCIMP)" CPDLL="$(VCDLL)" EHFLAGS="$(VCFLAGS) $(EHFLAGS_DLL)" allpassed VCE: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="$(VCEDLL)" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_DLL)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCEIMP)" CPDLL="$(VCEDLL)" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_DLL)" allpassed VSE: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="$(VSEDLL)" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_DLL)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSEIMP)" CPDLL="$(VSEDLL)" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_DLL)" allpassed VCX: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_DLL)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCIMP)" CPDLL="$(VCDLL)" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_DLL)" allpassed VC-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCFLAGS) $(EHFLAGS_DLL)" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCIMP)" CPDLL="$(VCDLL)" EHFLAGS="$(VCFLAGS) $(EHFLAGS_DLL)" $(BENCHTESTS) VCE-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="$(VCEDLL)" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_DLL)" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCEIMP)" CPDLL="$(VCEDLL)" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_DLL)" $(BENCHTESTS) VSE-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="$(VSEDLL)" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_DLL)" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSEIMP)" CPDLL="$(VSEDLL)" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_DLL)" $(BENCHTESTS) VCX-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="$(VCDLL)" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_DLL)" $(BENCHTESTS) - -VC-static-lib VC-small-static-lib: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) /MT" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCIMP)" CPDLL="$(VCDLL)" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_DLL)" $(BENCHTESTS) VC-static VC-small-static: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCFLAGS) $(EHFLAGS_STATIC)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) $(EHFLAGS_STATIC)" allpassed VCE-static VCE-small-static: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_STATIC)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_STATIC)" allpassed VSE-static VSE-small-static: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_STATIC)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_STATIC)" allpassed VCX-static VCX-small-static: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_STATIC)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_STATIC)" allpassed VC-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIB)" CPDLL="" EHFLAGS="$(VCFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) VCE-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIB)" CPDLL="" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) VSE-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIB)" CPDLL="" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) VCX-static-bench: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_STATIC)" $(BENCHTESTS) VC-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCFLAGS) $(EHFLAGS_DLL_DEBUG)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCIMPD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCFLAGS) $(EHFLAGS_DLL_DEBUG)" allpassed VC-static-debug VC-small-static-debug: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed VCE-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIBD)" CPDLL="$(VCEDLLD)" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_DLL_DEBUG)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCEIMPD)" CPDLL="$(VCEDLLD)" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_DLL_DEBUG)" allpassed VCE-static-debug VCE-small-static-debug: @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCELIBD)" CPDLL="" EHFLAGS="$(VCEFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed VSE-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIBD)" CPDLL="$(VSEDLLD)" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_DLL_DEBUG)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSEIMPD)" CPDLL="$(VSEDLLD)" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_DLL_DEBUG)" allpassed VSE-static-debug VSE-small-static-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VSELIBD)" CPDLL="" EHFLAGS="$(VSEFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed VCX-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_DLL_DEBUG)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCIMPD)" CPDLL="$(VCDLLD)" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_DLL_DEBUG)" allpassed VCX-static-debug VCX-small-static-debug: - @ $(MAKE) /E /nologo TEST="$@" CPLIB="" CPDLL="" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed + @ $(MAKE) /E /nologo TEST="$@" CPLIB="$(VCLIBD)" CPDLL="" EHFLAGS="$(VCXFLAGS) $(EHFLAGS_STATIC_DEBUG)" allpassed clean: if exist *.dll $(RM) *.dll diff --git a/tests/common.mk b/tests/common.mk index 1e652769..652ab94b 100644 --- a/tests/common.mk +++ b/tests/common.mk @@ -57,4 +57,63 @@ BENCHTESTS = \ # 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 errno0 \ + 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 rwlock8 \ + 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/runorder.mk b/tests/runorder.mk index 8c7cd73f..54bf0be8 100644 --- a/tests/runorder.mk +++ b/tests/runorder.mk @@ -1,159 +1,158 @@ -# -# 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: errno0.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 +errno0.pass: sizes.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 +rwlock8.pass: rwlock7.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/timeouts.c b/tests/timeouts.c index 2a4e97e9..99d8a0cc 100644 --- a/tests/timeouts.c +++ b/tests/timeouts.c @@ -180,19 +180,19 @@ 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_); + assert(0 == pthread_mutexattr_init(&mattr_)); + assert(0 == pthread_mutex_init(&mutex_, &mattr_)); + assert(0 == pthread_condattr_init(&cattr_)); + assert(0 == 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_); + assert(0 == pthread_cond_destroy(&cv_)); + assert(0 == pthread_mutex_destroy(&mutex_)); + assert(0 == pthread_mutexattr_destroy(&mattr_)); + assert(0 == pthread_condattr_destroy(&cattr_)); return 0; } @@ -208,7 +208,7 @@ int Wait(time_t sec, long nsec) abstime.tv_sec += sc; abstime.tv_nsec %= 1000000000L; } - pthread_mutex_lock(&mutex_); + assert(0 == pthread_mutex_lock(&mutex_)); /* * We don't need to check the CV. */ From 69a11d95384f899c473247a4a319ef39abcfb4dc Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 18:54:56 +1000 Subject: [PATCH 168/207] New test --- tests/errno0.c | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 tests/errno0.c diff --git a/tests/errno0.c b/tests/errno0.c new file mode 100644 index 00000000..83790e21 --- /dev/null +++ b/tests/errno0.c @@ -0,0 +1,99 @@ +/* + * File: errno0.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2018, 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/ + * + * This file is part of Pthreads4w. + * + * Pthreads4w is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads4w is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads4w. If not, see . * + * + * -------------------------------------------------------------------------- + * + * Test Synopsis: Test transmissibility of errno between library and exe + * - + * + * Test Method (Validation or Falsification): + * - Validation + * + * 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: + * - + * + * Pass Criteria: + * - Process returns zero exit status. + * + * Fail Criteria: + * - Process returns non-zero exit status. + */ + +#include "test.h" + +int +main() +{ + int err = 0; + errno = 0; + + assert(errno == 0); + assert(0 != sem_destroy(NULL)); + + err = +#if defined(PTW32_USES_SEPARATE_CRT) + GetLastError(); +#else + errno; +#endif + + assert(err != 0); + assert(err == EINVAL); + + /* + * Success. + */ + return 0; +} From 93676c0553d48421bd72533e21c8776c38a30822 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 19:02:28 +1000 Subject: [PATCH 169/207] Fix names --- Makefile | 8 ++++---- implement.h | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index ae32a371..119afd5e 100644 --- a/Makefile +++ b/Makefile @@ -227,13 +227,13 @@ $(DLLS): $(DLL_OBJS) $(CC) /LDd /Zi $(DLL_OBJS) /link /implib:$*.lib $(XLIBS) /out:$@ $(INLINED_STATIC_STAMPS): $(DLL_OBJS) - if exist $*.lib del $*.lib - lib $(DLL_OBJS) /out:$*.lib + if exist lib$*.lib del lib$*.lib + lib $(DLL_OBJS) /out:lib$*.lib echo. >$@ $(SMALL_STATIC_STAMPS): $(STATIC_OBJS) - if exist $*.lib del $*.lib - lib $(STATIC_OBJS) /out:$*.lib + if exist lib$*.lib del lib$*.lib + lib $(STATIC_OBJS) /out:lib$*.lib echo. >$@ .c.obj: diff --git a/implement.h b/implement.h index e49404af..77c8eb93 100644 --- a/implement.h +++ b/implement.h @@ -72,20 +72,20 @@ typedef VOID (APIENTRY *PAPCFUNC)(DWORD dwParam); # if defined(__MINGW32__) __attribute__((unused)) # endif -static int ptw32_get_errno(void) { int err = 0; _get_errno(&err); return err; } -# define PTW32_GET_ERRNO() ptw32_get_errno() +static int __ptw32_get_errno(void) { int err = 0; _get_errno(&err); return err; } +# define __PTW32_GET_ERRNO() __ptw32_get_errno() # if defined(__MINGW32__) __attribute__((unused)) # endif -static void ptw32_set_errno(int err) { _set_errno(err); SetLastError(err); } -# define PTW32_SET_ERRNO(err) ptw32_set_errno(err) +static void __ptw32_set_errno(int err) { _set_errno(err); SetLastError(err); } +# define __PTW32_SET_ERRNO(err) __ptw32_set_errno(err) #else -# define PTW32_GET_ERRNO() (errno) +# define __PTW32_GET_ERRNO() (errno) # if defined(__MINGW32__) __attribute__((unused)) # endif -static void ptw32_set_errno(int err) { errno = err; SetLastError(err); } -# define PTW32_SET_ERRNO(err) ptw32_set_errno(err) +static void __ptw32_set_errno(int err) { errno = err; SetLastError(err); } +# define __PTW32_SET_ERRNO(err) __ptw32_set_errno(err) #endif #if !defined(malloc) From f40e8a6e78b654715cfdc9260aec140022896848 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 20:39:55 +1000 Subject: [PATCH 170/207] More name repair after patch --- tests/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index ee845330..ebf457d2 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -23,7 +23,7 @@ OPTIM = /O2 /Ob0 XXLIBS = ws2_32.lib # C++ Exceptions -VCEFLAGS = /EHs /TP /DPtW32NoCatchWarn /D__CLEANUP_CXX +VCEFLAGS = /EHs /TP /D__PtW32NoCatchWarn /D__PTW32_CLEANUP_CXX VCELIB = libpthreadVCE$(PTW32_VER).lib VCEIMP = pthreadVCE$(PTW32_VER).lib VCEDLL = pthreadVCE$(PTW32_VER).dll @@ -31,7 +31,7 @@ VCELIBD = libpthreadVCE$(PTW32_VER)d.lib VCEIMPD = pthreadVCE$(PTW32_VER)d.lib VCEDLLD = pthreadVCE$(PTW32_VER)d.dll # Structured Exceptions -VSEFLAGS = /D__CLEANUP_SEH +VSEFLAGS = /D__PTW32_CLEANUP_SEH VSELIB = libpthreadVSE$(PTW32_VER).lib VSEIMP = pthreadVSE$(PTW32_VER).lib VSEDLL = pthreadVSE$(PTW32_VER).dll @@ -39,7 +39,7 @@ VSELIBD = libpthreadVSE$(PTW32_VER)d.lib VSEIMPD = pthreadVSE$(PTW32_VER)d.lib VSEDLLD = pthreadVSE$(PTW32_VER)d.dll # C cleanup code -VCFLAGS = /D__CLEANUP_C +VCFLAGS = /D__PTW32_CLEANUP_C VCLIB = libpthreadVC$(PTW32_VER).lib VCIMP = pthreadVC$(PTW32_VER).lib VCDLL = pthreadVC$(PTW32_VER).dll From 6696e2b5102a0e1e35eecca452c3237a02bb0060 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 21:47:02 +1000 Subject: [PATCH 171/207] More post patch fixes --- Makefile | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 119afd5e..3ee0fb21 100644 --- a/Makefile +++ b/Makefile @@ -103,8 +103,11 @@ all-tests-dll: cd tests && $(MAKE) /E clean VSE$(XDBG) $(TEST_ENV) all-tests-static: + $(MAKE) /E realclean VC-static$(XDBG) cd tests && $(MAKE) /E clean VC-static$(XDBG) $(TEST_ENV) + $(MAKE) /E realclean VCE-static$(XDBG) cd tests && $(MAKE) /E clean VCE-static$(XDBG) $(TEST_ENV) + $(MAKE) /E realclean VSE-static$(XDBG) cd tests && $(MAKE) /E clean VSE-static$(XDBG) $(TEST_ENV) $(MAKE) realclean @ echo $@ completed successfully. @@ -204,24 +207,18 @@ clean: if exist *.res del *.res cd tests && $(MAKE) clean -# Very basic install. It assumes "realclean" was done just prior to build target if -# you want the installed $(DEVDEST_LIB_NAME) to match that build. +# Very basic install. It assumes "realclean" was done just prior to build target. install: if not exist $(DLLDEST) mkdir $(DLLDEST) if not exist $(LIBDEST) mkdir $(LIBDEST) if not exist $(HDRDEST) mkdir $(HDRDEST) if exist pthreadV*.dll copy pthreadV*.dll $(DLLDEST) copy pthreadV*.lib $(LIBDEST) + copy libpthreadV*.lib $(LIBDEST) copy _ptw32.h $(HDRDEST) copy pthread.h $(HDRDEST) copy sched.h $(HDRDEST) copy semaphore.h $(HDRDEST) - if exist pthreadVC$(PTW32_VER).lib copy pthreadVC$(PTW32_VER).lib $(LIBDEST)\$(DEST_LIB_NAME) - if exist pthreadVC$(PTW32_VER_DEBUG).lib copy pthreadVC$(PTW32_VER_DEBUG).lib $(LIBDEST)\$(DEST_LIB_NAME) - if exist pthreadVCE$(PTW32_VER).lib copy pthreadVCE$(PTW32_VER).lib $(LIBDEST)\$(DEST_LIB_NAME) - if exist pthreadVCE$(PTW32_VER_DEBUG).lib copy pthreadVCE$(PTW32_VER_DEBUG).lib $(LIBDEST)\$(DEST_LIB_NAME) - if exist pthreadVSE$(PTW32_VER).lib copy pthreadVSE$(PTW32_VER).lib $(LIBDEST)\$(DEST_LIB_NAME) - if exist pthreadVSE$(PTW32_VER_DEBUG).lib copy pthreadVSE$(PTW32_VER_DEBUG).lib $(LIBDEST)\$(DEST_LIB_NAME) $(DLLS): $(DLL_OBJS) $(CC) /LDd /Zi $(DLL_OBJS) /link /implib:$*.lib $(XLIBS) /out:$@ From cefda1c2498c6ccf0cf68436d0f623cffb87a286 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 22:16:33 +1000 Subject: [PATCH 172/207] Fix install target --- Makefile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 4be5d570..f9bc188e 100644 --- a/Makefile +++ b/Makefile @@ -222,16 +222,11 @@ install: if not exist $(HDRDEST) mkdir $(HDRDEST) if exist pthreadV*.dll copy pthreadV*.dll $(DLLDEST) copy pthreadV*.lib $(LIBDEST) + copy libpthreadV*.lib $(LIBDEST) copy _ptw32.h $(HDRDEST) copy pthread.h $(HDRDEST) copy sched.h $(HDRDEST) copy semaphore.h $(HDRDEST) - if exist pthreadVC$(PTW32_VER).lib copy pthreadVC$(PTW32_VER).lib $(LIBDEST)\$(DEST_LIB_NAME) - if exist pthreadVC$(PTW32_VER_DEBUG).lib copy pthreadVC$(PTW32_VER_DEBUG).lib $(LIBDEST)\$(DEST_LIB_NAME) - if exist pthreadVCE$(PTW32_VER).lib copy pthreadVCE$(PTW32_VER).lib $(LIBDEST)\$(DEST_LIB_NAME) - if exist pthreadVCE$(PTW32_VER_DEBUG).lib copy pthreadVCE$(PTW32_VER_DEBUG).lib $(LIBDEST)\$(DEST_LIB_NAME) - if exist pthreadVSE$(PTW32_VER).lib copy pthreadVSE$(PTW32_VER).lib $(LIBDEST)\$(DEST_LIB_NAME) - if exist pthreadVSE$(PTW32_VER_DEBUG).lib copy pthreadVSE$(PTW32_VER_DEBUG).lib $(LIBDEST)\$(DEST_LIB_NAME) $(DLLS): $(DLL_OBJS) $(CC) /LDd /Zi $(DLL_OBJS) /link /implib:$*.lib $(XLIBS) /out:$@ From 4ff8fdd0dfa5a5d91f3e8252834e00be66493062 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 22:30:20 +1000 Subject: [PATCH 173/207] Remove unused variable --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index f9bc188e..db5959b0 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,6 @@ PTW32_VER = 2$(EXTRAVERSION) PTW32_VER_DEBUG= $(PTW32_VER)d DESTROOT = ..\PTHREADS-BUILT -DEST_LIB_NAME = pthread.lib DLLDEST = $(DESTROOT)\bin LIBDEST = $(DESTROOT)\lib @@ -214,8 +213,7 @@ clean: if exist *.res del *.res if exist *_stamp del *_stamp -# Very basic install. It assumes "realclean" was done just prior to build target if -# you want the installed $(DEVDEST_LIB_NAME) to match that build. +# Very basic install. It assumes "realclean" was done just prior to build target. install: if not exist $(DLLDEST) mkdir $(DLLDEST) if not exist $(LIBDEST) mkdir $(LIBDEST) From 15b71784be2e1a27ccfe7316e92a891aff088268 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Tue, 7 Aug 2018 22:52:25 +1000 Subject: [PATCH 174/207] Update help target --- Makefile | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 3ee0fb21..04c4a12d 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,6 @@ PTW32_VER = 3$(EXTRAVERSION) PTW32_VER_DEBUG= $(PTW32_VER)d DESTROOT = ..\PTHREADS-BUILT -DEST_LIB_NAME = pthread.lib DLLDEST = $(DESTROOT)\bin LIBDEST = $(DESTROOT)\lib @@ -57,7 +56,10 @@ DLL_OBJS = $(DLL_OBJS) $(RESOURCE_OBJS) STATIC_OBJS = $(STATIC_OBJS) $(RESOURCE_OBJS) help: - @ echo Run one of the following command lines: + @ echo To just build all possible versions and install them in $(DESTROOT) + @ echo nmake all install + @ echo ------------------------------------------ + @ echo Or run one of the following command lines: @ echo nmake clean all-tests @ echo nmake -DEXHAUSTIVE clean all-tests @ echo nmake clean all-tests-md @@ -66,28 +68,29 @@ help: @ echo nmake clean VC-debug @ echo nmake clean VC-static @ echo nmake clean VC-static-debug -# @ echo nmake clean VC-small-static -# @ echo nmake clean VC-small-static-debug @ echo nmake clean VCE @ echo nmake clean VCE-debug @ echo nmake clean VCE-static @ echo nmake clean VCE-static-debug -# @ echo nmake clean VCE-small-static -# @ echo nmake clean VCE-small-static-debug @ echo nmake clean VSE @ echo nmake clean VSE-debug @ echo nmake clean VSE-static @ echo nmake clean VSE-static-debug -# @ echo nmake clean VSE-small-static -# @ echo nmake clean VSE-small-static-debug all: + $(MAKE) /E clean VC-static + $(MAKE) /E clean VCE-static + $(MAKE) /E clean VSE-static + $(MAKE) /E clean VC-static-debug + $(MAKE) /E clean VCE-static-debug + $(MAKE) /E clean VSE-static-debug $(MAKE) /E clean VC $(MAKE) /E clean VCE $(MAKE) /E clean VSE $(MAKE) /E clean VC-debug $(MAKE) /E clean VCE-debug $(MAKE) /E clean VSE-debug + $(MAKE) /E clean TEST_ENV = CFLAGS="$(CFLAGS) /DNO_ERROR_DIALOGS" From 94397481f721cd7327bdba392bad553d36d27da5 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 8 Aug 2018 12:14:12 +1000 Subject: [PATCH 175/207] use GetSystemTimeAsFileTime() everywhere; nmake build independence. --- ChangeLog | 10 ++++++++++ GNUmakefile.in | 34 ++++++++++++++++++---------------- Makefile | 21 +++++++++++++-------- _ptw32.h | 8 +++++++- common.mk | 5 ++++- config.h | 7 +++++-- configure.ac | 2 +- ptw32_relmillisecs.c | 2 +- 8 files changed, 59 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index fab7551e..ed30fce3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2018-08-08 Ross Johnson + + * Makefile: "nmake realclean VC VC-static" and similar wasn't remaking pthread.obj. + * common.mk: changes to accommodate the above. + * config.h (NEED_FTIME): defined for all which uses GetSystemTimeAsFileTime() + * _ptw32.h (NEED_FTIME): Likewise. + * GNUmakefile: use changes in common.mk but still has problem with + "make realclean GC GC-static" and similar. + * configure.ac (AC_INIT): package name change. + 2018-08-07 Ross Johnson * GNUmakefile.in (DLL_VER): rename as PTW32_VER. diff --git a/GNUmakefile.in b/GNUmakefile.in index f74b5303..74fb61da 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -173,13 +173,15 @@ GCE_CFLAGS = $(__PTW32_FLAGS) -mthreads DEFS = @DEFS@ -D__PTW32_BUILD CFLAGS = $(OPT) $(XOPT) $(ARCH) -I. -I${srcdir} $(DEFS) -Wall -OBJEXT = @OBJEXT@ -RESEXT = @OBJEXT@ +OBJEXT = @OBJEXT@ +OEXT = @OBJEXT@ +RESEXT = @OBJEXT@ include ${srcdir}/common.mk DLL_OBJS += $(RESOURCE_OBJS) STATIC_OBJS += $(RESOURCE_OBJS) +STATIC_OBJS_SMALL += $(RESOURCE_OBJS) GCE_DLL = pthreadGCE$(PTW32_VER).dll GCED_DLL= pthreadGCE$(PTW32_VERD).dll @@ -260,35 +262,34 @@ GCE-debug: $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_CXX -g -O0" $(GCED_DLL) GC-static: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GC_INLINED_STATIC_STAMP) GC-static-debug: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) GC-small-static: - $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GC_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS_SMALL)" $(GC_SMALL_STATIC_STAMP) GC-small-static-debug: - $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS_SMALL)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) GCE-static: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_INLINED_STATIC_STAMP) GCE-static-debug: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) GCE-small-static: - $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS_SMALL)" $(GCE_SMALL_STATIC_STAMP) GCE-small-static-debug: - $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS_SMALL)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) tests: @ cd tests @ $(MAKE) auto -# Very basic install. It assumes "realclean" was done just prior to build target if -# you want the installed $(DEVDEST_LIB_NAME) to match that build. +# Very basic install. INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -339,9 +340,10 @@ install-headers: pthread.h sched.h semaphore.h _ptw32.h %.o: %.rc $(RC) $(RC_TARGET) $(RCFLAGS) $(CLEANUP) -o $@ -i $< -.SUFFIXES: .dll .rc .c .o +.SUFFIXES: .dll .rc .c .o ._o -.c.o:; $(CC) -c -o $@ $(CFLAGS) $(XC_FLAGS) $< +.c.o: + $(CC) -c -o $@ $(CFLAGS) $(XC_FLAGS) $< $(GC_DLL) $(GCD_DLL): $(DLL_OBJS) @@ -354,12 +356,12 @@ $(GCE_DLL) $(GCED_DLL): $(DLL_OBJS) $(DLLTOOL) -z pthread.def $^ $(DLLTOOL) -k --dllname $@ --output-lib lib$@.a --def $(PTHREAD_DEF) -$(GC_INLINED_STATIC_STAMP) $(GCE_INLINED_STATIC_STAMP) $(GCD_INLINED_STATIC_STAMP) $(GCED_INLINED_STATIC_STAMP): $(DLL_OBJS) +$(GC_INLINED_STATIC_STAMP) $(GCE_INLINED_STATIC_STAMP) $(GCD_INLINED_STATIC_STAMP) $(GCED_INLINED_STATIC_STAMP): $(STATIC_OBJS) $(RM) $(basename $@).a $(AR) -rsv $(basename $@).a $^ $(ECHO) touched > $@ -$(GC_SMALL_STATIC_STAMP) $(GCE_SMALL_STATIC_STAMP) $(GCD_SMALL_STATIC_STAMP) $(GCED_SMALL_STATIC_STAMP): $(STATIC_OBJS) +$(GC_SMALL_STATIC_STAMP) $(GCE_SMALL_STATIC_STAMP) $(GCD_SMALL_STATIC_STAMP) $(GCED_SMALL_STATIC_STAMP): $(STATIC_OBJS_SMALL) $(RM) $(basename $@).a $(AR) -rsv $(basename $@).a $^ $(ECHO) touched > $@ diff --git a/Makefile b/Makefile index 04c4a12d..82b81dcd 100644 --- a/Makefile +++ b/Makefile @@ -47,13 +47,15 @@ VSEFLAGSD = $(CPPFLAGS) $(CFLAGSD) VCFLAGS = $(CPPFLAGS) $(CFLAGS) VCFLAGSD = $(CPPFLAGS) $(CFLAGSD) -OBJEXT = obj -RESEXT = res +OBJEXT = obj +OEXT = o +RESEXT = res include common.mk -DLL_OBJS = $(DLL_OBJS) $(RESOURCE_OBJS) -STATIC_OBJS = $(STATIC_OBJS) $(RESOURCE_OBJS) +DLL_OBJS = $(DLL_OBJS) $(RESOURCE_OBJS) +STATIC_OBJS = $(STATIC_OBJS) $(RESOURCE_OBJS) +STATIC_OBJS_SMALL = $(STATIC_OBJS_SMALL) $(RESOURCE_OBJS) help: @ echo To just build all possible versions and install them in $(DESTROOT) @@ -226,19 +228,22 @@ install: $(DLLS): $(DLL_OBJS) $(CC) /LDd /Zi $(DLL_OBJS) /link /implib:$*.lib $(XLIBS) /out:$@ -$(INLINED_STATIC_STAMPS): $(DLL_OBJS) +$(INLINED_STATIC_STAMPS): $(STATIC_OBJS) if exist lib$*.lib del lib$*.lib - lib $(DLL_OBJS) /out:lib$*.lib + lib $(STATIC_OBJS) /out:lib$*.lib echo. >$@ -$(SMALL_STATIC_STAMPS): $(STATIC_OBJS) +$(SMALL_STATIC_STAMPS): $(STATIC_OBJS_SMALL) if exist lib$*.lib del lib$*.lib - lib $(STATIC_OBJS) /out:lib$*.lib + lib $(STATIC_OBJS_SMALL) /out:lib$*.lib echo. >$@ .c.obj: $(CC) $(XCFLAGS) $(EHFLAGS) /D$(CLEANUP) -c $< +.c.o: + $(CC) $(XCFLAGS) $(EHFLAGS) /D$(CLEANUP) /Fo$*.$(OEXT) -c $< + # TARGET_CPU is an environment variable set by Visual Studio Command Prompt # as provided by the SDK (VS 2010 Express plus SDK 7.1) # PLATFORM is an environment variable that may be set in the VS 2013 Express x64 cross diff --git a/_ptw32.h b/_ptw32.h index 56b624be..47b45ee1 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -103,11 +103,17 @@ /* * This is more or less a duplicate of what is in the autoconf config.h, - * which is only used when building the pthread-win32 libraries. They + * which is only used when building the pthreads4w libraries. */ #if !defined (__PTW32_CONFIG_H) && !defined(__PTW32_PSEUDO_CONFIG_H_SOURCED) # define __PTW32_PSEUDO_CONFIG_H_SOURCED +/* + * We define NEED_FTIME for all now. GetSystemTimeAsFileTime() is pretty + * much universal now and consistently higher resolution than _ftime64(). + */ +# define NEED_FTIME + # if defined(WINCE) # undef HAVE_CPU_AFFINITY # define NEED_DUPLICATEHANDLE diff --git a/common.mk b/common.mk index b564accb..92a8e0df 100644 --- a/common.mk +++ b/common.mk @@ -7,8 +7,11 @@ RESOURCE_OBJS = \ DLL_OBJS = \ pthread.$(OBJEXT) -# Separate modules for minimising the size of statically linked images STATIC_OBJS = \ + pthread.$(OEXT) + +# Separate modules for minimising the size of statically linked images +STATIC_OBJS_SMALL = \ cleanup.$(OBJEXT) \ create.$(OBJEXT) \ dll.$(OBJEXT) \ diff --git a/config.h b/config.h index 3addcba1..0cdf45d3 100644 --- a/config.h +++ b/config.h @@ -34,8 +34,11 @@ /* Define if you don't have Win32 calloc. (eg. WinCE) */ #undef NEED_CALLOC -/* Define if you don't have Win32 ftime. (eg. WinCE) */ -#undef NEED_FTIME +/* + * Define this now that all systems since Server 2000 support + * GetSystemTimeAsFileTime() (and WINCE before that). + */ +#define NEED_FTIME /* Define if you don't have Win32 semaphores. (eg. WinCE 2.1 or earlier) */ #undef NEED_SEM diff --git a/configure.ac b/configure.ac index 4e7ae28e..2a50e59f 100644 --- a/configure.ac +++ b/configure.ac @@ -29,7 +29,7 @@ # if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -AC_INIT([pthreads-win32],[git]) +AC_INIT([pthreads4w],[git]) AC_CONFIG_HEADERS([config.h]) # Checks for build tools. diff --git a/ptw32_relmillisecs.c b/ptw32_relmillisecs.c index 92d859dc..61a42f80 100644 --- a/ptw32_relmillisecs.c +++ b/ptw32_relmillisecs.c @@ -104,7 +104,7 @@ __ptw32_relmillisecs (const struct timespec * abstime) tmpCurrMilliseconds = (int64_t)currSysTime.tv_sec * MILLISEC_PER_SEC; tmpCurrMilliseconds += ((int64_t)currSysTime.tv_nsec + (NANOSEC_PER_MILLISEC/2)) / NANOSEC_PER_MILLISEC; - tmpCurrNanoseconds = (int64_t)currSysTime->tv_nsec + ((int64_t)currSysTime->tv_sec * NANOSEC_PER_SEC); + tmpCurrNanoseconds = (int64_t)currSysTime.tv_nsec + ((int64_t)currSysTime.tv_sec * NANOSEC_PER_SEC); #else /* ! NEED_FTIME */ From 8faeaab9d693b11fec08a15f75f1a94efa5f9b74 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 7 Aug 2018 19:55:16 -0700 Subject: [PATCH 176/207] Always perform time comparisons in nanoseconds and comparing rounded values Thus we can avoid any reference to ftime64() which only has millisecond resolution and rounds or truncates differently on some C runtime libraries. --- _ptw32.h | 1 - config.h | 4 --- implement.h | 2 -- pthread.h | 8 ----- ptw32_relmillisecs.c | 81 +++++++------------------------------------- ptw32_timespec.c | 4 --- 6 files changed, 12 insertions(+), 88 deletions(-) diff --git a/_ptw32.h b/_ptw32.h index d66da9af..71a74b67 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -113,7 +113,6 @@ # define NEED_CREATETHREAD # define NEED_ERRNO # define NEED_CALLOC -# define NEED_FTIME # define NEED_UNICODE_CONSTS # define NEED_PROCESS_AFFINITY_MASK /* This may not be needed */ diff --git a/config.h b/config.h index 091ccb32..2edf4f41 100644 --- a/config.h +++ b/config.h @@ -34,9 +34,6 @@ /* Define if you don't have Win32 calloc. (eg. WinCE) */ #undef NEED_CALLOC -/* Define if you don't have Win32 ftime. (eg. WinCE) */ -#undef NEED_FTIME - /* Define if you don't have Win32 semaphores. (eg. WinCE 2.1 or earlier) */ #undef NEED_SEM @@ -117,7 +114,6 @@ # define NEED_CREATETHREAD # define NEED_ERRNO # define NEED_CALLOC -# define NEED_FTIME /* # define NEED_SEM */ # define NEED_UNICODE_CONSTS # define NEED_PROCESS_AFFINITY_MASK diff --git a/implement.h b/implement.h index 58114dc6..335f703f 100644 --- a/implement.h +++ b/implement.h @@ -698,10 +698,8 @@ __PTW32_BEGIN_C_DECLS void ptw32_mcs_node_transfer (ptw32_mcs_local_node_t * new_node, ptw32_mcs_local_node_t * old_node); -#if defined(NEED_FTIME) void ptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft); void ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts); -#endif /* Declared in pthw32_calloc.c */ #if defined(NEED_CALLOC) diff --git a/pthread.h b/pthread.h index 7108b303..2d96d901 100644 --- a/pthread.h +++ b/pthread.h @@ -1134,14 +1134,6 @@ typedef void (*ptw32_terminate_handler)(); PTW32_DLLPORT ptw32_terminate_handler PTW32_CDECL pthread_win32_set_terminate_np(ptw32_terminate_handler termFunction); #endif -/* - * Some compiler environments don't define some things. - */ -#if defined(__BORLANDC__) -# define _ftime ftime -# define _timeb timeb -#endif - #if defined(__cplusplus) /* diff --git a/ptw32_relmillisecs.c b/ptw32_relmillisecs.c index 5d64094a..83673bb9 100644 --- a/ptw32_relmillisecs.c +++ b/ptw32_relmillisecs.c @@ -55,23 +55,14 @@ DWORD ptw32_relmillisecs (const struct timespec * abstime) { DWORD milliseconds; - int64_t tmpAbsMilliseconds; int64_t tmpAbsNanoseconds; - int64_t tmpCurrMilliseconds; int64_t tmpCurrNanoseconds; -#if defined(NEED_FTIME) struct timespec currSysTime; FILETIME ft; -#else /* ! NEED_FTIME */ -#if ( defined(_MSC_VER) && _MSC_VER >= 1300 ) /* MSVC7+ */ || \ - ( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0601 ) - struct __timeb64 currSysTime; -#else - struct _timeb currSysTime; +# if defined(WINCE) + SYSTEMTIME st; #endif -#endif /* NEED_FTIME */ - /* * Calculate timeout as milliseconds from current system time. @@ -84,17 +75,11 @@ ptw32_relmillisecs (const struct timespec * abstime) * * Assume all integers are unsigned, i.e. cannot test if less than 0. */ - tmpAbsMilliseconds = (int64_t)abstime->tv_sec * MILLISEC_PER_SEC; - tmpAbsMilliseconds += ((int64_t)abstime->tv_nsec + (NANOSEC_PER_MILLISEC/2)) / NANOSEC_PER_MILLISEC; tmpAbsNanoseconds = (int64_t)abstime->tv_nsec + ((int64_t)abstime->tv_sec * NANOSEC_PER_SEC); /* get current system time */ -#if defined(NEED_FTIME) - # if defined(WINCE) - - SYSTEMTIME st; GetSystemTime(&st); SystemTimeToFileTime(&st, &ft); # else @@ -103,35 +88,20 @@ ptw32_relmillisecs (const struct timespec * abstime) ptw32_filetime_to_timespec(&ft, &currSysTime); - tmpCurrMilliseconds = (int64_t)currSysTime.tv_sec * MILLISEC_PER_SEC; - tmpCurrMilliseconds += ((int64_t)currSysTime.tv_nsec + (NANOSEC_PER_MILLISEC/2)) - / NANOSEC_PER_MILLISEC; - tmpCurrNanoseconds = (int64_t)currSysTime->tv_nsec + ((int64_t)currSysTime->tv_sec * NANOSEC_PER_SEC); - -#else /* ! NEED_FTIME */ - -#if defined(_MSC_VER) && _MSC_VER >= 1400 /* MSVC8+ */ - _ftime64_s(&currSysTime); -#elif ( defined(_MSC_VER) && _MSC_VER >= 1300 ) /* MSVC7+ */ || \ - ( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0601 ) - _ftime64(&currSysTime); -#else - _ftime(&currSysTime); -#endif - - tmpCurrMilliseconds = (int64_t) currSysTime.time * MILLISEC_PER_SEC; - tmpCurrMilliseconds += (int64_t) currSysTime.millitm; - tmpCurrNanoseconds = tmpCurrMilliseconds * NANOSEC_PER_MILLISEC; - -#endif /* NEED_FTIME */ + tmpCurrNanoseconds = (int64_t)currSysTime.tv_nsec + ((int64_t)currSysTime.tv_sec * NANOSEC_PER_SEC); - if (tmpAbsMilliseconds > tmpCurrMilliseconds) + if (tmpAbsNanoseconds > tmpCurrNanoseconds) { - milliseconds = (DWORD) (tmpAbsMilliseconds - tmpCurrMilliseconds); - if (milliseconds == INFINITE) + int64_t deltaNanoseconds = tmpAbsNanoseconds - tmpCurrNanoseconds; + + if (deltaNanoseconds >= ((int64_t)INFINITE * NANOSEC_PER_MILLISEC)) { /* Timeouts must be finite */ - milliseconds--; + milliseconds = INFINITE - 1; + } + else + { + milliseconds = (DWORD)(deltaNanoseconds / NANOSEC_PER_MILLISEC); } } else @@ -163,22 +133,11 @@ pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * int64_t sec; int64_t nsec; -#if defined(NEED_FTIME) struct timespec currSysTime; FILETIME ft; -#else /* ! NEED_FTIME */ -#if ( defined(_MSC_VER) && _MSC_VER >= 1300 ) /* MSVC7+ */ || \ - ( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0601 ) - struct __timeb64 currSysTime; -#else - struct _timeb currSysTime; -#endif -#endif /* NEED_FTIME */ /* get current system time */ -#if defined(NEED_FTIME) - # if defined(WINCE) SYSTEMTIME st; @@ -193,22 +152,6 @@ pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * sec = currSysTime.tv_sec; nsec = currSysTime.tv_nsec; -#else /* ! NEED_FTIME */ - -#if defined(_MSC_VER) && _MSC_VER >= 1400 /* MSVC8+ */ - _ftime64_s(&currSysTime); -#elif ( defined(_MSC_VER) && _MSC_VER >= 1300 ) /* MSVC7+ */ || \ - ( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0601 ) - _ftime64(&currSysTime); -#else - _ftime(&currSysTime); -#endif - - sec = currSysTime.time; - nsec = currSysTime.millitm * NANOSEC_PER_MILLISEC; - -#endif /* NEED_FTIME */ - if (NULL != relative) { nsec += relative->tv_nsec; diff --git a/ptw32_timespec.c b/ptw32_timespec.c index ff284093..e82e35e3 100644 --- a/ptw32_timespec.c +++ b/ptw32_timespec.c @@ -39,8 +39,6 @@ # include #endif -#if defined(NEED_FTIME) - #include "pthread.h" #include "implement.h" @@ -82,5 +80,3 @@ ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts) (int) ((*(uint64_t *) ft - PTW32_TIMESPEC_TO_FILETIME_OFFSET - ((uint64_t) ts->tv_sec * (uint64_t) 10000000UL)) * 100); } - -#endif From ebe6a7b7fee6ac179d9e831facd60444d6137ad4 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 8 Aug 2018 14:21:48 +1000 Subject: [PATCH 177/207] Mark Pizzolato changes. Always perform time comparisons in nanoseconds and comparing rounded values Thus we can avoid any reference to ftime64() which only has millisecond resolution and rounds or truncates differently on some C runtime libraries. --- ChangeLog | 19 +++++++++ GNUmakefile.in | 27 +++++++------ Makefile | 33 ++++++++-------- _ptw32.h | 1 - common.mk | 5 ++- config.h | 4 -- configure.ac | 3 +- implement.h | 3 +- pthread.h | 8 ---- ptw32_relmillisecs.c | 91 ++++++++------------------------------------ ptw32_timespec.c | 4 -- 11 files changed, 73 insertions(+), 125 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6b7aafef..4b3b6ea4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2018-08-08 Ross Johnson + + * Makefile: "nmake realclean VC VC-static" and similar wasn't remaking pthread.obj. + * common.mk: changes to accommodate the above. + * GNUmakefile: use changes in common.mk but still has problem with + "make realclean GC GC-static" and similar. + * configure.ac (AC_INIT): package name change. + +2018-08-08 Mark Pizzolato + + * config.h (NEED_FTIME): Removed + * _ptw32.h (NEED_FTIME): Removed. + * ptw32_timespec.c (NEED_FTIME): Removed conditional. + * ptw32_relmillisecs: Fix long-standing bug in NEED_FTIME code; remove NEED_FTIME + and all !NEED_FTIME code; compare nanoseconds and convert to milliseconds + at the end. + * implement.h (NEED_FTIME): remove conditionals. + * pthread.h: Remove Borland compiler time types no longer needed. + 2018-08-07 Ross Johnson * GNUmakefile.in (DLL_VER): rename as PTW32_VER. diff --git a/GNUmakefile.in b/GNUmakefile.in index 050fa665..61172db7 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -172,13 +172,15 @@ GCE_CFLAGS = $(PTW32_FLAGS) -mthreads DEFS = @DEFS@ -DPTW32_BUILD CFLAGS = $(OPT) $(XOPT) $(ARCH) -I. -I${srcdir} $(DEFS) -Wall -OBJEXT = @OBJEXT@ -RESEXT = @OBJEXT@ +OBJEXT = @OBJEXT@ +OEXT = @OBJEXT@ +RESEXT = @OBJEXT@ include ${srcdir}/common.mk DLL_OBJS += $(RESOURCE_OBJS) STATIC_OBJS += $(RESOURCE_OBJS) +STATIC_OBJS_SMALL += $(RESOURCE_OBJS) GCE_DLL = pthreadGCE$(PTW32_VER).dll GCED_DLL= pthreadGCE$(PTW32_VERD).dll @@ -259,28 +261,28 @@ GCE-debug: $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__CLEANUP_CXX -g -O0" $(GCED_DLL) GC-static: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GC_INLINED_STATIC_STAMP) GC-static-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) GC-small-static: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GC_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS_SMALL)" $(GC_SMALL_STATIC_STAMP) GC-small-static-debug: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-D__CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS_SMALL)" PTW32_VER=$(PTW32_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) GCE-static: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_INLINED_STATIC_STAMP) GCE-static-debug: - $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) GCE-small-static: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS_SMALL)" $(GCE_SMALL_STATIC_STAMP) GCE-small-static-debug: - $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS_SMALL)" PTW32_VER=$(PTW32_VERD) OPT="-D__CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) tests: @ cd tests @@ -353,12 +355,12 @@ $(GCE_DLL) $(GCED_DLL): $(DLL_OBJS) $(DLLTOOL) -z pthread.def $^ $(DLLTOOL) -k --dllname $@ --output-lib lib$@.a --def $(PTHREAD_DEF) -$(GC_INLINED_STATIC_STAMP) $(GCE_INLINED_STATIC_STAMP) $(GCD_INLINED_STATIC_STAMP) $(GCED_INLINED_STATIC_STAMP): $(DLL_OBJS) +$(GC_INLINED_STATIC_STAMP) $(GCE_INLINED_STATIC_STAMP) $(GCD_INLINED_STATIC_STAMP) $(GCED_INLINED_STATIC_STAMP): $(STATIC_OBJS) $(RM) $(basename $@).a $(AR) -rsv $(basename $@).a $^ $(ECHO) touched > $@ -$(GC_SMALL_STATIC_STAMP) $(GCE_SMALL_STATIC_STAMP) $(GCD_SMALL_STATIC_STAMP) $(GCED_SMALL_STATIC_STAMP): $(STATIC_OBJS) +$(GC_SMALL_STATIC_STAMP) $(GCE_SMALL_STATIC_STAMP) $(GCD_SMALL_STATIC_STAMP) $(GCED_SMALL_STATIC_STAMP): $(STATIC_OBJS_SMALL) $(RM) $(basename $@).a $(AR) -rsv $(basename $@).a $^ $(ECHO) touched > $@ @@ -372,6 +374,7 @@ clean: -$(RM) *.exe -$(RM) *.manifest -$(RM) $(PTHREAD_DEF) + -cd tests && $(MAKE) clean realclean: clean -$(RM) lib*.a diff --git a/Makefile b/Makefile index db5959b0..296e18fc 100644 --- a/Makefile +++ b/Makefile @@ -47,16 +47,21 @@ VSEFLAGSD = $(CPPFLAGS) $(CFLAGSD) VCFLAGS = $(CPPFLAGS) $(CFLAGS) VCFLAGSD = $(CPPFLAGS) $(CFLAGSD) -OBJEXT = obj -RESEXT = res +OBJEXT = obj +OEXT = o +RESEXT = res include common.mk -DLL_OBJS = $(DLL_OBJS) $(RESOURCE_OBJS) -STATIC_OBJS = $(STATIC_OBJS) $(RESOURCE_OBJS) +DLL_OBJS = $(DLL_OBJS) $(RESOURCE_OBJS) +STATIC_OBJS = $(STATIC_OBJS) $(RESOURCE_OBJS) +STATIC_OBJS_SMALL = $(STATIC_OBJS_SMALL) $(RESOURCE_OBJS) help: - @ echo Run one of the following command lines: + @ echo To just build all possible versions and install them in $(DESTROOT) + @ echo nmake all install + @ echo ------------------------------------------ + @ echo Or run one of the following command lines: @ echo nmake clean all-tests @ echo nmake -DEXHAUSTIVE clean all-tests @ echo nmake clean all-tests-md @@ -65,20 +70,14 @@ help: @ echo nmake clean VC-debug @ echo nmake clean VC-static @ echo nmake clean VC-static-debug -# @ echo nmake clean VC-small-static -# @ echo nmake clean VC-small-static-debug @ echo nmake clean VCE @ echo nmake clean VCE-debug @ echo nmake clean VCE-static @ echo nmake clean VCE-static-debug -# @ echo nmake clean VCE-small-static -# @ echo nmake clean VCE-small-static-debug @ echo nmake clean VSE @ echo nmake clean VSE-debug @ echo nmake clean VSE-static @ echo nmake clean VSE-static-debug -# @ echo nmake clean VSE-small-static -# @ echo nmake clean VSE-small-static-debug all: $(MAKE) /E clean VC-static @@ -87,7 +86,6 @@ all: $(MAKE) /E clean VC-static-debug $(MAKE) /E clean VCE-static-debug $(MAKE) /E clean VSE-static-debug - $(MAKE) /E clean $(MAKE) /E clean VC $(MAKE) /E clean VCE $(MAKE) /E clean VSE @@ -229,19 +227,22 @@ install: $(DLLS): $(DLL_OBJS) $(CC) /LDd /Zi $(DLL_OBJS) /link /implib:$*.lib $(XLIBS) /out:$@ -$(INLINED_STATIC_STAMPS): $(DLL_OBJS) +$(INLINED_STATIC_STAMPS): $(STATIC_OBJS) if exist lib$*.lib del lib$*.lib - lib $(DLL_OBJS) /out:lib$*.lib + lib $(STATIC_OBJS) /out:lib$*.lib echo. >$@ -$(SMALL_STATIC_STAMPS): $(STATIC_OBJS) +$(SMALL_STATIC_STAMPS): $(STATIC_OBJS_SMALL) if exist lib$*.lib del lib$*.lib - lib $(STATIC_OBJS) /out:lib$*.lib + lib $(STATIC_OBJS_SMALL) /out:lib$*.lib echo. >$@ .c.obj: $(CC) $(EHFLAGS) /D$(CLEANUP) -c $< +.c.o: + $(CC) $(EHFLAGS) /D$(CLEANUP) -c $< /Fo$@ + # TARGET_CPU is an environment variable set by Visual Studio Command Prompt # as provided by the SDK (VS 2010 Express plus SDK 7.1) # PLATFORM is an environment variable that may be set in the VS 2013 Express x64 cross diff --git a/_ptw32.h b/_ptw32.h index d66da9af..71a74b67 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -113,7 +113,6 @@ # define NEED_CREATETHREAD # define NEED_ERRNO # define NEED_CALLOC -# define NEED_FTIME # define NEED_UNICODE_CONSTS # define NEED_PROCESS_AFFINITY_MASK /* This may not be needed */ diff --git a/common.mk b/common.mk index b564accb..92a8e0df 100644 --- a/common.mk +++ b/common.mk @@ -7,8 +7,11 @@ RESOURCE_OBJS = \ DLL_OBJS = \ pthread.$(OBJEXT) -# Separate modules for minimising the size of statically linked images STATIC_OBJS = \ + pthread.$(OEXT) + +# Separate modules for minimising the size of statically linked images +STATIC_OBJS_SMALL = \ cleanup.$(OBJEXT) \ create.$(OBJEXT) \ dll.$(OBJEXT) \ diff --git a/config.h b/config.h index 091ccb32..2edf4f41 100644 --- a/config.h +++ b/config.h @@ -34,9 +34,6 @@ /* Define if you don't have Win32 calloc. (eg. WinCE) */ #undef NEED_CALLOC -/* Define if you don't have Win32 ftime. (eg. WinCE) */ -#undef NEED_FTIME - /* Define if you don't have Win32 semaphores. (eg. WinCE 2.1 or earlier) */ #undef NEED_SEM @@ -117,7 +114,6 @@ # define NEED_CREATETHREAD # define NEED_ERRNO # define NEED_CALLOC -# define NEED_FTIME /* # define NEED_SEM */ # define NEED_UNICODE_CONSTS # define NEED_PROCESS_AFFINITY_MASK diff --git a/configure.ac b/configure.ac index 36e7cdde..4aa317fb 100644 --- a/configure.ac +++ b/configure.ac @@ -28,7 +28,7 @@ * You should have received a copy of the GNU General Public License * along with Pthreads4w. If not, see . * # -AC_INIT([Pthreads4w],[git]) +AC_INIT([pthreads4w],[git]) AC_CONFIG_HEADERS([config.h]) # Checks for build tools. @@ -69,7 +69,6 @@ PTW32_AC_CHECK_TYPEDEF([struct timespec],[time.h]) # PTW32_AC_NEED_ERRNO PTW32_AC_NEED_FUNC([NEED_CALLOC],[calloc]) -PTW32_AC_NEED_FUNC([NEED_FTIME],[ftime]) PTW32_AC_NEED_FUNC([NEED_CREATETHREAD],[_beginthreadex]) PTW32_AC_CHECK_CPU_AFFINITY diff --git a/implement.h b/implement.h index 58114dc6..a0fd235d 100644 --- a/implement.h +++ b/implement.h @@ -698,10 +698,9 @@ __PTW32_BEGIN_C_DECLS void ptw32_mcs_node_transfer (ptw32_mcs_local_node_t * new_node, ptw32_mcs_local_node_t * old_node); -#if defined(NEED_FTIME) void ptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft); + void ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts); -#endif /* Declared in pthw32_calloc.c */ #if defined(NEED_CALLOC) diff --git a/pthread.h b/pthread.h index 7108b303..2d96d901 100644 --- a/pthread.h +++ b/pthread.h @@ -1134,14 +1134,6 @@ typedef void (*ptw32_terminate_handler)(); PTW32_DLLPORT ptw32_terminate_handler PTW32_CDECL pthread_win32_set_terminate_np(ptw32_terminate_handler termFunction); #endif -/* - * Some compiler environments don't define some things. - */ -#if defined(__BORLANDC__) -# define _ftime ftime -# define _timeb timeb -#endif - #if defined(__cplusplus) /* diff --git a/ptw32_relmillisecs.c b/ptw32_relmillisecs.c index 5d64094a..286ba043 100644 --- a/ptw32_relmillisecs.c +++ b/ptw32_relmillisecs.c @@ -40,9 +40,6 @@ #include "pthread.h" #include "implement.h" -#if !defined(NEED_FTIME) -#include -#endif static const int64_t NANOSEC_PER_SEC = 1000000000; static const int64_t NANOSEC_PER_MILLISEC = 1000000; @@ -55,23 +52,15 @@ DWORD ptw32_relmillisecs (const struct timespec * abstime) { DWORD milliseconds; - int64_t tmpAbsMilliseconds; int64_t tmpAbsNanoseconds; - int64_t tmpCurrMilliseconds; int64_t tmpCurrNanoseconds; -#if defined(NEED_FTIME) struct timespec currSysTime; FILETIME ft; -#else /* ! NEED_FTIME */ -#if ( defined(_MSC_VER) && _MSC_VER >= 1300 ) /* MSVC7+ */ || \ - ( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0601 ) - struct __timeb64 currSysTime; -#else - struct _timeb currSysTime; -#endif -#endif /* NEED_FTIME */ +# if defined(WINCE) + SYSTEMTIME st; +#endif /* * Calculate timeout as milliseconds from current system time. @@ -84,17 +73,11 @@ ptw32_relmillisecs (const struct timespec * abstime) * * Assume all integers are unsigned, i.e. cannot test if less than 0. */ - tmpAbsMilliseconds = (int64_t)abstime->tv_sec * MILLISEC_PER_SEC; - tmpAbsMilliseconds += ((int64_t)abstime->tv_nsec + (NANOSEC_PER_MILLISEC/2)) / NANOSEC_PER_MILLISEC; tmpAbsNanoseconds = (int64_t)abstime->tv_nsec + ((int64_t)abstime->tv_sec * NANOSEC_PER_SEC); /* get current system time */ -#if defined(NEED_FTIME) - # if defined(WINCE) - - SYSTEMTIME st; GetSystemTime(&st); SystemTimeToFileTime(&st, &ft); # else @@ -103,36 +86,21 @@ ptw32_relmillisecs (const struct timespec * abstime) ptw32_filetime_to_timespec(&ft, &currSysTime); - tmpCurrMilliseconds = (int64_t)currSysTime.tv_sec * MILLISEC_PER_SEC; - tmpCurrMilliseconds += ((int64_t)currSysTime.tv_nsec + (NANOSEC_PER_MILLISEC/2)) - / NANOSEC_PER_MILLISEC; - tmpCurrNanoseconds = (int64_t)currSysTime->tv_nsec + ((int64_t)currSysTime->tv_sec * NANOSEC_PER_SEC); - -#else /* ! NEED_FTIME */ - -#if defined(_MSC_VER) && _MSC_VER >= 1400 /* MSVC8+ */ - _ftime64_s(&currSysTime); -#elif ( defined(_MSC_VER) && _MSC_VER >= 1300 ) /* MSVC7+ */ || \ - ( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0601 ) - _ftime64(&currSysTime); -#else - _ftime(&currSysTime); -#endif - - tmpCurrMilliseconds = (int64_t) currSysTime.time * MILLISEC_PER_SEC; - tmpCurrMilliseconds += (int64_t) currSysTime.millitm; - tmpCurrNanoseconds = tmpCurrMilliseconds * NANOSEC_PER_MILLISEC; - -#endif /* NEED_FTIME */ + tmpCurrNanoseconds = (int64_t)currSysTime.tv_nsec + ((int64_t)currSysTime.tv_sec * NANOSEC_PER_SEC); - if (tmpAbsMilliseconds > tmpCurrMilliseconds) + if (tmpAbsNanoseconds > tmpCurrNanoseconds) { - milliseconds = (DWORD) (tmpAbsMilliseconds - tmpCurrMilliseconds); - if (milliseconds == INFINITE) - { - /* Timeouts must be finite */ - milliseconds--; - } + int64_t deltaNanoseconds = tmpAbsNanoseconds - tmpCurrNanoseconds; + + if (deltaNanoseconds >= ((int64_t)INFINITE * NANOSEC_PER_MILLISEC)) + { + /* Timeouts must be finite */ + milliseconds = INFINITE - 1; + } + else + { + milliseconds = (DWORD)(deltaNanoseconds / NANOSEC_PER_MILLISEC); + } } else { @@ -163,22 +131,11 @@ pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * int64_t sec; int64_t nsec; -#if defined(NEED_FTIME) struct timespec currSysTime; FILETIME ft; -#else /* ! NEED_FTIME */ -#if ( defined(_MSC_VER) && _MSC_VER >= 1300 ) /* MSVC7+ */ || \ - ( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0601 ) - struct __timeb64 currSysTime; -#else - struct _timeb currSysTime; -#endif -#endif /* NEED_FTIME */ /* get current system time */ -#if defined(NEED_FTIME) - # if defined(WINCE) SYSTEMTIME st; @@ -193,22 +150,6 @@ pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * sec = currSysTime.tv_sec; nsec = currSysTime.tv_nsec; -#else /* ! NEED_FTIME */ - -#if defined(_MSC_VER) && _MSC_VER >= 1400 /* MSVC8+ */ - _ftime64_s(&currSysTime); -#elif ( defined(_MSC_VER) && _MSC_VER >= 1300 ) /* MSVC7+ */ || \ - ( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0601 ) - _ftime64(&currSysTime); -#else - _ftime(&currSysTime); -#endif - - sec = currSysTime.time; - nsec = currSysTime.millitm * NANOSEC_PER_MILLISEC; - -#endif /* NEED_FTIME */ - if (NULL != relative) { nsec += relative->tv_nsec; diff --git a/ptw32_timespec.c b/ptw32_timespec.c index ff284093..e82e35e3 100644 --- a/ptw32_timespec.c +++ b/ptw32_timespec.c @@ -39,8 +39,6 @@ # include #endif -#if defined(NEED_FTIME) - #include "pthread.h" #include "implement.h" @@ -82,5 +80,3 @@ ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts) (int) ((*(uint64_t *) ft - PTW32_TIMESPEC_TO_FILETIME_OFFSET - ((uint64_t) ts->tv_sec * (uint64_t) 10000000UL)) * 100); } - -#endif From 8c1d612b376333619c564ef8dadd2410b9ae0563 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 8 Aug 2018 14:32:33 +1000 Subject: [PATCH 178/207] Mark Pizzolato changes: Always perform time comparisons in nanoseconds and comparing rounded values Thus we can avoid any reference to ftime64() which only has millisecond resolution and rounds or truncates differently on some C runtime libraries. --- ChangeLog | 14 ++++++- GNUmakefile.in | 2 +- Makefile | 2 +- _ptw32.h | 7 ---- config.h | 6 --- configure.ac | 1 - implement.h | 3 +- pthread.h | 8 ---- ptw32_relmillisecs.c | 89 ++++++++------------------------------------ ptw32_timespec.c | 4 -- 10 files changed, 30 insertions(+), 106 deletions(-) diff --git a/ChangeLog b/ChangeLog index ed30fce3..f48750a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,11 +2,21 @@ * Makefile: "nmake realclean VC VC-static" and similar wasn't remaking pthread.obj. * common.mk: changes to accommodate the above. - * config.h (NEED_FTIME): defined for all which uses GetSystemTimeAsFileTime() - * _ptw32.h (NEED_FTIME): Likewise. * GNUmakefile: use changes in common.mk but still has problem with "make realclean GC GC-static" and similar. * configure.ac (AC_INIT): package name change. + +2018-08-08 Mark Pizzolato + + * config.h (NEED_FTIME): Removed + * _ptw32.h (NEED_FTIME): Removed. + * ptw32_timespec.c (NEED_FTIME): Removed conditional. + * ptw32_relmillisecs: Fix long-standing bug in NEED_FTIME code; remove NEED_FTIME + and all !NEED_FTIME code; compare nanoseconds and convert to milliseconds + at the end. + * implement.h (NEED_FTIME): remove conditionals. + * pthread.h: Remove Borland compiler time types no longer needed. + * configure.ac (NEED_FTIME): Removed check. 2018-08-07 Ross Johnson diff --git a/GNUmakefile.in b/GNUmakefile.in index 74fb61da..3455b6d1 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -340,7 +340,7 @@ install-headers: pthread.h sched.h semaphore.h _ptw32.h %.o: %.rc $(RC) $(RC_TARGET) $(RCFLAGS) $(CLEANUP) -o $@ -i $< -.SUFFIXES: .dll .rc .c .o ._o +.SUFFIXES: .dll .rc .c .o .c.o: $(CC) -c -o $@ $(CFLAGS) $(XC_FLAGS) $< diff --git a/Makefile b/Makefile index 82b81dcd..a703b9c5 100644 --- a/Makefile +++ b/Makefile @@ -196,7 +196,6 @@ realclean: clean if exist *.lib del *.lib if exist *.a del *.a if exist *.manifest del *.manifest - if exist *_stamp del *_stamp if exist make.log.txt del make.log.txt cd tests && $(MAKE) realclean @@ -210,6 +209,7 @@ clean: if exist *.o del *.o if exist *.i del *.i if exist *.res del *.res + if exist *_stamp del *_stamp cd tests && $(MAKE) clean # Very basic install. It assumes "realclean" was done just prior to build target. diff --git a/_ptw32.h b/_ptw32.h index 47b45ee1..94d64e7f 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -108,19 +108,12 @@ #if !defined (__PTW32_CONFIG_H) && !defined(__PTW32_PSEUDO_CONFIG_H_SOURCED) # define __PTW32_PSEUDO_CONFIG_H_SOURCED -/* - * We define NEED_FTIME for all now. GetSystemTimeAsFileTime() is pretty - * much universal now and consistently higher resolution than _ftime64(). - */ -# define NEED_FTIME - # if defined(WINCE) # undef HAVE_CPU_AFFINITY # define NEED_DUPLICATEHANDLE # define NEED_CREATETHREAD # define NEED_ERRNO # define NEED_CALLOC -# define NEED_FTIME # define NEED_UNICODE_CONSTS # define NEED_PROCESS_AFFINITY_MASK /* This may not be needed */ diff --git a/config.h b/config.h index 0cdf45d3..6da56909 100644 --- a/config.h +++ b/config.h @@ -34,12 +34,6 @@ /* Define if you don't have Win32 calloc. (eg. WinCE) */ #undef NEED_CALLOC -/* - * Define this now that all systems since Server 2000 support - * GetSystemTimeAsFileTime() (and WINCE before that). - */ -#define NEED_FTIME - /* Define if you don't have Win32 semaphores. (eg. WinCE 2.1 or earlier) */ #undef NEED_SEM diff --git a/configure.ac b/configure.ac index 2a50e59f..f571dbf8 100644 --- a/configure.ac +++ b/configure.ac @@ -70,7 +70,6 @@ PTW32_AC_CHECK_TYPEDEF([struct timespec],[time.h]) # PTW32_AC_NEED_ERRNO PTW32_AC_NEED_FUNC([NEED_CALLOC],[calloc]) -PTW32_AC_NEED_FUNC([NEED_FTIME],[ftime]) PTW32_AC_NEED_FUNC([NEED_CREATETHREAD],[_beginthreadex]) PTW32_AC_CHECK_CPU_AFFINITY diff --git a/implement.h b/implement.h index 77c8eb93..1579376b 100644 --- a/implement.h +++ b/implement.h @@ -701,10 +701,9 @@ __PTW32_BEGIN_C_DECLS void __ptw32_mcs_node_transfer (__ptw32_mcs_local_node_t * new_node, __ptw32_mcs_local_node_t * old_node); -#if defined(NEED_FTIME) void __ptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft); + void __ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts); -#endif /* Declared in pthw32_calloc.c */ #if defined(NEED_CALLOC) diff --git a/pthread.h b/pthread.h index 4b1e5db1..f35a39b5 100644 --- a/pthread.h +++ b/pthread.h @@ -1134,14 +1134,6 @@ typedef void (*__ptw32_terminate_handler)(); __PTW32_DLLPORT __ptw32_terminate_handler __PTW32_CDECL pthread_win32_set_terminate_np(__ptw32_terminate_handler termFunction); #endif -/* - * Some compiler environments don't define some things. - */ -#if defined(__BORLANDC__) -# define _ftime ftime -# define _timeb timeb -#endif - #if defined(__cplusplus) /* diff --git a/ptw32_relmillisecs.c b/ptw32_relmillisecs.c index 61a42f80..34b2c4ea 100644 --- a/ptw32_relmillisecs.c +++ b/ptw32_relmillisecs.c @@ -38,9 +38,6 @@ #include "pthread.h" #include "implement.h" -#if !defined(NEED_FTIME) -#include -#endif static const int64_t NANOSEC_PER_SEC = 1000000000; static const int64_t NANOSEC_PER_MILLISEC = 1000000; @@ -53,23 +50,15 @@ DWORD __ptw32_relmillisecs (const struct timespec * abstime) { DWORD milliseconds; - int64_t tmpAbsMilliseconds; int64_t tmpAbsNanoseconds; - int64_t tmpCurrMilliseconds; int64_t tmpCurrNanoseconds; -#if defined(NEED_FTIME) struct timespec currSysTime; FILETIME ft; -#else /* ! NEED_FTIME */ -#if ( defined(_MSC_VER) && _MSC_VER >= 1300 ) /* MSVC7+ */ || \ - ( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0601 ) - struct __timeb64 currSysTime; -#else - struct _timeb currSysTime; -#endif -#endif /* NEED_FTIME */ +# if defined(WINCE) + SYSTEMTIME st; +#endif /* * Calculate timeout as milliseconds from current system time. @@ -82,17 +71,11 @@ __ptw32_relmillisecs (const struct timespec * abstime) * * Assume all integers are unsigned, i.e. cannot test if less than 0. */ - tmpAbsMilliseconds = (int64_t)abstime->tv_sec * MILLISEC_PER_SEC; - tmpAbsMilliseconds += ((int64_t)abstime->tv_nsec + (NANOSEC_PER_MILLISEC/2)) / NANOSEC_PER_MILLISEC; tmpAbsNanoseconds = (int64_t)abstime->tv_nsec + ((int64_t)abstime->tv_sec * NANOSEC_PER_SEC); /* get current system time */ -#if defined(NEED_FTIME) - # if defined(WINCE) - - SYSTEMTIME st; GetSystemTime(&st); SystemTimeToFileTime(&st, &ft); # else @@ -101,36 +84,21 @@ __ptw32_relmillisecs (const struct timespec * abstime) __ptw32_filetime_to_timespec(&ft, &currSysTime); - tmpCurrMilliseconds = (int64_t)currSysTime.tv_sec * MILLISEC_PER_SEC; - tmpCurrMilliseconds += ((int64_t)currSysTime.tv_nsec + (NANOSEC_PER_MILLISEC/2)) - / NANOSEC_PER_MILLISEC; tmpCurrNanoseconds = (int64_t)currSysTime.tv_nsec + ((int64_t)currSysTime.tv_sec * NANOSEC_PER_SEC); -#else /* ! NEED_FTIME */ - -#if defined(_MSC_VER) && _MSC_VER >= 1400 /* MSVC8+ */ - _ftime64_s(&currSysTime); -#elif ( defined(_MSC_VER) && _MSC_VER >= 1300 ) /* MSVC7+ */ || \ - ( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0601 ) - _ftime64(&currSysTime); -#else - _ftime(&currSysTime); -#endif - - tmpCurrMilliseconds = (int64_t) currSysTime.time * MILLISEC_PER_SEC; - tmpCurrMilliseconds += (int64_t) currSysTime.millitm; - tmpCurrNanoseconds = tmpCurrMilliseconds * NANOSEC_PER_MILLISEC; - -#endif /* NEED_FTIME */ - - if (tmpAbsMilliseconds > tmpCurrMilliseconds) + if (tmpAbsNanoseconds > tmpCurrNanoseconds) { - milliseconds = (DWORD) (tmpAbsMilliseconds - tmpCurrMilliseconds); - if (milliseconds == INFINITE) - { - /* Timeouts must be finite */ - milliseconds--; - } + int64_t deltaNanoseconds = tmpAbsNanoseconds - tmpCurrNanoseconds; + + if (deltaNanoseconds >= ((int64_t)INFINITE * NANOSEC_PER_MILLISEC)) + { + /* Timeouts must be finite */ + milliseconds = INFINITE - 1; + } + else + { + milliseconds = (DWORD)(deltaNanoseconds / NANOSEC_PER_MILLISEC); + } } else { @@ -161,22 +129,11 @@ pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * int64_t sec; int64_t nsec; -#if defined(NEED_FTIME) struct timespec currSysTime; FILETIME ft; -#else /* ! NEED_FTIME */ -#if ( defined(_MSC_VER) && _MSC_VER >= 1300 ) /* MSVC7+ */ || \ - ( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0601 ) - struct __timeb64 currSysTime; -#else - struct _timeb currSysTime; -#endif -#endif /* NEED_FTIME */ /* get current system time */ -#if defined(NEED_FTIME) - # if defined(WINCE) SYSTEMTIME st; @@ -191,22 +148,6 @@ pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * sec = currSysTime.tv_sec; nsec = currSysTime.tv_nsec; -#else /* ! NEED_FTIME */ - -#if defined(_MSC_VER) && _MSC_VER >= 1400 /* MSVC8+ */ - _ftime64_s(&currSysTime); -#elif ( defined(_MSC_VER) && _MSC_VER >= 1300 ) /* MSVC7+ */ || \ - ( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0601 ) - _ftime64(&currSysTime); -#else - _ftime(&currSysTime); -#endif - - sec = currSysTime.time; - nsec = currSysTime.millitm * NANOSEC_PER_MILLISEC; - -#endif /* NEED_FTIME */ - if (NULL != relative) { nsec += relative->tv_nsec; diff --git a/ptw32_timespec.c b/ptw32_timespec.c index e4868cce..a57a6c57 100644 --- a/ptw32_timespec.c +++ b/ptw32_timespec.c @@ -37,8 +37,6 @@ # include #endif -#if defined(NEED_FTIME) - #include "pthread.h" #include "implement.h" @@ -80,5 +78,3 @@ __ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts) (int) ((*(uint64_t *) ft - __PTW32_TIMESPEC_TO_FILETIME_OFFSET - ((uint64_t) ts->tv_sec * (uint64_t) 10000000UL)) * 100); } - -#endif From 4ec5541905ee18157f3a9cb8e4bf49307521166f Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 8 Aug 2018 14:33:50 +1000 Subject: [PATCH 179/207] Update --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 4b3b6ea4..beda0e2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,7 @@ at the end. * implement.h (NEED_FTIME): remove conditionals. * pthread.h: Remove Borland compiler time types no longer needed. + * configure.ac (NEED_FTIME): Removed check. 2018-08-07 Ross Johnson From 07053a521b0a9deb6db2a649cde1f828f2eb1f4f Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 8 Aug 2018 20:47:40 +1000 Subject: [PATCH 180/207] Update for release --- NEWS | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 7a101ddc..b6c57c8e 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ RELEASE 3.0.0 -------------- -(2018-08-01) +(2018-08-08) General ------- @@ -80,9 +80,10 @@ either the SJLJ or SEH exception handling method should work. New Features ------------ -No major new features are introduced compared to version 2.10.0. This release -introduces a change to pthread_t and pthread_once_t that will affect -applications that link with the library. +Other than the following, this release is feature-equivalent to v2.11.0. + +This release introduces a change to pthread_t and pthread_once_t that will +affect applications that link with the library. pthread_t: remains a struct but extends the reuse counter from 32 bits to 64 bits. On 64 bit machines the overall size of the object will not increase, we @@ -97,7 +98,7 @@ pthread_once_t: removes two long-obsoleted elements and reduces it's size. RELEASE 2.11.0 -------------- -(Upcoming release) +(2018-08-08) General ------- From 9808f0b151e6c6efe2d57f3b54a1fb9a19d1eb88 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 8 Aug 2018 20:49:00 +1000 Subject: [PATCH 181/207] Update for release --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 26f8f38e..642d3cd2 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ RELEASE 2.11.0 -------------- -(Upcoming release) +(2018-08-08) General ------- From 2d5e8a97d77d6e50565886a42981e087efa6997f Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Fri, 10 Aug 2018 21:35:46 +1000 Subject: [PATCH 182/207] New test --- tests/ChangeLog | 4 ++++ tests/common.mk | 1 + tests/equal0.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++ tests/runorder.mk | 3 ++- 4 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 tests/equal0.c diff --git a/tests/ChangeLog b/tests/ChangeLog index c6c69cfc..bba53bed 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -6,6 +6,10 @@ * Makefile: Variable renaming: e.g. VCLIB to VCIMP for DLL import library pthreadVC2.lib and VCLIB now holds static library name libpthreadVC2.lib, and similar for the other cleanup method versions. + * equal0.c: New test. If this test fails, the library's process init + routines have likely not been invoked or failed. + * common.mk: Add new test. + * runorder.mk: Likewise. 2018-07-22 Mark Pizzolato diff --git a/tests/common.mk b/tests/common.mk index 652ab94b..b0ab0055 100644 --- a/tests/common.mk +++ b/tests/common.mk @@ -18,6 +18,7 @@ ALL_KNOWN_TESTS = \ create1 create2 create3 \ delay1 delay2 \ detach1 \ + equal0 \ equal1 \ errno1 \ exception1 exception2 exception3_0 exception3 \ diff --git a/tests/equal0.c b/tests/equal0.c new file mode 100644 index 00000000..733bc342 --- /dev/null +++ b/tests/equal0.c @@ -0,0 +1,48 @@ +/* + * Test for pthread_equal. + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2018, 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 functions: pthread_self(). + */ + +#include "test.h" + +int +main() +{ + pthread_t t1 = pthread_self(); + + assert(pthread_equal(t1, pthread_self()) != 0); + + /* Success. */ + return 0; +} diff --git a/tests/runorder.mk b/tests/runorder.mk index 54bf0be8..215d7e79 100644 --- a/tests/runorder.mk +++ b/tests/runorder.mk @@ -56,7 +56,8 @@ create3.pass: create2.pass delay1.pass: self1.pass create3.pass delay2.pass: delay1.pass detach1.pass: join0.pass -equal1.pass: self1.pass create1.pass +equal0.pass: self1.pass +equal1.pass: equal0.pass create1.pass errno0.pass: sizes.pass errno1.pass: mutex3.pass exception1.pass: cancel4.pass From 12b7a1d26dbf5db894fcfcd94b9c7b787111419d Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Fri, 10 Aug 2018 21:40:20 +1000 Subject: [PATCH 183/207] Remove *.idb files in cleanup --- ChangeLog | 4 ++++ Makefile | 1 + tests/ChangeLog | 4 ++++ tests/Makefile | 1 + 4 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index f48750a0..1df5c80d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2018-08-10 Ross Johnson + + * Makefile (clean): remove *.idb files. + 2018-08-08 Ross Johnson * Makefile: "nmake realclean VC VC-static" and similar wasn't remaking pthread.obj. diff --git a/Makefile b/Makefile index a703b9c5..644b3942 100644 --- a/Makefile +++ b/Makefile @@ -203,6 +203,7 @@ clean: if exist *.obj del *.obj if exist *.def del *.def if exist *.ilk del *.ilk + if exist *.idb del *.idb if exist *.pdb del *.pdb if exist *.exp del *.exp if exist *.map del *.map diff --git a/tests/ChangeLog b/tests/ChangeLog index bba53bed..c4895d05 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2018-08-10 Ross Johnson + + * Makefile (clean): remove *.idb files. + 2018-08-07 Ross Johnson * GNUmakefile.in (DLL_VER): rename as PTW32_VER. diff --git a/tests/Makefile b/tests/Makefile index ebf457d2..d79bca62 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -197,6 +197,7 @@ clean: if exist *.e $(RM) *.e if exist *.i $(RM) *.i if exist *.obj $(RM) *.obj + if exist *.idb $(RM) *.idb if exist *.pdb $(RM) *.pdb if exist *.o $(RM) *.o if exist *.asm $(RM) *.asm From 2d76339966f0487c62b0fc86fd09a31209163753 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Fri, 10 Aug 2018 13:31:50 -0700 Subject: [PATCH 184/207] Fix static library initialization to avoid link time optimization removal --- dll.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dll.c b/dll.c index bd3bbaea..80edbf65 100644 --- a/dll.c +++ b/dll.c @@ -126,13 +126,13 @@ typedef int foo; * implement.h) does the job in a portable manner. */ -static int on_process_init(void) +int ptw32_on_process_init(void) { pthread_win32_process_attach_np (); return 0; } -static int on_process_exit(void) +int ptw32_on_process_exit(void) { pthread_win32_thread_detach_np (); pthread_win32_process_detach_np (); @@ -140,19 +140,19 @@ static int on_process_exit(void) } #if defined(__GNUC__) -__attribute__((section(".ctors"), used)) static int (*gcc_ctor)(void) = on_process_init; -__attribute__((section(".dtors"), used)) static int (*gcc_dtor)(void) = on_process_exit; +__attribute__((section(".ctors"), used)) static int (*gcc_ctor)(void) = ptw32_on_process_init; +__attribute__((section(".dtors"), used)) static int (*gcc_dtor)(void) = ptw32_on_process_exit; #elif defined(_MSC_VER) # if _MSC_VER >= 1400 /* MSVC8+ */ # pragma section(".CRT$XCU", long, read) # pragma section(".CRT$XPU", long, read) -__declspec(allocate(".CRT$XCU")) static int (*msc_ctor)(void) = on_process_init; -__declspec(allocate(".CRT$XPU")) static int (*msc_dtor)(void) = on_process_exit; +__declspec(allocate(".CRT$XCU")) int (*ptw32_msc_ctor)(void) = ptw32_on_process_init; +__declspec(allocate(".CRT$XPU")) int (*ptw32_msc_dtor)(void) = ptw32_on_process_exit; # else # pragma data_seg(".CRT$XCU") -static int (*msc_ctor)(void) = on_process_init; +int (*ptw32_msc_ctor)(void) = ptw32_on_process_init; # pragma data_seg(".CRT$XPU") -static int (*msc_dtor)(void) = on_process_exit; +int (*ptw32_msc_dtor)(void) = ptw32_on_process_exit; # pragma data_seg() /* reset data segment */ # endif #endif From 5af38104d0f7e5ef2fc31bfb1b051dd72c3801b2 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sat, 11 Aug 2018 10:17:13 +1000 Subject: [PATCH 185/207] For consistency, replace some existing extern "C" with __PTW32_* macros used elsewhere. --- ChangeLog | 4 ++++ dll.c | 20 +++++++++++++------- implement.h | 2 ++ 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1df5c80d..7f93d541 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ 2018-08-10 Ross Johnson * Makefile (clean): remove *.idb files. + * dll.c: replace 'extern "C"' with macros __PTW32_BEGIN_C_DECLS/__PTW32_BEGIN_C_DECLS + for consistency tidy-up; add comment re __ptw32_autostatic_anchor() function. + * implement.h (__ptw32_autostatic_anchor): add __PTW32_BEGIN_C_DECLS/__PTW32_BEGIN_C_DECLS + envelope. 2018-08-08 Ross Johnson diff --git a/dll.c b/dll.c index 1dccfb0b..1edc89df 100644 --- a/dll.c +++ b/dll.c @@ -49,13 +49,9 @@ #pragma warning( disable : 4100 ) #endif -#if defined(__cplusplus) -/* - * Dear c++: Please don't mangle this name. -thanks - */ -extern "C" -#endif /* __cplusplus */ - BOOL WINAPI DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) +__PTW32_BEGIN_C_DECLS + +BOOL WINAPI DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) { BOOL result = __PTW32_TRUE; @@ -90,6 +86,8 @@ extern "C" } /* DllMain */ +__PTW32_END_C_DECLS + #endif /* !PTW32_STATIC_LIB */ #if ! defined (__PTW32_BUILD_INLINED) @@ -157,11 +155,19 @@ static int (*msc_dtor)(void) = on_process_exit; #endif /* defined(__MINGW32__) || defined(_MSC_VER) */ +__PTW32_BEGIN_C_DECLS + /* This dummy function exists solely to be referenced by other modules * (specifically, in implement.h), so that the linker can't optimize away * this module. Don't call it. + * + * Shouldn't work if we are compiling via pthreads.c + * (whole library single translation unit) + * Leaving it here in case it affects small-static builds. */ void __ptw32_autostatic_anchor(void) { abort(); } +__PTW32_END_C_DECLS + #endif /* __PTW32_STATIC_LIB */ diff --git a/implement.h b/implement.h index 1579376b..81c5f292 100644 --- a/implement.h +++ b/implement.h @@ -135,11 +135,13 @@ static void __ptw32_set_errno(int err) { errno = err; SetLastError(err); } * Don't allow the linker to optimize away dll.obj (dll.o) in static builds. */ #if defined (__PTW32_STATIC_LIB) && defined (__PTW32_BUILD) && !defined (__PTW32_TEST_SNEAK_PEEK) +__PTW32_BEGIN_C_DECLS void __ptw32_autostatic_anchor(void); # if defined(__GNUC__) __attribute__((unused, used)) # endif static void (*local_autostatic_anchor)(void) = __ptw32_autostatic_anchor; +__PTW32_END_C_DECLS #endif typedef enum From 6e7f368cbd14cd93cabdbf9681db92a26da55384 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sat, 11 Aug 2018 10:22:20 +1000 Subject: [PATCH 186/207] Remove /Z7 flag from release CFLAGS. This was introduced recently by mistake. --- tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index d79bca62..36efaf7b 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -53,7 +53,7 @@ VCXFLAGS = /EHs /TP /D__PTW32_CLEANUP_C CPLIB = $(VCLIB) CPDLL = $(VCDLL) -CFLAGS = $(OPTIM) /W3 /Z7 +CFLAGS = $(OPTIM) /W3 CFLAGS_DEBUG = $(OPTIM) /W3 /Z7 LFLAGS = /INCREMENTAL:NO INCLUDES = -I. From c3e1ed0a0d4278d16dcdc03902f2a824fb54ad99 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sat, 11 Aug 2018 11:23:55 +1000 Subject: [PATCH 187/207] Make our static linking pre/post main routines "extern" to avoid agressive optimisers. --- ChangeLog | 3 ++- dll.c | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7f93d541..6dd4d518 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,7 +2,8 @@ * Makefile (clean): remove *.idb files. * dll.c: replace 'extern "C"' with macros __PTW32_BEGIN_C_DECLS/__PTW32_BEGIN_C_DECLS - for consistency tidy-up; add comment re __ptw32_autostatic_anchor() function. + for consistency tidy-up; add comment re __ptw32_autostatic_anchor() function; + make our static constructor/destructors "extern" to avoid optimisers. * implement.h (__ptw32_autostatic_anchor): add __PTW32_BEGIN_C_DECLS/__PTW32_BEGIN_C_DECLS envelope. diff --git a/dll.c b/dll.c index 1edc89df..674f7c7e 100644 --- a/dll.c +++ b/dll.c @@ -120,15 +120,19 @@ typedef int foo; * needed, we need a way to prevent the linker from optimizing away this * module. The pthread_win32_autostatic_anchor() hack below (and in * implement.h) does the job in a portable manner. + * + * Make everything "extern" to evade being optimized away. + * Yes, "extern" is implied if not "static" but we are indicating we are + * doing this deliberately. */ -static int on_process_init(void) +extern int __ptw32_on_process_init(void) { pthread_win32_process_attach_np (); return 0; } -static int on_process_exit(void) +extern int __ptw32_on_process_exit(void) { pthread_win32_thread_detach_np (); pthread_win32_process_detach_np (); @@ -136,19 +140,19 @@ static int on_process_exit(void) } #if defined(__GNUC__) -__attribute__((section(".ctors"), used)) static int (*gcc_ctor)(void) = on_process_init; -__attribute__((section(".dtors"), used)) static int (*gcc_dtor)(void) = on_process_exit; +__attribute__((section(".ctors"), used)) extern int (*gcc_ctor)(void) = __ptw32_on_process_init; +__attribute__((section(".dtors"), used)) extern int (*gcc_dtor)(void) = __ptw32_on_process_exit; #elif defined(_MSC_VER) # if _MSC_VER >= 1400 /* MSVC8+ */ # pragma section(".CRT$XCU", long, read) # pragma section(".CRT$XPU", long, read) -__declspec(allocate(".CRT$XCU")) static int (*msc_ctor)(void) = on_process_init; -__declspec(allocate(".CRT$XPU")) static int (*msc_dtor)(void) = on_process_exit; +__declspec(allocate(".CRT$XCU")) extern int (*msc_ctor)(void) = __ptw32_on_process_init; +__declspec(allocate(".CRT$XPU")) extern int (*msc_dtor)(void) = __ptw32_on_process_exit; # else # pragma data_seg(".CRT$XCU") -static int (*msc_ctor)(void) = on_process_init; +extern int (*msc_ctor)(void) = __ptw32_on_process_init; # pragma data_seg(".CRT$XPU") -static int (*msc_dtor)(void) = on_process_exit; +extern int (*msc_dtor)(void) = __ptw32_on_process_exit; # pragma data_seg() /* reset data segment */ # endif #endif From b9856a65c136ff4083b956d76154eeafbbfb05fd Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sat, 11 Aug 2018 12:06:17 +1000 Subject: [PATCH 188/207] Update version number and remove comment --- _ptw32.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/_ptw32.h b/_ptw32.h index 94d64e7f..e638027e 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -38,18 +38,15 @@ #ifndef __PTW32_H #define __PTW32_H -/* See the README file for an explanation of the pthreads-win32 +/* See the README file for an explanation of the pthreads4w * version numbering scheme and how the DLL is named etc. - * - * FIXME: consider moving this to <_ptw32.h>; maybe also add a - * leading underscore to the macro names. */ #define __PTW32_VERSION_MAJOR 3 #define __PTW32_VERSION_MINOR 0 -#define __PTW32_VERSION_MICRO 0 +#define __PTW32_VERSION_MICRO 1 #define __PTW32_VERION_BUILD 0 -#define __PTW32_VERSION 3,0,0,0 -#define __PTW32_VERSION_STRING "3, 0, 0, 0\0" +#define __PTW32_VERSION 3,0,0,1 +#define __PTW32_VERSION_STRING "3, 0, 1, 0\0" #if defined(__GNUC__) # pragma GCC system_header From 7c8a2c6fe0c1761c3df6adad40fddb96677bfaf5 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sat, 11 Aug 2018 12:21:12 +1000 Subject: [PATCH 189/207] Backport changes made in v3.0.1 --- ChangeLog | 9 +++++++++ Makefile | 1 + _ptw32.h | 9 +++------ dll.c | 40 +++++++++++++++++++++++++--------------- implement.h | 2 ++ tests/ChangeLog | 8 ++++++++ tests/common.mk | 1 + tests/runorder.mk | 3 ++- 8 files changed, 51 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index beda0e2a..ed3f539d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2018-08-10 Ross Johnson + + * Makefile (clean): remove *.idb files. + * dll.c: replace 'extern "C"' with macros PTW32_BEGIN_C_DECLS/PTW32_BEGIN_C_DECLS + for consistency tidy-up; add comment re ptw32_autostatic_anchor() function; + make our static constructor/destructors "extern" to avoid optimisers. + * implement.h (ptw32_autostatic_anchor): add PTW32_BEGIN_C_DECLS/PTW32_BEGIN_C_DECLS + envelope. + 2018-08-08 Ross Johnson * Makefile: "nmake realclean VC VC-static" and similar wasn't remaking pthread.obj. diff --git a/Makefile b/Makefile index 296e18fc..4dc48d39 100644 --- a/Makefile +++ b/Makefile @@ -203,6 +203,7 @@ clean: if exist *.obj del *.obj if exist *.def del *.def if exist *.ilk del *.ilk + if exist *.idb del *.idb if exist *.pdb del *.pdb if exist *.exp del *.exp if exist *.map del *.map diff --git a/_ptw32.h b/_ptw32.h index 71a74b67..427706fc 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -39,16 +39,13 @@ /* See the README file for an explanation of the Pthreads4w * version numbering scheme and how the DLL is named etc. - * - * FIXME: consider moving this to <_ptw32.h>; maybe also add a - * leading underscore to the macro names. */ #define PTW32_VERSION_MAJOR 2 #define PTW32_VERSION_MINOR 11 -#define PTW32_VERSION_MICRO 0 +#define PTW32_VERSION_MICRO 1 #define PTW32_VERION_BUILD 0 -#define PTW32_VERSION 2,11,0,0 -#define PTW32_VERSION_STRING "2, 11, 0, 0\0" +#define PTW32_VERSION 2,11,1,0 +#define PTW32_VERSION_STRING "2, 11, 1, 0\0" #if defined(__GNUC__) # pragma GCC system_header diff --git a/dll.c b/dll.c index bd3bbaea..15f4343b 100644 --- a/dll.c +++ b/dll.c @@ -51,13 +51,9 @@ #pragma warning( disable : 4100 ) #endif -#if defined(__cplusplus) -/* - * Dear c++: Please don't mangle this name. -thanks - */ -extern "C" -#endif /* __cplusplus */ - BOOL WINAPI DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) +PTW32_BEGIN_C_DECLS + +BOOL WINAPI DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) { BOOL result = PTW32_TRUE; @@ -92,6 +88,8 @@ extern "C" } /* DllMain */ +PTW32_END_C_DECLS + #endif /* !PTW32_STATIC_LIB */ #if ! defined(PTW32_BUILD_INLINED) @@ -124,15 +122,19 @@ typedef int foo; * needed, we need a way to prevent the linker from optimizing away this * module. The pthread_win32_autostatic_anchor() hack below (and in * implement.h) does the job in a portable manner. + * + * Make everything "extern" to evade being optimized away. + * Yes, "extern" is implied if not "static" but we are indicating we are + * doing this deliberately. */ -static int on_process_init(void) +extern int ptw32_on_process_init(void) { pthread_win32_process_attach_np (); return 0; } -static int on_process_exit(void) +extern int ptw32_on_process_exit(void) { pthread_win32_thread_detach_np (); pthread_win32_process_detach_np (); @@ -140,30 +142,38 @@ static int on_process_exit(void) } #if defined(__GNUC__) -__attribute__((section(".ctors"), used)) static int (*gcc_ctor)(void) = on_process_init; -__attribute__((section(".dtors"), used)) static int (*gcc_dtor)(void) = on_process_exit; +__attribute__((section(".ctors"), used)) extern int (*gcc_ctor)(void) = ptw32_on_process_init; +__attribute__((section(".dtors"), used)) extern int (*gcc_dtor)(void) = ptw32_on_process_exit; #elif defined(_MSC_VER) # if _MSC_VER >= 1400 /* MSVC8+ */ # pragma section(".CRT$XCU", long, read) # pragma section(".CRT$XPU", long, read) -__declspec(allocate(".CRT$XCU")) static int (*msc_ctor)(void) = on_process_init; -__declspec(allocate(".CRT$XPU")) static int (*msc_dtor)(void) = on_process_exit; +__declspec(allocate(".CRT$XCU")) extern int (*msc_ctor)(void) = ptw32_on_process_init; +__declspec(allocate(".CRT$XPU")) extern int (*msc_dtor)(void) = ptw32_on_process_exit; # else # pragma data_seg(".CRT$XCU") -static int (*msc_ctor)(void) = on_process_init; +extern int (*msc_ctor)(void) = ptw32_on_process_init; # pragma data_seg(".CRT$XPU") -static int (*msc_dtor)(void) = on_process_exit; +extern int (*msc_dtor)(void) = ptw32_on_process_exit; # pragma data_seg() /* reset data segment */ # endif #endif #endif /* defined(__MINGW32__) || defined(_MSC_VER) */ +PTW32_BEGIN_C_DECLS + /* This dummy function exists solely to be referenced by other modules * (specifically, in implement.h), so that the linker can't optimize away * this module. Don't call it. + * + * Shouldn't work if we are compiling via pthreads.c + * (whole library single translation unit) + * Leaving it here in case it affects small-static builds. */ void ptw32_autostatic_anchor(void) { abort(); } +PTW32_END_C_DECLS + #endif /* PTW32_STATIC_LIB */ diff --git a/implement.h b/implement.h index a0fd235d..42fd1424 100644 --- a/implement.h +++ b/implement.h @@ -132,11 +132,13 @@ static void ptw32_set_errno(int err) { errno = err; SetLastError(err); } * Don't allow the linker to optimize away dll.obj (dll.o) in static builds. */ #if defined(PTW32_STATIC_LIB) && defined(PTW32_BUILD) && !defined(PTW32_TEST_SNEAK_PEEK) +PTW32_BEGIN_C_DECLS void ptw32_autostatic_anchor(void); # if defined(__GNUC__) __attribute__((unused, used)) # endif static void (*local_autostatic_anchor)(void) = ptw32_autostatic_anchor; +PTW32_END_C_DECLS #endif typedef enum diff --git a/tests/ChangeLog b/tests/ChangeLog index 5d765d4a..96c5545a 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2018-08-10 Ross Johnson + + * Makefile (clean): remove *.idb files. + 2018-08-07 Ross Johnson * GNUmakefile.in (DLL_VER): rename as PTW32_VER. @@ -6,6 +10,10 @@ * Makefile: Variable renaming: e.g. VCLIB to VCIMP for DLL import library pthreadVC2.lib and VCLIB now holds static library name libpthreadVC2.lib, and similar for the other cleanup method versions. + * equal0.c: New test. If this test fails, the library's process init + routines have likely not been invoked or failed. + * common.mk: Add new test. + * runorder.mk: Likewise. 2018-07-22 Mark Pizzolato diff --git a/tests/common.mk b/tests/common.mk index cd810676..df8a9cca 100644 --- a/tests/common.mk +++ b/tests/common.mk @@ -18,6 +18,7 @@ ALL_KNOWN_TESTS = \ create1 create2 create3 \ delay1 delay2 \ detach1 \ + equal0 \ equal1 \ errno1 errno0 \ exception1 exception2 exception3_0 exception3 \ diff --git a/tests/runorder.mk b/tests/runorder.mk index 54bf0be8..215d7e79 100644 --- a/tests/runorder.mk +++ b/tests/runorder.mk @@ -56,7 +56,8 @@ create3.pass: create2.pass delay1.pass: self1.pass create3.pass delay2.pass: delay1.pass detach1.pass: join0.pass -equal1.pass: self1.pass create1.pass +equal0.pass: self1.pass +equal1.pass: equal0.pass create1.pass errno0.pass: sizes.pass errno1.pass: mutex3.pass exception1.pass: cancel4.pass From d695410ea6ac7af074a72abbb43da21375172881 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sat, 11 Aug 2018 12:22:17 +1000 Subject: [PATCH 190/207] New test --- tests/equal0.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 tests/equal0.c diff --git a/tests/equal0.c b/tests/equal0.c new file mode 100644 index 00000000..3e3c4155 --- /dev/null +++ b/tests/equal0.c @@ -0,0 +1,50 @@ +/* + * Test for pthread_equal. + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999-2018, 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/ + * + * This file is part of Pthreads4w. + * + * Pthreads4w is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pthreads4w is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Pthreads4w. If not, see . * + * + * -------------------------------------------------------------------------- + * + * Depends on functions: pthread_self(). + */ + +#include "test.h" + +int +main() +{ + pthread_t t1 = pthread_self(); + + assert(pthread_equal(t1, pthread_self()) != 0); + + /* Success. */ + return 0; +} From 7238dac80557ce1beb8bd64ee7797721f714bf06 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sat, 11 Aug 2018 12:24:01 +1000 Subject: [PATCH 191/207] Remove duplicated section Obviously an operator merge error. --- tests/common.mk | 59 ------------------------------------------------- 1 file changed, 59 deletions(-) diff --git a/tests/common.mk b/tests/common.mk index b0ab0055..f6cf9d17 100644 --- a/tests/common.mk +++ b/tests/common.mk @@ -58,63 +58,4 @@ BENCHTESTS = \ # 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 errno0 \ - 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 rwlock8 \ - 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 From 0ddd075e5195e006464f5b3d5b8442673717fa72 Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sat, 11 Aug 2018 12:28:02 +1000 Subject: [PATCH 192/207] Fix macro name from backport --- dll.c | 8 ++++---- implement.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dll.c b/dll.c index 15f4343b..4e788f4a 100644 --- a/dll.c +++ b/dll.c @@ -51,7 +51,7 @@ #pragma warning( disable : 4100 ) #endif -PTW32_BEGIN_C_DECLS +__PTW32_BEGIN_C_DECLS BOOL WINAPI DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) { @@ -88,7 +88,7 @@ BOOL WINAPI DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) } /* DllMain */ -PTW32_END_C_DECLS +__PTW32_END_C_DECLS #endif /* !PTW32_STATIC_LIB */ @@ -161,7 +161,7 @@ extern int (*msc_dtor)(void) = ptw32_on_process_exit; #endif /* defined(__MINGW32__) || defined(_MSC_VER) */ -PTW32_BEGIN_C_DECLS +__PTW32_BEGIN_C_DECLS /* This dummy function exists solely to be referenced by other modules * (specifically, in implement.h), so that the linker can't optimize away @@ -173,7 +173,7 @@ PTW32_BEGIN_C_DECLS */ void ptw32_autostatic_anchor(void) { abort(); } -PTW32_END_C_DECLS +__PTW32_END_C_DECLS #endif /* PTW32_STATIC_LIB */ diff --git a/implement.h b/implement.h index 42fd1424..0637090d 100644 --- a/implement.h +++ b/implement.h @@ -132,13 +132,13 @@ static void ptw32_set_errno(int err) { errno = err; SetLastError(err); } * Don't allow the linker to optimize away dll.obj (dll.o) in static builds. */ #if defined(PTW32_STATIC_LIB) && defined(PTW32_BUILD) && !defined(PTW32_TEST_SNEAK_PEEK) -PTW32_BEGIN_C_DECLS +__PTW32_BEGIN_C_DECLS void ptw32_autostatic_anchor(void); # if defined(__GNUC__) __attribute__((unused, used)) # endif static void (*local_autostatic_anchor)(void) = ptw32_autostatic_anchor; -PTW32_END_C_DECLS +__PTW32_END_C_DECLS #endif typedef enum From 4f7fec22de1bcecde3bc2dd2faf4d7b5d6d3bd93 Mon Sep 17 00:00:00 2001 From: Carlo-Bramini Date: Sat, 18 Aug 2018 15:55:55 +0200 Subject: [PATCH 193/207] Fix __PTW32_PROGCTR for ARM --- context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context.h b/context.h index 33294c15..318b689a 100644 --- a/context.h +++ b/context.h @@ -62,7 +62,7 @@ #endif #if defined(_ARM_) || defined(ARM) || defined(_M_ARM) || defined(_M_ARM64) -#define PTW32_PROGCTR(Context) ((Context).Pc) +#define __PTW32_PROGCTR(Context) ((Context).Pc) #endif #if !defined (__PTW32_PROGCTR) From ae73c69206542371787719bf344534662b2e25b4 Mon Sep 17 00:00:00 2001 From: Carlo-Bramini Date: Sat, 18 Aug 2018 16:07:22 +0200 Subject: [PATCH 194/207] Add version info for ARM --- version.rc | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/version.rc b/version.rc index aa0596cc..3c385b32 100644 --- a/version.rc +++ b/version.rc @@ -41,28 +41,45 @@ */ #if defined (__PTW32_RC_MSC) +# if defined(__PTW32_CLEANUP_C) +# define __PTW32_VERSIONINFO_NAME "pthreadVC2.DLL\0" +# elif defined(__PTW32_CLEANUP_CXX) +# define __PTW32_VERSIONINFO_NAME "pthreadVCE2.DLL\0" +# elif defined(__PTW32_CLEANUP_SEH) +# define __PTW32_VERSIONINFO_NAME "pthreadVSE2.DLL\0" +# endif # if defined (__PTW32_ARCHx64) || defined (__PTW32_ARCHX64) || defined (__PTW32_ARCHAMD64) # if defined(__PTW32_CLEANUP_C) -# define __PTW32_VERSIONINFO_NAME "pthreadVC2.DLL\0" # define __PTW32_VERSIONINFO_DESCRIPTION "MS C x64\0" # elif defined(__PTW32_CLEANUP_CXX) -# define __PTW32_VERSIONINFO_NAME "pthreadVCE2.DLL\0" # define __PTW32_VERSIONINFO_DESCRIPTION "MS C++ x64\0" # elif defined(__PTW32_CLEANUP_SEH) -# define __PTW32_VERSIONINFO_NAME "pthreadVSE2.DLL\0" # define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH x64\0" # endif # elif defined (__PTW32_ARCHx86) || defined (__PTW32_ARCHX86) # if defined(__PTW32_CLEANUP_C) -# define __PTW32_VERSIONINFO_NAME "pthreadVC2.DLL\0" # define __PTW32_VERSIONINFO_DESCRIPTION "MS C x86\0" # elif defined(__PTW32_CLEANUP_CXX) -# define __PTW32_VERSIONINFO_NAME "pthreadVCE2.DLL\0" # define __PTW32_VERSIONINFO_DESCRIPTION "MS C++ x86\0" # elif defined(__PTW32_CLEANUP_SEH) -# define __PTW32_VERSIONINFO_NAME "pthreadVSE2.DLL\0" # define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH x86\0" # endif +# elif defined (__PTW32_ARCHarm) || defined (__PTW32_ARCHARM) || defined (__PTW32_AARCH32) +# if defined(__PTW32_CLEANUP_C) +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C ARM\0" +# elif defined(__PTW32_CLEANUP_CXX) +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C++ ARM\0" +# elif defined(__PTW32_CLEANUP_SEH) +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH ARM\0" +# endif +# elif defined (__PTW32_ARCHarm64) || defined (__PTW32_ARCHARM64) || defined (__PTW32_AARCH64) +# if defined(__PTW32_CLEANUP_C) +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C ARM64\0" +# elif defined(__PTW32_CLEANUP_CXX) +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C++ ARM64\0" +# elif defined(__PTW32_CLEANUP_SEH) +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH ARM64\0" +# endif # endif #elif defined(__GNUC__) # if defined(_M_X64) From 44daa2441137b90477b449663abe9755b2c9a16b Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sun, 19 Aug 2018 20:35:54 +1000 Subject: [PATCH 195/207] Fix macro name. --- ChangeLog | 4 ++++ context.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6dd4d518..6f0913ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2018-08-19 Ross Johnson + + * context.h (__PTW32_PROCPTR): Added missing '__' prefix for v3. + 2018-08-10 Ross Johnson * Makefile (clean): remove *.idb files. diff --git a/context.h b/context.h index 33294c15..318b689a 100644 --- a/context.h +++ b/context.h @@ -62,7 +62,7 @@ #endif #if defined(_ARM_) || defined(ARM) || defined(_M_ARM) || defined(_M_ARM64) -#define PTW32_PROGCTR(Context) ((Context).Pc) +#define __PTW32_PROGCTR(Context) ((Context).Pc) #endif #if !defined (__PTW32_PROGCTR) From c53ac5456b577ba03ec7745b6c32e39b92aa0f59 Mon Sep 17 00:00:00 2001 From: Joel Winarske Date: Mon, 8 Oct 2018 16:39:30 -0700 Subject: [PATCH 196/207] test case fixes --- tests/openmp1.c | 6 +++--- tests/tryentercs.c | 2 +- tests/tryentercs2.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/openmp1.c b/tests/openmp1.c index b5791e2e..30adb330 100755 --- a/tests/openmp1.c +++ b/tests/openmp1.c @@ -88,9 +88,6 @@ int main(int argc, char *argv[]) { pthread_t b_thr; int status; - printf("%s:%d - %s - a_thr:%p - b_thr:%p\n", - __FILE__,__LINE__,__FUNCTION__,a_thr.p,b_thr.p); - status = pthread_create(&a_thr, NULL, _thread, (void*) 1 ); if ( status != 0 ) { printf("Failed to create thread 1\n"); @@ -103,6 +100,9 @@ int main(int argc, char *argv[]) { return (-1); } + printf("%s:%d - %s - a_thr:%p - b_thr:%p\n", + __FILE__,__LINE__,__FUNCTION__,a_thr.p,b_thr.p); + status = pthread_join(a_thr, NULL); if ( status != 0 ) { printf("Failed to join thread 1\n"); diff --git a/tests/tryentercs.c b/tests/tryentercs.c index 51154e69..15d14204 100644 --- a/tests/tryentercs.c +++ b/tests/tryentercs.c @@ -66,7 +66,7 @@ main() */ _h_kernel32 = LoadLibrary(TEXT("KERNEL32.DLL")); _try_enter_critical_section = - (BOOL (PT_STDCALL *)(LPCRITICAL_SECTION)) + (BOOL (WINAPI *)(LPCRITICAL_SECTION)) GetProcAddress(_h_kernel32, (LPCSTR) "TryEnterCriticalSection"); diff --git a/tests/tryentercs2.c b/tests/tryentercs2.c index a747b0fb..50c540ae 100644 --- a/tests/tryentercs2.c +++ b/tests/tryentercs2.c @@ -65,7 +65,7 @@ main() */ _h_kernel32 = LoadLibrary(TEXT("KERNEL32.DLL")); _try_enter_critical_section = - (BOOL (PT_STDCALL *)(LPCRITICAL_SECTION)) + (BOOL (WINAPI *)(LPCRITICAL_SECTION)) GetProcAddress(_h_kernel32, (LPCSTR) "TryEnterCriticalSection"); From 113d3298398eb8648a939e912510d5750294848a Mon Sep 17 00:00:00 2001 From: Joel Winarske Date: Mon, 8 Oct 2018 16:40:39 -0700 Subject: [PATCH 197/207] cmake first pass --- .gitignore | 3 + CMakeLists.txt | 149 ++++++++++++++ appveyor.yml | 93 +++++++++ cmake/common.cmake | 150 ++++++++++++++ cmake/get_version.cmake | 21 ++ cmake/target_arch.cmake | 36 ++++ cmake/version.rc.in | 418 ++++++++++++++++++++++++++++++++++++++++ tests/CMakeLists.txt | 77 ++++++++ 8 files changed, 947 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 appveyor.yml create mode 100644 cmake/common.cmake create mode 100644 cmake/get_version.cmake create mode 100644 cmake/target_arch.cmake create mode 100644 cmake/version.rc.in create mode 100644 tests/CMakeLists.txt diff --git a/.gitignore b/.gitignore index 0fa70b68..7d7555e5 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,6 @@ tests/benchlib.o tests/SIZES.* tests/*.log /.project +build +PTHREADS-BUILT +.vscode \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..73af7de0 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,149 @@ +cmake_minimum_required(VERSION 3.11) + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "MinSizeRel" CACHE STRING "Choose the type of build, options are: Debug, Release, or MinSizeRel." FORCE) + message(STATUS "No build type specified, defaulting to MinSizeRel.") +endif() + +set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_SOURCE_DIR}/cmake") + +include (get_version) + +message(STATUS "Generator ......... ${CMAKE_GENERATOR}") +message(STATUS "Build Type ........ ${CMAKE_BUILD_TYPE}") +message(STATUS "Version ........... ${PTHREADS4W_VERSION}") + +project(pthreads4w VERSION ${PTHREADS4W_VERSION} LANGUAGES C) + +set(PTW32_VER ${PROJECT_VERSION_MAJOR}${EXTRAVERSION}) +set(CMAKE_DEBUG_POSTFIX d) + +# Uncomment this if config.h defines RETAIN_WSALASTERROR +#set(XLIBS wsock32.lib) + +include (common) + +include_directories(.) + +################################# +# Target Arch # +################################# +include (target_arch) + +get_target_arch(TARGET_ARCH) + +if(${TARGET_ARCH} STREQUAL "ARM") + add_definitions(-D__PTW32_ARCHARM) +elseif(${TARGET_ARCH} STREQUAL "x86_64") + add_definitions(-D__PTW32_ARCHAMD64) +elseif(${TARGET_ARCH} STREQUAL "x86") + add_definitions(-D__PTW32_ARCHX86) +elseif(${TARGET_ARCH} STREQUAL "x64") + add_definitions(-D__PTW32_ARCHX64) +else() + MESSAGE(ERROR "\"${TARGET_ARCH}\" not supported in version.rc") +endif() + +################################# +# Install Path # +################################# +if(DIST_ROOT) + set(CMAKE_INSTALL_PREFIX "${DIST_ROOT}") +else() + set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/PTHREADS-BUILT") +endif() +message(STATUS "Install Path ${CMAKE_INSTALL_PREFIX}") + + +set(DLLDEST ${CMAKE_INSTALL_PREFIX}/${TARGET_ARCH}/${CMAKE_BUILD_TYPE}/bin) +set(LIBDEST ${CMAKE_INSTALL_PREFIX}/${TARGET_ARCH}/${CMAKE_BUILD_TYPE}/lib) +set(HDRDEST ${CMAKE_INSTALL_PREFIX}/${TARGET_ARCH}/${CMAKE_BUILD_TYPE}/include) +set(TESTDEST ${CMAKE_INSTALL_PREFIX}/${TARGET_ARCH}/${CMAKE_BUILD_TYPE}/test) + +################################# +# Defs # +################################# +add_definitions(-D__PTW32_BUILD_INLINED) + +if(MSVC) + + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /errorReport:none /nologo ") + + # C++ Exceptions + # (Note: If you are using Microsoft VC++6.0, the library needs to be built + # with /EHa instead of /EHs or else cancellation won't work properly.) + if(MSVC_VERSION EQUAL 1200) + set(VCEFLAGS "/EHa /TP ") + else() + set(VCEFLAGS "/EHs /TP ") + endif() + + add_definitions(-DHAVE_CONFIG_H -D__PTW32_RC_MSC) + +endif() + +# Update filename with proper version info +configure_file(${CMAKE_SOURCE_DIR}/cmake/version.rc.in ${CMAKE_BINARY_DIR}/version.rc @ONLY) + +################################# +# Libraries # +################################# +set(targ_suffix "") +if(${CMAKE_BUILD_TYPE} STREQUAL "Debug") + set(targ_suffix ${CMAKE_DEBUG_POSTFIX}) +endif() + +macro(shared_lib type def) + set(targ pthread${type}${PTW32_VER}) + add_library(${targ} SHARED pthread.c ${CMAKE_BINARY_DIR}/version.rc) + message(STATUS ${targ}) + target_compile_definitions(${targ} PUBLIC "-D${def}") + if(${type} STREQUAL "VCE") + set_target_properties(${targ} PROPERTIES COMPILE_FLAGS ${VCEFLAGS}) + endif() + if(${CMAKE_GENERATOR} MATCHES "Visual Studio") + install(FILES ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${targ}${targ_suffix}.dll DESTINATION ${DLLDEST}) + install(FILES ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${targ}${targ_suffix}.lib DESTINATION ${LIBDEST}) + else() + install(FILES ${CMAKE_BINARY_DIR}/${targ}${targ_suffix}.dll DESTINATION ${DLLDEST}) + install(FILES ${CMAKE_BINARY_DIR}/${targ}${targ_suffix}.lib DESTINATION ${LIBDEST}) + endif() +endmacro() + +macro(static_lib type def) + set(targ libpthread${type}${PTW32_VER}) + add_library(${targ} STATIC pthread.c) + message(STATUS ${targ}) + target_compile_definitions(${targ} PUBLIC "-D${def}" -D__PTW32_STATIC_LIB) + if(${type} STREQUAL "VCE") + set_target_properties(${targ} PROPERTIES COMPILE_FLAGS ${VCEFLAGS}) + endif() + if(${CMAKE_GENERATOR} MATCHES "Visual Studio") + install(FILES ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${targ}${targ_suffix}.lib DESTINATION ${LIBDEST}) + else() + install(FILES ${CMAKE_BINARY_DIR}/${targ}${targ_suffix}.lib DESTINATION ${LIBDEST}) + endif() +endmacro() + +shared_lib ( VCE __PTW32_CLEANUP_CXX ) +shared_lib ( VSE __PTW32_CLEANUP_SEH ) +shared_lib ( VC __PTW32_CLEANUP_C ) + +static_lib ( VCE __PTW32_CLEANUP_CXX ) +static_lib ( VSE __PTW32_CLEANUP_SEH ) +static_lib ( VC __PTW32_CLEANUP_C ) + +################################# +# Install # +################################# +install(FILES _ptw32.h pthread.h sched.h semaphore.h DESTINATION ${HDRDEST}) + +################################# +# Test # +################################# +option(ENABLE_TESTS "Enable Test code build" FALSE) + +#TODO determine if cross compile... +if(ENABLE_TESTS) + add_subdirectory(tests) +endif() diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..1f5700f6 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,93 @@ +version: 3.0.1.{build} + +cache: + - C:\Tools\ninja\ninja.exe + +shallow_clone: true +clone_depth: 1 + +branches: + only: + - cmake + +configuration: +- MinSizeRel +- Release +- Debug + +environment: + DIST_DIR: '%APPVEYOR_BUILD_FOLDER%\dist' + CMAKE_DIST_DIR: C:/projects/pthreads4w/dist + NINJA_DIR: C:\Tools\ninja + matrix: + - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' + PLATFORM: x64 + VCVARSALL: '%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat' + ARCHITECTURE: x86_amd64 + ARCHIVE: VS2015_%CONFIGURATION%_%PLATFORM%_%APPVEYOR_BUILD_NUMBER% + GENERATOR: Ninja + - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' + PLATFORM: x86 + VCVARSALL: '%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat' + ARCHITECTURE: x86 + ARCHIVE: VS2015_%CONFIGURATION%_%PLATFORM%_%APPVEYOR_BUILD_NUMBER% + GENERATOR: Ninja + - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' + PLATFORM: x64 + VCVARSALL: '%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"' + ARCHITECTURE: + ARCHIVE: VS2017_%CONFIGURATION%_%PLATFORM%_%APPVEYOR_BUILD_NUMBER% + GENERATOR: Ninja + - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' + PLATFORM: x86 + VCVARSALL: '%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"' + ARCHITECTURE: + ARCHIVE: VS2017_%CONFIGURATION%_%PLATFORM%_%APPVEYOR_BUILD_NUMBER% + GENERATOR: Ninja + +init: + - echo BUILD_NUMBER=%APPVEYOR_BUILD_NUMBER% + +install: + # Ninja + - if not exist %NINJA_DIR%\ mkdir %NINJA_DIR% + - cd %NINJA_DIR% + - if not exist ninja.exe appveyor DownloadFile https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip + - if not exist ninja.exe 7z x ninja-win.zip + - set PATH=%NINJA_DIR%;%PATH% + # CMake + - cmake --version + +build: + parallel: true + +build_script: + - call "%VCVARSALL%" %ARCHITECTURE% + - cd %APPVEYOR_BUILD_FOLDER% + - mkdir build + - cd build + - cmake -G"%GENERATOR%" + -DCMAKE_BUILD_TYPE=%CONFIGURATION% + -DBUILD_NUMBER=%APPVEYOR_BUILD_NUMBER% + -DDIST_ROOT="%CMAKE_DIST_DIR%/%APPVEYOR_BUILD_WORKER_IMAGE%" + -DENABLE_TESTS=ON + .. + - cmake --build . --config %CONFIGURATION% --target install + +after_build: + - cd %DIST_DIR% + - 7z a -tzip %ARCHIVE%.zip "%APPVEYOR_BUILD_WORKER_IMAGE%" + - certutil -hashfile %ARCHIVE%.zip MD5 > %ARCHIVE%.md5 + +artifacts: + - path: dist\$(ARCHIVE).zip + - path: dist\$(ARCHIVE).md5 + +test: +before_test: + - set PATH=%APPVEYOR_BUILD_FOLDER%\build;%PATH% +test_script: + - if exist %APPVEYOR_BUILD_FOLDER%\build\tests\ cd %APPVEYOR_BUILD_FOLDER%\build\tests + - if exist %APPVEYOR_BUILD_FOLDER%\build\tests\ ctest -C %CONFIGURATION% +after_test: + # TODO process CTest output \ No newline at end of file diff --git a/cmake/common.cmake b/cmake/common.cmake new file mode 100644 index 00000000..70ead8a6 --- /dev/null +++ b/cmake/common.cmake @@ -0,0 +1,150 @@ + +set(PTHREAD_SRCS + ptw32_MCS_lock.c + ptw32_is_attr.c + ptw32_processInitialize.c + ptw32_processTerminate.c + ptw32_threadStart.c + ptw32_threadDestroy.c + ptw32_tkAssocCreate.c + ptw32_tkAssocDestroy.c + ptw32_callUserDestroyRoutines.c + ptw32_semwait.c + ptw32_timespec.c + ptw32_throw.c + ptw32_getprocessors.c + ptw32_calloc.c + ptw32_new.c + ptw32_reuse.c + ptw32_relmillisecs.c + ptw32_cond_check_need_init.c + ptw32_mutex_check_need_init.c + ptw32_rwlock_check_need_init.c + ptw32_rwlock_cancelwrwait.c + ptw32_spinlock_check_need_init.c + pthread_attr_init.c + pthread_attr_destroy.c + pthread_attr_getaffinity_np.c + pthread_attr_setaffinity_np.c + pthread_attr_getdetachstate.c + pthread_attr_setdetachstate.c + pthread_attr_getname_np.c + pthread_attr_setname_np.c + pthread_attr_getscope.c + pthread_attr_setscope.c + pthread_attr_getstackaddr.c + pthread_attr_setstackaddr.c + pthread_attr_getstacksize.c + pthread_attr_setstacksize.c + pthread_barrier_init.c + pthread_barrier_destroy.c + pthread_barrier_wait.c + pthread_barrierattr_init.c + pthread_barrierattr_destroy.c + pthread_barrierattr_setpshared.c + pthread_barrierattr_getpshared.c + pthread_setcancelstate.c + pthread_setcanceltype.c + pthread_testcancel.c + pthread_cancel.c + pthread_condattr_destroy.c + pthread_condattr_getpshared.c + pthread_condattr_init.c + pthread_condattr_setpshared.c + pthread_cond_destroy.c + pthread_cond_init.c + pthread_cond_signal.c + pthread_cond_wait.c + create.c + cleanup.c + dll.c + errno.c + pthread_exit.c + global.c + pthread_equal.c + pthread_getconcurrency.c + pthread_kill.c + pthread_once.c + pthread_self.c + pthread_setconcurrency.c + w32_CancelableWait.c + pthread_mutex_init.c + pthread_mutex_destroy.c + pthread_mutexattr_init.c + pthread_mutexattr_destroy.c + pthread_mutexattr_getpshared.c + pthread_mutexattr_setpshared.c + pthread_mutexattr_settype.c + pthread_mutexattr_gettype.c + pthread_mutexattr_setrobust.c + pthread_mutexattr_getrobust.c + pthread_mutex_lock.c + pthread_mutex_timedlock.c + pthread_mutex_unlock.c + pthread_mutex_trylock.c + pthread_mutex_consistent.c + pthread_mutexattr_setkind_np.c + pthread_mutexattr_getkind_np.c + pthread_getw32threadhandle_np.c + pthread_getunique_np.c + pthread_timedjoin_np.c + pthread_tryjoin_np.c + pthread_setaffinity.c + pthread_delay_np.c + pthread_num_processors_np.c + pthread_win32_attach_detach_np.c + pthread_timechange_handler_np.c + pthread_rwlock_init.c + pthread_rwlock_destroy.c + pthread_rwlockattr_init.c + pthread_rwlockattr_destroy.c + pthread_rwlockattr_getpshared.c + pthread_rwlockattr_setpshared.c + pthread_rwlock_rdlock.c + pthread_rwlock_timedrdlock.c + pthread_rwlock_wrlock.c + pthread_rwlock_timedwrlock.c + pthread_rwlock_unlock.c + pthread_rwlock_tryrdlock.c + pthread_rwlock_trywrlock.c + pthread_attr_setschedpolicy.c + pthread_attr_getschedpolicy.c + pthread_attr_setschedparam.c + pthread_attr_getschedparam.c + pthread_attr_setinheritsched.c + pthread_attr_getinheritsched.c + pthread_setschedparam.c + pthread_getschedparam.c + sched_get_priority_max.c + sched_get_priority_min.c + sched_setscheduler.c + sched_getscheduler.c + sched_yield.c + sched_setaffinity.c + sem_init.c + sem_destroy.c + sem_trywait.c + sem_timedwait.c + sem_wait.c + sem_post.c + sem_post_multiple.c + sem_getvalue.c + sem_open.c + sem_close.c + sem_unlink.c + pthread_spin_init.c + pthread_spin_destroy.c + pthread_spin_lock.c + pthread_spin_unlock.c + pthread_spin_trylock.c + pthread_detach.c + pthread_join.c + pthread_timedjoin_np.c + pthread_tryjoin_np.c + pthread_key_create.c + pthread_key_delete.c + pthread_getname_np.c + pthread_setname_np.c + pthread_setspecific.c + pthread_getspecific.c +) diff --git a/cmake/get_version.cmake b/cmake/get_version.cmake new file mode 100644 index 00000000..82e92c7e --- /dev/null +++ b/cmake/get_version.cmake @@ -0,0 +1,21 @@ + +file(READ ${CMAKE_SOURCE_DIR}/_ptw32.h _PTW32_H_CONTENTS) + +string(REGEX MATCH "#define __PTW32_VERSION_MAJOR ([a-zA-Z0-9_]+)" PTW32_VERSION_MAJOR "${_PTW32_H_CONTENTS}") +string(REPLACE "#define __PTW32_VERSION_MAJOR " "" PTW32_VERSION_MAJOR "${PTW32_VERSION_MAJOR}") + +string(REGEX MATCH "#define __PTW32_VERSION_MINOR ([a-zA-Z0-9_]+)" PTW32_VERSION_MINOR "${_PTW32_H_CONTENTS}") +string(REPLACE "#define __PTW32_VERSION_MINOR " "" PTW32_VERSION_MINOR "${PTW32_VERSION_MINOR}") + +string(REGEX MATCH "#define __PTW32_VERSION_MICRO ([a-zA-Z0-9_]+)" PTW32_VERSION_MICRO "${_PTW32_H_CONTENTS}") +string(REPLACE "#define __PTW32_VERSION_MICRO " "" PTW32_VERSION_MICRO "${PTW32_VERSION_MICRO}") + +string(REGEX MATCH "#define __PTW32_VERION_BUILD ([a-zA-Z0-9_]+)" PTW32_VERSION_BUILD "${_PTW32_H_CONTENTS}") +string(REPLACE "#define __PTW32_VERION_BUILD " "" PTW32_VERSION_BUILD "${PTW32_VERSION_BUILD}") + +if(BUILD_NUMBER) + set(PTW32_VERSION_BUILD ${BUILD_NUMBER}) +endif() + +set(PTHREADS4W_VERSION ${PTW32_VERSION_MAJOR}.${PTW32_VERSION_MINOR}.${PTW32_VERSION_MICRO}.${PTW32_VERSION_BUILD}) + diff --git a/cmake/target_arch.cmake b/cmake/target_arch.cmake new file mode 100644 index 00000000..05450445 --- /dev/null +++ b/cmake/target_arch.cmake @@ -0,0 +1,36 @@ + +set(TARGET_ARCH_DETECT_CODE " + + #if defined(_M_ARM) + #error cmake_arch ARM + #elif defined(_M_ARM64) + #error cmake_arch ARM64 + #elif defined(_M_AMD64) + #error cmake_arch x86_64 + #elif defined(_M_X64) + #error cmake_arch x64 + #elif defined(_M_IX86) + #error cmake_arch x86 + #else + #error cmake_arch unknown + #endif +") + +function(get_target_arch out) + + file(WRITE + "${CMAKE_BINARY_DIR}/target_arch_detect.c" + "${TARGET_ARCH_DETECT_CODE}") + + try_run( + run_result_unused compile_result_unused + "${CMAKE_BINARY_DIR}" "${CMAKE_BINARY_DIR}/target_arch_detect.c" + COMPILE_OUTPUT_VARIABLE TARGET_ARCH) + + # parse compiler output + string(REGEX MATCH "cmake_arch ([a-zA-Z0-9_]+)" TARGET_ARCH "${TARGET_ARCH}") + string(REPLACE "cmake_arch " "" TARGET_ARCH "${TARGET_ARCH}") + + set(${out} "${TARGET_ARCH}" PARENT_SCOPE) + +endfunction() diff --git a/cmake/version.rc.in b/cmake/version.rc.in new file mode 100644 index 00000000..0afaa8d1 --- /dev/null +++ b/cmake/version.rc.in @@ -0,0 +1,418 @@ +/* This is an implementation of the threads API of POSIX 1003.1-2001. + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2018, 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. + */ + +#include +#include "pthread.h" + +/* + * Note: the correct __PTW32_CLEANUP_* macro must be defined corresponding to + * the definition used for the object file builds. This is done in the + * relevent makefiles for the command line builds, but users should ensure + * that their resource compiler knows what it is too. + * If using the default (no __PTW32_CLEANUP_* defined), pthread.h will define it + * as __PTW32_CLEANUP_C. + */ + +#if defined (__PTW32_RC_MSC) +# if defined (__PTW32_ARCHx64) || defined (__PTW32_ARCHX64) || defined (__PTW32_ARCHAMD64) +# if defined(__PTW32_CLEANUP_C) +# define __PTW32_VERSIONINFO_NAME "pthreadVC@PTW32_VER@.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C x64\0" +# elif defined(__PTW32_CLEANUP_CXX) +# define __PTW32_VERSIONINFO_NAME "pthreadVCE@PTW32_VER@.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C++ x64\0" +# elif defined(__PTW32_CLEANUP_SEH) +# define __PTW32_VERSIONINFO_NAME "pthreadVSE@PTW32_VER@.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH x64\0" +# endif +# elif defined (__PTW32_ARCHx86) || defined (__PTW32_ARCHX86) +# if defined(__PTW32_CLEANUP_C) +# define __PTW32_VERSIONINFO_NAME "pthreadVC@PTW32_VER@.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C x86\0" +# elif defined(__PTW32_CLEANUP_CXX) +# define __PTW32_VERSIONINFO_NAME "pthreadVCE@PTW32_VER@.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C++ x86\0" +# elif defined(__PTW32_CLEANUP_SEH) +# define __PTW32_VERSIONINFO_NAME "pthreadVSE@PTW32_VER@.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH x86\0" +# endif +# elif defined (__PTW32_ARCHARM) || defined (__PTW32_ARCHARM) +# if defined(__PTW32_CLEANUP_C) +# define __PTW32_VERSIONINFO_NAME "pthreadVC@PTW32_VER@.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C ARM\0" +# elif defined(__PTW32_CLEANUP_CXX) +# define __PTW32_VERSIONINFO_NAME "pthreadVCE@PTW32_VER@.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C++ ARM\0" +# elif defined(__PTW32_CLEANUP_SEH) +# define __PTW32_VERSIONINFO_NAME "pthreadVSE@PTW32_VER@.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH ARM\0" +# endif +# endif +#elif defined(__GNUC__) +# if defined(_M_X64) +# define __PTW32_ARCH "x64 (mingw64)" +# else +# define __PTW32_ARCH "x86 (mingw32)" +# endif +# if defined(__PTW32_CLEANUP_C) +# define __PTW32_VERSIONINFO_NAME "pthreadGC@PTW32_VER@.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "GNU C " __PTW32_ARCH "\0" +# elif defined(__PTW32_CLEANUP_CXX) +# define __PTW32_VERSIONINFO_NAME "pthreadGCE@PTW32_VER@.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "GNU C++ " __PTW32_ARCH "\0" +# else +# error Resource compiler doesn't know which cleanup style you're using - see version.rc +# endif +#elif defined(__BORLANDC__) +# if defined(_M_X64) +# define __PTW32_ARCH "x64 (Borland)" +# else +# define __PTW32_ARCH "x86 (Borland)" +# endif +# if defined(__PTW32_CLEANUP_C) +# define __PTW32_VERSIONINFO_NAME "pthreadBC@PTW32_VER@.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "BORLAND C " __PTW32_ARCH "\0" +# elif defined(__PTW32_CLEANUP_CXX) +# define __PTW32_VERSIONINFO_NAME "pthreadBCE@PTW32_VER@.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "BORLAND C++ " __PTW32_ARCH "\0" +# else +# error Resource compiler doesn't know which cleanup style you're using - see version.rc +# endif +#elif defined(__WATCOMC__) +# if defined(_M_X64) +# define __PTW32_ARCH "x64 (Watcom)" +# else +# define __PTW32_ARCH "x86 (Watcom)" +# endif +# if defined(__PTW32_CLEANUP_C) +# define __PTW32_VERSIONINFO_NAME "pthreadWC@PTW32_VER@.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "WATCOM C " __PTW32_ARCH "\0" +# elif defined(__PTW32_CLEANUP_CXX) +# define __PTW32_VERSIONINFO_NAME "pthreadWCE@PTW32_VER@.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "WATCOM C++ " __PTW32_ARCH "\0" +# else +# error Resource compiler doesn't know which cleanup style you're using - see version.rc +# endif +#else +# error Resource compiler doesn't know which compiler you're using - see version.rc +#endif + + +VS_VERSION_INFO VERSIONINFO + FILEVERSION __PTW32_VERSION + PRODUCTVERSION __PTW32_VERSION + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS 0 + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + 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\0" + VALUE "LegalCopyright", "Copyright - Project contributors 1999-2018\0" + VALUE "Comments", "https://sourceforge.net/p/pthreads4w/wiki/Contributors/\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +/* +VERSIONINFO Resource + +The VERSIONINFO resource-definition statement creates a version-information +resource. The resource contains such information about the file as its +version number, its intended operating system, and its original filename. +The resource is intended to be used with the Version Information functions. + +versionID VERSIONINFO fixed-info { block-statement...} + +versionID + Version-information resource identifier. This value must be 1. + +fixed-info + Version information, such as the file version and the intended operating + system. This parameter consists of the following statements. + + + Statement Description + -------------------------------------------------------------------------- + FILEVERSION + version Binary version number for the file. The version + consists of two 32-bit integers, defined by four + 16-bit integers. For example, "FILEVERSION 3,10,0,61" + is translated into two doublewords: 0x0003000a and + 0x0000003d, in that order. Therefore, if version is + defined by the DWORD values dw1 and dw2, they need + to appear in the FILEVERSION statement as follows: + HIWORD(dw1), LOWORD(dw1), HIWORD(dw2), LOWORD(dw2). + PRODUCTVERSION + version Binary version number for the product with which the + file is distributed. The version parameter is two + 32-bit integers, defined by four 16-bit integers. + For more information about version, see the + FILEVERSION description. + FILEFLAGSMASK + fileflagsmask Bits in the FILEFLAGS statement are valid. If a bit + is set, the corresponding bit in FILEFLAGS is valid. + FILEFLAGSfileflags Attributes of the file. The fileflags parameter must + be the combination of all the file flags that are + valid at compile time. For 16-bit Windows, this + value is 0x3f. + FILEOSfileos Operating system for which this file was designed. + The fileos parameter can be one of the operating + system values given in the Remarks section. + FILETYPEfiletype General type of file. The filetype parameter can be + one of the file type values listed in the Remarks + section. + FILESUBTYPE + subtype Function of the file. The subtype parameter is zero + unless the type parameter in the FILETYPE statement + is VFT_DRV, VFT_FONT, or VFT_VXD. For a list of file + subtype values, see the Remarks section. + +block-statement + Specifies one or more version-information blocks. A block can contain + string information or variable information. For more information, see + StringFileInfo Block or VarFileInfo Block. + +Remarks + +To use the constants specified with the VERSIONINFO statement, you must +include the Winver.h or Windows.h header file in the resource-definition file. + +The following list describes the parameters used in the VERSIONINFO statement: + +fileflags + A combination of the following values. + + Value Description + + VS_FF_DEBUG File contains debugging information or is compiled + with debugging features enabled. + VS_FF_PATCHED File has been modified and is not identical to the + original shipping file of the same version number. + VS_FF_PRERELEASE File is a development version, not a commercially + released product. + VS_FF_PRIVATEBUILD File was not built using standard release procedures. + If this value is given, the StringFileInfo block must + contain a PrivateBuild string. + VS_FF_SPECIALBUILD File was built by the original company using standard + release procedures but is a variation of the standard + file of the same version number. If this value is + given, the StringFileInfo block must contain a + SpecialBuild string. + +fileos + One of the following values. + + Value Description + + VOS_UNKNOWN The operating system for which the file was designed + is unknown. + VOS_DOS File was designed for MS-DOS. + VOS_NT File was designed for Windows Server 2003 family, + Windows XP, Windows 2000, or Windows NT. + VOS__WINDOWS16 File was designed for 16-bit Windows. + VOS__WINDOWS32 File was designed for 32-bit Windows. + VOS_DOS_WINDOWS16 File was designed for 16-bit Windows running with + MS-DOS. + VOS_DOS_WINDOWS32 File was designed for 32-bit Windows running with + MS-DOS. + VOS_NT_WINDOWS32 File was designed for Windows Server 2003 family, + Windows XP, Windows 2000, or Windows NT. + + The values 0x00002L, 0x00003L, 0x20000L and 0x30000L are reserved. + +filetype + One of the following values. + + Value Description + + VFT_UNKNOWN File type is unknown. + VFT_APP File contains an application. + VFT_DLL File contains a dynamic-link library (DLL). + VFT_DRV File contains a device driver. If filetype is + VFT_DRV, subtype contains a more specific + description of the driver. + VFT_FONT File contains a font. If filetype is VFT_FONT, + subtype contains a more specific description of the + font. + VFT_VXD File contains a virtual device. + VFT_STATIC_LIB File contains a static-link library. + + All other values are reserved for use by Microsoft. + +subtype + Additional information about the file type. + + If filetype specifies VFT_DRV, this parameter can be one of the + following values. + + Value Description + + VFT2_UNKNOWN Driver type is unknown. + VFT2_DRV_COMM File contains a communications driver. + VFT2_DRV_PRINTER File contains a printer driver. + VFT2_DRV_KEYBOARD File contains a keyboard driver. + VFT2_DRV_LANGUAGE File contains a language driver. + VFT2_DRV_DISPLAY File contains a display driver. + VFT2_DRV_MOUSE File contains a mouse driver. + VFT2_DRV_NETWORK File contains a network driver. + VFT2_DRV_SYSTEM File contains a system driver. + VFT2_DRV_INSTALLABLE File contains an installable driver. + VFT2_DRV_SOUND File contains a sound driver. + VFT2_DRV_VERSIONED_PRINTER File contains a versioned printer driver. + + If filetype specifies VFT_FONT, this parameter can be one of the + following values. + + Value Description + + VFT2_UNKNOWN Font type is unknown. + VFT2_FONT_RASTER File contains a raster font. + VFT2_FONT_VECTOR File contains a vector font. + VFT2_FONT_TRUETYPE File contains a TrueType font. + + If filetype specifies VFT_VXD, this parameter must be the virtual-device + identifier included in the virtual-device control block. + + All subtype values not listed here are reserved for use by Microsoft. + +langID + One of the following language codes. + + Code Language Code Language + + 0x0401 Arabic 0x0415 Polish + 0x0402 Bulgarian 0x0416 Portuguese (Brazil) + 0x0403 Catalan 0x0417 Rhaeto-Romanic + 0x0404 Traditional Chinese 0x0418 Romanian + 0x0405 Czech 0x0419 Russian + 0x0406 Danish 0x041A Croato-Serbian (Latin) + 0x0407 German 0x041B Slovak + 0x0408 Greek 0x041C Albanian + 0x0409 U.S. English 0x041D Swedish + 0x040A Castilian Spanish 0x041E Thai + 0x040B Finnish 0x041F Turkish + 0x040C French 0x0420 Urdu + 0x040D Hebrew 0x0421 Bahasa + 0x040E Hungarian 0x0804 Simplified Chinese + 0x040F Icelandic 0x0807 Swiss German + 0x0410 Italian 0x0809 U.K. English + 0x0411 Japanese 0x080A Mexican Spanish + 0x0412 Korean 0x080C Belgian French + 0x0413 Dutch 0x0C0C Canadian French + 0x0414 Norwegian ā€“ Bokmal 0x100C Swiss French + 0x0810 Swiss Italian 0x0816 Portuguese (Portugal) + 0x0813 Belgian Dutch 0x081A Serbo-Croatian (Cyrillic) + 0x0814 Norwegian ā€“ Nynorsk + +charsetID + One of the following character-set identifiers. + + Identifier Character Set + + 0 7-bit ASCII + 932 Japan (Shift %Gā€“%@ JIS X-0208) + 949 Korea (Shift %Gā€“%@ KSC 5601) + 950 Taiwan (Big5) + 1200 Unicode + 1250 Latin-2 (Eastern European) + 1251 Cyrillic + 1252 Multilingual + 1253 Greek + 1254 Turkish + 1255 Hebrew + 1256 Arabic + +string-name + One of the following predefined names. + + Name Description + + Comments Additional information that should be displayed for + diagnostic purposes. + CompanyName Company that produced the file%Gā€”%@for example, + "Microsoft Corporation" or "Standard Microsystems + Corporation, Inc." This string is required. + FileDescription File description to be presented to users. This + string may be displayed in a list box when the user + is choosing files to install%Gā€”%@for example, + "Keyboard Driver for AT-Style Keyboards". This + string is required. + FileVersion Version number of the file%Gā€”%@for example, + "3.10" or "5.00.RC2". This string is required. + InternalName Internal name of the file, if one exists ā€” for + example, a module name if the file is a dynamic-link + library. If the file has no internal name, this + string should be the original filename, without + extension. This string is required. + LegalCopyright Copyright notices that apply to the file. This + should include the full text of all notices, legal + symbols, copyright dates, and so on ā€” for example, + "Copyright (C) Microsoft Corporation 1990ā€“1999". + This string is optional. + LegalTrademarks Trademarks and registered trademarks that apply to + the file. This should include the full text of all + notices, legal symbols, trademark numbers, and so on. + This string is optional. + OriginalFilename Original name of the file, not including a path. + This information enables an application to determine + whether a file has been renamed by a user. The + format of the name depends on the file system for + which the file was created. This string is required. + PrivateBuild Information about a private version of the file ā€” for + example, "Built by TESTER1 on \TESTBED". This string + should be present only if VS_FF_PRIVATEBUILD is + specified in the fileflags parameter of the root + block. + ProductName Name of the product with which the file is + distributed. This string is required. + ProductVersion Version of the product with which the file is + distributed ā€” for example, "3.10" or "5.00.RC2". + This string is required. + SpecialBuild Text that indicates how this version of the file + differs from the standard version ā€” for example, + "Private build for TESTER1 solving mouse problems + on M250 and M250E computers". This string should be + present only if VS_FF_SPECIALBUILD is specified in + the fileflags parameter of the root block. + */ diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 00000000..7d39d609 --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,77 @@ + +include (CTest) + +include_directories(..) + +set(XXLIBS ws2_32.lib) + +set(VCEFLAGS "${VCEFLAGS} -D__PtW32NoCatchWarn") + +macro(add_testcase test type def) + + set(lib_test test-${test}${type}${PTW32_VER}) + set(dll_test test-dll-${test}${type}${PTW32_VER}) + + set(lib_lib libpthread${type}${PTW32_VER}) + set(dll_lib pthread${type}${PTW32_VER}) + + set(extra "") + if(${test} MATCHES "benchtest") + set(c_dep "benchlib.c") + elseif(${test} MATCHES "openmp1") + if(MSVC) + set(extra "/openmp -D_OPENMP") + endif() + endif() + + add_executable(${lib_test} ${test}.c ${c_dep}) + target_link_libraries(${lib_test} ${lib_lib}${targ_suffix}.lib ${XXLIBS}) + target_compile_definitions(${lib_test} PUBLIC "/nologo -D_CONSOLE -D_MBCS -D${def} ${extra}") + add_dependencies(${lib_test} ${lib_lib}) + + add_executable(${dll_test} ${test}.c ${c_dep}) + target_link_libraries(${dll_test} ${dll_lib}${targ_suffix}.lib ${XXLIBS}) + target_compile_definitions(${dll_test} PUBLIC "/nologo -D_CONSOLE -D_MBCS -D${def} ${extra}") + add_dependencies(${dll_test} ${dll_lib}) + + if(${CMAKE_GENERATOR} MATCHES "Visual Studio") + install(FILES ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/tests/${lib_test}.exe DESTINATION ${TESTDEST}) + install(FILES ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/tests/${dll_test}.exe DESTINATION ${TESTDEST}) + else() + install(FILES ${CMAKE_BINARY_DIR}/tests/${lib_test}.exe DESTINATION ${TESTDEST}) + install(FILES ${CMAKE_BINARY_DIR}/tests/${dll_test}.exe DESTINATION ${TESTDEST}) + endif() + + if(${type} MATCHES "VCE") + set_target_properties(${lib_test} PROPERTIES COMPILE_FLAGS ${VCEFLAGS}) + set_target_properties(${dll_test} PROPERTIES COMPILE_FLAGS ${VCEFLAGS}) + endif() + + add_test(NAME ${lib_test} COMMAND ${lib_test}) + add_test(NAME ${dll_test} COMMAND ${dll_test}) + +endmacro() + + +file(GLOB TESTS *.c) + +foreach(t ${TESTS}) + + get_filename_component(test ${t} NAME) + string(REPLACE ".c" "" test "${test}") + + # exclusions + if(${test} STREQUAL "benchlib") + list(REMOVE_ITEM TESTS ${t}) + continue() + elseif(${test} STREQUAL "context2") # SEGFAULT + continue() + elseif(${test} STREQUAL "tryentercs2") # SEGFAULT + continue() + endif() + + add_testcase(${test} VCE __PTW32_CLEANUP_CXX ) + add_testcase(${test} VSE __PTW32_CLEANUP_SEH ) + add_testcase(${test} VC __PTW32_CLEANUP_C ) + +endforeach(t) From e9affe60eba20c20314fc2ea62c08a6dfccb014d Mon Sep 17 00:00:00 2001 From: Joel Winarske Date: Tue, 9 Oct 2018 21:12:47 -0700 Subject: [PATCH 198/207] cleanup, and add ARM/ARM64 --- CMakeLists.txt | 10 ++- appveyor.yml | 80 ++++++++++++++--------- cmake/common.cmake | 150 ------------------------------------------- cmake/version.rc.in | 11 ++++ tests/CMakeLists.txt | 11 ++-- 5 files changed, 74 insertions(+), 188 deletions(-) delete mode 100644 cmake/common.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 73af7de0..4e794ff8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,6 @@ set(CMAKE_DEBUG_POSTFIX d) # Uncomment this if config.h defines RETAIN_WSALASTERROR #set(XLIBS wsock32.lib) -include (common) include_directories(.) @@ -33,7 +32,9 @@ include (target_arch) get_target_arch(TARGET_ARCH) if(${TARGET_ARCH} STREQUAL "ARM") - add_definitions(-D__PTW32_ARCHARM) + add_definitions(-D__PTW32_ARCHARM -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1) +elseif(${TARGET_ARCH} STREQUAL "ARM64") + add_definitions(-D__PTW32_ARCHARM64 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1) elseif(${TARGET_ARCH} STREQUAL "x86_64") add_definitions(-D__PTW32_ARCHAMD64) elseif(${TARGET_ARCH} STREQUAL "x86") @@ -43,6 +44,11 @@ elseif(${TARGET_ARCH} STREQUAL "x64") else() MESSAGE(ERROR "\"${TARGET_ARCH}\" not supported in version.rc") endif() +message(STATUS "Target ............ ${TARGET_ARCH}") + +if(MSVC) + message(STATUS "MSVC Version ...... ${MSVC_VERSION}") +endif() ################################# # Install Path # diff --git a/appveyor.yml b/appveyor.yml index 1f5700f6..841d4cb5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,8 +1,5 @@ version: 3.0.1.{build} -cache: - - C:\Tools\ninja\ninja.exe - shallow_clone: true clone_depth: 1 @@ -18,43 +15,60 @@ configuration: environment: DIST_DIR: '%APPVEYOR_BUILD_FOLDER%\dist' CMAKE_DIST_DIR: C:/projects/pthreads4w/dist - NINJA_DIR: C:\Tools\ninja + matrix: + - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' - PLATFORM: x64 VCVARSALL: '%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat' - ARCHITECTURE: x86_amd64 - ARCHIVE: VS2015_%CONFIGURATION%_%PLATFORM%_%APPVEYOR_BUILD_NUMBER% - GENERATOR: Ninja + ARCHITECTURE: amd64_x86 + ARCHIVE: VS2015_%CONFIGURATION%_x86_%APPVEYOR_BUILD_NUMBER% + GENERATOR: 'NMake Makefiles' + TESTING: OFF + - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' - PLATFORM: x86 VCVARSALL: '%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat' - ARCHITECTURE: x86 - ARCHIVE: VS2015_%CONFIGURATION%_%PLATFORM%_%APPVEYOR_BUILD_NUMBER% - GENERATOR: Ninja + ARCHITECTURE: amd64 + ARCHIVE: VS2015_%CONFIGURATION%_x64_%APPVEYOR_BUILD_NUMBER% + GENERATOR: 'NMake Makefiles' + TESTING: OFF + + - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' + VCVARSALL: '%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat' + ARCHITECTURE: amd64_arm + ARCHIVE: VS2015_%CONFIGURATION%_ARM_%APPVEYOR_BUILD_NUMBER% + GENERATOR: 'NMake Makefiles' + TESTING: OFF + + - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' - PLATFORM: x64 - VCVARSALL: '%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"' - ARCHITECTURE: - ARCHIVE: VS2017_%CONFIGURATION%_%PLATFORM%_%APPVEYOR_BUILD_NUMBER% - GENERATOR: Ninja + VCVARSALL: '%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsamd64_arm.bat' + ARCHIVE: VS2017_%CONFIGURATION%_ARM_%APPVEYOR_BUILD_NUMBER% + GENERATOR: 'NMake Makefiles' + TESTING: OFF + + - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' + VCVARSALL: '%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat' + ARCHIVE: VS2017_%CONFIGURATION%_ARM64_%APPVEYOR_BUILD_NUMBER% + GENERATOR: 'NMake Makefiles' + TESTING: OFF + + - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' + VCVARSALL: '%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat' + ARCHIVE: VS2017_%CONFIGURATION%_x86_%APPVEYOR_BUILD_NUMBER% + GENERATOR: 'NMake Makefiles' + TESTING: ON + - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' - PLATFORM: x86 - VCVARSALL: '%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"' - ARCHITECTURE: - ARCHIVE: VS2017_%CONFIGURATION%_%PLATFORM%_%APPVEYOR_BUILD_NUMBER% - GENERATOR: Ninja + VCVARSALL: '%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat' + ARCHIVE: VS2017_%CONFIGURATION%_x64_%APPVEYOR_BUILD_NUMBER% + GENERATOR: 'NMake Makefiles' + TESTING: ON init: - echo BUILD_NUMBER=%APPVEYOR_BUILD_NUMBER% install: - # Ninja - - if not exist %NINJA_DIR%\ mkdir %NINJA_DIR% - - cd %NINJA_DIR% - - if not exist ninja.exe appveyor DownloadFile https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip - - if not exist ninja.exe 7z x ninja-win.zip - - set PATH=%NINJA_DIR%;%PATH% + # CMake - cmake --version @@ -62,7 +76,8 @@ build: parallel: true build_script: - - call "%VCVARSALL%" %ARCHITECTURE% + - if exist "%VCVARSALL%" ( call "%VCVARSALL%" %ARCHITECTURE% ) + - cd %APPVEYOR_BUILD_FOLDER% - mkdir build - cd build @@ -70,9 +85,10 @@ build_script: -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DBUILD_NUMBER=%APPVEYOR_BUILD_NUMBER% -DDIST_ROOT="%CMAKE_DIST_DIR%/%APPVEYOR_BUILD_WORKER_IMAGE%" - -DENABLE_TESTS=ON + -DENABLE_TESTS=%TESTING% .. - - cmake --build . --config %CONFIGURATION% --target install + + cmake --build . --config %CONFIGURATION% --target install after_build: - cd %DIST_DIR% @@ -88,6 +104,6 @@ before_test: - set PATH=%APPVEYOR_BUILD_FOLDER%\build;%PATH% test_script: - if exist %APPVEYOR_BUILD_FOLDER%\build\tests\ cd %APPVEYOR_BUILD_FOLDER%\build\tests - - if exist %APPVEYOR_BUILD_FOLDER%\build\tests\ ctest -C %CONFIGURATION% + - if exist %APPVEYOR_BUILD_FOLDER%\build\tests\ ctest -C %CONFIGURATION% -V after_test: # TODO process CTest output \ No newline at end of file diff --git a/cmake/common.cmake b/cmake/common.cmake deleted file mode 100644 index 70ead8a6..00000000 --- a/cmake/common.cmake +++ /dev/null @@ -1,150 +0,0 @@ - -set(PTHREAD_SRCS - ptw32_MCS_lock.c - ptw32_is_attr.c - ptw32_processInitialize.c - ptw32_processTerminate.c - ptw32_threadStart.c - ptw32_threadDestroy.c - ptw32_tkAssocCreate.c - ptw32_tkAssocDestroy.c - ptw32_callUserDestroyRoutines.c - ptw32_semwait.c - ptw32_timespec.c - ptw32_throw.c - ptw32_getprocessors.c - ptw32_calloc.c - ptw32_new.c - ptw32_reuse.c - ptw32_relmillisecs.c - ptw32_cond_check_need_init.c - ptw32_mutex_check_need_init.c - ptw32_rwlock_check_need_init.c - ptw32_rwlock_cancelwrwait.c - ptw32_spinlock_check_need_init.c - pthread_attr_init.c - pthread_attr_destroy.c - pthread_attr_getaffinity_np.c - pthread_attr_setaffinity_np.c - pthread_attr_getdetachstate.c - pthread_attr_setdetachstate.c - pthread_attr_getname_np.c - pthread_attr_setname_np.c - pthread_attr_getscope.c - pthread_attr_setscope.c - pthread_attr_getstackaddr.c - pthread_attr_setstackaddr.c - pthread_attr_getstacksize.c - pthread_attr_setstacksize.c - pthread_barrier_init.c - pthread_barrier_destroy.c - pthread_barrier_wait.c - pthread_barrierattr_init.c - pthread_barrierattr_destroy.c - pthread_barrierattr_setpshared.c - pthread_barrierattr_getpshared.c - pthread_setcancelstate.c - pthread_setcanceltype.c - pthread_testcancel.c - pthread_cancel.c - pthread_condattr_destroy.c - pthread_condattr_getpshared.c - pthread_condattr_init.c - pthread_condattr_setpshared.c - pthread_cond_destroy.c - pthread_cond_init.c - pthread_cond_signal.c - pthread_cond_wait.c - create.c - cleanup.c - dll.c - errno.c - pthread_exit.c - global.c - pthread_equal.c - pthread_getconcurrency.c - pthread_kill.c - pthread_once.c - pthread_self.c - pthread_setconcurrency.c - w32_CancelableWait.c - pthread_mutex_init.c - pthread_mutex_destroy.c - pthread_mutexattr_init.c - pthread_mutexattr_destroy.c - pthread_mutexattr_getpshared.c - pthread_mutexattr_setpshared.c - pthread_mutexattr_settype.c - pthread_mutexattr_gettype.c - pthread_mutexattr_setrobust.c - pthread_mutexattr_getrobust.c - pthread_mutex_lock.c - pthread_mutex_timedlock.c - pthread_mutex_unlock.c - pthread_mutex_trylock.c - pthread_mutex_consistent.c - pthread_mutexattr_setkind_np.c - pthread_mutexattr_getkind_np.c - pthread_getw32threadhandle_np.c - pthread_getunique_np.c - pthread_timedjoin_np.c - pthread_tryjoin_np.c - pthread_setaffinity.c - pthread_delay_np.c - pthread_num_processors_np.c - pthread_win32_attach_detach_np.c - pthread_timechange_handler_np.c - pthread_rwlock_init.c - pthread_rwlock_destroy.c - pthread_rwlockattr_init.c - pthread_rwlockattr_destroy.c - pthread_rwlockattr_getpshared.c - pthread_rwlockattr_setpshared.c - pthread_rwlock_rdlock.c - pthread_rwlock_timedrdlock.c - pthread_rwlock_wrlock.c - pthread_rwlock_timedwrlock.c - pthread_rwlock_unlock.c - pthread_rwlock_tryrdlock.c - pthread_rwlock_trywrlock.c - pthread_attr_setschedpolicy.c - pthread_attr_getschedpolicy.c - pthread_attr_setschedparam.c - pthread_attr_getschedparam.c - pthread_attr_setinheritsched.c - pthread_attr_getinheritsched.c - pthread_setschedparam.c - pthread_getschedparam.c - sched_get_priority_max.c - sched_get_priority_min.c - sched_setscheduler.c - sched_getscheduler.c - sched_yield.c - sched_setaffinity.c - sem_init.c - sem_destroy.c - sem_trywait.c - sem_timedwait.c - sem_wait.c - sem_post.c - sem_post_multiple.c - sem_getvalue.c - sem_open.c - sem_close.c - sem_unlink.c - pthread_spin_init.c - pthread_spin_destroy.c - pthread_spin_lock.c - pthread_spin_unlock.c - pthread_spin_trylock.c - pthread_detach.c - pthread_join.c - pthread_timedjoin_np.c - pthread_tryjoin_np.c - pthread_key_create.c - pthread_key_delete.c - pthread_getname_np.c - pthread_setname_np.c - pthread_setspecific.c - pthread_getspecific.c -) diff --git a/cmake/version.rc.in b/cmake/version.rc.in index 0afaa8d1..0e41fcb2 100644 --- a/cmake/version.rc.in +++ b/cmake/version.rc.in @@ -74,6 +74,17 @@ # define __PTW32_VERSIONINFO_NAME "pthreadVSE@PTW32_VER@.DLL\0" # define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH ARM\0" # endif +# elif defined (__PTW32_ARCHARM64) || defined (__PTW32_ARCHARM64) +# if defined(__PTW32_CLEANUP_C) +# define __PTW32_VERSIONINFO_NAME "pthreadVC@PTW32_VER@.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C ARM64\0" +# elif defined(__PTW32_CLEANUP_CXX) +# define __PTW32_VERSIONINFO_NAME "pthreadVCE@PTW32_VER@.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C++ ARM64\0" +# elif defined(__PTW32_CLEANUP_SEH) +# define __PTW32_VERSIONINFO_NAME "pthreadVSE@PTW32_VER@.DLL\0" +# define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH ARM64\0" +# endif # endif #elif defined(__GNUC__) # if defined(_M_X64) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7d39d609..fc8e7fde 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -15,22 +15,25 @@ macro(add_testcase test type def) set(lib_lib libpthread${type}${PTW32_VER}) set(dll_lib pthread${type}${PTW32_VER}) - set(extra "") + set(c_dep "") if(${test} MATCHES "benchtest") set(c_dep "benchlib.c") - elseif(${test} MATCHES "openmp1") + endif() + + set(extra "") + if(${test} MATCHES "openmp1") if(MSVC) set(extra "/openmp -D_OPENMP") endif() endif() add_executable(${lib_test} ${test}.c ${c_dep}) - target_link_libraries(${lib_test} ${lib_lib}${targ_suffix}.lib ${XXLIBS}) + target_link_libraries(${lib_test} ${lib_lib} ${XXLIBS}) target_compile_definitions(${lib_test} PUBLIC "/nologo -D_CONSOLE -D_MBCS -D${def} ${extra}") add_dependencies(${lib_test} ${lib_lib}) add_executable(${dll_test} ${test}.c ${c_dep}) - target_link_libraries(${dll_test} ${dll_lib}${targ_suffix}.lib ${XXLIBS}) + target_link_libraries(${dll_test} ${dll_lib} ${XXLIBS}) target_compile_definitions(${dll_test} PUBLIC "/nologo -D_CONSOLE -D_MBCS -D${def} ${extra}") add_dependencies(${dll_test} ${dll_lib}) From f7d44fe7fd803575e906696455738e696ef6053f Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sun, 3 Nov 2019 19:44:11 +1100 Subject: [PATCH 199/207] Remove third party test code. --- ChangeLog | 5 + NOTICE | 24 +- tests/ChangeLog | 8 + tests/common.mk | 2 +- tests/runorder.mk | 12 +- tests/rwlock7.c | 199 ---------------- tests/rwlock7_1.c | 222 ----------------- tests/rwlock8.c | 205 ---------------- tests/rwlock8_1.c | 228 ------------------ tests/threestage.c | 583 --------------------------------------------- 10 files changed, 20 insertions(+), 1468 deletions(-) delete mode 100644 tests/rwlock7.c delete mode 100644 tests/rwlock7_1.c delete mode 100644 tests/rwlock8.c delete mode 100644 tests/rwlock8_1.c delete mode 100644 tests/threestage.c diff --git a/ChangeLog b/ChangeLog index 6f0913ef..d37c9b8e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2019-11-03 Ross Johnson + + * NOTICE: Remove third party code acknowledgments because files have been + removed from distro. + 2018-08-19 Ross Johnson * context.h (__PTW32_PROCPTR): Added missing '__' prefix for v3. diff --git a/NOTICE b/NOTICE index d73542d7..3b99d7bd 100644 --- a/NOTICE +++ b/NOTICE @@ -4,26 +4,4 @@ Copyright 1999-2018, Pthreads4w contributors This product includes software developed through the colaborative effort of several individuals, each of whom is listed in the file -CONTRIBUTORS included with this software. - -The following files are not covered under the Copyrights -listed above: - - [1] tests/rwlock7.c - [1] tests/rwlock7_1.c - [1] tests/rwlock8.c - [1] tests/rwlock8_1.c - [2] tests/threestage.c - -[1] The file tests/rwlock7.c and those similarly named are derived from -code written by Dave Butenhof for his book 'Programming With POSIX(R) -Threads'. The original code was obtained by free download from his -website http://home.earthlink.net/~anneart/family/Threads/source.html - -[2] The file tests/threestage.c 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 compilation. -The only modification to the code has been to provide default -values when run without arguments. +CONTRIBUTORS included with this software. \ No newline at end of file diff --git a/tests/ChangeLog b/tests/ChangeLog index c4895d05..beda9e32 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,11 @@ +2018-08-19 Ross Johnson + + * threestage.c: Delete. + * rwlock7.c: Delete. + * rwlock8.c: Delete. + * rwlock7_1.c: Delete. + * rwlock8_1.c: Delete. + 2018-08-10 Ross Johnson * Makefile (clean): remove *.idb files. diff --git a/tests/common.mk b/tests/common.mk index f6cf9d17..731713d0 100644 --- a/tests/common.mk +++ b/tests/common.mk @@ -40,7 +40,7 @@ ALL_KNOWN_TESTS = \ 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 \ + rwlock5 rwlock6 \ self1 self2 \ semaphore1 semaphore2 semaphore3 \ semaphore4 semaphore4t semaphore5 \ diff --git a/tests/runorder.mk b/tests/runorder.mk index 215d7e79..63a428ba 100644 --- a/tests/runorder.mk +++ b/tests/runorder.mk @@ -113,7 +113,7 @@ once3.pass: once2.pass once4.pass: once3.pass priority1.pass: join1.pass priority2.pass: priority1.pass barrier3.pass -reinit1.pass: rwlock7.pass +reinit1.pass: rwlock6.pass reuse1.pass: create3.pass reuse2.pass: reuse1.pass robust1.pass: mutex8r.pass @@ -127,13 +127,11 @@ rwlock3.pass: rwlock2.pass join2.pass rwlock4.pass: rwlock3.pass rwlock5.pass: rwlock4.pass rwlock6.pass: rwlock5.pass -rwlock7.pass: rwlock6.pass -rwlock8.pass: rwlock7.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 +rwlock3_t.pass: rwlock3.pass rwlock2_t.pass +rwlock4_t.pass: rwlock4.pass rwlock3_t.pass +rwlock5_t.pass: rwlock5.pass rwlock4_t.pass +rwlock6_t.pass: rwlock6.pass rwlock5_t.pass rwlock6_t2.pass: rwlock6_t.pass self1.pass: sizes.pass self2.pass: self1.pass equal1.pass create1.pass diff --git a/tests/rwlock7.c b/tests/rwlock7.c deleted file mode 100644 index 9d58f6e9..00000000 --- a/tests/rwlock7.c +++ /dev/null @@ -1,199 +0,0 @@ -/* - * rwlock7.c - * - * Hammer on a bunch of rwlocks to test robustness and fairness. - * Printed stats should be roughly even for each thread. - */ - -#include "test.h" -#include - -#ifdef __GNUC__ -#include -#endif - -#define THREADS 5 -#define DATASIZE 7 -#define ITERATIONS 1000000 - -/* - * Keep statistics for each thread. - */ -typedef struct thread_tag { - int thread_num; - pthread_t thread_id; - int updates; - int reads; - int changed; - int seed; -} thread_t; - -/* - * Read-write lock and shared data - */ -typedef struct data_tag { - pthread_rwlock_t lock; - int data; - int updates; -} data_t; - -static thread_t threads[THREADS]; -static data_t data[DATASIZE]; - -/* - * Thread start routine that uses read-write locks - */ -void *thread_routine (void *arg) -{ - thread_t *self = (thread_t*)arg; - int iteration; - int element = 0; - int seed = self->seed; - int interval = 1 + rand_r (&seed) % 71; - - self->changed = 0; - - for (iteration = 0; iteration < ITERATIONS; iteration++) - { - if (iteration % (ITERATIONS / 10) == 0) - { - putchar('.'); - fflush(stdout); - } - /* - * Each "self->interval" iterations, perform an - * update operation (write lock instead of read - * lock). - */ - if ((iteration % interval) == 0) - { - assert(pthread_rwlock_wrlock (&data[element].lock) == 0); - data[element].data = self->thread_num; - data[element].updates++; - self->updates++; - interval = 1 + rand_r (&seed) % 71; - assert(pthread_rwlock_unlock (&data[element].lock) == 0); - } else { - /* - * Look at the current data element to see whether - * the current thread last updated it. Count the - * times, to report later. - */ - assert(pthread_rwlock_rdlock (&data[element].lock) == 0); - - self->reads++; - - if (data[element].data != self->thread_num) - { - self->changed++; - interval = 1 + self->changed % 71; - } - - assert(pthread_rwlock_unlock (&data[element].lock) == 0); - } - - element = (element + 1) % DATASIZE; - - } - - return NULL; -} - -int -main (int argc, char *argv[]) -{ - int count; - int data_count; - int thread_updates = 0; - int data_updates = 0; - int seed = 1; - - __PTW32_STRUCT_TIMEB currSysTime1; - __PTW32_STRUCT_TIMEB currSysTime2; - - /* - * Initialize the shared data. - */ - for (data_count = 0; data_count < DATASIZE; data_count++) - { - data[data_count].data = 0; - data[data_count].updates = 0; - - assert(pthread_rwlock_init (&data[data_count].lock, NULL) == 0); - } - - __PTW32_FTIME(&currSysTime1); - - /* - * Create THREADS threads to access shared data. - */ - for (count = 0; count < THREADS; count++) - { - threads[count].thread_num = count; - threads[count].updates = 0; - threads[count].reads = 0; - threads[count].seed = 1 + rand_r (&seed) % 71; - - assert(pthread_create (&threads[count].thread_id, - NULL, thread_routine, (void*)(size_t)&threads[count]) == 0); - } - - /* - * Wait for all threads to complete, and collect - * statistics. - */ - for (count = 0; count < THREADS; count++) - { - assert(pthread_join (threads[count].thread_id, NULL) == 0); - } - - putchar('\n'); - fflush(stdout); - - for (count = 0; count < THREADS; count++) - { - if (threads[count].changed > 0) - { - printf ("Thread %d found changed elements %d times\n", - count, threads[count].changed); - } - } - - putchar('\n'); - fflush(stdout); - - for (count = 0; count < THREADS; count++) - { - thread_updates += threads[count].updates; - printf ("%02d: seed %d, updates %d, reads %d\n", - count, threads[count].seed, - threads[count].updates, threads[count].reads); - } - - putchar('\n'); - fflush(stdout); - - /* - * Collect statistics for the data. - */ - for (data_count = 0; data_count < DATASIZE; data_count++) - { - data_updates += data[data_count].updates; - printf ("data %02d: value %d, %d updates\n", - data_count, data[data_count].data, data[data_count].updates); - assert(pthread_rwlock_destroy (&data[data_count].lock) == 0); - } - - printf ("%d thread updates, %d data updates\n", - thread_updates, data_updates); - - __PTW32_FTIME(&currSysTime2); - - printf( "\nstart: %ld/%d, stop: %ld/%d, duration:%ld\n", - (long)currSysTime1.time,currSysTime1.millitm, - (long)currSysTime2.time,currSysTime2.millitm, - ((long)((currSysTime2.time*1000+currSysTime2.millitm) - - (currSysTime1.time*1000+currSysTime1.millitm)))); - - return 0; -} diff --git a/tests/rwlock7_1.c b/tests/rwlock7_1.c deleted file mode 100644 index 4e2ea491..00000000 --- a/tests/rwlock7_1.c +++ /dev/null @@ -1,222 +0,0 @@ -/* - * rwlock7_1.c - * - * Hammer on a bunch of rwlocks to test robustness and fairness. - * Printed stats should be roughly even for each thread. - * - * Use CPU affinity to compare against non-affinity rwlock7.c - */ - -#include "test.h" -#include - -#ifdef __GNUC__ -#include -#endif - -#define THREADS 5 -#define DATASIZE 7 -#define ITERATIONS 1000000 - -/* - * Keep statistics for each thread. - */ -typedef struct thread_tag { - int thread_num; - pthread_t thread_id; - cpu_set_t threadCpus; - int updates; - int reads; - int changed; - int seed; -} thread_t; - -/* - * Read-write lock and shared data - */ -typedef struct data_tag { - pthread_rwlock_t lock; - int data; - int updates; -} data_t; - -static thread_t threads[THREADS]; -static data_t data[DATASIZE]; -static cpu_set_t processCpus; -static int cpu_count; - -/* - * Thread start routine that uses read-write locks - */ -void *thread_routine (void *arg) -{ - thread_t *self = (thread_t*)arg; - int iteration; - int element = 0; - int seed = self->seed; - int interval = 1 + rand_r (&seed) % 71; - - /* - * Set each thread to a fixed (different if possible) cpu. - */ - CPU_ZERO(&self->threadCpus); - CPU_SET(self->thread_num%cpu_count, &self->threadCpus); - assert(pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &self->threadCpus) == 0); - - self->changed = 0; - - for (iteration = 0; iteration < ITERATIONS; iteration++) - { - if (iteration % (ITERATIONS / 10) == 0) - { - putchar('.'); - fflush(stdout); - } - /* - * Each "self->interval" iterations, perform an - * update operation (write lock instead of read - * lock). - */ - if ((iteration % interval) == 0) - { - assert(pthread_rwlock_wrlock (&data[element].lock) == 0); - data[element].data = self->thread_num; - data[element].updates++; - self->updates++; - interval = 1 + rand_r (&seed) % 71; - assert(pthread_rwlock_unlock (&data[element].lock) == 0); - } else { - /* - * Look at the current data element to see whether - * the current thread last updated it. Count the - * times, to report later. - */ - assert(pthread_rwlock_rdlock (&data[element].lock) == 0); - - self->reads++; - - if (data[element].data != self->thread_num) - { - self->changed++; - interval = 1 + self->changed % 71; - } - - assert(pthread_rwlock_unlock (&data[element].lock) == 0); - } - - element = (element + 1) % DATASIZE; - - } - - return NULL; -} - -int -main (int argc, char *argv[]) -{ - int count; - int data_count; - int thread_updates = 0; - int data_updates = 0; - int seed = 1; - pthread_t self = pthread_self(); - __PTW32_STRUCT_TIMEB currSysTime1; - __PTW32_STRUCT_TIMEB currSysTime2; - - 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); - assert((cpu_count = CPU_COUNT(&processCpus)) > 0); - printf("CPUs: %d\n", cpu_count); - - /* - * Initialize the shared data. - */ - for (data_count = 0; data_count < DATASIZE; data_count++) - { - data[data_count].data = 0; - data[data_count].updates = 0; - - assert(pthread_rwlock_init (&data[data_count].lock, NULL) == 0); - } - - __PTW32_FTIME(&currSysTime1); - - /* - * Create THREADS threads to access shared data. - */ - for (count = 0; count < THREADS; count++) - { - threads[count].thread_num = count; - threads[count].updates = 0; - threads[count].reads = 0; - threads[count].seed = 1 + rand_r (&seed) % 71; - - assert(pthread_create (&threads[count].thread_id, - NULL, thread_routine, (void*)(size_t)&threads[count]) == 0); - } - - /* - * Wait for all threads to complete, and collect - * statistics. - */ - for (count = 0; count < THREADS; count++) - { - assert(pthread_join (threads[count].thread_id, NULL) == 0); - } - - putchar('\n'); - fflush(stdout); - - for (count = 0; count < THREADS; count++) - { - if (threads[count].changed > 0) - { - printf ("Thread %d found changed elements %d times\n", - count, threads[count].changed); - } - } - - putchar('\n'); - fflush(stdout); - - for (count = 0; count < THREADS; count++) - { - thread_updates += threads[count].updates; - printf ("%02d: seed %d, updates %d, reads %d, cpu %d\n", - count, threads[count].seed, - threads[count].updates, threads[count].reads, - threads[count].thread_num%cpu_count); - } - - putchar('\n'); - fflush(stdout); - - /* - * Collect statistics for the data. - */ - for (data_count = 0; data_count < DATASIZE; data_count++) - { - data_updates += data[data_count].updates; - printf ("data %02d: value %d, %d updates\n", - data_count, data[data_count].data, data[data_count].updates); - assert(pthread_rwlock_destroy (&data[data_count].lock) == 0); - } - - printf ("%d thread updates, %d data updates\n", - thread_updates, data_updates); - - __PTW32_FTIME(&currSysTime2); - - printf( "\nstart: %ld/%d, stop: %ld/%d, duration:%ld\n", - (long)currSysTime1.time,currSysTime1.millitm, - (long)currSysTime2.time,currSysTime2.millitm, - ((long)((currSysTime2.time*1000+currSysTime2.millitm) - - (currSysTime1.time*1000+currSysTime1.millitm)))); - - return 0; -} diff --git a/tests/rwlock8.c b/tests/rwlock8.c deleted file mode 100644 index 301e1ec6..00000000 --- a/tests/rwlock8.c +++ /dev/null @@ -1,205 +0,0 @@ -/* - * rwlock8.c - * - * Hammer on a bunch of rwlocks to test robustness and fairness. - * Printed stats should be roughly even for each thread. - * - * Yield during each access to exercise lock contention code paths - * more than rwlock7.c does (particularly on uni-processor systems). - */ - -#include "test.h" -#include - -#ifdef __GNUC__ -#include -#endif - -#define THREADS 5 -#define DATASIZE 7 -#define ITERATIONS 100000 - -/* - * Keep statistics for each thread. - */ -typedef struct thread_tag { - int thread_num; - pthread_t thread_id; - int updates; - int reads; - int changed; - int seed; -} thread_t; - -/* - * Read-write lock and shared data - */ -typedef struct data_tag { - pthread_rwlock_t lock; - int data; - int updates; -} data_t; - -static thread_t threads[THREADS]; -static data_t data[DATASIZE]; - -/* - * Thread start routine that uses read-write locks - */ -void *thread_routine (void *arg) -{ - thread_t *self = (thread_t*)arg; - int iteration; - int element = 0; - int seed = self->seed; - int interval = 1 + rand_r (&seed) % 71; - - self->changed = 0; - - for (iteration = 0; iteration < ITERATIONS; iteration++) - { - if (iteration % (ITERATIONS / 10) == 0) - { - putchar('.'); - fflush(stdout); - } - /* - * Each "self->interval" iterations, perform an - * update operation (write lock instead of read - * lock). - */ - if ((iteration % interval) == 0) - { - assert(pthread_rwlock_wrlock (&data[element].lock) == 0); - data[element].data = self->thread_num; - data[element].updates++; - self->updates++; - interval = 1 + rand_r (&seed) % 71; - sched_yield(); - assert(pthread_rwlock_unlock (&data[element].lock) == 0); - } else { - /* - * Look at the current data element to see whether - * the current thread last updated it. Count the - * times, to report later. - */ - assert(pthread_rwlock_rdlock (&data[element].lock) == 0); - - self->reads++; - - if (data[element].data != self->thread_num) - { - self->changed++; - interval = 1 + self->changed % 71; - } - - sched_yield(); - - assert(pthread_rwlock_unlock (&data[element].lock) == 0); - } - - element = (element + 1) % DATASIZE; - - } - - return NULL; -} - -int -main (int argc, char *argv[]) -{ - int count; - int data_count; - int thread_updates = 0; - int data_updates = 0; - int seed = 1; - - __PTW32_STRUCT_TIMEB currSysTime1; - __PTW32_STRUCT_TIMEB currSysTime2; - - /* - * Initialize the shared data. - */ - for (data_count = 0; data_count < DATASIZE; data_count++) - { - data[data_count].data = 0; - data[data_count].updates = 0; - - assert(pthread_rwlock_init (&data[data_count].lock, NULL) == 0); - } - - __PTW32_FTIME(&currSysTime1); - - /* - * Create THREADS threads to access shared data. - */ - for (count = 0; count < THREADS; count++) - { - threads[count].thread_num = count; - threads[count].updates = 0; - threads[count].reads = 0; - threads[count].seed = 1 + rand_r (&seed) % 71; - - assert(pthread_create (&threads[count].thread_id, - NULL, thread_routine, (void*)(size_t)&threads[count]) == 0); - } - - /* - * Wait for all threads to complete, and collect - * statistics. - */ - for (count = 0; count < THREADS; count++) - { - assert(pthread_join (threads[count].thread_id, NULL) == 0); - } - - putchar('\n'); - fflush(stdout); - - for (count = 0; count < THREADS; count++) - { - if (threads[count].changed > 0) - { - printf ("Thread %d found changed elements %d times\n", - count, threads[count].changed); - } - } - - putchar('\n'); - fflush(stdout); - - for (count = 0; count < THREADS; count++) - { - thread_updates += threads[count].updates; - printf ("%02d: seed %d, updates %d, reads %d\n", - count, threads[count].seed, - threads[count].updates, threads[count].reads); - } - - putchar('\n'); - fflush(stdout); - - /* - * Collect statistics for the data. - */ - for (data_count = 0; data_count < DATASIZE; data_count++) - { - data_updates += data[data_count].updates; - printf ("data %02d: value %d, %d updates\n", - data_count, data[data_count].data, data[data_count].updates); - assert(pthread_rwlock_destroy (&data[data_count].lock) == 0); - } - - printf ("%d thread updates, %d data updates\n", - thread_updates, data_updates); - - __PTW32_FTIME(&currSysTime2); - - printf( "\nstart: %ld/%d, stop: %ld/%d, duration:%ld\n", - (long)currSysTime1.time,currSysTime1.millitm, - (long)currSysTime2.time,currSysTime2.millitm, - ((long)((currSysTime2.time*1000+currSysTime2.millitm) - - (currSysTime1.time*1000+currSysTime1.millitm)))); - - return 0; -} diff --git a/tests/rwlock8_1.c b/tests/rwlock8_1.c deleted file mode 100644 index a85f37fb..00000000 --- a/tests/rwlock8_1.c +++ /dev/null @@ -1,228 +0,0 @@ -/* - * rwlock8.c - * - * Hammer on a bunch of rwlocks to test robustness and fairness. - * Printed stats should be roughly even for each thread. - * - * Yield during each access to exercise lock contention code paths - * more than rwlock7.c does (particularly on uni-processor systems). - * - * Use CPU affinity to compare against non-affinity rwlock8.c - */ - -#include "test.h" -#include - -#ifdef __GNUC__ -#include -#endif - -#define THREADS 5 -#define DATASIZE 7 -#define ITERATIONS 100000 - -/* - * Keep statistics for each thread. - */ -typedef struct thread_tag { - int thread_num; - pthread_t thread_id; - cpu_set_t threadCpus; - int updates; - int reads; - int changed; - int seed; -} thread_t; - -/* - * Read-write lock and shared data - */ -typedef struct data_tag { - pthread_rwlock_t lock; - int data; - int updates; -} data_t; - -static thread_t threads[THREADS]; -static data_t data[DATASIZE]; -static cpu_set_t processCpus; -static int cpu_count; - -/* - * Thread start routine that uses read-write locks - */ -void *thread_routine (void *arg) -{ - thread_t *self = (thread_t*)arg; - int iteration; - int element = 0; - int seed = self->seed; - int interval = 1 + rand_r (&seed) % 71; - - /* - * Set each thread to a fixed (different if possible) cpu. - */ - CPU_ZERO(&self->threadCpus); - CPU_SET(self->thread_num%cpu_count, &self->threadCpus); - assert(pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &self->threadCpus) == 0); - - self->changed = 0; - - for (iteration = 0; iteration < ITERATIONS; iteration++) - { - if (iteration % (ITERATIONS / 10) == 0) - { - putchar('.'); - fflush(stdout); - } - /* - * Each "self->interval" iterations, perform an - * update operation (write lock instead of read - * lock). - */ - if ((iteration % interval) == 0) - { - assert(pthread_rwlock_wrlock (&data[element].lock) == 0); - data[element].data = self->thread_num; - data[element].updates++; - self->updates++; - interval = 1 + rand_r (&seed) % 71; - sched_yield(); - assert(pthread_rwlock_unlock (&data[element].lock) == 0); - } else { - /* - * Look at the current data element to see whether - * the current thread last updated it. Count the - * times, to report later. - */ - assert(pthread_rwlock_rdlock (&data[element].lock) == 0); - - self->reads++; - - if (data[element].data != self->thread_num) - { - self->changed++; - interval = 1 + self->changed % 71; - } - - sched_yield(); - - assert(pthread_rwlock_unlock (&data[element].lock) == 0); - } - - element = (element + 1) % DATASIZE; - - } - - return NULL; -} - -int -main (int argc, char *argv[]) -{ - int count; - int data_count; - int thread_updates = 0; - int data_updates = 0; - int seed = 1; - pthread_t self = pthread_self(); - __PTW32_STRUCT_TIMEB currSysTime1; - __PTW32_STRUCT_TIMEB currSysTime2; - - 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); - assert((cpu_count = CPU_COUNT(&processCpus)) > 0); - printf("CPUs: %d\n", cpu_count); - - /* - * Initialize the shared data. - */ - for (data_count = 0; data_count < DATASIZE; data_count++) - { - data[data_count].data = 0; - data[data_count].updates = 0; - - assert(pthread_rwlock_init (&data[data_count].lock, NULL) == 0); - } - - __PTW32_FTIME(&currSysTime1); - - /* - * Create THREADS threads to access shared data. - */ - for (count = 0; count < THREADS; count++) - { - threads[count].thread_num = count; - threads[count].updates = 0; - threads[count].reads = 0; - threads[count].seed = 1 + rand_r (&seed) % 71; - - assert(pthread_create (&threads[count].thread_id, - NULL, thread_routine, (void*)(size_t)&threads[count]) == 0); - } - - /* - * Wait for all threads to complete, and collect - * statistics. - */ - for (count = 0; count < THREADS; count++) - { - assert(pthread_join (threads[count].thread_id, NULL) == 0); - } - - putchar('\n'); - fflush(stdout); - - for (count = 0; count < THREADS; count++) - { - if (threads[count].changed > 0) - { - printf ("Thread %d found changed elements %d times\n", - count, threads[count].changed); - } - } - - putchar('\n'); - fflush(stdout); - - for (count = 0; count < THREADS; count++) - { - thread_updates += threads[count].updates; - printf ("%02d: seed %d, updates %d, reads %d, cpu %d\n", - count, threads[count].seed, - threads[count].updates, threads[count].reads, - threads[count].thread_num%cpu_count); - } - - putchar('\n'); - fflush(stdout); - - /* - * Collect statistics for the data. - */ - for (data_count = 0; data_count < DATASIZE; data_count++) - { - data_updates += data[data_count].updates; - printf ("data %02d: value %d, %d updates\n", - data_count, data[data_count].data, data[data_count].updates); - assert(pthread_rwlock_destroy (&data[data_count].lock) == 0); - } - - printf ("%d thread updates, %d data updates\n", - thread_updates, data_updates); - - __PTW32_FTIME(&currSysTime2); - - printf( "\nstart: %ld/%d, stop: %ld/%d, duration:%ld\n", - (long)currSysTime1.time,currSysTime1.millitm, - (long)currSysTime2.time,currSysTime2.millitm, - ((long)((currSysTime2.time*1000+currSysTime2.millitm) - - (currSysTime1.time*1000+currSysTime1.millitm)))); - - return 0; -} diff --git a/tests/threestage.c b/tests/threestage.c deleted file mode 100644 index cd607f0d..00000000 --- a/tests/threestage.c +++ /dev/null @@ -1,583 +0,0 @@ -/* - 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; - -} From 67186579ee3cf81e54d149dce5f5a612f957d2fe Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Sun, 3 Nov 2019 19:46:55 +1100 Subject: [PATCH 200/207] Bump version --- _ptw32.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_ptw32.h b/_ptw32.h index e638027e..5821f94d 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -43,10 +43,10 @@ */ #define __PTW32_VERSION_MAJOR 3 #define __PTW32_VERSION_MINOR 0 -#define __PTW32_VERSION_MICRO 1 +#define __PTW32_VERSION_MICRO 2 #define __PTW32_VERION_BUILD 0 -#define __PTW32_VERSION 3,0,0,1 -#define __PTW32_VERSION_STRING "3, 0, 1, 0\0" +#define __PTW32_VERSION 3,0,2,0 +#define __PTW32_VERSION_STRING "3, 0, 2, 0\0" #if defined(__GNUC__) # pragma GCC system_header From 2b0a86c48a8e655838d77babb3bdc03c44e8b8fd Mon Sep 17 00:00:00 2001 From: raspopov Date: Tue, 27 Oct 2020 19:13:56 +0300 Subject: [PATCH 201/207] Fixed wrong #pragma warning use. Signed-off-by: raspopov --- pthread.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pthread.h b/pthread.h index f35a39b5..a270e6c7 100644 --- a/pthread.h +++ b/pthread.h @@ -559,13 +559,14 @@ typedef struct __ptw32_cleanup_t __ptw32_cleanup_t; #if defined(_MSC_VER) /* Disable MSVC 'anachronism used' warning */ +#pragma warning( push ) #pragma warning( disable : 4229 ) #endif typedef void (* __PTW32_CDECL __ptw32_cleanup_callback_t)(void *); #if defined(_MSC_VER) -#pragma warning( default : 4229 ) +#pragma warning( pop ) #endif struct __ptw32_cleanup_t From abb9dd9c01b18d06d098c20728b66e88f05e36a9 Mon Sep 17 00:00:00 2001 From: Ger Hobbelt Date: Wed, 14 Apr 2021 00:35:42 +0200 Subject: [PATCH 202/207] moved files pre-merge --- NEWS => README.md | 0 ANNOUNCE => docs/ANNOUNCE.md | 0 BUGS => docs/BUGS.md | 0 CONTRIBUTORS => docs/CONTRIBUTORS.md | 0 ChangeLog => docs/ChangeLog.md | 0 FAQ => docs/FAQ.md | 0 LICENSE => docs/LICENSE.md | 0 MAINTAINERS => docs/MAINTAINERS.md | 0 docs/NEWS.md | 1588 +++++++++++++++++ NOTICE => docs/NOTICE.md | 0 PROGRESS => docs/PROGRESS.md | 0 README.Borland => docs/README.Borland.md | 0 README.CV => docs/README.CV.md | 0 .../README.NONPORTABLE.md | 0 README.Watcom => docs/README.Watcom.md | 0 README.WinCE => docs/README.WinCE.md | 0 README => docs/README.md | 0 TODO => docs/TODO.md | 0 WinCE-PORT => docs/WinCE-PORT.md | 0 19 files changed, 1588 insertions(+) rename NEWS => README.md (100%) rename ANNOUNCE => docs/ANNOUNCE.md (100%) rename BUGS => docs/BUGS.md (100%) rename CONTRIBUTORS => docs/CONTRIBUTORS.md (100%) rename ChangeLog => docs/ChangeLog.md (100%) rename FAQ => docs/FAQ.md (100%) rename LICENSE => docs/LICENSE.md (100%) rename MAINTAINERS => docs/MAINTAINERS.md (100%) create mode 100644 docs/NEWS.md rename NOTICE => docs/NOTICE.md (100%) rename PROGRESS => docs/PROGRESS.md (100%) rename README.Borland => docs/README.Borland.md (100%) rename README.CV => docs/README.CV.md (100%) rename README.NONPORTABLE => docs/README.NONPORTABLE.md (100%) rename README.Watcom => docs/README.Watcom.md (100%) rename README.WinCE => docs/README.WinCE.md (100%) rename README => docs/README.md (100%) rename TODO => docs/TODO.md (100%) rename WinCE-PORT => docs/WinCE-PORT.md (100%) diff --git a/NEWS b/README.md similarity index 100% rename from NEWS rename to README.md diff --git a/ANNOUNCE b/docs/ANNOUNCE.md similarity index 100% rename from ANNOUNCE rename to docs/ANNOUNCE.md diff --git a/BUGS b/docs/BUGS.md similarity index 100% rename from BUGS rename to docs/BUGS.md diff --git a/CONTRIBUTORS b/docs/CONTRIBUTORS.md similarity index 100% rename from CONTRIBUTORS rename to docs/CONTRIBUTORS.md diff --git a/ChangeLog b/docs/ChangeLog.md similarity index 100% rename from ChangeLog rename to docs/ChangeLog.md diff --git a/FAQ b/docs/FAQ.md similarity index 100% rename from FAQ rename to docs/FAQ.md diff --git a/LICENSE b/docs/LICENSE.md similarity index 100% rename from LICENSE rename to docs/LICENSE.md diff --git a/MAINTAINERS b/docs/MAINTAINERS.md similarity index 100% rename from MAINTAINERS rename to docs/MAINTAINERS.md diff --git a/docs/NEWS.md b/docs/NEWS.md new file mode 100644 index 00000000..b6c57c8e --- /dev/null +++ b/docs/NEWS.md @@ -0,0 +1,1588 @@ +RELEASE 3.0.0 +-------------- +(2018-08-08) + +General +------- +Note that this is a new major release. The major version increment +introduces two ABI changes along with other naming changes that will +require recompilation of linking applications and possibly some textual +changes to compile-time macro references in configuration and source +files, e.g. PTW32_* changes to __PTW32_*, ptw32_* to __ptw32_*, etc. + +License Change +-------------- +With the agreement of all substantial relevant contributors Pthreads4w +version 3, with the exception of four files, is being released under the +terms of the Apache License v2.0. The APLv2 is compatible with the GPLv3 +and LGPLv3 licenses and therefore this code may continue to be legally +included within GPLv3 and LGPLv3 projects. + +A substantial relevant contributor was defined as one who has contributed +original code that implements a capability present in the releases going +forward. This excludes several contributors who have contributed code +that has been obsoleted, or have provided patches that fix bugs, +reorganise code for aesthetic or practical purposes, or improve build +processes. This distinction was necessary in order to move forward in the +likelyhood that not all contributors would be contactable. All +contributors are listed in the file CONTRIBUTORS. + +The four files that will remain LGPL but change to v3 are files used to +configure the GNU environment builds: + + aclocal.m4 + configure.ac + GNUmakefile.in + tests/GNUmakefile.in + +Contributors who have either requested this change or agreed to it when +consulted are: + +John Bossom +Alexander Terekhov +Vladimir Kliatchko +Ross Johnson + +Pthreads4w version 2 releases will remain LGPL but version 2.11 and later +will be released under v3 of that license so that any additions to +pthreads4w version 3 code that is backported to v2 will not pollute that +code. + +Backporting and Support of Legacy Windows Releases +-------------------------------------------------- +Some changes from 2011-02-26 onward may not be compatible with pre +Windows 2000 systems. + +New bug fixes in all releases since 2.8.0 have NOT been applied to the +1.x.x series. + +Testing and verification +------------------------ +The MSVC, MinGW and MinGW64 builds have been tested on SMP architecture +(Intel x64 Hex Core) by completing the included test suite, as well as the +stress and bench tests. + +Be sure to run your builds against the test suite. If you see failures +then please consider how your toolchains might be contributing to the +failure. See the README file for more detailed descriptions of the +toolchains and test systems that we have used to get the tests to pass +successfully. + +We recommend MinGW64 over MinGW for both 64 and 32 bit GNU CC builds +only because the MinGW DWARF2 exception handling with C++ builds causes some +problems with thread cancelation. + +MinGW64 also includes its own native pthreads implementation, which you may +prefer to use. If you wish to build our library you will need to select the +Win32 native threads option at install time. We recommend also selecting the +SJLJ exception handling method for MinGW64-w32 builds. For MinGW64-w64 builds +either the SJLJ or SEH exception handling method should work. + +New Features +------------ +Other than the following, this release is feature-equivalent to v2.11.0. + +This release introduces a change to pthread_t and pthread_once_t that will +affect applications that link with the library. + +pthread_t: remains a struct but extends the reuse counter from 32 bits to 64 +bits. On 64 bit machines the overall size of the object will not increase, we +simply put 4 bytes of padding to good use reducing the risk that the counter +could wrap around in very long-running applications from small to, effectively, +zero. The 64 bit reuse counter extends risk-free run time from months +(assuming an average thread lifetime of 1ms) to centuries (assuming an +average thread lifetime of 1ns). + +pthread_once_t: removes two long-obsoleted elements and reduces it's size. + + +RELEASE 2.11.0 +-------------- +(2018-08-08) + +General +------- +New bug fixes in all releases since 2.8.0 have NOT been applied to the +1.x.x series. + +Some changes from 2011-02-26 onward may not be compatible with +pre Windows 2000 systems. + +License Change to LGPL v3 +------------------------- +Pthreads4w version 2.11 and all future 2.x versions will be released +under the Lesser GNU Public License version 3 (LGPLv3). + +Planned Release Under the Apache License v2 +------------------------------------------- +The next major version of this software (version 3) will be released +under the Apache License version 2.0 (ALv2). Releasing 2.11 under LGPLv3 +will allow modifications to version 3 of this software to be backported +to version 2 going forward. Further to this, any GPL projects currently +using this library will be able to continue to use either version 2 or 3 +of this code in their projects. + +For more information please see: +https://www.apache.org/licenses/GPL-compatibility.html + +In order to remain consistent with this change, from this point on +modifications to this library will only be accepted against version 3 +of this software under the terms of the ALv2. They will then, where +appropriate, be backported to version 2. + +We hope to release version 3 at the same time as we release version 2.11. + +Testing and verification +------------------------ +This version has been tested on SMP architecture (Intel x64 Hex Core) +by completing the included test suite, as well as the stress and bench +tests. + +Be sure to run your builds against the test suite. If you see failures +then please consider how your toolchains might be contributing to the +failure. See the README file for more detailed descriptions of the +toolchains and test systems that we have used to get the tests to pass +successfully. We recommend MinGW64 over MinGW32 for both 64 and 32 bit +GNU CC builds. MinGW64 also includes its own independent pthreads +implementation, which you may prefer to use. + +New Features or Changes +----------------------- +For Microsoft toolchain builds: +(1) Static linking requires both this library and any linking +libraries or applications to be compiled with /MT consistently. + +(2) Static libraries have been renamed as libpthreadV*.lib +to differentiate them from DLL import libs pthreadV*.lib. + +(3) If you are using mixed linkage, e.g. linking the static /MT version +of the library to an application linked with /MD you may be able to use +GetLastError() to interrogate the error code because the library sets +both errno (via _set_errno()) and SetLastError(). + +Bug Fixes +--------- +Remove the attempt to set PTW32_USES_SEPARATE_CRT in the headers which +can cause unexpected results. In certain situations a user may want to +define it explicitly in their environment to invoke it's effects, either +when buidling the library or an application or both. See README.NONPORTABLE. +-- Ross Johnson + +The library should be more reliable under fully statically linked +scenarios. Note: we have removed the PIMAGE_TLS_CALLBACK code and +reverted to the earlier method that appears to be more reliable +across all compiler editions. +- Mark Pizzolato + +Various corrections to GNUmakefile. Although this file has been removed, +for completeness the changes have been recorded as commits to the +repository. +- Kyle Schwarz + +MinGW64-w64 defines pid_t as __int64. sched.h now reflects that. +- Kyle Schwarz + +Several tests have been fixed that were seen to fail on machines under +load. Other tests that used similar crude mechanisms to synchronise +threads (these are unit tests) had the same improvements applied: +semaphore5.c recognises that sem_destroy can legitimately return +EBUSY; mutex6*.c, mutex7*.c and mutex8*.c all replaced a single +Sleep() with a polling loop. +- Ross Johnson + + +RELEASE 2.10.0 +-------------- +(2016-09-18) + +General +------- +New bug fixes in all releases since 2.8.0 have NOT been applied to the +1.x.x series. + +Some changes from 2011-02-26 onward may not be compatible with +pre Windows 2000 systems. + +Testing and verification +------------------------ +This version has been tested on SMP architecture (Intel x64 Hex Core) +by completing the included test suite, as well as the stress and bench +tests. + +Be sure to run your builds against the test suite. If you see failures +then please consider how your toolchains might be contributing to the +failure. See the README file for more detailed descriptions of the +toolchains and test systems that we have used to get the tests to pass +successfully. We recommend MinGW64 over MinGW32 for both 64 and 32 bit +GNU CC builds. MinGW64 also includes its own independent pthreads +implementation, which you may prefer to use. + +New Features +------------ +New routines: +pthread_timedjoin_np() +pthread_tryjoin_np() + - added for compatibility with Linux. +sched_getaffinity() +sched_setaffinity() +pthread_getaffinity_np() +pthread_setaffinity_np() +pthread_attr_getaffinity_np() +pthread_attr_setaffinity_np() + - added for compatibility with Linux and other libgcc-based systems. + The macros to manipulate cpu_set_t objects (the cpu affinity mask + vector) are also defined: CPU_ZERO, CPU_CLR, CPU_SET, CPU_EQUAL, + CPU_AND, CPU_OR, CPU_XOR, CPU_COUNT, CPU_ISSET. +pthread_getname_np() +pthread_setname_np() +pthread_attr_getname_np() +pthread_attr_setname_np() + - added for compatibility with other POSIX implementations. Because + some implementations use different *_setname_np() prototypes + you can define one of the following macros when building the library: + __PTW32_COMPATIBILITY_BSD (compatibility with NetBSD, FreeBSD) + __PTW32_COMPATIBILITY_TRU64 + If not defined then compatibility is with Linux and other equivalents. + We don't impose a strict limit on the length of the thread name for the + default compatibility case. Unlike Linux, no default thread name is set. + For MSVC builds, the thread name if set is made available for use by the + MSVS debugger, i.e. it should be displayed within the debugger to + identify the thread in place of/as well as a threadID. +pthread_win32_getabstime_np() + - Return the current time plus an optional offset in a platform-aware way + that is compatible with POSIX timed calls (returns the struct timespec + address which is the first argument). Intended primarily to make it + easier to write tests but may be useful for applications generally. +GNU compiler environments (MinGW32 and MinGW64) now have the option of using +autoconf to automatically configure the build. + +Builds: +New makefile targets have been added and existing targets modified or +removed. For example, targets to build and test all of the possible +configurations of both dll and static libs. + +GNU compiler builds are now explicitly using ISO C and C++ 2011 standards +compatibility. If your GNU compiler doesn't support this please consider +updating. Auto configuration is now possible via 'configure' script. The +script must be generated using autoconf - see the README file. Thanks to +Keith Marshall from the MinGW project. + +Static linking: +The autostatic functionality has been moved to dll.c, and extended so +that builds using MSVC8 and later no longer require apps to call +pthread_win32_thread_detach_np(). That is, all of the DllMain +functionality is now automatic for static linking for these builds. + +Some nmake static linking targets have been disabled: +Due to an issue with TLS behaviour, the V*-small-static* nmake targets +in Makefile have been disabled. The issue is exposed by tests/semaphore3.c +where the pthread_self() call inside the thread fails to return the +correct POSIX thread handle but returns a new "implicit" POSIX thread +handle instead. Implicit pthread handles have detached thread status, which +causes the pthread_detach() call inside the thread to return EINVAL. The +V*-static* targets appear to be not affected. The primary difference is +that the latter are generated from a single compilation unit. + +Bug Fixes +--------- +Small object file static linking now works (MinGW). The autostatic code +is required but nothing explicitly referenced this code so was getting +optimised out. +- Daniel Richard G. + +sem_getvalue() could return the errno value instead of setting errno +and returning -1. +- Ross Johnson + +Errno values were being lost if the library is statically linked +with the runtime library, meaning also that the application used a +separate runtime instance. This is still the case except a build +switch has been added that allows more robust error status to be +incorporated, i.e. allow the return code to be retrieved via +GetLastError(). +- Daniel Richard G. + +Identified the cause of significant failures around cancelation +and pthread_exit() for the GCE (GNU C++) build configuration as +coming from Mingw32. Not sure if this is general or just when +building 32 bit libraries and apps that run on 64 bit systems. +These failures do not arise with Mingw64 32 bit builds (GCC built +with multilib enabled) running on 64 bit systems. +- Daniel Richard G. and Ross Johnson + +pthread_key_delete() bug introduced in release 2.9.x caused this +routine to fail in a way that the test suite was not detecting. A +new test has been added to confirm that this routine behaves +correctly, particularly when keys with destructors are deleted +before threads exit. +- Stephane Clairet + +pthread_win32_process_attach_np() fix potential failure/security around +finding and loading of QUSEREX.DLL. +- Jason Baker + +_POSIX_THREAD_ATTR_STACKADDR is now set equal to -1 in pthread.h. As a +consequence pthread_attr_setstackaddr() now returns ENOSYS. Previously +the value was stored and could be retrieved but was otherwise unused. +pthread_attr_getstackaddr() returns ENOSYS correspondingly. +- Ross Johnson + +Fixed a potential memory leak in pthread_mutex_init(). The leak would +only occur if the mutex initialisation failed (extremely rare if ever). +- Jaeeun Choi + +Fixed sub-millisecond timeouts, which caused the library to busy wait. +- Mark Smith + +Fix a race condition and crash in MCS locks. The waiter queue management +code in __ptw32_mcs_lock_acquire was racing with the queue management code +in __ptw32_mcs_lock_release and causing a segmentation fault. +- Anurag Sharma +- Jonathan Brown (also reported this bug and provided a fix) + +RELEASE 2.9.1 +------------- +(2012-05-27) + +General +------- +New bug fixes in this release since 2.8.0 have NOT been applied to the +1.x.x series. + +This release replaces an extremely brief 2.9.0 release and adds +some last minute non-code changes were made to embed better +descriptive properties in the dlls to indicate target architecture +and build environments. + +Some changes post 2011-02-26 in CVS may not be compatible with pre +Windows 2000 systems. + +Use of other than the "C" version of the library is now discouraged. +That is, the "C++" version fails some tests and does not provide any +additional functionality. + +Testing and verification +------------------------ +This version has been tested on SMP architecture (Intel x64 Hex Core) +by completing the included test suite, stress and bench tests. + +New Features +------------ +DLL properties now properly includes the target architecture, i.e. +right-click on the file pthreadVC2.dll in explorer and choose the Detail +tab will show the compiler and architecture in the description field, e.g. +"MS C x64" or "MS C x86". +- Ross Johnson + +(MSC and GNU builds) The statically linked library now automatically +initialises and cleans up on program start/exit, i.e. statically linked +applications need not call the routines pthread_win32_process_attach_np() +and pthread_win32_process_detach_np() explicitly. The per-thread routine +pthread_win32_thread_detach_np() is also called at program exit to cleanup +POSIX resources acquired by the primary Windows native thread, if I (RJ) +understand the process correctly. Other Windows native threads that call +POSIX API routines may need to call the thread detach routine on thread +exit if the application depends on reclaimed POSIX resources or running +POSIX TSD (TLS) destructors. +See README.NONPORTABLE for descriptions of these routines. +- Ramiro Polla + +Robust mutexes are implemented within the PROCESS_PRIVATE scope. NOTE that +pthread_mutex_* functions may return different error codes for robust +mutexes than they otherwise do in normal usage, e.g. pthread_mutex_unlock +is required to check ownership for all mutex types when the mutex is +robust, whereas this does not occur for the "normal" non-robust mutex type. +- Ross Johnson + +pthread_getunique_np is implemented for source level compatibility +with some other implementations. This routine returns a 64 bit +sequence number that is uniquely associated with a thread. It can be +used by applications to order or hash POSIX thread handles. +- Ross Johnson + +Bug fixes +--------- +Many more changes for 64 bit systems. +- Kai Tietz + +Various modifications and fixes to build and test for WinCE. +- Marcel Ruff, Sinan Kaya + +Fix pthread_cond_destroy() - should not be a cancellation point. Other +minor build problems fixed. +- Romano Paolo Tenca + +Remove potential deadlock condition from pthread_cond_destroy(). +- Eric Berge + +Various modifications to build and test for Win64. +- Kip Streithorst + +Various fixes to the QueueUserAPCEx async cancellation helper DLL +(this is a separate download) and pthreads code cleanups. +- Sebastian Gottschalk + +Removed potential NULL pointer reference. +- Robert Kindred + +Removed the requirement that applications restrict the number of threads +calling pthread_barrier_wait to just the barrier count. Also reduced the +contention between barrier_wait and barrier_destroy. This change will have +slowed barriers down slightly but halves the number of semaphores consumed +per barrier to one. +- Ross Johnson + +Fixed a handle leak in sched_[gs]etscheduler. +- Mark Pizzolato + +Removed all of the POSIX re-entrant function compatibility macros from pthread.h. +Some were simply not semanticly correct. +- Igor Lubashev + +Threads no longer attempt to pass uncaught exceptions out of thread scope (C++ +and SEH builds only). Uncaught exceptions now cause the thread to exit with +the return code PTHREAD_CANCELED. +- Ross Johnson + +Lots of casting fixes particularly for x64, Interlocked fixes and reworking +for x64. +- Daniel Richard G., John Kamp + +Other changes +------------- +Dependence on the winsock library is now discretionary via +#define RETAIN_WSALASTERROR in config.h. It is undefined by default unless +WINCE is defined (because RJ is unsure of the dependency there). +- Ramiro Polla + +Several static POSIX mutexes used for internal management were replaced by +MCS queue-based locks to reduce resource consumption, in particular use of Win32 +objects. +- Ross Johnson + +For security, the QuserEx.dll if used must now be installed in the Windows System +folder. +- Ross Johnson + +New tests +--------- +robust[1-5].c - Robust mutexes +sequence1.c - per-thread unique sequence numbers + +Modified tests and benchtests +----------------------------- +All mutex*.c tests wherever appropriate have been modified to also test +robust mutexes under the same conditions. +Added robust mutex benchtests to benchtest*.c wherever appropriate. + + +RELEASE 2.8.0 +------------- +(2006-12-22) + +General +------- +New bug fixes in this release since 2.7.0 have not been applied to the +version 1.x.x series. It is probably time to drop version 1. + +Testing and verification +------------------------ +This release has not yet been tested on SMP architechtures. All tests pass +on a uni-processor system. + +Bug fixes +--------- +Sem_destroy could return EBUSY even though no threads were waiting on the +semaphore. Other races around invalidating semaphore structs (internally) +have been removed as well. + +New tests +--------- +semaphore5.c - tests the bug fix referred to above. + + +RELEASE 2.7.0 +------------- +(2005-06-04) + +General +------- +All new features in this release have been back-ported in release 1.11.0, +including the incorporation of MCS locks in pthread_once, however, versions +1 and 2 remain incompatible even though they are now identical in +performance and functionality. + +Testing and verification +------------------------ +This release has been tested (passed the test suite) on both uni-processor +and multi-processor systems. +- Tim Theisen + +Bug fixes +--------- +Pthread_once has been re-implemented to remove priority boosting and other +complexity to improve robustness. Races for Win32 handles that are not +recycle-unique have been removed. The general form of pthread_once is now +the same as that suggested earlier by Alexander Terekhov, but instead of the +'named mutex', a queue-based lock has been implemented which has the required +properties of dynamic self initialisation and destruction. This lock is also +efficient. The ABI is unaffected in as much as the size of pthread_once_t has +not changed and PTHREAD_ONCE_INIT has not changed, however, applications that +peek inside pthread_once_t, which is supposed to be opaque, will break. +- Vladimir Kliatchko + +New features +------------ +* Support for Mingw cross development tools added to GNUmakefile. +Mingw cross tools allow building the libraries on Linux. +- Mikael Magnusson + + +RELEASE 2.6.0 +------------- +(2005-05-19) + +General +------- +All of the bug fixes and new features in this release have been +back-ported in release 1.10.0. + +Testing and verification +------------------------ +This release has been tested (passed the test suite) on both uni-processor +and multi-processor systems. Thanks to Tim Theisen at TomoTherapy for +exhaustively running the MP tests and for providing crutial observations +and data when faults are detected. + +Bugs fixed +---------- + +* pthread_detach() now reclaims remaining thread resources if called after +the target thread has terminated. Previously, this routine did nothing in +this case. + +New tests +--------- + +* detach1.c - tests that pthread_detach properly invalidates the target +thread, which indicates that the thread resources have been reclaimed. + + +RELEASE 2.5.0 +------------- +(2005-05-09) + +General +------- + +The package now includes a reference documentation set consisting of +HTML formatted Unix-style manual pages that have been edited for +consistency with Pthreads-w32. The set can also be read online at: +https://sourceforge.net/projects/pthreads4w/manual/index.html + +Thanks again to Tim Theisen for running the test suite pre-release +on an MP system. + +All of the bug fixes and new features in this release have been +back-ported in release 1.9.0. + +Bugs fixed +---------- + +* Thread Specific Data (TSD) key management has been ammended to +eliminate a source of (what was effectively) resource leakage (a HANDLE +plus memory for each key destruct routine/thread association). This was +not a true leak because these resources were eventually reclaimed when +pthread_key_delete was run AND each thread referencing the key had exited. +The problem was that these two conditions are often not met until very +late, and often not until the process is about to exit. + +The ammended implementation avoids the need for the problematic HANDLE +and reclaims the memory as soon as either the key is deleted OR the +thread exits, whichever is first. + +Thanks to Richard Hughes at Aculab for identifying and locating the leak. + +* TSD key destructors are now processed up to PTHREAD_DESTRUCTOR_ITERATIONS +times instead of just once. PTHREAD_DESTRUCTOR_ITERATIONS has been +defined in pthread.h for some time but not used. + +* Fix a semaphore accounting race between sem_post/sem_post_multiple +and sem_wait cancellation. This is the same issue as with +sem_timedwait that was fixed in the last release. + +* sem_init, sem_post, and sem_post_multiple now check that the +semaphore count never exceeds _POSIX_SEM_VALUE_MAX. + +* Although sigwait() is nothing more than a no-op, it should at least +be a cancellation point to be consistent with the standard. + +New tests +--------- + +* stress1.c - attempts to expose problems in condition variable +and semaphore timed wait logic. This test was inspired by Stephan +Mueller's sample test code used to identify the sem_timedwait bug +from the last release. It's not a part of the regular test suite +because it can take awhile to run. To run it: +nmake clean VC-stress + +* tsd2.c - tests that key destructors are re-run if the tsd key value is +not NULL after the destructor routine has run. Also tests that +pthread_setspecific() and pthread_getspecific() are callable from +destructors. + + +RELEASE 2.4.0 +------------- +(2005-04-26) + +General +------- + +There is now no plan to release a version 3.0.0 to fix problems in +pthread_once(). Other possible implementations of pthread_once +will still be investigated for a possible future release in an attempt +to reduce the current implementation's complexity. + +All of the bug fixes and new features in this release have been +back-ported for release 1.8.0. + +Bugs fixed +---------- + +* Fixed pthread_once race (failures on an MP system). Thanks to +Tim Theisen for running exhaustive pre-release testing on his MP system +using a range of compilers: + VC++ 6 + VC++ 7.1 + Intel C++ version 8.0 +All tests passed. +Some minor speed improvements were also done. + +* Fix integer overrun error in pthread_mutex_timedlock() - missed when +sem_timedwait() was fixed in release 2.2.0. This routine no longer returns +ENOTSUP when NEED_SEM is defined - it is supported (NEED_SEM is only +required for WinCE versions prior to 3.0). + +* Fix timeout bug in sem_timedwait(). +- Thanks to Stephan Mueller for reporting, providing diagnostic output +and test code. + +* Fix several problems in the NEED_SEM conditionally included code. +NEED_SEM included code is provided for systems that don't implement W32 +semaphores, such as WinCE prior to version 3.0. An alternate implementation +of POSIX semaphores is built using W32 events for these systems when +NEED_SEM is defined. This code has been completely rewritten in this +release to reuse most of the default POSIX semaphore code, and particularly, +to implement all of the sem_* routines supported by Pthreads4w. Tim +Theisen also run the test suite over the NEED_SEM code on his MP system. All +tests passed. + +* The library now builds without errors for the Borland Builder 5.5 compiler. + +New features +------------ + +* pthread_mutex_timedlock() and all sem_* routines provided by +Pthreads4w are now implemented for WinCE versions prior to 3.0. Those +versions did not implement W32 semaphores. Define NEED_SEM in config.h when +building the library for these systems. + +Known issues in this release +---------------------------- + +* pthread_once is too complicated - but it works as far as testing can +determine.. + +* The Borland version of the dll fails some of the tests with a memory read +exception. The cause is not yet known but a compiler bug has not been ruled +out. + + +RELEASE 2.3.0 +------------- +(2005-04-12) + +General +------- + +Release 1.7.0 is a backport of features and bug fixes new in +this release. See earlier notes under Release 2.0.0/General. + +Bugs fixed +---------- + +* Fixed pthread_once potential for post once_routine cancellation +hanging due to starvation. See comments in pthread_once.c. +Momentary priority boosting is used to ensure that, after a +once_routine is cancelled, the thread that will run the +once_routine is not starved by higher priority waiting threads at +critical times. Priority boosting occurs only AFTER a once_routine +cancellation, and is applied only to that once_control. The +once_routine is run at the thread's normal base priority. + +New tests +--------- + +* once4.c: Aggressively tests pthread_once() under realtime +conditions using threads with varying priorities. Windows' +random priority boosting does not occur for threads with realtime +priority levels. + + +RELEASE 2.2.0 +------------- +(2005-04-04) + +General +------- + +* Added makefile targets to build static link versions of the library. +Both MinGW and MSVC. Please note that this does not imply any change +to the LGPL licensing, which still imposes psecific conditions on +distributing software that has been statically linked with this library. + +* There is a known bug in pthread_once(). Cancellation of the init_routine +exposes a potential starvation (i.e. deadlock) problem if a waiting thread +has a higher priority than the initting thread. This problem will be fixed +in version 3.0.0 of the library. + +Bugs fixed +---------- + +* Fix integer overrun error in sem_timedwait(). +Kevin Lussier + +* Fix preprocessor directives for static linking. +Dimitar Panayotov + + +RELEASE 2.1.0 +------------- +(2005-03-16) + +Bugs fixed +---------- + +* Reverse change to pthread_setcancelstate() in 2.0.0. + + +RELEASE 2.0.0 +------------- +(2005-03-16) + +General +------- + +This release represents an ABI change and the DLL version naming has +incremented from 1 to 2, e.g. pthreadVC2.dll. + +Version 1.4.0 back-ports the new functionality included in this +release. Please distribute DLLs built from that version with updates +to applications built on pthreads-win32 version 1.x.x. + +The package naming has changed, replacing the snapshot date with +the version number + descriptive information. E.g. this +release is "pthreads-w32-2-0-0-release". + +Bugs fixed +---------- + +* pthread_setcancelstate() no longer checks for a pending +async cancel event if the library is using alertable async +cancel. See the README file (Prerequisites section) for info +on adding alertable async cancellation. + +New features +------------ + +* pthread_once() now supports init_routine cancellability. + +New tests +--------- + +* Agressively test pthread_once() init_routine cancellability. + + +SNAPSHOT 2005-03-08 +------------------- +Version 1.3.0 + +Bug reports (fixed) +------------------- + +* Implicitly created threads leave Win32 handles behind after exiting. +- Dmitrii Semii + +* pthread_once() starvation problem. +- Gottlob Frege + +New tests +--------- + +* More intense testing of pthread_once(). + + +SNAPSHOT 2005-01-25 +------------------- +Version 1.2.0 + +Bug fixes +--------- + +* Attempted acquisition of a recursive mutex could cause waiting threads +to not be woken when the mutex was released. +- Ralf Kubis + +* Various package omissions have been fixed. + + +SNAPSHOT 2005-01-03 +------------------- +Version 1.1.0 + +Bug fixes +--------- + +* Unlocking recursive or errorcheck mutexes would sometimes +unexpectedly return an EPERM error (bug introduced in +snapshot-2004-11-03). +- Konstantin Voronkov + + +SNAPSHOT 2004-11-22 +------------------- +Version 1.0.0 + +This snapshot primarily fixes the condvar bug introduced in +snapshot-2004-11-03. DLL versioning has also been included to allow +applications to runtime check the Microsoft compatible DLL version +information, and to extend the DLL naming system for ABI and major +(non-backward compatible) API changes. See the README file for details. + +Bug fixes +--------- + +* Condition variables no longer deadlock (bug introduced in +snapshot-2004-11-03). +- Alexander Kotliarov and Nicolas at saintmac + +* DLL naming extended to avoid 'DLL hell' in the future, and to +accommodate the ABI change introduced in snapshot-2004-11-03. Snapshot +2004-11-03 will be removed from FTP sites. + +New features +------------ + +* A Microsoft-style version resource has been added to the DLL for +applications that wish to check DLL compatibility at runtime. + +* Pthreads4w DLL naming has been extended to allow incompatible DLL +versions to co-exist in the same filesystem. See the README file for details, +but briefly: while the version information inside the DLL will change with +each release from now on, the DLL version names will only change if the new +DLL is not backward compatible with older applications. + +The versioning scheme has been borrowed from GNU Libtool, and the DLL +naming scheme is from Cygwin. Provided the Libtool-style numbering rules are +honoured, the Cygwin DLL naming scheme automatcally ensures that DLL name +changes are minimal and that applications will not load an incompatible +Pthreads4w DLL. + +Those who use the pre-built DLLs will find that the DLL/LIB names have a new +suffix (1) in this snapshot. E.g. pthreadVC1.dll etc. + +* The POSIX thread ID reuse uniqueness feature introduced in the last snapshot +has been kept as default, but the behaviour can now be controlled when the DLL +is built to effectively switch it off. This makes the library much more +sensitive to applications that assume that POSIX thread IDs are unique, i.e. +are not strictly compliant with POSIX. See the __PTW32_THREAD_ID_REUSE_INCREMENT +macro comments in config.h for details. + +Other changes +------------- +Certain POSIX macros have changed. + +These changes are intended to conform to the Single Unix Specification version 3, +which states that, if set to 0 (zero) or not defined, then applications may use +sysconf() to determine their values at runtime. Pthreads4w does not +implement sysconf(). + +The following macros are no longer undefined, but defined and set to -1 +(not implemented): + + _POSIX_THREAD_ATTR_STACKADDR + _POSIX_THREAD_PRIO_INHERIT + _POSIX_THREAD_PRIO_PROTECT + _POSIX_THREAD_PROCESS_SHARED + +The following macros are defined and set to 200112L (implemented): + + _POSIX_THREADS + _POSIX_THREAD_SAFE_FUNCTIONS + _POSIX_THREAD_ATTR_STACKSIZE + _POSIX_THREAD_PRIORITY_SCHEDULING + _POSIX_SEMAPHORES + _POSIX_READER_WRITER_LOCKS + _POSIX_SPIN_LOCKS + _POSIX_BARRIERS + +The following macros are defined and set to appropriate values: + + _POSIX_THREAD_THREADS_MAX + _POSIX_SEM_VALUE_MAX + _POSIX_SEM_NSEMS_MAX + PTHREAD_DESTRUCTOR_ITERATIONS + PTHREAD_KEYS_MAX + PTHREAD_STACK_MIN + PTHREAD_THREADS_MAX + + +SNAPSHOT 2004-11-03 +------------------- + +DLLs produced from this snapshot cannot be used with older applications without +recompiling the application, due to a change to pthread_t to provide unique POSIX +thread IDs. + +Although this snapshot passes the extended test suite, many of the changes are +fairly major, and some applications may show different behaviour than previously, +so adopt with care. Hopefully, any changed behaviour will be due to the library +being better at it's job, not worse. + +Bug fixes +--------- + +* pthread_create() no longer accepts NULL as the thread reference arg. +A segfault (memory access fault) will result, and no thread will be +created. + +* pthread_barrier_wait() no longer acts as a cancellation point. + +* Fix potential race condition in pthread_once() +- Tristan Savatier + +* Changes to pthread_cond_destroy() exposed some coding weaknesses in several +test suite mini-apps because pthread_cond_destroy() now returns EBUSY if the CV +is still in use. + +New features +------------ + +* Added for compatibility: +PTHREAD_RECURSIVE_MUTEX_INITIALIZER, +PTHREAD_ERRORCHECK_MUTEX_INITIALIZER, +PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP, +PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP + +* Initial support for Digital Mars compiler +- Anuj Goyal + +* Faster Mutexes. These have been been rewritten following a model provided by +Alexander Terekhov that reduces kernel space checks, and eliminates some additional +critical sections used to manage a race between timedlock expiration and unlock. +Please be aware that the new mutexes do not enforce strict absolute FIFO scheduling +of mutexes, however any out-of-order lock acquisition should be very rare. + +* Faster semaphores. Following a similar model to mutexes above, these have been +rewritten to use preliminary users space checks. + +* sem_getvalue() now returns the number of waiters. + +* The POSIX thread ID now has much stronger uniqueness characteristics. The library +garrantees not to reuse the same thread ID for at least 2^(wordsize) thread +destruction/creation cycles. + +New tests +--------- + +* semaphore4.c: Tests cancellation of the new sem_wait(). + +* semaphore4t.c: Likewise for sem_timedwait(). + +* rwlock8.c: Tests and times the slow execution paths of r/w locks, and the CVs, +mutexes, and semaphores that they're built on. + + +SNAPSHOT 2004-05-16 +------------------- + +Attempt to add Watcom to the list of compilers that can build the library. +This failed in the end due to it's non-thread-aware errno. The library +builds but the test suite fails. See README.Watcom for more details. + +Bug fixes +--------- +* Bug and memory leak in sem_init() +- Alex Blanco + +* __ptw32_getprocessors() now returns CPU count of 1 for WinCE. +- James Ewing + +* pthread_cond_wait() could be canceled at a point where it should not +be cancelable. Fixed. +- Alexander Terekhov + +* sem_timedwait() had an incorrect timeout calculation. +- Philippe Di Cristo + +* Fix a memory leak left behind after threads are destroyed. +- P. van Bruggen + +New features +------------ +* Ported to AMD64. +- Makoto Kato + +* True pre-emptive asynchronous cancellation of threads. This is optional +and requires that Panagiotis E. Hadjidoukas's QueueUserAPCEx package be +installed. This package is included in the pthreads-win32 self-unpacking +Zip archive starting from this snapshot. See the README.txt file inside +the package for installation details. + +Note: If you don't use async cancellation in your application, or don't need +to cancel threads that are blocked on system resources such as network I/O, +then the default non-preemptive async cancellation is probably good enough. +However, pthreads-win32 auto-detects the availability of these components +at run-time, so you don't need to rebuild the library from source if you +change your mind later. + +All of the advice available in books and elsewhere on the undesirability +of using async cancellation in any application still stands, but this +feature is a welcome addition with respect to the library's conformance to +the POSIX standard. + +SNAPSHOT 2003-09-18 +------------------- + +Cleanup of thread priority management. In particular, setting of thread +priority now attempts to map invalid Win32 values within the range returned +by sched_get_priority_min/max() to useful values. See README.NONPORTABLE +under "Thread priority". + +Bug fixes +--------- +* pthread_getschedparam() now returns the priority given by the most recent +call to pthread_setschedparam() or established by pthread_create(), as +required by the standard. Previously, pthread_getschedparam() incorrectly +returned the running thread priority at the time of the call, which may have +been adjusted or temporarily promoted/demoted. + +* sched_get_priority_min() and sched_get_priority_max() now return -1 on error +and set errno. Previously, they incorrectly returned the error value directly. + + +SNAPSHOT 2003-09-04 +------------------- + +Bug fixes +--------- +* __ptw32_cancelableWait() now allows cancellation of waiting implicit POSIX +threads. + +New test +-------- +* cancel8.c tests cancellation of Win32 threads waiting at a POSIX cancellation +point. + + +SNAPSHOT 2003-09-03 +------------------- + +Bug fixes +--------- +* pthread_self() would free the newly created implicit POSIX thread handle if +DuplicateHandle failed instead of recycle it (very unlikely). + +* pthread_exit() was neither freeing nor recycling the POSIX thread struct +for implicit POSIX threads. + +New feature - cancellation of/by Win32 (non-POSIX) threads +--------------------------------------------------------- +Since John Bossom's original implementation, the library has allowed non-POSIX +initialised threads (Win32 threads) to call Pthreads4w routines and +therefore interact with POSIX threads. This is done by creating an on-the-fly +POSIX thread ID for the Win32 thread that, once created, allows fully +reciprical interaction. This did not extend to thread cancellation (async or +deferred). Now it does. + +Any thread can be canceled by any other thread (Win32 or POSIX) if the former +thread's POSIX pthread_t value is known. It's TSD destructors and POSIX +cleanup handlers will be run before the thread exits with an exit code of +PTHREAD_CANCELED (retrieved with GetExitCodeThread()). + +This allows a Win32 thread to, for example, call POSIX CV routines in the same way +that POSIX threads would/should, with pthread_cond_wait() cancelability and +cleanup handlers (pthread_cond_wait() is a POSIX cancellation point). + +By adding cancellation, Win32 threads should now be able to call all POSIX +threads routines that make sense including semaphores, mutexes, condition +variables, read/write locks, barriers, spinlocks, tsd, cleanup push/pop, +cancellation, pthread_exit, scheduling, etc. + +Note that these on-the-fly 'implicit' POSIX thread IDs are initialised as detached +(not joinable) with deferred cancellation type. The POSIX thread ID will be created +automatically by any POSIX routines that need a POSIX handle (unless the routine +needs a pthread_t as a parameter of course). A Win32 thread can discover it's own +POSIX thread ID by calling pthread_self(), which will create the handle if +necessary and return the pthread_t value. + +New tests +--------- +Test the above new feature. + + +SNAPSHOT 2003-08-19 +------------------- + +This snapshot fixes some accidental corruption to new test case sources. +There are no changes to the library source code. + + +SNAPSHOT 2003-08-15 +------------------- + +Bug fixes +--------- + +* pthread.dsp now uses correct compile flags (/MD). +- Viv + +* pthread_win32_process_detach_np() fixed memory leak. +- Steven Reddie + +* pthread_mutex_destroy() fixed incorrect return code. +- Nicolas Barry + +* pthread_spin_destroy() fixed memory leak. +- Piet van Bruggen + +* Various changes to tighten arg checking, and to work with later versions of +MinGW32 and MsysDTK. + +* pthread_getschedparam() etc, fixed dangerous thread validity checking. +- Nicolas Barry + +* POSIX thread handles are now reused and their memory is not freed on thread exit. +This allows for stronger thread validity checking. + +New standard routine +-------------------- + +* pthread_kill() added to provide thread validity checking to applications. +It does not accept any non zero values for the signal arg. + +New test cases +-------------- + +* New test cases to confirm validity checking, pthread_kill(), and thread reuse. + + +SNAPSHOT 2003-05-10 +------------------- + +Bug fixes +--------- + +* pthread_mutex_trylock() now returns correct error values. +pthread_mutex_destroy() will no longer destroy a recursively locked mutex. +pthread_mutex_lock() is no longer inadvertantly behaving as a cancellation point. +- Thomas Pfaff + +* pthread_mutex_timedlock() no longer occasionally sets incorrect mutex +ownership, causing deadlocks in some applications. +- Robert Strycek and Alexander Terekhov + + +SNAPSHOT 2002-11-04 +------------------- + +Bug fixes +--------- + +* sem_getvalue() now returns the correct value under Win NT and WinCE. +- Rob Fanner + +* sem_timedwait() now uses tighter checks for unreasonable +abstime values - that would result in unexpected timeout values. + +* __ptw32_cond_wait_cleanup() no longer mysteriously consumes +CV signals but may produce more spurious wakeups. It is believed +that the sem_timedwait() call is consuming a CV signal that it +shouldn't. +- Alexander Terekhov + +* Fixed a memory leak in __ptw32_threadDestroy() for implicit threads. + +* Fixed potential for deadlock in pthread_cond_destroy(). +A deadlock could occur for statically declared CVs (PTHREAD_COND_INITIALIZER), +when one thread is attempting to destroy the condition variable while another +is attempting to dynamically initialize it. +- Michael Johnson + + +SNAPSHOT 2002-03-02 +------------------- + +Cleanup code default style. (IMPORTANT) +---------------------------------------------------------------------- +Previously, if not defined, the cleanup style was determined automatically +from the compiler/language, and one of the following was defined accordingly: + + __PTW32_CLEANUP_SEH MSVC only + __PTW32_CLEANUP_CXX C++, including MSVC++, GNU G++ + __PTW32_CLEANUP_C C, including GNU GCC, not MSVC + +These defines determine the style of cleanup (see pthread.h) and, +most importantly, the way that cancellation and thread exit (via +pthread_exit) is performed (see the routine __ptw32_throw() in private.c). + +In short, the exceptions versions of the library throw an exception +when a thread is canceled or exits (via pthread_exit()), which is +caught by a handler in the thread startup routine, so that the +the correct stack unwinding occurs regardless of where the thread +is when it's canceled or exits via pthread_exit(). + +In this and future snapshots, unless the build explicitly defines (e.g. +via a compiler option) __PTW32_CLEANUP_SEH, __PTW32_CLEANUP_CXX, or __PTW32_CLEANUP_C, then +the build NOW always defaults to __PTW32_CLEANUP_C style cleanup. This style +uses setjmp/longjmp in the cancellation and pthread_exit implementations, +and therefore won't do stack unwinding even when linked to applications +that have it (e.g. C++ apps). This is for consistency with most +current commercial Unix POSIX threads implementations. Compaq's TRU64 +may be an exception (no pun intended) and possible future trend. + +Although it was not clearly documented before, it is still necessary to +build your application using the same __PTW32_CLEANUP_* define as was +used for the version of the library that you link with, so that the +correct parts of pthread.h are included. That is, the possible +defines require the following library versions: + + __PTW32_CLEANUP_SEH pthreadVSE.dll + __PTW32_CLEANUP_CXX pthreadVCE.dll or pthreadGCE.dll + __PTW32_CLEANUP_C pthreadVC.dll or pthreadGC.dll + +E.g. regardless of whether your app is C or C++, if you link with +pthreadVC.lib or libpthreadGC.a, then you must define __PTW32_CLEANUP_C. + + +THE POINT OF ALL THIS IS: if you have not been defining one of these +explicitly, then the defaults as described at the top of this +section were being used. + +THIS NOW CHANGES, as has been explained above, but to try to make this +clearer here's an example: + +If you were building your application with MSVC++ i.e. using C++ +exceptions and not explicitly defining one of __PTW32_CLEANUP_*, then +__PTW32_CLEANUP_C++ was automatically defined for you in pthread.h. +You should have been linking with pthreadVCE.dll, which does +stack unwinding. + +If you now build your application as you had before, pthread.h will now +automatically set __PTW32_CLEANUP_C as the default style, and you will need to +link with pthreadVC.dll. Stack unwinding will now NOT occur when a thread +is canceled, or the thread calls pthread_exit(). + +Your application will now most likely behave differently to previous +versions, and in non-obvious ways. Most likely is that locally +instantiated objects may not be destroyed or cleaned up after a thread +is canceled. + +If you want the same behaviour as before, then you must now define +__PTW32_CLEANUP_C++ explicitly using a compiler option and link with +pthreadVCE.dll as you did before. + + +WHY ARE WE MAKING THE DEFAULT STYLE LESS EXCEPTION-FRIENDLY? +Because no commercial Unix POSIX threads implementation allows you to +choose to have stack unwinding. Therefore, providing it in pthread-win32 +as a default is dangerous. We still provide the choice but unless +you consciously choose to do otherwise, your pthreads applications will +now run or crash in similar ways irrespective of the threads platform +you use. Or at least this is the hope. + + +WHY NOT REMOVE THE EXCEPTIONS VERSIONS OF THE LIBRARY ALTOGETHER? +There are a few reasons: +- because there are well respected POSIX threads people who believe + that POSIX threads implementations should be exceptions aware and + do the expected thing in that context. (There are equally respected + people who believe it should not be easily accessible, if it's there + at all, for unconditional conformity to other implementations.) +- because Pthreads4w is one of the few implementations that has + the choice, perhaps the only freely available one, and so offers + a laboratory to people who may want to explore the effects; +- although the code will always be around somewhere for anyone who + wants it, once it's removed from the current version it will not be + nearly as visible to people who may have a use for it. + + +Source module splitting +----------------------- +In order to enable smaller image sizes to be generated +for applications that link statically with the library, +most routines have been separated out into individual +source code files. + +This is being done in such a way as to be backward compatible. +The old source files are reused to congregate the individual +routine files into larger translation units (via a bunch of +# includes) so that the compiler can still optimise wherever +possible, e.g. through inlining, which can only be done +within the same translation unit. + +It is also possible to build the entire library by compiling +the single file named "pthread.c", which just #includes all +the secondary congregation source files. The compiler +may be able to use this to do more inlining of routines. + +Although the GNU compiler is able to produce libraries with +the necessary separation (the -ffunction-segments switch), +AFAIK, the MSVC and other compilers don't have this feature. + +Finally, since I use makefiles and command-line compilation, +I don't know what havoc this reorganisation may wreak amongst +IDE project file users. You should be able to continue +using your existing project files without modification. + + +New non-portable functions +-------------------------- +pthread_num_processors_np(): + Returns the number of processors in the system that are + available to the process, as determined from the processor + affinity mask. + +pthread_timechange_handler_np(): + To improve tolerance against operator or time service initiated + system clock changes. + + This routine can be called by an application when it + receives a WM_TIMECHANGE message from the system. At present + it broadcasts all condition variables so that waiting threads + can wake up and re-evaluate their conditions and restart + their timed waits if required. + - Suggested by Alexander Terekhov + + +Platform dependence +------------------- +As Win95 doesn't provide one, the library now contains +it's own InterlockedCompareExchange() routine, which is used +whenever Windows doesn't provide it. InterlockedCompareExchange() +is used to implement spinlocks and barriers, and also in mutexes. +This routine relies on the CMPXCHG machine instruction which +is not available on i386 CPUs. This library (from snapshot +20010712 onwards) is therefore no longer supported on i386 +processor platforms. + + +New standard routines +--------------------- +For source code portability only - rwlocks cannot be process shared yet. + + pthread_rwlockattr_init() + pthread_rwlockattr_destroy() + pthread_rwlockattr_setpshared() + pthread_rwlockattr_getpshared() + +As defined in the new POSIX standard, and the Single Unix Spec version 3: + + sem_timedwait() + pthread_mutex_timedlock() - Alexander Terekhov and Thomas Pfaff + pthread_rwlock_timedrdlock() - adapted from pthread_rwlock_rdlock() + pthread_rwlock_timedwrlock() - adapted from pthread_rwlock_wrlock() + + +pthread.h no longer includes windows.h +-------------------------------------- +[Not yet for G++] + +This was done to prevent conflicts. + +HANDLE, DWORD, and NULL are temporarily defined within pthread.h if +they are not already. + + +pthread.h, sched.h and semaphore.h now use dllexport/dllimport +-------------------------------------------------------------- +Not only to avoid the need for the pthread.def file, but to +improve performance. Apparently, declaring functions with dllimport +generates a direct call to the function and avoids the overhead +of a stub function call. + +Bug fixes +--------- +* Fixed potential NULL pointer dereferences in pthread_mutexattr_init, +pthread_mutexattr_getpshared, pthread_barrierattr_init, +pthread_barrierattr_getpshared, and pthread_condattr_getpshared. +- Scott McCaskill + +* Removed potential race condition in pthread_mutex_trylock and +pthread_mutex_lock; +- Alexander Terekhov + +* The behaviour of pthread_mutex_trylock in relation to +recursive mutexes was inconsistent with commercial implementations. +Trylock would return EBUSY if the lock was owned already by the +calling thread regardless of mutex type. Trylock now increments the +recursion count and returns 0 for RECURSIVE mutexes, and will +return EDEADLK rather than EBUSY for ERRORCHECK mutexes. This is +consistent with Solaris. +- Thomas Pfaff + +* Found a fix for the library and workaround for applications for +the known bug #2, i.e. where __PTW32_CLEANUP_CXX or __PTW32_CLEANUP_SEH is defined. +See the "Known Bugs in this snapshot" section below. + +This could be made transparent to applications by replacing the macros that +define the current C++ and SEH versions of pthread_cleanup_push/pop +with the C version, but AFAIK cleanup handlers would not then run in the +correct sequence with destructors and exception cleanup handlers when +an exception occurs. + +* cancellation once started in a thread cannot now be inadvertantly +double canceled. That is, once a thread begins it's cancellation run, +cancellation is disabled and a subsequent cancel request will +return an error (ESRCH). + +* errno: An incorrect compiler directive caused a local version +of errno to be used instead of the Win32 errno. Both instances are +thread-safe but applications checking errno after a Pthreads4w +call would be wrong. Fixing this also fixed a bad compiler +option in the testsuite (/MT should have been /MD) which is +needed to link with the correct library MSVCRT.LIB. + + +SNAPSHOT 2001-07-12 +------------------- + +To be added + + +SNAPSHOT 2001-07-03 +------------------- + +To be added + + +SNAPSHOT 2000-08-13 +------------------- + +New: +- Renamed DLL and LIB files: + pthreadVSE.dll (MS VC++/Structured EH) + pthreadVSE.lib + pthreadVCE.dll (MS VC++/C++ EH) + pthreadVCE.lib + pthreadGCE.dll (GNU G++/C++ EH) + libpthreadw32.a + + Both your application and the pthread dll should use the + same exception handling scheme. + +Bugs fixed: +- MSVC++ C++ exception handling. + +Some new tests have been added. + + +SNAPSHOT 2000-08-10 +------------------- + +New: +- asynchronous cancellation on X86 (Jason Nye) +- Makefile compatible with MS nmake to replace + buildlib.bat +- GNUmakefile for Mingw32 +- tests/Makefile for MS nmake replaces runall.bat +- tests/GNUmakefile for Mingw32 + +Bugs fixed: +- kernel32 load/free problem +- attempt to hide internel exceptions from application + exception handlers (__try/__except and try/catch blocks) +- Win32 thread handle leakage bug + (David Baggett/Paul Redondo/Eyal Lebedinsky) + +Some new tests have been added. + + +SNAPSHOT 1999-11-02 +------------------- + +Bugs fixed: +- ctime_r macro had an incorrect argument (Erik Hensema), +- threads were not being created + PTHREAD_CANCEL_DEFERRED. This should have + had little effect as deferred is the only + supported type. (Ross Johnson). + +Some compatibility improvements added, eg. +- pthread_setcancelstate accepts NULL pointer + for the previous value argument. Ditto for + pthread_setcanceltype. This is compatible + with Solaris but should not affect + standard applications (Erik Hensema) + +Some new tests have been added. + + +SNAPSHOT 1999-10-17 +------------------- + +Bug fix - cancellation of threads waiting on condition variables +now works properly (Lorin Hochstein and Peter Slacik) + + +SNAPSHOT 1999-08-12 +------------------- + +Fixed exception stack cleanup if calling pthread_exit() +- (Lorin Hochstein and John Bossom). + +Fixed bugs in condition variables - (Peter Slacik): + - additional contention checks + - properly adjust number of waiting threads after timed + condvar timeout. + + +SNAPSHOT 1999-05-30 +------------------- + +Some minor bugs have been fixed. See the ChangeLog file for details. + +Some more POSIX 1b functions are now included but ony return an +error (ENOSYS) if called. They are: + + sem_open + sem_close + sem_unlink + sem_getvalue + + +SNAPSHOT 1999-04-07 +------------------- + +Some POSIX 1b functions which were internally supported are now +available as exported functions: + + sem_init + sem_destroy + sem_wait + sem_trywait + sem_post + sched_yield + sched_get_priority_min + sched_get_priority_max + +Some minor bugs have been fixed. See the ChangeLog file for details. + + +SNAPSHOT 1999-03-16 +------------------- + +Initial release. + diff --git a/NOTICE b/docs/NOTICE.md similarity index 100% rename from NOTICE rename to docs/NOTICE.md diff --git a/PROGRESS b/docs/PROGRESS.md similarity index 100% rename from PROGRESS rename to docs/PROGRESS.md diff --git a/README.Borland b/docs/README.Borland.md similarity index 100% rename from README.Borland rename to docs/README.Borland.md diff --git a/README.CV b/docs/README.CV.md similarity index 100% rename from README.CV rename to docs/README.CV.md diff --git a/README.NONPORTABLE b/docs/README.NONPORTABLE.md similarity index 100% rename from README.NONPORTABLE rename to docs/README.NONPORTABLE.md diff --git a/README.Watcom b/docs/README.Watcom.md similarity index 100% rename from README.Watcom rename to docs/README.Watcom.md diff --git a/README.WinCE b/docs/README.WinCE.md similarity index 100% rename from README.WinCE rename to docs/README.WinCE.md diff --git a/README b/docs/README.md similarity index 100% rename from README rename to docs/README.md diff --git a/TODO b/docs/TODO.md similarity index 100% rename from TODO rename to docs/TODO.md diff --git a/WinCE-PORT b/docs/WinCE-PORT.md similarity index 100% rename from WinCE-PORT rename to docs/WinCE-PORT.md From 8648e9283b375b66ded482e13c8b9fb0b61edf4d Mon Sep 17 00:00:00 2001 From: Ger Hobbelt Date: Wed, 14 Apr 2021 01:15:19 +0200 Subject: [PATCH 203/207] partial whitespace police raid pre-merge --- Bmakefile | 2 +- CMakeLists.txt | 28 +- GNUmakefile.in | 40 +- Makefile | 46 +- README.md | 52 +- _ptw32.h | 54 +- cleanup.c | 26 +- cmake/get_version.cmake | 16 +- cmake/version.rc.in | 150 ++--- config.h | 14 +- configure.ac | 4 +- context.h | 22 +- create.c | 33 +- dll.c | 37 +- docs/ChangeLog.md | 1068 +++++++++++++++--------------- docs/FAQ.md | 26 +- docs/NEWS.md | 52 +- docs/README.CV.md | 70 +- docs/README.NONPORTABLE.md | 2 +- docs/README.md | 30 +- docs/WinCE-PORT.md | 16 +- errno.c | 4 +- global.c | 34 +- implement.h | 374 +++++------ manual/pthread_setname_np.html | 8 +- need_errno.h | 18 +- pthread.h | 386 +++++------ pthread_attr_destroy.c | 2 +- pthread_attr_getaffinity_np.c | 2 +- pthread_attr_getdetachstate.c | 2 +- pthread_attr_getinheritsched.c | 2 +- pthread_attr_getschedparam.c | 2 +- pthread_attr_getschedpolicy.c | 2 +- pthread_attr_getstackaddr.c | 2 +- pthread_attr_getstacksize.c | 2 +- pthread_attr_init.c | 2 +- pthread_attr_setaffinity_np.c | 2 +- pthread_attr_setdetachstate.c | 2 +- pthread_attr_setinheritsched.c | 2 +- pthread_attr_setname_np.c | 2 +- pthread_attr_setschedparam.c | 2 +- pthread_attr_setschedpolicy.c | 2 +- pthread_attr_setstackaddr.c | 2 +- pthread_attr_setstacksize.c | 2 +- pthread_barrier_destroy.c | 12 +- pthread_barrier_wait.c | 18 +- pthread_cancel.c | 34 +- pthread_cond_destroy.c | 34 +- pthread_cond_init.c | 22 +- pthread_cond_signal.c | 14 +- pthread_cond_wait.c | 46 +- pthread_delay_np.c | 14 +- pthread_detach.c | 24 +- pthread_exit.c | 9 +- pthread_getconcurrency.c | 2 +- pthread_getname_np.c | 10 +- pthread_getschedparam.c | 2 +- pthread_getunique_np.c | 2 +- pthread_getw32threadhandle_np.c | 4 +- pthread_join.c | 8 +- pthread_key_create.c | 2 +- pthread_key_delete.c | 20 +- pthread_kill.c | 10 +- pthread_mutex_consistent.c | 38 +- pthread_mutex_destroy.c | 8 +- pthread_mutex_init.c | 8 +- pthread_mutex_lock.c | 90 +-- pthread_mutex_timedlock.c | 104 +-- pthread_mutex_trylock.c | 36 +- pthread_mutex_unlock.c | 26 +- pthread_num_processors_np.c | 2 +- pthread_once.c | 24 +- pthread_rwlock_destroy.c | 10 +- pthread_rwlock_init.c | 2 +- pthread_rwlock_rdlock.c | 6 +- pthread_rwlock_timedrdlock.c | 6 +- pthread_rwlock_timedwrlock.c | 12 +- pthread_rwlock_tryrdlock.c | 6 +- pthread_rwlock_trywrlock.c | 6 +- pthread_rwlock_unlock.c | 2 +- pthread_rwlock_wrlock.c | 12 +- pthread_self.c | 24 +- pthread_setaffinity.c | 22 +- pthread_setcancelstate.c | 12 +- pthread_setcanceltype.c | 12 +- pthread_setconcurrency.c | 2 +- pthread_setname_np.c | 22 +- pthread_setschedparam.c | 14 +- pthread_setspecific.c | 20 +- pthread_spin_destroy.c | 18 +- pthread_spin_init.c | 6 +- pthread_spin_lock.c | 14 +- pthread_spin_trylock.c | 14 +- pthread_spin_unlock.c | 12 +- pthread_testcancel.c | 12 +- pthread_timechange_handler_np.c | 8 +- pthread_timedjoin_np.c | 10 +- pthread_tryjoin_np.c | 8 +- pthread_win32_attach_detach_np.c | 96 +-- ptw32_MCS_lock.c | 146 ++-- ptw32_callUserDestroyRoutines.c | 34 +- ptw32_calloc.c | 2 +- ptw32_cond_check_need_init.c | 8 +- ptw32_getprocessors.c | 4 +- ptw32_is_attr.c | 4 +- ptw32_mutex_check_need_init.c | 20 +- ptw32_new.c | 21 +- ptw32_processInitialize.c | 52 +- ptw32_processTerminate.c | 36 +- ptw32_relmillisecs.c | 10 +- ptw32_reuse.c | 62 +- ptw32_rwlock_cancelwrwait.c | 2 +- ptw32_rwlock_check_need_init.c | 8 +- ptw32_semwait.c | 16 +- ptw32_spinlock_check_need_init.c | 8 +- ptw32_threadDestroy.c | 8 +- ptw32_threadStart.c | 72 +- ptw32_throw.c | 58 +- ptw32_timespec.c | 12 +- ptw32_tkAssocCreate.c | 6 +- ptw32_tkAssocDestroy.c | 4 +- sched.h | 36 +- sched_get_priority_max.c | 6 +- sched_get_priority_min.c | 6 +- sched_getscheduler.c | 4 +- sched_setaffinity.c | 10 +- sched_setscheduler.c | 6 +- sem_close.c | 2 +- sem_destroy.c | 8 +- sem_getvalue.c | 8 +- sem_init.c | 6 +- sem_open.c | 2 +- sem_post.c | 8 +- sem_post_multiple.c | 8 +- sem_timedwait.c | 30 +- sem_trywait.c | 8 +- sem_unlink.c | 2 +- sem_wait.c | 29 +- semaphore.h | 26 +- signal.c | 6 +- tests/Bmakefile | 6 +- tests/CMakeLists.txt | 6 +- tests/ChangeLog | 10 +- tests/GNUmakefile.in | 30 +- tests/Makefile | 8 +- tests/Wmakefile | 6 +- tests/affinity2.c | 2 +- tests/benchlib.c | 42 +- tests/benchtest.h | 6 +- tests/benchtest1.c | 16 +- tests/benchtest2.c | 16 +- tests/benchtest3.c | 16 +- tests/benchtest4.c | 16 +- tests/benchtest5.c | 8 +- tests/cancel9.c | 2 +- tests/cleanup1.c | 2 +- tests/context1.c | 4 +- tests/context2.c | 4 +- tests/exception3.c | 2 +- tests/name_np1.c | 6 +- tests/name_np2.c | 6 +- tests/once3.c | 2 +- tests/once4.c | 2 +- tests/self1.c | 4 +- tests/semaphore1.c | 4 +- tests/sizes.c | 6 +- tests/spin4.c | 12 +- tests/test.h | 18 +- tests/valid1.c | 2 +- tests/valid2.c | 2 +- version.rc | 138 ++-- w32_CancelableWait.c | 22 +- 172 files changed, 2439 insertions(+), 2448 deletions(-) diff --git a/Bmakefile b/Bmakefile index 80cf135e..51d9b824 100644 --- a/Bmakefile +++ b/Bmakefile @@ -25,7 +25,7 @@ CFLAGS = /q /I. /DHAVE_CONFIG_H=1 /4 /tWD /tWM \ /w-aus /w-asc /w-par #C cleanup code -BCFLAGS = $ (__PTW32_FLAGS) $(CFLAGS) +BCFLAGS = $ (PTW32_FLAGS) $(CFLAGS) OBJEXT = obj RESEXT = res diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e794ff8..b6697f9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,15 +32,15 @@ include (target_arch) get_target_arch(TARGET_ARCH) if(${TARGET_ARCH} STREQUAL "ARM") - add_definitions(-D__PTW32_ARCHARM -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1) + add_definitions(-DPTW32_ARCHARM -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1) elseif(${TARGET_ARCH} STREQUAL "ARM64") - add_definitions(-D__PTW32_ARCHARM64 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1) + add_definitions(-DPTW32_ARCHARM64 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1) elseif(${TARGET_ARCH} STREQUAL "x86_64") - add_definitions(-D__PTW32_ARCHAMD64) + add_definitions(-DPTW32_ARCHAMD64) elseif(${TARGET_ARCH} STREQUAL "x86") - add_definitions(-D__PTW32_ARCHX86) + add_definitions(-DPTW32_ARCHX86) elseif(${TARGET_ARCH} STREQUAL "x64") - add_definitions(-D__PTW32_ARCHX64) + add_definitions(-DPTW32_ARCHX64) else() MESSAGE(ERROR "\"${TARGET_ARCH}\" not supported in version.rc") endif() @@ -69,7 +69,7 @@ set(TESTDEST ${CMAKE_INSTALL_PREFIX}/${TARGET_ARCH}/${CMAKE_BUILD_TYPE}/test) ################################# # Defs # ################################# -add_definitions(-D__PTW32_BUILD_INLINED) +add_definitions(-DPTW32_BUILD_INLINED) if(MSVC) @@ -84,7 +84,7 @@ if(MSVC) set(VCEFLAGS "/EHs /TP ") endif() - add_definitions(-DHAVE_CONFIG_H -D__PTW32_RC_MSC) + add_definitions(-DHAVE_CONFIG_H -DPTW32_RC_MSC) endif() @@ -120,7 +120,7 @@ macro(static_lib type def) set(targ libpthread${type}${PTW32_VER}) add_library(${targ} STATIC pthread.c) message(STATUS ${targ}) - target_compile_definitions(${targ} PUBLIC "-D${def}" -D__PTW32_STATIC_LIB) + target_compile_definitions(${targ} PUBLIC "-D${def}" -DPTW32_STATIC_LIB) if(${type} STREQUAL "VCE") set_target_properties(${targ} PROPERTIES COMPILE_FLAGS ${VCEFLAGS}) endif() @@ -131,13 +131,13 @@ macro(static_lib type def) endif() endmacro() -shared_lib ( VCE __PTW32_CLEANUP_CXX ) -shared_lib ( VSE __PTW32_CLEANUP_SEH ) -shared_lib ( VC __PTW32_CLEANUP_C ) +shared_lib ( VCE PTW32_CLEANUP_CXX ) +shared_lib ( VSE PTW32_CLEANUP_SEH ) +shared_lib ( VC PTW32_CLEANUP_C ) -static_lib ( VCE __PTW32_CLEANUP_CXX ) -static_lib ( VSE __PTW32_CLEANUP_SEH ) -static_lib ( VC __PTW32_CLEANUP_C ) +static_lib ( VCE PTW32_CLEANUP_CXX ) +static_lib ( VSE PTW32_CLEANUP_SEH ) +static_lib ( VC PTW32_CLEANUP_C ) ################################# # Install # diff --git a/GNUmakefile.in b/GNUmakefile.in index 3455b6d1..b64980c3 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -144,7 +144,7 @@ LFLAGS = $(ARCH) # non-compliant, but applications that make assumptions that POSIX # does not garrantee may fail or misbehave under some settings. # -# __PTW32_THREAD_ID_REUSE_INCREMENT +# PTW32_THREAD_ID_REUSE_INCREMENT # Purpose: # POSIX says that applications should assume that thread IDs can be # recycled. However, Solaris and some other systems use a [very large] @@ -161,16 +161,16 @@ LFLAGS = $(ARCH) # Set to some other +ve value to emulate smaller word size types # (i.e. will wrap sooner). # -#__PTW32_FLAGS = "-D__PTW32_THREAD_ID_REUSE_INCREMENT=0" +#PTW32_FLAGS = "-DPTW32_THREAD_ID_REUSE_INCREMENT=0" # # ---------------------------------------------------------------------- -GC_CFLAGS = $(__PTW32_FLAGS) -GCE_CFLAGS = $(__PTW32_FLAGS) -mthreads +GC_CFLAGS = $(PTW32_FLAGS) +GCE_CFLAGS = $(PTW32_FLAGS) -mthreads ## Mingw #MAKE ?= make -DEFS = @DEFS@ -D__PTW32_BUILD +DEFS = @DEFS@ -DPTW32_BUILD CFLAGS = $(OPT) $(XOPT) $(ARCH) -I. -I${srcdir} $(DEFS) -Wall OBJEXT = @OBJEXT@ @@ -226,7 +226,7 @@ all: @ $(MAKE) clean GC-static @ $(MAKE) clean GCE-static -TEST_ENV = __PTW32_FLAGS="$(__PTW32_FLAGS) -DNO_ERROR_DIALOGS" PTW32_VER=$(PTW32_VER) ARCH="$(ARCH)" +TEST_ENV = PTW32_FLAGS="$(PTW32_FLAGS) -DNO_ERROR_DIALOGS" PTW32_VER=$(PTW32_VER) ARCH="$(ARCH)" all-tests: $(MAKE) realclean GC @@ -246,44 +246,44 @@ all-tests: @ - $(GREP) FAILED *.log all-tests-cflags: - $(MAKE) all-tests __PTW32_FLAGS="-Wall -Wextra" + $(MAKE) all-tests PTW32_FLAGS="-Wall -Wextra" @ $(ECHO) "$@ completed." GC: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-DPTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" $(GC_DLL) GC-debug: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_DLL) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CLEANUP=-DPTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(DLL_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-DPTW32_CLEANUP_C -g -O0" $(GCD_DLL) GCE: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-DPTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" $(GCE_DLL) GCE-debug: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_CXX -g -O0" $(GCED_DLL) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED" CC=$(CXX) CLEANUP=-DPTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(DLL_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-DPTW32_CLEANUP_CXX -g -O0" $(GCED_DLL) GC-static: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GC_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-DPTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GC_INLINED_STATIC_STAMP) GC-static-debug: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CLEANUP=-DPTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-DPTW32_CLEANUP_C -g -O0" $(GCD_INLINED_STATIC_STAMP) GC-small-static: - $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS_SMALL)" $(GC_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-DPTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS_SMALL)" $(GC_SMALL_STATIC_STAMP) GC-small-static-debug: - $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CLEANUP=-D__PTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS_SMALL)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CLEANUP=-DPTW32_CLEANUP_C XC_FLAGS="$(GC_CFLAGS)" OBJ="$(STATIC_OBJS_SMALL)" PTW32_VER=$(PTW32_VERD) OPT="-DPTW32_CLEANUP_C -g -O0" $(GCD_SMALL_STATIC_STAMP) GCE-static: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-DPTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" $(GCE_INLINED_STATIC_STAMP) GCE-static-debug: - $(MAKE) XOPT="-D__PTW32_BUILD_INLINED -D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_BUILD_INLINED -DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-DPTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS)" PTW32_VER=$(PTW32_VERD) OPT="-DPTW32_CLEANUP_C -g -O0" $(GCED_INLINED_STATIC_STAMP) GCE-small-static: - $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS_SMALL)" $(GCE_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-DPTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS_SMALL)" $(GCE_SMALL_STATIC_STAMP) GCE-small-static-debug: - $(MAKE) XOPT="-D__PTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-D__PTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS_SMALL)" PTW32_VER=$(PTW32_VERD) OPT="-D__PTW32_CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) + $(MAKE) XOPT="-DPTW32_STATIC_LIB" CC=$(CXX) CLEANUP=-DPTW32_CLEANUP_CXX XC_FLAGS="$(GCE_CFLAGS)" OBJ="$(STATIC_OBJS_SMALL)" PTW32_VER=$(PTW32_VERD) OPT="-DPTW32_CLEANUP_C -g -O0" $(GCED_SMALL_STATIC_STAMP) tests: @ cd tests @@ -335,7 +335,7 @@ install-headers: pthread.h sched.h semaphore.h _ptw32.h $(CC) -E -o $@ $(CFLAGS) $^ %.s: %.c - $(CC) -c $(CFLAGS) -D__PTW32_BUILD_INLINED -Wa,-ahl $^ > $@ + $(CC) -c $(CFLAGS) -DPTW32_BUILD_INLINED -Wa,-ahl $^ > $@ %.o: %.rc $(RC) $(RC_TARGET) $(RCFLAGS) $(CLEANUP) -o $@ -i $< diff --git a/Makefile b/Makefile index 644b3942..6e1c6594 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ CFLAGSD = /W3 /Z7 $(XCFLAGS) #XLIBS = wsock32.lib # Default cleanup style -CLEANUP = __PTW32_CLEANUP_C +CLEANUP = PTW32_CLEANUP_C # C++ Exceptions # (Note: If you are using Microsoft VC++6.0, the library needs to be built @@ -134,61 +134,61 @@ all-tests-mt: @ echo $@ completed successfully. VCE: - @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VCEFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).dll + @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VCEFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).dll VCE-debug: - @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VCEFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).dll + @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VCEFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).dll VSE: - @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VSEFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).dll + @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VSEFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).dll VSE-debug: - @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VSEFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).dll + @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VSEFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).dll VC: - @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VCFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).dll + @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VCFLAGS) /DPTW32_BUILD_INLINED" CLEANUP=PTW32_CLEANUP_C pthreadVC$(PTW32_VER).dll VC-debug: - @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VCFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).dll + @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VCFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).dll # # Static builds # #VCE-small-static: -# @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).small_static_stamp +# @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" CLEANUP=PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).small_static_stamp #VCE-small-static-debug: -# @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCEFLAGSD) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).small_static_stamp +# @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCEFLAGSD) /DPTW32_STATIC_LIB" CLEANUP=PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).small_static_stamp #VSE-small-static: -# @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).small_static_stamp +# @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB" CLEANUP=PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).small_static_stamp #VSE-small-static-debug: -# @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).small_static_stamp +# @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VSEFLAGSD) /DPTW32_STATIC_LIB" CLEANUP=PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).small_static_stamp #VC-small-static: -# @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).small_static_stamp +# @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" CLEANUP=PTW32_CLEANUP_C pthreadVC$(PTW32_VER).small_static_stamp #VC-small-static-debug: -# @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).small_static_stamp +# @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCFLAGSD) /DPTW32_STATIC_LIB" CLEANUP=PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).small_static_stamp VCE-static: - @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).inlined_static_stamp + @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).inlined_static_stamp VCE-static-debug: - @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).inlined_static_stamp + @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCEFLAGSD) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).inlined_static_stamp VSE-static: - @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).inlined_static_stamp + @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VSEFLAGS) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).inlined_static_stamp VSE-static-debug: - @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).inlined_static_stamp + @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VSEFLAGSD) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).inlined_static_stamp VC-static: - @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).inlined_static_stamp + @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=PTW32_CLEANUP_C pthreadVC$(PTW32_VER).inlined_static_stamp VC-static-debug: - @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).inlined_static_stamp + @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCFLAGSD) /DPTW32_STATIC_LIB /DPTW32_BUILD_INLINED" CLEANUP=PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).inlined_static_stamp realclean: clean @@ -254,14 +254,14 @@ $(SMALL_STATIC_STAMPS): $(STATIC_OBJS_SMALL) .rc.res: !IF DEFINED(PLATFORM) ! IF DEFINED(PROCESSOR_ARCHITECTURE) - rc /d__PTW32_ARCH$(PROCESSOR_ARCHITECTURE) /d__PTW32_RC_MSC /d$(CLEANUP) $< + rc /dPTW32_ARCH$(PROCESSOR_ARCHITECTURE) /dPTW32_RC_MSC /d$(CLEANUP) $< ! ELSE - rc /d__PTW32_ARCH$(PLATFORM) /d__PTW32_RC_MSC /d$(CLEANUP) $< + rc /dPTW32_ARCH$(PLATFORM) /dPTW32_RC_MSC /d$(CLEANUP) $< ! ENDIF !ELSE IF DEFINED(TARGET_CPU) - rc /d__PTW32_ARCH$(TARGET_CPU) /d__PTW32_RC_MSC /d$(CLEANUP) $< + rc /dPTW32_ARCH$(TARGET_CPU) /dPTW32_RC_MSC /d$(CLEANUP) $< !ELSE - rc /d__PTW32_ARCHx86 /d__PTW32_RC_MSC /d$(CLEANUP) $< + rc /dPTW32_ARCHx86 /dPTW32_RC_MSC /d$(CLEANUP) $< !ENDIF .c.i: diff --git a/README.md b/README.md index b6c57c8e..290d7be8 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Note that this is a new major release. The major version increment introduces two ABI changes along with other naming changes that will require recompilation of linking applications and possibly some textual changes to compile-time macro references in configuration and source -files, e.g. PTW32_* changes to __PTW32_*, ptw32_* to __ptw32_*, etc. +files, e.g. PTW32_* changes to PTW32_*, ptw32_* to ptw32_*, etc. License Change -------------- @@ -240,8 +240,8 @@ pthread_attr_setname_np() - added for compatibility with other POSIX implementations. Because some implementations use different *_setname_np() prototypes you can define one of the following macros when building the library: - __PTW32_COMPATIBILITY_BSD (compatibility with NetBSD, FreeBSD) - __PTW32_COMPATIBILITY_TRU64 + PTW32_COMPATIBILITY_BSD (compatibility with NetBSD, FreeBSD) + PTW32_COMPATIBILITY_TRU64 If not defined then compatibility is with Linux and other equivalents. We don't impose a strict limit on the length of the thread name for the default compatibility case. Unlike Linux, no default thread name is set. @@ -335,8 +335,8 @@ Fixed sub-millisecond timeouts, which caused the library to busy wait. - Mark Smith Fix a race condition and crash in MCS locks. The waiter queue management -code in __ptw32_mcs_lock_acquire was racing with the queue management code -in __ptw32_mcs_lock_release and causing a segmentation fault. +code in ptw32_mcs_lock_acquire was racing with the queue management code +in ptw32_mcs_lock_release and causing a segmentation fault. - Anurag Sharma - Jonathan Brown (also reported this bug and provided a fix) @@ -897,7 +897,7 @@ suffix (1) in this snapshot. E.g. pthreadVC1.dll etc. has been kept as default, but the behaviour can now be controlled when the DLL is built to effectively switch it off. This makes the library much more sensitive to applications that assume that POSIX thread IDs are unique, i.e. -are not strictly compliant with POSIX. See the __PTW32_THREAD_ID_REUSE_INCREMENT +are not strictly compliant with POSIX. See the PTW32_THREAD_ID_REUSE_INCREMENT macro comments in config.h for details. Other changes @@ -1017,7 +1017,7 @@ Bug fixes * Bug and memory leak in sem_init() - Alex Blanco -* __ptw32_getprocessors() now returns CPU count of 1 for WinCE. +* ptw32_getprocessors() now returns CPU count of 1 for WinCE. - James Ewing * pthread_cond_wait() could be canceled at a point where it should not @@ -1078,7 +1078,7 @@ SNAPSHOT 2003-09-04 Bug fixes --------- -* __ptw32_cancelableWait() now allows cancellation of waiting implicit POSIX +* ptw32_cancelableWait() now allows cancellation of waiting implicit POSIX threads. New test @@ -1207,13 +1207,13 @@ Bug fixes * sem_timedwait() now uses tighter checks for unreasonable abstime values - that would result in unexpected timeout values. -* __ptw32_cond_wait_cleanup() no longer mysteriously consumes +* ptw32_cond_wait_cleanup() no longer mysteriously consumes CV signals but may produce more spurious wakeups. It is believed that the sem_timedwait() call is consuming a CV signal that it shouldn't. - Alexander Terekhov -* Fixed a memory leak in __ptw32_threadDestroy() for implicit threads. +* Fixed a memory leak in ptw32_threadDestroy() for implicit threads. * Fixed potential for deadlock in pthread_cond_destroy(). A deadlock could occur for statically declared CVs (PTHREAD_COND_INITIALIZER), @@ -1230,13 +1230,13 @@ Cleanup code default style. (IMPORTANT) Previously, if not defined, the cleanup style was determined automatically from the compiler/language, and one of the following was defined accordingly: - __PTW32_CLEANUP_SEH MSVC only - __PTW32_CLEANUP_CXX C++, including MSVC++, GNU G++ - __PTW32_CLEANUP_C C, including GNU GCC, not MSVC + PTW32_CLEANUP_SEH MSVC only + PTW32_CLEANUP_CXX C++, including MSVC++, GNU G++ + PTW32_CLEANUP_C C, including GNU GCC, not MSVC These defines determine the style of cleanup (see pthread.h) and, most importantly, the way that cancellation and thread exit (via -pthread_exit) is performed (see the routine __ptw32_throw() in private.c). +pthread_exit) is performed (see the routine ptw32_throw() in private.c). In short, the exceptions versions of the library throw an exception when a thread is canceled or exits (via pthread_exit()), which is @@ -1245,8 +1245,8 @@ the correct stack unwinding occurs regardless of where the thread is when it's canceled or exits via pthread_exit(). In this and future snapshots, unless the build explicitly defines (e.g. -via a compiler option) __PTW32_CLEANUP_SEH, __PTW32_CLEANUP_CXX, or __PTW32_CLEANUP_C, then -the build NOW always defaults to __PTW32_CLEANUP_C style cleanup. This style +via a compiler option) PTW32_CLEANUP_SEH, PTW32_CLEANUP_CXX, or PTW32_CLEANUP_C, then +the build NOW always defaults to PTW32_CLEANUP_C style cleanup. This style uses setjmp/longjmp in the cancellation and pthread_exit implementations, and therefore won't do stack unwinding even when linked to applications that have it (e.g. C++ apps). This is for consistency with most @@ -1254,17 +1254,17 @@ current commercial Unix POSIX threads implementations. Compaq's TRU64 may be an exception (no pun intended) and possible future trend. Although it was not clearly documented before, it is still necessary to -build your application using the same __PTW32_CLEANUP_* define as was +build your application using the same PTW32_CLEANUP_* define as was used for the version of the library that you link with, so that the correct parts of pthread.h are included. That is, the possible defines require the following library versions: - __PTW32_CLEANUP_SEH pthreadVSE.dll - __PTW32_CLEANUP_CXX pthreadVCE.dll or pthreadGCE.dll - __PTW32_CLEANUP_C pthreadVC.dll or pthreadGC.dll + PTW32_CLEANUP_SEH pthreadVSE.dll + PTW32_CLEANUP_CXX pthreadVCE.dll or pthreadGCE.dll + PTW32_CLEANUP_C pthreadVC.dll or pthreadGC.dll E.g. regardless of whether your app is C or C++, if you link with -pthreadVC.lib or libpthreadGC.a, then you must define __PTW32_CLEANUP_C. +pthreadVC.lib or libpthreadGC.a, then you must define PTW32_CLEANUP_C. THE POINT OF ALL THIS IS: if you have not been defining one of these @@ -1275,13 +1275,13 @@ THIS NOW CHANGES, as has been explained above, but to try to make this clearer here's an example: If you were building your application with MSVC++ i.e. using C++ -exceptions and not explicitly defining one of __PTW32_CLEANUP_*, then -__PTW32_CLEANUP_C++ was automatically defined for you in pthread.h. +exceptions and not explicitly defining one of PTW32_CLEANUP_*, then +PTW32_CLEANUP_C++ was automatically defined for you in pthread.h. You should have been linking with pthreadVCE.dll, which does stack unwinding. If you now build your application as you had before, pthread.h will now -automatically set __PTW32_CLEANUP_C as the default style, and you will need to +automatically set PTW32_CLEANUP_C as the default style, and you will need to link with pthreadVC.dll. Stack unwinding will now NOT occur when a thread is canceled, or the thread calls pthread_exit(). @@ -1291,7 +1291,7 @@ instantiated objects may not be destroyed or cleaned up after a thread is canceled. If you want the same behaviour as before, then you must now define -__PTW32_CLEANUP_C++ explicitly using a compiler option and link with +PTW32_CLEANUP_C++ explicitly using a compiler option and link with pthreadVCE.dll as you did before. @@ -1434,7 +1434,7 @@ consistent with Solaris. - Thomas Pfaff * Found a fix for the library and workaround for applications for -the known bug #2, i.e. where __PTW32_CLEANUP_CXX or __PTW32_CLEANUP_SEH is defined. +the known bug #2, i.e. where PTW32_CLEANUP_CXX or PTW32_CLEANUP_SEH is defined. See the "Known Bugs in this snapshot" section below. This could be made transparent to applications by replacing the macros that diff --git a/_ptw32.h b/_ptw32.h index 5821f94d..f484c299 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -35,18 +35,18 @@ * -------------------------------------------------------------------------- */ -#ifndef __PTW32_H -#define __PTW32_H +#ifndef PTW32_H +#define PTW32_H /* See the README file for an explanation of the pthreads4w * version numbering scheme and how the DLL is named etc. */ -#define __PTW32_VERSION_MAJOR 3 -#define __PTW32_VERSION_MINOR 0 -#define __PTW32_VERSION_MICRO 2 -#define __PTW32_VERION_BUILD 0 -#define __PTW32_VERSION 3,0,2,0 -#define __PTW32_VERSION_STRING "3, 0, 2, 0\0" +#define PTW32_VERSION_MAJOR 3 +#define PTW32_VERSION_MINOR 0 +#define PTW32_VERSION_MICRO 2 +#define PTW32_VERION_BUILD 0 +#define PTW32_VERSION 3,0,2,0 +#define PTW32_VERSION_STRING "3, 0, 2, 0\0" #if defined(__GNUC__) # pragma GCC system_header @@ -56,23 +56,23 @@ #endif #if defined (__cplusplus) -# define __PTW32_BEGIN_C_DECLS extern "C" { -# define __PTW32_END_C_DECLS } +# define PTW32_BEGIN_C_DECLS extern "C" { +# define PTW32_END_C_DECLS } #else -# define __PTW32_BEGIN_C_DECLS -# define __PTW32_END_C_DECLS +# define PTW32_BEGIN_C_DECLS +# define PTW32_END_C_DECLS #endif -#if defined __PTW32_STATIC_LIB -# define __PTW32_DLLPORT +#if defined PTW32_STATIC_LIB +# define PTW32_DLLPORT -#elif defined __PTW32_BUILD -# define __PTW32_DLLPORT __declspec (dllexport) +#elif defined PTW32_BUILD +# define PTW32_DLLPORT __declspec (dllexport) #else -# define __PTW32_DLLPORT /*__declspec (dllimport)*/ +# define PTW32_DLLPORT /*__declspec (dllimport)*/ #endif -#ifndef __PTW32_CDECL +#ifndef PTW32_CDECL /* FIXME: another internal macro; should have two initial underscores; * Nominally, we prefer to use __cdecl calling convention for all our * functions, but we map it through this macro alias to facilitate the @@ -92,9 +92,9 @@ * remember that this must be defined consistently, for both the DLL * build, and the application build. */ -# define __PTW32_CDECL +# define PTW32_CDECL # else -# define __PTW32_CDECL __cdecl +# define PTW32_CDECL __cdecl # endif #endif @@ -103,8 +103,8 @@ * which is only used when building the pthreads4w libraries. */ -#if !defined (__PTW32_CONFIG_H) && !defined(__PTW32_PSEUDO_CONFIG_H_SOURCED) -# define __PTW32_PSEUDO_CONFIG_H_SOURCED +#if !defined (PTW32_CONFIG_H) && !defined(PTW32_PSEUDO_CONFIG_H_SOURCED) +# define PTW32_PSEUDO_CONFIG_H_SOURCED # if defined(WINCE) # undef HAVE_CPU_AFFINITY # define NEED_DUPLICATEHANDLE @@ -119,9 +119,9 @@ # if _MSC_VER >= 1900 # define HAVE_STRUCT_TIMESPEC # elif _MSC_VER < 1300 -# define __PTW32_CONFIG_MSVC6 +# define PTW32_CONFIG_MSVC6 # elif _MSC_VER < 1400 -# define __PTW32_CONFIG_MSVC7 +# define PTW32_CONFIG_MSVC7 # endif # elif defined(_UWIN) # define HAVE_MODE_T @@ -148,7 +148,7 @@ #elif !defined(__MINGW32__) typedef _int64 int64_t; typedef unsigned _int64 uint64_t; -# if defined (__PTW32_CONFIG_MSVC6) +# if defined (PTW32_CONFIG_MSVC6) typedef long intptr_t; # endif #elif defined(HAVE_STDINT_H) && HAVE_STDINT_H == 1 @@ -193,7 +193,7 @@ #endif /* POSIX 2008 - related to robust mutexes */ -#if __PTW32_VERSION_MAJOR > 2 +#if PTW32_VERSION_MAJOR > 2 # if !defined(EOWNERDEAD) # define EOWNERDEAD 1000 # endif @@ -209,4 +209,4 @@ # endif #endif -#endif /* !__PTW32_H */ +#endif /* !PTW32_H */ diff --git a/cleanup.c b/cleanup.c index 0c3b05bd..8ecfe9ce 100644 --- a/cleanup.c +++ b/cleanup.c @@ -45,13 +45,13 @@ /* - * The functions __ptw32_pop_cleanup and __ptw32_push_cleanup + * The functions ptw32_pop_cleanup and ptw32_push_cleanup * are implemented here for applications written in C with no * SEH or C++ destructor support. */ -__ptw32_cleanup_t * -__ptw32_pop_cleanup (int execute) +ptw32_cleanup_t * +ptw32_pop_cleanup (int execute) /* * ------------------------------------------------------ * DOCPUBLIC @@ -77,9 +77,9 @@ __ptw32_pop_cleanup (int execute) * ------------------------------------------------------ */ { - __ptw32_cleanup_t *cleanup; + ptw32_cleanup_t *cleanup; - cleanup = (__ptw32_cleanup_t *) pthread_getspecific (__ptw32_cleanupKey); + cleanup = (ptw32_cleanup_t *) pthread_getspecific (ptw32_cleanupKey); if (cleanup != NULL) { @@ -90,18 +90,18 @@ __ptw32_pop_cleanup (int execute) } - pthread_setspecific (__ptw32_cleanupKey, (void *) cleanup->prev); + pthread_setspecific (ptw32_cleanupKey, (void *) cleanup->prev); } return (cleanup); -} /* __ptw32_pop_cleanup */ +} /* ptw32_pop_cleanup */ void -__ptw32_push_cleanup (__ptw32_cleanup_t * cleanup, - __ptw32_cleanup_callback_t routine, void *arg) +ptw32_push_cleanup (ptw32_cleanup_t * cleanup, + ptw32_cleanup_callback_t routine, void *arg) /* * ------------------------------------------------------ * DOCPUBLIC @@ -132,7 +132,7 @@ __ptw32_push_cleanup (__ptw32_cleanup_t * cleanup, * b) when the thread acts on a cancellation request, * c) or when the thrad calls pthread_cleanup_pop with a nonzero * 'execute' argument - * NOTE: pthread_push_cleanup, __ptw32_pop_cleanup must be paired + * NOTE: pthread_push_cleanup, ptw32_pop_cleanup must be paired * in the same lexical scope. * * RESULTS @@ -145,8 +145,8 @@ __ptw32_push_cleanup (__ptw32_cleanup_t * cleanup, cleanup->routine = routine; cleanup->arg = arg; - cleanup->prev = (__ptw32_cleanup_t *) pthread_getspecific (__ptw32_cleanupKey); + cleanup->prev = (ptw32_cleanup_t *) pthread_getspecific (ptw32_cleanupKey); - pthread_setspecific (__ptw32_cleanupKey, (void *) cleanup); + pthread_setspecific (ptw32_cleanupKey, (void *) cleanup); -} /* __ptw32_push_cleanup */ +} /* ptw32_push_cleanup */ diff --git a/cmake/get_version.cmake b/cmake/get_version.cmake index 82e92c7e..5afaebc1 100644 --- a/cmake/get_version.cmake +++ b/cmake/get_version.cmake @@ -1,17 +1,17 @@ file(READ ${CMAKE_SOURCE_DIR}/_ptw32.h _PTW32_H_CONTENTS) -string(REGEX MATCH "#define __PTW32_VERSION_MAJOR ([a-zA-Z0-9_]+)" PTW32_VERSION_MAJOR "${_PTW32_H_CONTENTS}") -string(REPLACE "#define __PTW32_VERSION_MAJOR " "" PTW32_VERSION_MAJOR "${PTW32_VERSION_MAJOR}") +string(REGEX MATCH "#define PTW32_VERSION_MAJOR ([a-zA-Z0-9_]+)" PTW32_VERSION_MAJOR "${_PTW32_H_CONTENTS}") +string(REPLACE "#define PTW32_VERSION_MAJOR " "" PTW32_VERSION_MAJOR "${PTW32_VERSION_MAJOR}") -string(REGEX MATCH "#define __PTW32_VERSION_MINOR ([a-zA-Z0-9_]+)" PTW32_VERSION_MINOR "${_PTW32_H_CONTENTS}") -string(REPLACE "#define __PTW32_VERSION_MINOR " "" PTW32_VERSION_MINOR "${PTW32_VERSION_MINOR}") +string(REGEX MATCH "#define PTW32_VERSION_MINOR ([a-zA-Z0-9_]+)" PTW32_VERSION_MINOR "${_PTW32_H_CONTENTS}") +string(REPLACE "#define PTW32_VERSION_MINOR " "" PTW32_VERSION_MINOR "${PTW32_VERSION_MINOR}") -string(REGEX MATCH "#define __PTW32_VERSION_MICRO ([a-zA-Z0-9_]+)" PTW32_VERSION_MICRO "${_PTW32_H_CONTENTS}") -string(REPLACE "#define __PTW32_VERSION_MICRO " "" PTW32_VERSION_MICRO "${PTW32_VERSION_MICRO}") +string(REGEX MATCH "#define PTW32_VERSION_MICRO ([a-zA-Z0-9_]+)" PTW32_VERSION_MICRO "${_PTW32_H_CONTENTS}") +string(REPLACE "#define PTW32_VERSION_MICRO " "" PTW32_VERSION_MICRO "${PTW32_VERSION_MICRO}") -string(REGEX MATCH "#define __PTW32_VERION_BUILD ([a-zA-Z0-9_]+)" PTW32_VERSION_BUILD "${_PTW32_H_CONTENTS}") -string(REPLACE "#define __PTW32_VERION_BUILD " "" PTW32_VERSION_BUILD "${PTW32_VERSION_BUILD}") +string(REGEX MATCH "#define PTW32_VERION_BUILD ([a-zA-Z0-9_]+)" PTW32_VERSION_BUILD "${_PTW32_H_CONTENTS}") +string(REPLACE "#define PTW32_VERION_BUILD " "" PTW32_VERSION_BUILD "${PTW32_VERSION_BUILD}") if(BUILD_NUMBER) set(PTW32_VERSION_BUILD ${BUILD_NUMBER}) diff --git a/cmake/version.rc.in b/cmake/version.rc.in index 0e41fcb2..4df76c7c 100644 --- a/cmake/version.rc.in +++ b/cmake/version.rc.in @@ -32,102 +32,102 @@ #include "pthread.h" /* - * Note: the correct __PTW32_CLEANUP_* macro must be defined corresponding to + * Note: the correct PTW32_CLEANUP_* macro must be defined corresponding to * the definition used for the object file builds. This is done in the * relevent makefiles for the command line builds, but users should ensure * that their resource compiler knows what it is too. - * If using the default (no __PTW32_CLEANUP_* defined), pthread.h will define it - * as __PTW32_CLEANUP_C. + * If using the default (no PTW32_CLEANUP_* defined), pthread.h will define it + * as PTW32_CLEANUP_C. */ -#if defined (__PTW32_RC_MSC) -# if defined (__PTW32_ARCHx64) || defined (__PTW32_ARCHX64) || defined (__PTW32_ARCHAMD64) -# if defined(__PTW32_CLEANUP_C) -# define __PTW32_VERSIONINFO_NAME "pthreadVC@PTW32_VER@.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C x64\0" -# elif defined(__PTW32_CLEANUP_CXX) -# define __PTW32_VERSIONINFO_NAME "pthreadVCE@PTW32_VER@.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C++ x64\0" -# elif defined(__PTW32_CLEANUP_SEH) -# define __PTW32_VERSIONINFO_NAME "pthreadVSE@PTW32_VER@.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH x64\0" +#if defined (PTW32_RC_MSC) +# if defined (PTW32_ARCHx64) || defined (PTW32_ARCHX64) || defined (PTW32_ARCHAMD64) +# if defined(PTW32_CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadVC@PTW32_VER@.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C x64\0" +# elif defined(PTW32_CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadVCE@PTW32_VER@.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C++ x64\0" +# elif defined(PTW32_CLEANUP_SEH) +# define PTW32_VERSIONINFO_NAME "pthreadVSE@PTW32_VER@.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C SEH x64\0" # endif -# elif defined (__PTW32_ARCHx86) || defined (__PTW32_ARCHX86) -# if defined(__PTW32_CLEANUP_C) -# define __PTW32_VERSIONINFO_NAME "pthreadVC@PTW32_VER@.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C x86\0" -# elif defined(__PTW32_CLEANUP_CXX) -# define __PTW32_VERSIONINFO_NAME "pthreadVCE@PTW32_VER@.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C++ x86\0" -# elif defined(__PTW32_CLEANUP_SEH) -# define __PTW32_VERSIONINFO_NAME "pthreadVSE@PTW32_VER@.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH x86\0" +# elif defined (PTW32_ARCHx86) || defined (PTW32_ARCHX86) +# if defined(PTW32_CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadVC@PTW32_VER@.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C x86\0" +# elif defined(PTW32_CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadVCE@PTW32_VER@.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C++ x86\0" +# elif defined(PTW32_CLEANUP_SEH) +# define PTW32_VERSIONINFO_NAME "pthreadVSE@PTW32_VER@.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C SEH x86\0" # endif -# elif defined (__PTW32_ARCHARM) || defined (__PTW32_ARCHARM) -# if defined(__PTW32_CLEANUP_C) -# define __PTW32_VERSIONINFO_NAME "pthreadVC@PTW32_VER@.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C ARM\0" -# elif defined(__PTW32_CLEANUP_CXX) -# define __PTW32_VERSIONINFO_NAME "pthreadVCE@PTW32_VER@.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C++ ARM\0" -# elif defined(__PTW32_CLEANUP_SEH) -# define __PTW32_VERSIONINFO_NAME "pthreadVSE@PTW32_VER@.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH ARM\0" +# elif defined (PTW32_ARCHARM) || defined (PTW32_ARCHARM) +# if defined(PTW32_CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadVC@PTW32_VER@.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C ARM\0" +# elif defined(PTW32_CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadVCE@PTW32_VER@.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C++ ARM\0" +# elif defined(PTW32_CLEANUP_SEH) +# define PTW32_VERSIONINFO_NAME "pthreadVSE@PTW32_VER@.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C SEH ARM\0" # endif -# elif defined (__PTW32_ARCHARM64) || defined (__PTW32_ARCHARM64) -# if defined(__PTW32_CLEANUP_C) -# define __PTW32_VERSIONINFO_NAME "pthreadVC@PTW32_VER@.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C ARM64\0" -# elif defined(__PTW32_CLEANUP_CXX) -# define __PTW32_VERSIONINFO_NAME "pthreadVCE@PTW32_VER@.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C++ ARM64\0" -# elif defined(__PTW32_CLEANUP_SEH) -# define __PTW32_VERSIONINFO_NAME "pthreadVSE@PTW32_VER@.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH ARM64\0" +# elif defined (PTW32_ARCHARM64) || defined (PTW32_ARCHARM64) +# if defined(PTW32_CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadVC@PTW32_VER@.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C ARM64\0" +# elif defined(PTW32_CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadVCE@PTW32_VER@.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C++ ARM64\0" +# elif defined(PTW32_CLEANUP_SEH) +# define PTW32_VERSIONINFO_NAME "pthreadVSE@PTW32_VER@.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "MS C SEH ARM64\0" # endif # endif #elif defined(__GNUC__) # if defined(_M_X64) -# define __PTW32_ARCH "x64 (mingw64)" +# define PTW32_ARCH "x64 (mingw64)" # else -# define __PTW32_ARCH "x86 (mingw32)" +# define PTW32_ARCH "x86 (mingw32)" # endif -# if defined(__PTW32_CLEANUP_C) -# define __PTW32_VERSIONINFO_NAME "pthreadGC@PTW32_VER@.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "GNU C " __PTW32_ARCH "\0" -# elif defined(__PTW32_CLEANUP_CXX) -# define __PTW32_VERSIONINFO_NAME "pthreadGCE@PTW32_VER@.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "GNU C++ " __PTW32_ARCH "\0" +# if defined(PTW32_CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadGC@PTW32_VER@.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "GNU C " PTW32_ARCH "\0" +# elif defined(PTW32_CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadGCE@PTW32_VER@.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "GNU C++ " PTW32_ARCH "\0" # else # error Resource compiler doesn't know which cleanup style you're using - see version.rc # endif #elif defined(__BORLANDC__) # if defined(_M_X64) -# define __PTW32_ARCH "x64 (Borland)" +# define PTW32_ARCH "x64 (Borland)" # else -# define __PTW32_ARCH "x86 (Borland)" +# define PTW32_ARCH "x86 (Borland)" # endif -# if defined(__PTW32_CLEANUP_C) -# define __PTW32_VERSIONINFO_NAME "pthreadBC@PTW32_VER@.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "BORLAND C " __PTW32_ARCH "\0" -# elif defined(__PTW32_CLEANUP_CXX) -# define __PTW32_VERSIONINFO_NAME "pthreadBCE@PTW32_VER@.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "BORLAND C++ " __PTW32_ARCH "\0" +# if defined(PTW32_CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadBC@PTW32_VER@.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "BORLAND C " PTW32_ARCH "\0" +# elif defined(PTW32_CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadBCE@PTW32_VER@.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "BORLAND C++ " PTW32_ARCH "\0" # else # error Resource compiler doesn't know which cleanup style you're using - see version.rc # endif #elif defined(__WATCOMC__) # if defined(_M_X64) -# define __PTW32_ARCH "x64 (Watcom)" +# define PTW32_ARCH "x64 (Watcom)" # else -# define __PTW32_ARCH "x86 (Watcom)" +# define PTW32_ARCH "x86 (Watcom)" # endif -# if defined(__PTW32_CLEANUP_C) -# define __PTW32_VERSIONINFO_NAME "pthreadWC@PTW32_VER@.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "WATCOM C " __PTW32_ARCH "\0" -# elif defined(__PTW32_CLEANUP_CXX) -# define __PTW32_VERSIONINFO_NAME "pthreadWCE@PTW32_VER@.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "WATCOM C++ " __PTW32_ARCH "\0" +# if defined(PTW32_CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadWC@PTW32_VER@.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "WATCOM C " PTW32_ARCH "\0" +# elif defined(PTW32_CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadWCE@PTW32_VER@.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "WATCOM C++ " PTW32_ARCH "\0" # else # error Resource compiler doesn't know which cleanup style you're using - see version.rc # endif @@ -137,8 +137,8 @@ VS_VERSION_INFO VERSIONINFO - FILEVERSION __PTW32_VERSION - PRODUCTVERSION __PTW32_VERSION + FILEVERSION PTW32_VERSION + PRODUCTVERSION PTW32_VERSION FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS 0 FILEOS VOS__WINDOWS32 @@ -149,11 +149,11 @@ BEGIN BLOCK "040904b0" BEGIN 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 "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\0" VALUE "LegalCopyright", "Copyright - Project contributors 1999-2018\0" VALUE "Comments", "https://sourceforge.net/p/pthreads4w/wiki/Contributors/\0" diff --git a/config.h b/config.h index 6da56909..379371d5 100644 --- a/config.h +++ b/config.h @@ -1,14 +1,14 @@ /* config.h */ -#ifndef __PTW32_CONFIG_H -#define __PTW32_CONFIG_H +#ifndef PTW32_CONFIG_H +#define PTW32_CONFIG_H /********************************************************************* * Defaults: see target specific redefinitions below. *********************************************************************/ /* We're building the pthreads-win32 library */ -#define __PTW32_BUILD +#define PTW32_BUILD /* CPU affinity */ #define HAVE_CPU_AFFINITY @@ -77,7 +77,7 @@ # applications that make assumptions that POSIX does not guarantee are # not strictly compliant and may fail or misbehave with some settings. # -# __PTW32_THREAD_ID_REUSE_INCREMENT +# PTW32_THREAD_ID_REUSE_INCREMENT # Purpose: # POSIX says that applications should assume that thread IDs can be # recycled. However, Solaris (and some other systems) use a [very large] @@ -95,11 +95,11 @@ # (i.e. will wrap sooner). This might be useful to emulate some embedded # systems. # -# define __PTW32_THREAD_ID_REUSE_INCREMENT 0 +# define PTW32_THREAD_ID_REUSE_INCREMENT 0 # # ---------------------------------------------------------------------- */ -#undef __PTW32_THREAD_ID_REUSE_INCREMENT +#undef PTW32_THREAD_ID_REUSE_INCREMENT /********************************************************************* @@ -147,4 +147,4 @@ #define HAVE_STRUCT_TIMESPEC #endif -#endif /* __PTW32_CONFIG_H */ +#endif /* PTW32_CONFIG_H */ diff --git a/configure.ac b/configure.ac index f571dbf8..f8ecd790 100644 --- a/configure.ac +++ b/configure.ac @@ -48,8 +48,8 @@ AC_PROG_RANLIB # not normally support it. # AH_TOP(dnl -[#ifndef __PTW32_CONFIG_H] -[#define __PTW32_CONFIG_H]dnl +[#ifndef PTW32_CONFIG_H] +[#define PTW32_CONFIG_H]dnl ) # FIXME: AC_C_INLINE defines 'inline' to work with any C compiler, # whether or not it supports inline code expansion, but it does NOT diff --git a/context.h b/context.h index 318b689a..e9b6b657 100644 --- a/context.h +++ b/context.h @@ -32,40 +32,40 @@ * limitations under the License. */ -#ifndef __PTW32_CONTEXT_H -#define __PTW32_CONTEXT_H +#ifndef PTW32_CONTEXT_H +#define PTW32_CONTEXT_H -#undef __PTW32_PROGCTR +#undef PTW32_PROGCTR #if defined(_M_IX86) || (defined(_X86_) && !defined(__amd64__)) -#define __PTW32_PROGCTR(Context) ((Context).Eip) +#define PTW32_PROGCTR(Context) ((Context).Eip) #endif #if defined (_M_IA64) || defined(_IA64) -#define __PTW32_PROGCTR(Context) ((Context).StIIP) +#define PTW32_PROGCTR(Context) ((Context).StIIP) #endif #if defined(_MIPS_) || defined(MIPS) -#define __PTW32_PROGCTR(Context) ((Context).Fir) +#define PTW32_PROGCTR(Context) ((Context).Fir) #endif #if defined(_ALPHA_) -#define __PTW32_PROGCTR(Context) ((Context).Fir) +#define PTW32_PROGCTR(Context) ((Context).Fir) #endif #if defined(_PPC_) -#define __PTW32_PROGCTR(Context) ((Context).Iar) +#define PTW32_PROGCTR(Context) ((Context).Iar) #endif #if defined(_AMD64_) || defined(__amd64__) -#define __PTW32_PROGCTR(Context) ((Context).Rip) +#define PTW32_PROGCTR(Context) ((Context).Rip) #endif #if defined(_ARM_) || defined(ARM) || defined(_M_ARM) || defined(_M_ARM64) -#define __PTW32_PROGCTR(Context) ((Context).Pc) +#define PTW32_PROGCTR(Context) ((Context).Pc) #endif -#if !defined (__PTW32_PROGCTR) +#if !defined (PTW32_PROGCTR) #error Module contains CPU-specific code; modify and recompile. #endif diff --git a/create.c b/create.c index 3ed7ca91..d387dfdc 100644 --- a/create.c +++ b/create.c @@ -46,7 +46,7 @@ int pthread_create (pthread_t * tid, const pthread_attr_t * attr, - void * (__PTW32_CDECL *start) (void *), void *arg) + void * (PTW32_CDECL *start) (void *), void *arg) /* * ------------------------------------------------------ * DOCPUBLIC @@ -86,12 +86,12 @@ pthread_create (pthread_t * tid, */ { pthread_t thread; - __ptw32_thread_t * tp; - __ptw32_thread_t * sp; + ptw32_thread_t * tp; + ptw32_thread_t * sp; register pthread_attr_t a; HANDLE threadH = 0; int result = EAGAIN; - int run = __PTW32_TRUE; + int run = PTW32_TRUE; ThreadParms *parms = NULL; unsigned int stackSize; int priority; @@ -104,7 +104,7 @@ pthread_create (pthread_t * tid, */ tid->x = 0; - if (NULL == (sp = (__ptw32_thread_t *)pthread_self().p)) + if (NULL == (sp = (ptw32_thread_t *)pthread_self().p)) { goto FAIL0; } @@ -118,13 +118,13 @@ pthread_create (pthread_t * tid, a = NULL; } - thread = __ptw32_new(); + thread = ptw32_new(); if (thread.p == NULL) { goto FAIL0; } - tp = (__ptw32_thread_t *) thread.p; + tp = (ptw32_thread_t *) thread.p; priority = tp->sched_priority; @@ -206,7 +206,7 @@ pthread_create (pthread_t * tid, /* * State must be >= PThreadStateRunning before we return to the caller. - * __ptw32_threadStart will set state to PThreadStateRunning. + * ptw32_threadStart will set state to PThreadStateRunning. */ tp->state = PThreadStateSuspended; @@ -227,7 +227,7 @@ pthread_create (pthread_t * tid, threadH = (HANDLE) _beginthreadex ((void *) NULL, /* No security info */ stackSize, /* default stack size */ - __ptw32_threadStart, + ptw32_threadStart, parms, (unsigned) CREATE_SUSPENDED, @@ -237,7 +237,7 @@ pthread_create (pthread_t * tid, { if (a != NULL) { - (void) __ptw32_setthreadpriority (thread, SCHED_OTHER, priority); + (void) ptw32_setthreadpriority (thread, SCHED_OTHER, priority); } #if defined(HAVE_CPU_AFFINITY) @@ -255,17 +255,17 @@ pthread_create (pthread_t * tid, #else { - __ptw32_mcs_local_node_t stateLock; + ptw32_mcs_local_node_t stateLock; /* * This lock will force pthread_threadStart() to wait until we have * the thread handle and have set the priority. */ - __ptw32_mcs_lock_acquire(&tp->stateLock, &stateLock); + ptw32_mcs_lock_acquire(&tp->stateLock, &stateLock); tp->threadH = threadH = - (HANDLE) _beginthread (__ptw32_threadStart, stackSize, /* default stack size */ + (HANDLE) _beginthread (ptw32_threadStart, stackSize, /* default stack size */ parms); /* @@ -289,7 +289,7 @@ pthread_create (pthread_t * tid, if (a != NULL) { - (void) __ptw32_setthreadpriority (thread, SCHED_OTHER, priority); + (void) ptw32_setthreadpriority (thread, SCHED_OTHER, priority); } #if defined(HAVE_CPU_AFFINITY) @@ -300,7 +300,7 @@ pthread_create (pthread_t * tid, } - __ptw32_mcs_lock_release (&stateLock); + ptw32_mcs_lock_release (&stateLock); } #endif @@ -319,8 +319,7 @@ pthread_create (pthread_t * tid, FAIL0: if (result != 0) { - - __ptw32_threadDestroy (thread); + ptw32_threadDestroy (thread); tp = NULL; if (parms != NULL) diff --git a/dll.c b/dll.c index 674f7c7e..66be7b4d 100644 --- a/dll.c +++ b/dll.c @@ -39,7 +39,7 @@ #include "pthread.h" #include "implement.h" -#if !defined (__PTW32_STATIC_LIB) +#if !defined (PTW32_STATIC_LIB) #if defined(_MSC_VER) /* @@ -49,11 +49,11 @@ #pragma warning( disable : 4100 ) #endif -__PTW32_BEGIN_C_DECLS +PTW32_BEGIN_C_DECLS BOOL WINAPI DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) { - BOOL result = __PTW32_TRUE; + BOOL result = PTW32_TRUE; switch (fdwReason) { @@ -83,21 +83,20 @@ BOOL WINAPI DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved) } return (result); - } /* DllMain */ -__PTW32_END_C_DECLS +PTW32_END_C_DECLS #endif /* !PTW32_STATIC_LIB */ -#if ! defined (__PTW32_BUILD_INLINED) +#if ! defined (PTW32_BUILD_INLINED) /* * Avoid "translation unit is empty" warnings */ typedef int foo; #endif -#if defined(__PTW32_STATIC_LIB) +#if defined(PTW32_STATIC_LIB) /* * Note: MSVC 8 and higher use code in dll.c, which enables TLS cleanup @@ -126,13 +125,13 @@ typedef int foo; * doing this deliberately. */ -extern int __ptw32_on_process_init(void) +extern int ptw32_on_process_init(void) { pthread_win32_process_attach_np (); return 0; } -extern int __ptw32_on_process_exit(void) +extern int ptw32_on_process_exit(void) { pthread_win32_thread_detach_np (); pthread_win32_process_detach_np (); @@ -140,26 +139,26 @@ extern int __ptw32_on_process_exit(void) } #if defined(__GNUC__) -__attribute__((section(".ctors"), used)) extern int (*gcc_ctor)(void) = __ptw32_on_process_init; -__attribute__((section(".dtors"), used)) extern int (*gcc_dtor)(void) = __ptw32_on_process_exit; +__attribute__((section(".ctors"), used)) extern int (*gcc_ctor)(void) = ptw32_on_process_init; +__attribute__((section(".dtors"), used)) extern int (*gcc_dtor)(void) = ptw32_on_process_exit; #elif defined(_MSC_VER) # if _MSC_VER >= 1400 /* MSVC8+ */ # pragma section(".CRT$XCU", long, read) # pragma section(".CRT$XPU", long, read) -__declspec(allocate(".CRT$XCU")) extern int (*msc_ctor)(void) = __ptw32_on_process_init; -__declspec(allocate(".CRT$XPU")) extern int (*msc_dtor)(void) = __ptw32_on_process_exit; +__declspec(allocate(".CRT$XCU")) extern int (*msc_ctor)(void) = ptw32_on_process_init; +__declspec(allocate(".CRT$XPU")) extern int (*msc_dtor)(void) = ptw32_on_process_exit; # else # pragma data_seg(".CRT$XCU") -extern int (*msc_ctor)(void) = __ptw32_on_process_init; +extern int (*msc_ctor)(void) = ptw32_on_process_init; # pragma data_seg(".CRT$XPU") -extern int (*msc_dtor)(void) = __ptw32_on_process_exit; +extern int (*msc_dtor)(void) = ptw32_on_process_exit; # pragma data_seg() /* reset data segment */ # endif #endif #endif /* defined(__MINGW32__) || defined(_MSC_VER) */ -__PTW32_BEGIN_C_DECLS +PTW32_BEGIN_C_DECLS /* This dummy function exists solely to be referenced by other modules * (specifically, in implement.h), so that the linker can't optimize away @@ -169,9 +168,9 @@ __PTW32_BEGIN_C_DECLS * (whole library single translation unit) * Leaving it here in case it affects small-static builds. */ -void __ptw32_autostatic_anchor(void) { abort(); } +void ptw32_autostatic_anchor(void) { abort(); } -__PTW32_END_C_DECLS +PTW32_END_C_DECLS -#endif /* __PTW32_STATIC_LIB */ +#endif /* PTW32_STATIC_LIB */ diff --git a/docs/ChangeLog.md b/docs/ChangeLog.md index d37c9b8e..4affa4db 100644 --- a/docs/ChangeLog.md +++ b/docs/ChangeLog.md @@ -5,15 +5,15 @@ 2018-08-19 Ross Johnson - * context.h (__PTW32_PROCPTR): Added missing '__' prefix for v3. + * context.h (PTW32_PROCPTR): Added missing '__' prefix for v3. 2018-08-10 Ross Johnson * Makefile (clean): remove *.idb files. - * dll.c: replace 'extern "C"' with macros __PTW32_BEGIN_C_DECLS/__PTW32_BEGIN_C_DECLS - for consistency tidy-up; add comment re __ptw32_autostatic_anchor() function; + * dll.c: replace 'extern "C"' with macros PTW32_BEGIN_C_DECLS/PTW32_BEGIN_C_DECLS + for consistency tidy-up; add comment re ptw32_autostatic_anchor() function; make our static constructor/destructors "extern" to avoid optimisers. - * implement.h (__ptw32_autostatic_anchor): add __PTW32_BEGIN_C_DECLS/__PTW32_BEGIN_C_DECLS + * implement.h (ptw32_autostatic_anchor): add PTW32_BEGIN_C_DECLS/PTW32_BEGIN_C_DECLS envelope. 2018-08-08 Ross Johnson @@ -91,22 +91,22 @@ 2016-12-20 Ross Johnson - * all (PTW32_*): rename to __PTW32_*. - (ptw32_*): rename to __ptw32_*. + * all (PTW32_*): rename to PTW32_*. + (ptw32_*): rename to ptw32_*. (PtW32*): rename to __PtW32*. - * pthread.h (__PTW32_VERSION_MAJOR): = 3 - (__PTW32_VERSION_MINOR): = 0 + * pthread.h (PTW32_VERSION_MAJOR): = 3 + (PTW32_VERSION_MINOR): = 0 * GNUmakefile: removed; must now configure from GNUmakefile.in. I.e. For either MinGW or MinGW-w64: # autoheader # autoconf # ./configure - * pthread.h (PTHREAD_ONCE_INIT): for __PTW32_VERSION_MAJOR > 2, + * pthread.h (PTHREAD_ONCE_INIT): for PTW32_VERSION_MAJOR > 2, reverse element values to conform to new pthread_once_t. 2016-12-18 Ross Johnson - * implement.h (__PTW32_TEST_SNEAK_PEEK): Defined in tests/test.h + * implement.h (PTW32_TEST_SNEAK_PEEK): Defined in tests/test.h to control what some tests see when sneaking a peek inside this header. * GNUMakefile.in: call tests "make realclean" @@ -253,7 +253,7 @@ * pthread_attr_getname_np.c: Initial version. * pthread.h: Add new prototypes. * implement.h (pthread_attr_t_): Add "thrname" element. - * (__ptw32_thread_t): Add "name" element. + * (ptw32_thread_t): Add "name" element. 2013-06-06 Ross Johnson @@ -416,45 +416,45 @@ * README.NONPORTABLE: It's "DllMain", not "dllMain". * common.mk: Start of an attempt to define dependencies for pthread.$(OBJEXT). - * implement.h: Generalized __PTW32_BROKEN_ERRNO into + * implement.h: Generalized PTW32_BROKEN_ERRNO into PTW32_USES_SEPARATE_CRT; don't do the autostatic-anchoring thing if we're not building the library! - * pthread.h: Moved the __PTW32_CDECL bit into sched.h. pthread.h + * pthread.h: Moved the PTW32_CDECL bit into sched.h. pthread.h already #includes sched.h, so the latter is a good place to put definitions that need to be shared in common; severely simplified the errno declaration for Open Watcom, made it applicable only to Open Watcom, and made the comment less ambiguous; updated the long - comment describing __PTW32_BROK^WPTW32_USES_SEPARATE_CRT; added + comment describing PTW32_BROK^WPTW32_USES_SEPARATE_CRT; added (conditional) declaration of pthread_win32_set_terminate_np(), as - well as __ptw32_terminate_handler (so that eh.h doesn't have to get + well as ptw32_terminate_handler (so that eh.h doesn't have to get involved). * pthread_cond_wait.c: Missed a couple of errno conversions. * pthread_mutex_consistent.c: Visual Studio (either 2010 or 2008 Express, don't recall now) actually errored out due to charset issues in this file, so I've replaced non-ASCII characters with ASCII approximations. - * ptw32_threadStart.c: Big rewrite of __ptw32_threadStart(). + * ptw32_threadStart.c: Big rewrite of ptw32_threadStart(). Everything passes with this, except for GCE (and I can't figure out why). - * sched.h: Moved the __PTW32_CDECL section here (and made it + * sched.h: Moved the PTW32_CDECL section here (and made it idempotent); need to #include for size_t (one of the test programs #includes sched.h as the very first thing); moved the DWORD_PTR definition up, since it groups better with the pid_t definition; also need ULONG_PTR, don't need PDWORD_PTR; can't use PTW32_CONFIG_MSVC6, because if you only #include sched.h you don't get that bit in pthread.h; use a cpp symbol - (__PTW32_HAVE_DWORD_PTR) to inhibit defining *_PTR if needed. Note + (PTW32_HAVE_DWORD_PTR) to inhibit defining *_PTR if needed. Note that this isn't #defined inside the conditional, because there are no other instances of these typedefs that need to be disabled, and sched.h itself is already protected against multiple inclusion; DWORD_PTR can't be size_t, because (on MSVC6) the former is "unsigned long" and the latter is "unsigned int" and C++ doesn't see them as interchangeable; minor edit to the comment... I don't like saying - "VC++" without the "Microsoft" qualifier; use __PTW32_CDECL instead of - a literal __cdecl (this was why I moved the __PTW32_CDECL bit into this + "VC++" without the "Microsoft" qualifier; use PTW32_CDECL instead of + a literal __cdecl (this was why I moved the PTW32_CDECL bit into this file). - * semaphore.h: Put in another idempotentized __PTW32_CDECL bit here; - use __PTW32_CDECL instead of __cdecl, and fixed indentation of function + * semaphore.h: Put in another idempotentized PTW32_CDECL bit here; + use PTW32_CDECL instead of __cdecl, and fixed indentation of function formal parameters. 2012-09-21 Ross Johnson @@ -486,7 +486,7 @@ 2012-09-05 Daniel Richard. G * implement.h: whitespace adjustment. - * dll.c: Facilitate __PTW32_STATIC_LIB being defined in a header file. + * dll.c: Facilitate PTW32_STATIC_LIB being defined in a header file. 2012-09-04 Ross Johnson @@ -517,19 +517,19 @@ 2012-08-31 Daniel Richard. G * implement.h (INLINE): only define if building the inlined make targets. G++ - complained about undefined reference to __ptw32_robust_mutex_remove() because it + complained about undefined reference to ptw32_robust_mutex_remove() because it appears in separate compilation units for "make GCE". 2012-08-29 Ross Johnson - * ptw32_MCS_lock.c (__ptw32_mcs_flag_wait): Fix cast in first 'if' statement. + * ptw32_MCS_lock.c (ptw32_mcs_flag_wait): Fix cast in first 'if' statement. * pthread_mutex_consistent.c (comment): Fix awkward grammar. * pthread_mutexattr_init.c: Initialize robustness element. 2012-08-29 Daniel Richard. G - * implement.h (__PTW32_INTERLOCKED_SIZE): Define as long or LONGLONG. - (__PTW32_INTERLOCKED_SIZEPTR): Define as long* or LONGLONG*. + * implement.h (PTW32_INTERLOCKED_SIZE): Define as long or LONGLONG. + (PTW32_INTERLOCKED_SIZEPTR): Define as long* or LONGLONG*. * pthread_attr_getschedpolicy.c (SCHED_MAX): Fix cast. * ptw32_mutex_check_need_init.c: Fix static mutexattr_t struct initializations. * ptw32_threadStart.c (ExceptionFilter): Add cast. @@ -543,9 +543,9 @@ 2012-08-16 Daniel Richard. G - * pthread.h (__PTW32_CONFIG_MINGW): Defined to simplify complex macro combination. - * (__PTW32_CONFIG_MSVC6): Likewise. - * (__PTW32_CONFIG_MSVC8): Likewise. + * pthread.h (PTW32_CONFIG_MINGW): Defined to simplify complex macro combination. + * (PTW32_CONFIG_MSVC6): Likewise. + * (PTW32_CONFIG_MSVC8): Likewise. * autostatic.c: Substitute new macros. * create.c: Likewise. * pthread_cond_wait.c: Likewise. @@ -570,9 +570,9 @@ 2012-08-11 Daniel Richard. G - * autostatic.c (__ptw32_autostatic_anchor): new function; other + * autostatic.c (ptw32_autostatic_anchor): new function; other changes aimed at de-abstracting functionality. - * impliment.h (__ptw32_autostatic_anchor): dummy reference to + * impliment.h (ptw32_autostatic_anchor): dummy reference to ensure that autostatic.o is always linked into static applications. * GNUmakefile: Various improvements. * Makefile: Likewise. @@ -583,7 +583,7 @@ 2012-03-19 Ross Johnson - * implement.h (__ptw32_spinlock_check_need_init): added missing + * implement.h (ptw32_spinlock_check_need_init): added missing forward declaration. 2012-07-19 Daniel Richard. G @@ -604,8 +604,8 @@ * pthread.h (pthread_create): add __cdecl to prototype start arg (pthread_once): likewise for init_routine arg (pthread_key_create): likewise for destructor arg - (__ptw32_cleanup_push): replace type of routine arg with previously - defined __ptw32_cleanup_callback_t + (ptw32_cleanup_push): replace type of routine arg with previously + defined ptw32_cleanup_callback_t * pthread_key_create.c: add __cdecl attribute to destructor arg * pthread_once.c: add __cdecl attribute to init_routine arg * ptw32_threadStart.c (start): add __cdecl to start variable type @@ -652,7 +652,7 @@ 2011-07-01 Ross Johnson - * *.[ch] (__PTW32_INTERLOCKED_*): Redo 23 and 64 bit versions of these + * *.[ch] (PTW32_INTERLOCKED_*): Redo 23 and 64 bit versions of these macros and re-apply in code to undo the incorrect changes from 2011-06-29; remove some size_t casts which should not be required and may be problematic.a @@ -674,7 +674,7 @@ the superfluous static cleanup routine and call the release routine directly if popped. * create.c (stackSize): Now type size_t. - * pthread.h (struct __ptw32_thread_t_): Rearrange to fix element alignments. + * pthread.h (struct ptw32_thread_t_): Rearrange to fix element alignments. 2011-06-29 Daniel Richard G. @@ -688,7 +688,7 @@ 2011-06-29 Ross Johnson - * *.[ch] (__PTW32_INTERLOCKED_*): These macros should now work for + * *.[ch] (PTW32_INTERLOCKED_*): These macros should now work for both 32 and 64 bit builds. The MingW versions are all inlined asm while the MSVC versions expand to their Interlocked* or Interlocked*64 counterparts appropriately. The argument type have also been changed @@ -704,7 +704,7 @@ compilers such as the Intel compilter icl. * implement.h (#if): Fix forms like #if HAVE_SOMETHING. * pthread.h: Likewise. - * sched.h: Likewise; __PTW32_LEVEL_* becomes __PTW32_SCHED_LEVEL_*. + * sched.h: Likewise; PTW32_LEVEL_* becomes PTW32_SCHED_LEVEL_*. * semaphore.h: Likewise. 2011-05-11 Ross Johnson @@ -738,13 +738,13 @@ 2011-03-11 Ross Johnson - * implement.h (__PTW32_INTERLOCKED_*CREMENT macros): increment/decrement + * implement.h (PTW32_INTERLOCKED_*CREMENT macros): increment/decrement using ++/-- instead of add/subtract 1. * ptw32_MCS_lock.c: Make casts consistent. 2011-03-09 Ross Johnson - * implement.h (__ptw32_thread_t_): Add process unique sequence number. + * implement.h (ptw32_thread_t_): Add process unique sequence number. * global.c: Replace global Critical Section objects with MCS queue locks. * implement.h: Likewise. @@ -770,7 +770,7 @@ * several (MINGW64): Cast and call fixups for 64 bit compatibility; clean build via x86_64-w64-mingw32 cross toolchain on Linux i686 targeting x86_64 win64. - * ptw32_threadStart.c (__ptw32_threadStart): Routine no longer attempts + * ptw32_threadStart.c (ptw32_threadStart): Routine no longer attempts to pass [unexpected C++] exceptions out of scope but ends the thread normally setting EINTR as the exit status. * ptw32_throw.c: Fix C++ exception throwing warnings; ignore @@ -779,7 +779,7 @@ 2011-03-04 Ross Johnson - * implement.h (__PTW32_INTERLOCKED_*): Mingw32 does not provide + * implement.h (PTW32_INTERLOCKED_*): Mingw32 does not provide the __sync_* intrinsics so implemented them here as macro assembler routines. MSVS Interlocked* are emmitted as intrinsics wherever possible, so we want mingw to match it; Extended to @@ -789,8 +789,8 @@ * ptw32_MCS_lock.c: Converted interlocked calls to use new macros. * pthread_barrier_wait.c: Likewise. * pthread_once.c: Likewise. - * ptw32_MCS_lock.c (__ptw32_mcs_node_substitute): Name changed to - __ptw32_mcs_node_transfer. + * ptw32_MCS_lock.c (ptw32_mcs_node_substitute): Name changed to + ptw32_mcs_node_transfer. 2011-02-28 Ross Johnson @@ -840,9 +840,9 @@ 2010-06-19 Ross Johnson - * ptw32_MCS_lock.c (__ptw32_mcs_node_substitute): Fix variable + * ptw32_MCS_lock.c (ptw32_mcs_node_substitute): Fix variable names to avoid using C++ keyword ("new"). - * implement.h (__ptw32_mcs_node_substitute): Likewise. + * implement.h (ptw32_mcs_node_substitute): Likewise. * pthread_barrier_wait.c: Fix signed/unsigned comparison warning. 2010-06-18 Ramiro Polla @@ -872,11 +872,11 @@ 2010-01-26 Ross Johnson - * ptw32_MCS_lock.c (__ptw32_mcs_node_substitute): New routine + * ptw32_MCS_lock.c (ptw32_mcs_node_substitute): New routine to allow relocating the lock owners thread-local node to somewhere else, e.g. to global space so that another thread can release the lock. Used in pthread_barrier_wait. - (__ptw32_mcs_lock_try_acquire): New routine. + (ptw32_mcs_lock_try_acquire): New routine. * pthread_barrier_init: Only one semaphore is used now. * pthread_barrier_wait: Added an MCS guard lock with the last thread to leave the barrier releasing the lock. This removes a deadlock bug @@ -893,7 +893,7 @@ 2008-06-06 Robert Kindred - * ptw32_throw.c (__ptw32_throw): Remove possible reference to NULL + * ptw32_throw.c (ptw32_throw): Remove possible reference to NULL pointer. (At the same time made the switch block conditionally included only if exitCode is needed - RPJ.) * pthread_testcancel.c (pthread_testcancel): Remove duplicate and @@ -958,9 +958,9 @@ 2007-01-06 Romano Paolo Tenca * pthread_cond_destroy.c: Replace sem_wait() with non-cancelable - __ptw32_semwait() since pthread_cond_destroy() is not a cancellation + ptw32_semwait() since pthread_cond_destroy() is not a cancellation point. - * implement.h (__ptw32_spinlock_check_need_init): Add prototype. + * implement.h (ptw32_spinlock_check_need_init): Add prototype. * ptw32_MCS_lock.c: Reverse order of includes. 2007-01-06 Eric Berge @@ -981,7 +981,7 @@ 2007-01-04 Kip Streithorst - * implement.h (__PTW32_INTERLOCKED_COMPARE_EXCHANGE): Add Win64 + * implement.h (PTW32_INTERLOCKED_COMPARE_EXCHANGE): Add Win64 support. 2006-12-20 Ross Johnson @@ -1058,7 +1058,7 @@ 2005-05-13 Ross Johnson * pthread_win32_attach_detach_np.c (pthread_win32_thread_detach_np): - Move on-exit-only stuff from __ptw32_threadDestroy() to here. + Move on-exit-only stuff from ptw32_threadDestroy() to here. * ptw32_threadDestroy.c: It's purpose is now only to reclaim thread resources for detached threads, or via pthread_join() or pthread_detach() on joinable threads. @@ -1073,7 +1073,7 @@ * pthread_detach.c (pthread_detach): reduce extent of the thread existence check since we now don't care if the Win32 thread HANDLE has been closed; reclaim thread resources if the thread has exited already. - * ptw32_throw.c (__ptw32_throw): For Win32 threads that are not implicit, + * ptw32_throw.c (ptw32_throw): For Win32 threads that are not implicit, only Call thread cleanup if statically linking, otherwise leave it to dllMain. * sem_post.c (_POSIX_SEM_VALUE_MAX): Change to SEM_VALUE_MAX. @@ -1131,7 +1131,7 @@ until the process itself exited. In addition, at least one race condition has been removed - where two threads could attempt to release the association resources simultaneously - one via - __ptw32_callUserDestroyRoutines and the other via + ptw32_callUserDestroyRoutines and the other via pthread_key_delete. - thanks to Richard Hughes at Aculab for discovering the problem. * pthread_key_create.c: See above. @@ -1143,7 +1143,7 @@ 2005-04-27 Ross Johnson - * sem_wait.c (__ptw32_sem_wait_cleanup): after cancellation re-attempt + * sem_wait.c (ptw32_sem_wait_cleanup): after cancellation re-attempt to acquire the semaphore to avoid a race with a late sem_post. * sem_timedwait.c: Modify comments. @@ -1151,14 +1151,14 @@ * ptw32_relmillisecs.c: New module; converts future abstime to milliseconds relative to 'now'. - * pthread_mutex_timedlock.c: Use new __ptw32_relmillisecs routine in + * pthread_mutex_timedlock.c: Use new ptw32_relmillisecs routine in place of internal code; remove the NEED_SEM code - this routine is now implemented for builds that define NEED_SEM (WinCE etc) * sem_timedwait.c: Likewise; after timeout or cancellation, re-attempt to acquire the semaphore in case one has been posted since the timeout/cancel occurred. Thanks to Stefan Mueller. * Makefile: Add ptw32_relmillisecs.c module; remove - __ptw32_{in,de}crease_semaphore.c modules. + ptw32_{in,de}crease_semaphore.c modules. * GNUmakefile: Likewise. * Bmakefile: Likewise. @@ -1209,7 +1209,7 @@ * pthread.h: Fix conditional defines for static linking. * sched.h: Liekwise. * semaphore.h: Likewise. - * dll.c (__PTW32_STATIC_LIB): Module is conditionally included + * dll.c (PTW32_STATIC_LIB): Module is conditionally included in the build. 2005-03-16 Ross Johnson ^M @@ -1290,7 +1290,7 @@ starvation problem. - reported by Gottlob Frege - * ptw32_threadDestroy.c (__ptw32_threadDestroy): Implicit threads were + * ptw32_threadDestroy.c (ptw32_threadDestroy): Implicit threads were not closing their Win32 thread duplicate handle. - reported by Dmitrii Semii @@ -1311,7 +1311,7 @@ 2004-11-22 Ross Johnson - * pthread_cond_wait.c (__ptw32_cond_wait_cleanup): Undo change + * pthread_cond_wait.c (ptw32_cond_wait_cleanup): Undo change from 2004-11-02. * Makefile (DLL_VER): Added for DLL naming suffix - see README. * GNUmakefile (DLL_VER): Likewise. @@ -1326,26 +1326,26 @@ 2004-11-19 Ross Johnson - * config.h (__PTW32_THREAD_ID_REUSE_INCREMENT): Added to allow + * config.h (PTW32_THREAD_ID_REUSE_INCREMENT): Added to allow building the library for either unique thread IDs like Solaris or non-unique thread IDs like Linux; allows application developers to override the library's default insensitivity to some apps that may not be strictly POSIX compliant. * version.rc: New resource module to encode version information within the DLL. - * pthread.h: Added __PTW32_VERSION* defines and grouped sections + * pthread.h: Added PTW32_VERSION* defines and grouped sections required by resource compiler together; bulk of file is skipped if RC_INVOKED. Defined some error numbers and other names for Borland compiler. 2004-11-02 Ross Johnson - * pthread_cond_wait.c (__ptw32_cond_wait_cleanup): Lock CV mutex at + * pthread_cond_wait.c (ptw32_cond_wait_cleanup): Lock CV mutex at start of cleanup handler rather than at the end. - * implement.h (__PTW32_THREAD_REUSE_EMPTY): Renamed from *_BOTTOM. - (__ptw32_threadReuseBottom): New global variable. - * global.c (__ptw32_threadReuseBottom): Declare new variable. - * ptw32_reuse.c (__ptw32_reuse): Change reuse LIFO stack to LILO queue + * implement.h (PTW32_THREAD_REUSE_EMPTY): Renamed from *_BOTTOM. + (ptw32_threadReuseBottom): New global variable. + * global.c (ptw32_threadReuseBottom): Declare new variable. + * ptw32_reuse.c (ptw32_reuse): Change reuse LIFO stack to LILO queue to more evenly distribute use of reusable thread IDs; use renamed PTW32_THREAD_REUSE_EMPTY. * ptw32_processTerminate.c (ptw2_processTerminate): Use renamed @@ -1367,22 +1367,22 @@ 2004-10-29 Ross Johnson - * implement.h (pthread_t): Renamed to __ptw32_thread_t; struct contains + * implement.h (pthread_t): Renamed to ptw32_thread_t; struct contains all thread state. - * pthread.h (__ptw32_handle_t): New general purpose struct to serve + * pthread.h (ptw32_handle_t): New general purpose struct to serve as a handle for various reusable object IDs - currently only used - by pthread_t; contains a pointer to __ptw32_thread_t (thread state) + by pthread_t; contains a pointer to ptw32_thread_t (thread state) and a general purpose uint for use as a reuse counter or flags etc. - (pthread_t): typedef'ed to __ptw32_handle_t; the uint is the reuse + (pthread_t): typedef'ed to ptw32_handle_t; the uint is the reuse counter that allows the library to maintain unique POSIX thread IDs. When the pthread struct reuse stack was introduced, threads would often acquire an identical ID to a previously destroyed thread. The same was true for the pre-reuse stack library, by virtue of pthread_t being the address of the thread struct. The new pthread_t retains the reuse stack but provides virtually unique thread IDs. - * sem_wait.c (__ptw32_sem_wait_cleanup): New routine used for + * sem_wait.c (ptw32_sem_wait_cleanup): New routine used for cancellation cleanup. - * sem_timedwait.c (__ptw32_sem_timedwait_cleanup): Likewise. + * sem_timedwait.c (ptw32_sem_timedwait_cleanup): Likewise. 2004-10-22 Ross Johnson @@ -1400,7 +1400,7 @@ * sem_post.c (sem_post): Likewise. * sem_post_multiple.c (sem_post_multiple): Likewise. * sem_getvalue.c (sem_getvalue): Likewise. - * ptw32_semwait.c (__ptw32_semwait): Likewise. + * ptw32_semwait.c (ptw32_semwait): Likewise. * sem_destroy.c (sem_destroy): Likewise; also tightened the conditions for semaphore destruction; in particular, a semaphore will not be destroyed if it has waiters. @@ -1435,7 +1435,7 @@ * sem_timedwait.c (sem_timedwait): Likewise. * sem_post_multiple.c (sem_post_multiple): Likewise. * sem_getvalue.c (sem_getvalue): Likewise. - * ptw32_semwait.c (__ptw32_semwait): Likewise. + * ptw32_semwait.c (ptw32_semwait): Likewise. * implement.h (sem_t_): Add counter element. 2004-10-15 Ross Johnson @@ -1468,11 +1468,11 @@ * pthread_mutex_timedlock.c pthread_mutex_timedlock(): Similarly. * pthread_mutex_trylock.c (pthread_mutex_trylock): Similarly. * pthread_mutex_unlock.c (pthread_mutex_unlock): Similarly. - * ptw32_InterlockedCompareExchange.c (__ptw32_InterlockExchange): New + * ptw32_InterlockedCompareExchange.c (ptw32_InterlockExchange): New function. - (__PTW32_INTERLOCKED_EXCHANGE): Sets up macro to use inlined - __ptw32_InterlockedExchange. - * implement.h (__PTW32_INTERLOCKED_EXCHANGE): Set default to + (PTW32_INTERLOCKED_EXCHANGE): Sets up macro to use inlined + ptw32_InterlockedExchange. + * implement.h (PTW32_INTERLOCKED_EXCHANGE): Set default to InterlockedExchange(). * Makefile: Building using /Ob2 so that asm sections within inline functions are inlined. @@ -1499,7 +1499,7 @@ * pthread_spin_unlock.c (pthread_spin_unlock):Likewise. * ptw32_InterlockedCompareExchange.c: Sets up macro for inlined use. * implement.h (pthread_mutex_t_): Remove Critical Section element. - (__PTW32_INTERLOCKED_COMPARE_EXCHANGE): Set to default non-inlined + (PTW32_INTERLOCKED_COMPARE_EXCHANGE): Set to default non-inlined version of InterlockedCompareExchange(). * private.c: Include ptw32_InterlockedCompareExchange.c first for inlining. @@ -1543,7 +1543,7 @@ * pthread_barrier_wait.c (pthread_barrier_wait): Remove excessive code by substituting the internal non-cancelable version of sem_wait - (__ptw32_semwait). + (ptw32_semwait). 2004-08-25 Ross Johnson @@ -1605,7 +1605,7 @@ * pthread.h (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise. * pthread.h (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise. - * ptw32_mutex_check_need_init.c (__ptw32_mutex_check_need_init): + * ptw32_mutex_check_need_init.c (ptw32_mutex_check_need_init): Add new initialisers. * pthread_mutex_lock.c (pthread_mutex_lock): Check for new @@ -1629,14 +1629,14 @@ * pthread_cancel.c (pthread_cancel): Adapted to use auto-detected QueueUserAPCEx features at run-time. - (__ptw32_Registercancellation): Drop in replacement for QueueUserAPCEx() + (ptw32_Registercancellation): Drop in replacement for QueueUserAPCEx() if it can't be used. Provides older style non-preemptive async cancellation. * pthread_win32_attach_detach_np.c (pthread_win32_attach_np): Auto-detect quserex.dll and the availability of alertdrv.sys; initialise and close on process attach/detach. - * global.c (__ptw32_register_cancellation): Pointer to either - QueueUserAPCEx() or __ptw32_Registercancellation() depending on + * global.c (ptw32_register_cancellation): Pointer to either + QueueUserAPCEx() or ptw32_Registercancellation() depending on availability. QueueUserAPCEx makes pre-emptive async cancellation possible. * implement.h: Add definitions and prototypes related to QueueUserAPC. @@ -1671,13 +1671,13 @@ 2003-10-20 Alexander Terekhov - * pthread_mutex_timedlock.c (__ptw32_semwait): Move to individual module. + * pthread_mutex_timedlock.c (ptw32_semwait): Move to individual module. * ptw32_semwait.c: New module. - * pthread_cond_wait.c (__ptw32_cond_wait_cleanup): Replace cancelable - sem_wait() call with non-cancelable __ptw32_semwait() call. + * pthread_cond_wait.c (ptw32_cond_wait_cleanup): Replace cancelable + sem_wait() call with non-cancelable ptw32_semwait() call. * pthread.c (private.c): Re-order for inlining. GNU C warned that - function __ptw32_semwait() was defined 'inline' after it was called. - * pthread_cond_signal.c (__ptw32_cond_unblock): Likewise. + function ptw32_semwait() was defined 'inline' after it was called. + * pthread_cond_signal.c (ptw32_cond_unblock): Likewise. * pthread_delay_np.c: Disable Watcom warning with comment. * *.c (process.h): Remove include from .c files. This is conditionally included by the common project include files. @@ -1708,7 +1708,7 @@ than pushing to stack. * semaphore.h: Likewise. * sched.h: Likewise. - * pthread_cond_wait.c (__ptw32_cond_wait_cleanup): Define with cdecl attribute + * pthread_cond_wait.c (ptw32_cond_wait_cleanup): Define with cdecl attribute for Watcom compatibility. This routine is called via pthread_cleanup_push so it had to match function arg definition. * Wmakefile: New makefile for Watcom builds. @@ -1738,7 +1738,7 @@ priority levels; record priority level given via attributes, or inherited from parent thread, for later return by pthread_getschedparam. - * ptw32_new.c (__ptw32_new): Initialise pthread_t_ sched_priority element. + * ptw32_new.c (ptw32_new): Initialise pthread_t_ sched_priority element. * pthread_self.c (pthread_self): Set newly created implicit POSIX thread sched_priority to Win32 thread's current actual priority. Temporarily @@ -1754,7 +1754,7 @@ 2003-09-03 Ross Johnson - * w32_cancelableWait.c (__ptw32_cancelable_wait): Allow cancellation + * w32_cancelableWait.c (ptw32_cancelable_wait): Allow cancellation of implicit POSIX threads as well. 2003-09-02 Ross Johnson @@ -1764,16 +1764,16 @@ * pthread_exit.c (pthread_exit): Fix to recycle the POSIX thread handle in addition to calling user TSD destructors. Move the implicit POSIX thread exit - handling to __ptw32_throw to centralise the logic. + handling to ptw32_throw to centralise the logic. - * ptw32_throw.c (__ptw32_throw): Implicit POSIX threads have no point + * ptw32_throw.c (ptw32_throw): Implicit POSIX threads have no point to jump or throw to, so cleanup and exit the thread here in this case. For processes using the C runtime, the exit code will be set to the POSIX reason for the throw (i.e. PTHREAD_CANCEL or the value given to pthread_exit). Note that pthread_exit() already had similar logic, which has been moved to here. - * ptw32_threadDestroy.c (__ptw32_threadDestroy): Don't close the Win32 handle + * ptw32_threadDestroy.c (ptw32_threadDestroy): Don't close the Win32 handle of implicit POSIX threads - expect this to be done by Win32? 2003-09-01 Ross Johnson @@ -1796,10 +1796,10 @@ * pthread_cancel.c (pthread_cancel): Likewise. - * ptw32_threadDestroy.c (__ptw32_threadDestroy): pthread_t structs are + * ptw32_threadDestroy.c (ptw32_threadDestroy): pthread_t structs are never freed - push them onto a stack for reuse. - * ptw32_new.c (__ptw32_new): Check for reusable pthread_t before dynamically + * ptw32_new.c (ptw32_new): Check for reusable pthread_t before dynamically allocating new memory for the struct. * pthread_kill.c (pthread_kill): New file; new routine; takes only a zero @@ -1808,22 +1808,22 @@ * pthread.h (pthread_kill): Add prototype. - * ptw32_reuse.c (__ptw32_threadReusePop): New file; new routine; pop a + * ptw32_reuse.c (ptw32_threadReusePop): New file; new routine; pop a pthread_t off the reuse stack. pthread_t_ structs that have been destroyed, i.e. have exited detached or have been joined, are cleaned up and put onto a reuse stack. Consequently, thread IDs are no longer freed once calloced. The library will attempt to get a struct off this stack before asking the system to alloc new memory when creating threads. The stack is guarded by a global mutex. - (__ptw32_threadReusePush): New routine; push a pthread_t onto the reuse stack. + (ptw32_threadReusePush): New routine; push a pthread_t onto the reuse stack. - * implement.h (__ptw32_threadReusePush): Add new prototype. - (__ptw32_threadReusePop): Likewise. + * implement.h (ptw32_threadReusePush): Add new prototype. + (ptw32_threadReusePop): Likewise. (pthread_t): Add new element. - * ptw32_processTerminate.c (__ptw32_processTerminate): Delete the thread + * ptw32_processTerminate.c (ptw32_processTerminate): Delete the thread reuse lock; free all thread ID structs on the thread reuse stack. - * ptw32_processInitialize.c (__ptw32_processInitialize): Initialise the + * ptw32_processInitialize.c (ptw32_processInitialize): Initialise the thread reuse lock. 2003-07-19 Ross Johnson @@ -1855,7 +1855,7 @@ 2003-05-15 Steven Reddie * pthread_win32_attach_detach_np.c (pthread_win32_process_detach_np): - NULLify __ptw32_selfThreadKey after the thread is destroyed, otherwise + NULLify ptw32_selfThreadKey after the thread is destroyed, otherwise destructors calling pthreads routines might resurrect it again, creating memory leaks. Call the underlying Win32 Tls routine directly rather than pthread_setspecific(). @@ -1873,10 +1873,10 @@ 2002-12-17 Thomas Pfaff - * pthread_mutex_lock.c (__ptw32_semwait): New static routine to provide + * pthread_mutex_lock.c (ptw32_semwait): New static routine to provide a non-cancelable sem_wait() function. This is consistent with the way that pthread_mutex_timedlock.c does it. - (pthread_mutex_lock): Use __ptw32_semwait() instead of sem_wait(). + (pthread_mutex_lock): Use ptw32_semwait() instead of sem_wait(). 2002-12-11 Thomas Pfaff @@ -1892,20 +1892,20 @@ destroy a condition variable while the other is attempting to initialize a condition variable that was created with PTHREAD_COND_INITIALIZER, a deadlock can occur. Shrink - the __ptw32_cond_list_lock critical section to fix it. + the ptw32_cond_list_lock critical section to fix it. 2002-07-31 Ross Johnson - * ptw32_threadStart.c (__ptw32_threadStart): Thread cancelLock - destruction moved to __ptw32_threadDestroy(). + * ptw32_threadStart.c (ptw32_threadStart): Thread cancelLock + destruction moved to ptw32_threadDestroy(). - * ptw32_threadDestroy.c (__ptw32_threadDestroy): Destroy + * ptw32_threadDestroy.c (ptw32_threadDestroy): Destroy the thread's cancelLock. Moved here from ptw32_threadStart.c to cleanup implicit threads as well. 2002-07-30 Alexander Terekhov - * pthread_cond_wait.c (__ptw32_cond_wait_cleanup): + * pthread_cond_wait.c (ptw32_cond_wait_cleanup): Remove code designed to avoid/prevent spurious wakeup problems. It is believed that the sem_timedwait() call is consuming a CV signal that it shouldn't and this is @@ -1917,7 +1917,7 @@ unreasonable abstime values - that would result in unexpected timeout values. - * w32_CancelableWait.c (__ptw32_cancelable_wait): + * w32_CancelableWait.c (ptw32_cancelable_wait): Tighten up return value checking and add comments. @@ -1957,7 +1957,7 @@ * errno.c: Compiler directive was incorrectly including code. * pthread.h: Conditionally added some #defines from config.h needed when not building the library. e.g. NEED_ERRNO, NEED_SEM. - (__PTW32_DLLPORT): Now only defined if _DLL defined. + (PTW32_DLLPORT): Now only defined if _DLL defined. (_errno): Compiler directive was incorrectly including prototype. * sched.h: Conditionally added some #defines from config.h needed when not building the library. @@ -2009,11 +2009,11 @@ may not be tolerant of this. * pthread_cond_init.c: Add CV to linked list. * pthread_cond_destroy.c: Remove CV from linked list. - * global.c (__ptw32_cond_list_head): New variable. - (__ptw32_cond_list_tail): New variable. - (__ptw32_cond_list_cs): New critical section. - * __ptw32_processInitialize (__ptw32_cond_list_cs): Initialize. - * __ptw32_processTerminate (__ptw32_cond_list_cs): Delete. + * global.c (ptw32_cond_list_head): New variable. + (ptw32_cond_list_tail): New variable. + (ptw32_cond_list_cs): New critical section. + * ptw32_processInitialize (ptw32_cond_list_cs): Initialize. + * ptw32_processTerminate (ptw32_cond_list_cs): Delete. * Reduce executable size. @@ -2175,12 +2175,12 @@ 2002-02-07 Ross Johnson @@ -2342,9 +2342,9 @@ 2002-01-15 Ross Johnson - * pthread.h: Unless the build explicitly defines __PTW32_CLEANUP_SEH, - __PTW32_CLEANUP_CXX, or __PTW32_CLEANUP_C, then the build defaults to - __PTW32_CLEANUP_C style cleanup. This style uses setjmp/longjmp + * pthread.h: Unless the build explicitly defines PTW32_CLEANUP_SEH, + PTW32_CLEANUP_CXX, or PTW32_CLEANUP_C, then the build defaults to + PTW32_CLEANUP_C style cleanup. This style uses setjmp/longjmp in the cancellation and thread exit implementations and therefore won't do stack unwinding if linked to applications that have it (e.g. C++ apps). This is currently consistent with most/all @@ -2352,7 +2352,7 @@ * spin.c (pthread_spin_init): Edit renamed function call. * nonportable.c (pthread_num_processors_np): New. - (pthread_getprocessors_np): Renamed to __ptw32_getprocessors + (pthread_getprocessors_np): Renamed to ptw32_getprocessors and moved to private.c. * private.c (pthread_getprocessors): Moved here from nonportable.c. @@ -2377,8 +2377,8 @@ 2002-01-08 Ross Johnson * mutex.c (pthread_mutex_trylock): use - __ptw32_interlocked_compare_exchange function pointer - rather than __ptw32_InterlockedCompareExchange() directly + ptw32_interlocked_compare_exchange function pointer + rather than ptw32_InterlockedCompareExchange() directly to retain portability to non-iX86 processors, e.g. WinCE etc. The pointer will point to the native OS version of InterlockedCompareExchange() if the @@ -2391,7 +2391,7 @@ (pthread_mutex_destroy): Likewise. (pthread_mutex_unlock): Likewise. (pthread_mutex_trylock): Likewise; uses - __ptw32_InterlockedCompareExchange() to avoid need for + ptw32_InterlockedCompareExchange() to avoid need for critical section; library is no longer i386 compatible; recursive mutexes now increment the lock count rather than return EBUSY; errorcheck mutexes return EDEADLCK @@ -2433,9 +2433,9 @@ WSAGetLastError() and WSASetLastError(). * Makefile (wsock32.lib): Likewise. * create.c: Minor mostly inert changes. - * implement.h (__PTW32_MAX): Move into here and renamed + * implement.h (PTW32_MAX): Move into here and renamed from sched.h. - (__PTW32_MIN): Likewise. + (PTW32_MIN): Likewise. * GNUmakefile (TEST_ICE): Define if testing internal implementation of InterlockedCompareExchange. * Makefile (TEST_ICE): Likewise. @@ -2453,18 +2453,18 @@ 2001-10-17 Ross Johnson * barrier.c: Move _LONG and _LPLONG defines into - implement.h; rename to __PTW32_INTERLOCKED_LONG and + implement.h; rename to PTW32_INTERLOCKED_LONG and PTW32_INTERLOCKED_LPLONG respectively. - * spin.c: Likewise; __ptw32_interlocked_compare_exchange used + * spin.c: Likewise; ptw32_interlocked_compare_exchange used in place of InterlockedCompareExchange directly. - * global.c (__ptw32_interlocked_compare_exchange): Add + * global.c (ptw32_interlocked_compare_exchange): Add prototype for this new routine pointer to be used when InterlockedCompareExchange isn't supported by Windows. * nonportable.c (pthread_win32_process_attach_np): Check for support of InterlockedCompareExchange in kernel32 and assign its - address to __ptw32_interlocked_compare_exchange if it exists, or - our own ix86 specific implementation __ptw32_InterlockedCompareExchange. - *private.c (__ptw32_InterlockedCompareExchange): An + address to ptw32_interlocked_compare_exchange if it exists, or + our own ix86 specific implementation ptw32_InterlockedCompareExchange. + *private.c (ptw32_InterlockedCompareExchange): An implementation of InterlockedCompareExchange() which is specific to ix86; written directly in assembler for either MSVC or GNU C; needed because Windows 95 doesn't support @@ -2544,7 +2544,7 @@ is now stored in the barrier struct. * implement.h (pthread_barrier_t_): Lost some/gained one elements. - * private.c (__ptw32_threadStart): Removed some comments. + * private.c (ptw32_threadStart): Removed some comments. 2001-07-10 Ross Johnson @@ -2727,7 +2727,7 @@ * semaphore.h (sem_t): Fixed for compile and test. * implement.h (sem_t_): Likewise. * semaphore.c: Likewise. - * private.c (__ptw32_sem_timedwait): Updated to use new + * private.c (ptw32_sem_timedwait): Updated to use new opaque sem_t. 2001-06-06 Ross Johnson @@ -2748,16 +2748,16 @@ 2001-06-06 Ross Johnson * mutex.c (pthread_mutexattr_init): Remove - __ptw32_mutex_default_kind. + ptw32_mutex_default_kind. 2001-06-05 Ross Johnson * nonportable.c (pthread_mutex_setdefaultkind_np): Remove - should not have been included in the first place. (pthread_mutex_getdefaultkind_np): Likewise. - * global.c (__ptw32_mutex_default_kind): Likewise. + * global.c (ptw32_mutex_default_kind): Likewise. * mutex.c (pthread_mutex_init): Remove use of - __ptw32_mutex_default_kind. + ptw32_mutex_default_kind. * pthread.h (pthread_mutex_setdefaultkind_np): Likewise. (pthread_mutex_getdefaultkind_np): Likewise. * pthread.def (pthread_mutexattr_setkind_np): Added. @@ -2783,10 +2783,10 @@ * condvar.c (pthread_cond_init): Completely revamped. (pthread_cond_destroy): Likewise. - (__ptw32_cond_wait_cleanup): Likewise. - (__ptw32_cond_timedwait): Likewise. - (__ptw32_cond_unblock): New general signaling routine. - (pthread_cond_signal): Now calls __ptw32_cond_unblock. + (ptw32_cond_wait_cleanup): Likewise. + (ptw32_cond_timedwait): Likewise. + (ptw32_cond_unblock): New general signaling routine. + (pthread_cond_signal): Now calls ptw32_cond_unblock. (pthread_cond_broadcast): Likewise. * implement.h (pthread_cond_t_): Revamped. * README.CV: New; explanation of the above changes. @@ -2812,7 +2812,7 @@ using Multithreaded DLL CRT instead of Multithreaded statically linked CRT). * create.c (pthread_create): Likewise; fix typo. - * private.c (__ptw32_threadStart): Eliminate use of terminate() which doesn't + * private.c (ptw32_threadStart): Eliminate use of terminate() which doesn't throw exceptions. * Remove unnecessary #includes from a number of modules - [I had to #include malloc.h in implement.h for gcc - rpj]. @@ -2887,11 +2887,11 @@ * sync.c (pthread_join): Spelling fix in comment. - * private.c (__ptw32_threadStart): Reset original termination + * private.c (ptw32_threadStart): Reset original termination function (C++). - (__ptw32_threadStart): Cleanup detached threads early in case + (ptw32_threadStart): Cleanup detached threads early in case the library is statically linked. - (__ptw32_callUserDestroyRoutines): Remove [SEH] __try block from + (ptw32_callUserDestroyRoutines): Remove [SEH] __try block from destructor call so that unhandled exceptions will be passed through to the system; call terminate() from [C++] try block for the same reason. @@ -2909,22 +2909,22 @@ * config.h.in (HAVE_MODE_T): Added. (_UWIN): Start adding defines for the UWIN package. - * private.c (__ptw32_threadStart): Unhandled exceptions are + * private.c (ptw32_threadStart): Unhandled exceptions are now passed through to the system to deal with. This is consistent with normal Windows behaviour. C++ applications may use set_terminate() to override the default behaviour which is - to call __ptw32_terminate(). Ptw32_terminate() cleans up some + to call ptw32_terminate(). Ptw32_terminate() cleans up some POSIX thread stuff before calling the system default function which calls abort(). The users termination function should conform to standard C++ semantics which is to not return. It should exit the thread (call pthread_exit()) or exit the application. - * private.c (__ptw32_terminate): Added as the default set_terminate() + * private.c (ptw32_terminate): Added as the default set_terminate() function. It calls the system default function after cleaning up some POSIX thread stuff. - * implement.h (__ptw32_try_enter_critical_section): Move + * implement.h (ptw32_try_enter_critical_section): Move declaration. - * global.c (__ptw32_try_enter_critical_section): Moved + * global.c (ptw32_try_enter_critical_section): Moved from dll.c. * dll.c: Move process and thread attach/detach code into functions in nonportable.c. @@ -2994,12 +2994,12 @@ - Ollie Leahy (pthread_setcancelstate): Likewise. (pthread_setcanceltype): Likewise. - * misc.c (__ptw32_cancelable_wait): Likewise. + * misc.c (ptw32_cancelable_wait): Likewise. - * private.c (__ptw32_tkAssocCreate): Remove unused #if 0 + * private.c (ptw32_tkAssocCreate): Remove unused #if 0 wrapped code. - * pthread.h (__ptw32_get_exception_services_code): + * pthread.h (ptw32_get_exception_services_code): Needed to be forward declared unconditionally. 2000-09-06 Ross Johnson @@ -3013,29 +3013,29 @@ 2000-09-02 Ross Johnson - * condvar.c (__ptw32_cond_wait_cleanup): Ensure that all + * condvar.c (ptw32_cond_wait_cleanup): Ensure that all waking threads check if they are the last, and notify the broadcaster if so - even if an error occurs in the waiter. * semaphore.c (_decrease_semaphore): Should be - a call to __ptw32_decrease_semaphore. + a call to ptw32_decrease_semaphore. (_increase_semaphore): Should be a call to - __ptw32_increase_semaphore. + ptw32_increase_semaphore. - * misc.c (__ptw32_cancelable_wait): Renamed from + * misc.c (ptw32_cancelable_wait): Renamed from CancelableWait. * rwlock.c (_rwlock_check*): Renamed to - __ptw32_rwlock_check*. - * mutex.c (_mutex_check*): Renamed to __ptw32_mutex_check*. - * condvar.c (cond_timed*): Renamed to __ptw32_cond_timed*. - (_cond_check*): Renamed to __ptw32_cond_check*. - (cond_wait_cleanup*): Rename to __ptw32_cond_wait_cleanup*. - (__ptw32_cond_timedwait): Add comments. + ptw32_rwlock_check*. + * mutex.c (_mutex_check*): Renamed to ptw32_mutex_check*. + * condvar.c (cond_timed*): Renamed to ptw32_cond_timed*. + (_cond_check*): Renamed to ptw32_cond_check*. + (cond_wait_cleanup*): Rename to ptw32_cond_wait_cleanup*. + (ptw32_cond_timedwait): Add comments. 2000-08-22 Ross Johnson - * private.c (__ptw32_throw): Fix exception test; + * private.c (ptw32_throw): Fix exception test; move exceptionInformation declaration. * tsd.c (pthread_key_create): newkey wrongly declared. @@ -3053,7 +3053,7 @@ (pthread_rwlock_destroy): Invalidate the rwlock before freeing up any of it's resources - to avoid contention. - * private.c (__ptw32_tkAssocCreate): Change assoc->lock + * private.c (ptw32_tkAssocCreate): Change assoc->lock to use a dynamically initialised mutex - only consumes a W32 mutex or critical section when first used, not before. @@ -3063,9 +3063,9 @@ (pthread_mutexattr_destroy): Set attribute to NULL before freeing it's memory - to avoid contention. - * implement.h (__PTW32_EPS_CANCEL/PTW32_EPS_EXIT): + * implement.h (PTW32_EPS_CANCEL/PTW32_EPS_EXIT): Must be defined for all compilers - used as generic - exception selectors by __ptw32_throw(). + exception selectors by ptw32_throw(). * Several: Fix typos from scripted edit session yesterday. @@ -3078,43 +3078,43 @@ * mutex.c (pthread_mutexattr_setforcecs_np): Moved to new file "nonportable.c". - * pthread.h (__PTW32_BUILD): Only redefine __except + * pthread.h (PTW32_BUILD): Only redefine __except and catch compiler keywords if we aren't building - the library (ie. __PTW32_BUILD is not defined) - + the library (ie. PTW32_BUILD is not defined) - this is safer than defining and then undefining if not building the library. * implement.h: Remove __except and catch undefines. - * Makefile (CFLAGS): Define __PTW32_BUILD. - * GNUmakefile (CFLAGS): Define __PTW32_BUILD. + * Makefile (CFLAGS): Define PTW32_BUILD. + * GNUmakefile (CFLAGS): Define PTW32_BUILD. * All appropriate: Change Pthread_exception* to - __ptw32_exception* to be consistent with internal + ptw32_exception* to be consistent with internal identifier naming. - * private.c (__ptw32_throw): New function to provide + * private.c (ptw32_throw): New function to provide a generic exception throw for all internal exceptions and EH schemes. - (__ptw32_threadStart): pthread_exit() value is now + (ptw32_threadStart): pthread_exit() value is now returned via the thread structure exitStatus element. * exit.c (pthread_exit): pthread_exit() value is now returned via the thread structure exitStatus element. - * cancel.c (__ptw32_cancel_self): Now uses __ptw32_throw. + * cancel.c (ptw32_cancel_self): Now uses ptw32_throw. (pthread_setcancelstate): Ditto. (pthread_setcanceltype): Ditto. (pthread_testcancel): Ditto. (pthread_cancel): Ditto. * misc.c (CancelableWait): Ditto. * exit.c (pthread_exit): Ditto. - * All applicable: Change __PTW32_ prefix to + * All applicable: Change PTW32_ prefix to PTW32_ prefix to remove leading underscores from private library identifiers. 2000-08-17 Ross Johnson * All applicable: Change _pthread_ prefix to - __ptw32_ prefix to remove leading underscores + ptw32_ prefix to remove leading underscores from private library identifiers (single and double leading underscores are reserved in the ANSI C standard for compiler implementations). @@ -3185,18 +3185,18 @@ * cleanup.c (pthread_pop_cleanup): Remove _pthread prefix from __except and catch keywords; implement.h - now simply undefines __ptw32__except and - __ptw32_catch if defined; VC++ was not textually - substituting __ptw32_catch etc back to catch as + now simply undefines ptw32__except and + ptw32_catch if defined; VC++ was not textually + substituting ptw32_catch etc back to catch as it was redefined; the reason for using the prefixed version was to make it clear that it was not using the pthread.h redefined catch keyword. - * private.c (__ptw32_threadStart): Ditto. - (__ptw32_callUserDestroyRoutines): Ditto. + * private.c (ptw32_threadStart): Ditto. + (ptw32_callUserDestroyRoutines): Ditto. - * implement.h (__ptw32__except): Remove #define. - (__ptw32_catch): Remove #define. + * implement.h (ptw32__except): Remove #define. + (ptw32_catch): Remove #define. * GNUmakefile (pthread.a): New target to build libpthread32.a from pthread.dll using dlltool. @@ -3229,7 +3229,7 @@ 2000-08-03 Ross Johnson - * pthread.h: Add a base class __ptw32_exception for + * pthread.h: Add a base class ptw32_exception for library internal exceptions and change the "catch" re-define macro to use it. @@ -3253,24 +3253,24 @@ a local copy of the handle for internal use until pthread_create returns. - * private.c (__ptw32_threadStart): Initialise ei[]. - (__ptw32_threadStart): When beginthread is used to start the + * private.c (ptw32_threadStart): Initialise ei[]. + (ptw32_threadStart): When beginthread is used to start the thread, force waiting until the creator thread had the thread handle. - * cancel.c (__ptw32_cancel_thread): Include context switch + * cancel.c (ptw32_cancel_thread): Include context switch code for defined(_X86_) environments in addition to _M_IX86. * rwlock.c (pthread_rwlock_destroy): Assignment changed to avoid compiler warning. - * private.c (__ptw32_get_exception_services_code): Cast + * private.c (ptw32_get_exception_services_code): Cast NULL return value to avoid compiler warning. * cleanup.c (pthread_pop_cleanup): Initialise "cleanup" variable to avoid compiler warnings. - * misc.c (__ptw32_new): Change "new" variable to "t" to avoid + * misc.c (ptw32_new): Change "new" variable to "t" to avoid confusion with the C++ keyword of the same name. * condvar.c (cond_wait_cleanup): Initialise lastWaiter variable. @@ -3355,10 +3355,10 @@ * implement.h: Include SEH code only if MSC is not compiling as C++. - * cancel.c (__ptw32_cancel_thread): Add _M_IX86 check. + * cancel.c (ptw32_cancel_thread): Add _M_IX86 check. (pthread_testcancel): Include SEH code only if MSC is not compiling as C++. - (__ptw32_cancel_self): Include SEH code only if MSC is not + (ptw32_cancel_self): Include SEH code only if MSC is not compiling as C++. 2000-01-06 Erik Hensema @@ -3367,38 +3367,38 @@ 2000-01-04 Ross Johnson - * private.c (__ptw32_get_exception_services_code): New; returns + * private.c (ptw32_get_exception_services_code): New; returns value of EXCEPTION_PTW32_SERVICES. - (__ptw32_processInitialize): Remove initialisation of - __ptw32_exception_services which is no longer needed. + (ptw32_processInitialize): Remove initialisation of + ptw32_exception_services which is no longer needed. - * pthread.h (__ptw32_exception_services): Remove extern. - (__ptw32_get_exception_services_code): Add function prototype; + * pthread.h (ptw32_exception_services): Remove extern. + (ptw32_get_exception_services_code): Add function prototype; use this to return EXCEPTION_PTW32_SERVICES value instead of - using the __ptw32_exception_services variable which I had + using the ptw32_exception_services variable which I had trouble exporting through pthread.def. - * global.c (__ptw32_exception_services): Remove declaration. + * global.c (ptw32_exception_services): Remove declaration. 1999-11-22 Ross Johnson - * implement.h: Forward declare __ptw32_new(); + * implement.h: Forward declare ptw32_new(); - * misc.c (__ptw32_new): New; alloc and initialise a new pthread_t. + * misc.c (ptw32_new): New; alloc and initialise a new pthread_t. (pthread_self): New thread struct is generated by new routine - __ptw32_new(). + ptw32_new(). * create.c (pthread_create): New thread struct is generated - by new routine __ptw32_new(). + by new routine ptw32_new(). 1999-11-21 Ross Johnson - * global.c (__ptw32_exception_services): Declare new variable. + * global.c (ptw32_exception_services): Declare new variable. - * private.c (__ptw32_threadStart): Destroy thread's + * private.c (ptw32_threadStart): Destroy thread's cancelLock mutex; make 'catch' and '__except' usageimmune to redfinitions in pthread.h. - (__ptw32_processInitialize): Init new constant __ptw32_exception_services. + (ptw32_processInitialize): Init new constant ptw32_exception_services. * create.c (pthread_create): Initialise thread's cancelLock mutex. @@ -3412,7 +3412,7 @@ won't catch our internal exceptions. (__except): ditto for __except. - * implement.h (__ptw32_catch): Define internal version + * implement.h (ptw32_catch): Define internal version of 'catch' because 'catch' is redefined by pthread.h. (__except): ditto for __except. (struct pthread_t_): Add cancelLock mutex for async cancel @@ -3420,9 +3420,9 @@ 1999-11-21 Jason Nye , Erik Hensema - * cancel.c (__ptw32_cancel_self): New; part of the async + * cancel.c (ptw32_cancel_self): New; part of the async cancellation implementation. - (__ptw32_cancel_thread): Ditto; this function is X86 + (ptw32_cancel_thread): Ditto; this function is X86 processor specific. (pthread_setcancelstate): Add check for pending async cancel request and cancel the calling thread if @@ -3536,9 +3536,9 @@ Thu Sep 16 1999 Ross Johnson Add rwlock function prototypes. * rwlock.c: New module. * pthread.def: Add new rwlock functions. - * private.c (__ptw32_processInitialize): initialise - __ptw32_rwlock_test_init_lock critical section. - * global.c (__ptw32_rwlock_test_init_lock): Add. + * private.c (ptw32_processInitialize): initialise + ptw32_rwlock_test_init_lock critical section. + * global.c (ptw32_rwlock_test_init_lock): Add. * mutex.c (pthread_mutex_destroy): Don't free mutex memory if mutex is PTHREAD_MUTEX_INITIALIZER and has not been @@ -3555,20 +3555,20 @@ Thu Sep 16 1999 Ross Johnson 1999-08-21 Ross Johnson - * private.c (__ptw32_threadStart): Apply fix of 1999-08-19 + * private.c (ptw32_threadStart): Apply fix of 1999-08-19 this time to C++ and non-trapped C versions. Ommitted to do this the first time through. 1999-08-19 Ross Johnson - * private.c (__ptw32_threadStart): Return exit status from + * private.c (ptw32_threadStart): Return exit status from the application thread startup routine. - Milan Gardian 1999-08-18 John Bossom * exit.c (pthread_exit): Put status into pthread_t->exitStatus - * private.c (__ptw32_threadStart): Set pthread->exitStatus + * private.c (ptw32_threadStart): Set pthread->exitStatus on exit of try{} block. * sync.c (pthread_join): use pthread_exitStatus value if the thread exit doesn't return a value (for Mingw32 CRTDLL @@ -3578,8 +3578,8 @@ Tue Aug 17 20:17:58 CDT 1999 Mumit Khan * create.c (pthread_create): Add CRTDLL suppport. * exit.c (pthread_exit): Likewise. - * private.c (__ptw32_threadStart): Likewise. - (__ptw32_threadDestroy): Likewise. + * private.c (ptw32_threadStart): Likewise. + (ptw32_threadDestroy): Likewise. * sync.c (pthread_join): Likewise. * tests/join1.c (main): Warn about partial support for CRTDLL. @@ -3592,8 +3592,8 @@ Tue Aug 17 20:00:08 1999 Mumit Khan * errno.c (_errno): Fix self type. * pthread.h (PT_STDCALL): Move from here to * implement.h (PT_STDCALL): here. - (__ptw32_threadStart): Fix prototype. - * private.c (__ptw32_threadStart): Likewise. + (ptw32_threadStart): Fix prototype. + * private.c (ptw32_threadStart): Likewise. 1999-08-14 Ross Johnson @@ -3602,7 +3602,7 @@ Tue Aug 17 20:00:08 1999 Mumit Khan 1999-08-12 Ross Johnson - * private.c (__ptw32_threadStart): ei[] only declared if _MSC_VER. + * private.c (ptw32_threadStart): ei[] only declared if _MSC_VER. * exit.c (pthread_exit): Check for implicitly created threads to avoid raising an unhandled exception. @@ -3625,17 +3625,17 @@ Tue Aug 17 20:00:08 1999 Mumit Khan 1999-07-09 Ross Johnson - * misc.c (CancelableWait): __PTW32_EPS_CANCEL (SEH) and - __ptw32_exception_cancel (C++) used to identify the exception. + * misc.c (CancelableWait): PTW32_EPS_CANCEL (SEH) and + ptw32_exception_cancel (C++) used to identify the exception. - * cancel.c (pthread_testcancel): __PTW32_EPS_CANCEL (SEH) and - __ptw32_exception_cancel (C++) used to identify the exception. + * cancel.c (pthread_testcancel): PTW32_EPS_CANCEL (SEH) and + ptw32_exception_cancel (C++) used to identify the exception. * exit.c (pthread_exit): throw/raise an exception to return to - __ptw32_threadStart() to exit the thread. __PTW32_EPS_EXIT (SEH) - and __ptw32_exception_exit (C++) used to identify the exception. + ptw32_threadStart() to exit the thread. PTW32_EPS_EXIT (SEH) + and ptw32_exception_exit (C++) used to identify the exception. - * private.c (__ptw32_threadStart): Add pthread_exit exception trap; + * private.c (ptw32_threadStart): Add pthread_exit exception trap; clean up and exit the thread directly rather than via pthread_exit(). Sun May 30 00:25:02 1999 Ross Johnson @@ -3702,8 +3702,8 @@ Sun Apr 4 11:05:57 1999 Ross Johnson * sched.c (sched_yield): New function. - * condvar.c (__ptw32_sem_*): Rename to sem_*; except for - __ptw32_sem_timedwait which is an private function. + * condvar.c (ptw32_sem_*): Rename to sem_*; except for + ptw32_sem_timedwait which is an private function. Sat Apr 3 23:28:00 1999 Ross Johnson @@ -3711,32 +3711,32 @@ Sat Apr 3 23:28:00 1999 Ross Johnson Fri Apr 2 11:08:50 1999 Ross Johnson - * implement.h (__ptw32_sem_*): Remove prototypes now defined in + * implement.h (ptw32_sem_*): Remove prototypes now defined in semaphore.h. * pthread.h (sempahore.h): Include. * semaphore.h: New file for POSIX 1b semaphores. - * semaphore.c (__ptw32_sem_timedwait): Moved to private.c. + * semaphore.c (ptw32_sem_timedwait): Moved to private.c. - * pthread.h (__ptw32_sem_t): Change to sem_t. + * pthread.h (ptw32_sem_t): Change to sem_t. - * private.c (__ptw32_sem_timedwait): Moved from semaphore.c; + * private.c (ptw32_sem_timedwait): Moved from semaphore.c; set errno on error. * pthread.h (pthread_t_): Add per-thread errno element. Fri Apr 2 11:08:50 1999 John Bossom - * semaphore.c (__ptw32_sem_*): Change to sem_*; these functions + * semaphore.c (ptw32_sem_*): Change to sem_*; these functions will be exported from the library; set errno on error. * errno.c (_errno): New file. New function. Fri Mar 26 14:11:45 1999 Tor Lillqvist - * semaphore.c (__ptw32_sem_timedwait): Check for negative + * semaphore.c (ptw32_sem_timedwait): Check for negative milliseconds. Wed Mar 24 11:32:07 1999 John Bossom @@ -3748,7 +3748,7 @@ Wed Mar 24 11:32:07 1999 John Bossom * implement.h (SE_INFORMATION): Fix values. - * private.c (__ptw32_threadDestroy): Close the thread handle. + * private.c (ptw32_threadDestroy): Close the thread handle. Fri Mar 19 12:57:27 1999 Ross Johnson @@ -3756,7 +3756,7 @@ Fri Mar 19 12:57:27 1999 Ross Johnson Fri Mar 19 09:12:59 1999 Ross Johnson - * private.c (__ptw32_threadStart): status returns PTHREAD_CANCELED. + * private.c (ptw32_threadStart): status returns PTHREAD_CANCELED. * pthread.h (PTHREAD_CANCELED): defined. @@ -3807,7 +3807,7 @@ Mon Mar 8 11:18:59 1999 Ross Johnson problem of initialising the opaque critical section element in it. (PTHREAD_COND_INITIALIZER): Ditto. - * semaphore.c (__ptw32_sem_timedwait): Check sem == NULL earlier. + * semaphore.c (ptw32_sem_timedwait): Check sem == NULL earlier. Sun Mar 7 12:31:14 1999 Ross Johnson @@ -3819,11 +3819,11 @@ Sun Mar 7 12:31:14 1999 Ross Johnson the cancel event is recognised and acted apon if both objects happen to be signaled together. - * private.c (__ptw32_cond_test_init_lock): Initialise and destroy. + * private.c (ptw32_cond_test_init_lock): Initialise and destroy. - * implement.h (__ptw32_cond_test_init_lock): Add extern. + * implement.h (ptw32_cond_test_init_lock): Add extern. - * global.c (__ptw32_cond_test_init_lock): Add declaration. + * global.c (ptw32_cond_test_init_lock): Add declaration. * condvar.c (pthread_cond_destroy): check for valid initialised CV; flag destroyed CVs as invalid. @@ -3863,7 +3863,7 @@ Sat Feb 20 16:03:30 1999 Ross Johnson * dll.c (DLLMain): Expand TryEnterCriticalSection support test. * mutex.c (pthread_mutex_trylock): The check for - __ptw32_try_enter_critical_section == NULL should have been + ptw32_try_enter_critical_section == NULL should have been removed long ago. Fri Feb 19 16:03:30 1999 Ross Johnson @@ -3918,7 +3918,7 @@ Fri Feb 5 13:42:30 1999 Ross Johnson Thu Feb 4 10:07:28 1999 Ross Johnson - * global.c: Remove __ptw32_exception instantiation. + * global.c: Remove ptw32_exception instantiation. * cancel.c (pthread_testcancel): Change C++ exception throw. @@ -3926,7 +3926,7 @@ Thu Feb 4 10:07:28 1999 Ross Johnson Wed Feb 3 13:04:44 1999 Ross Johnson - * cleanup.c: Rename __ptw32_*_cleanup() to pthread_*_cleanup(). + * cleanup.c: Rename ptw32_*_cleanup() to pthread_*_cleanup(). * pthread.def: Ditto. @@ -3946,7 +3946,7 @@ Wed Feb 3 10:13:48 1999 Ross Johnson Tue Feb 2 18:07:43 1999 Ross Johnson * implement.h: Add #include . - Change sem_t to __ptw32_sem_t. + Change sem_t to ptw32_sem_t. Tue Feb 2 18:07:43 1999 Kevin Ruland @@ -3954,7 +3954,7 @@ Tue Feb 2 18:07:43 1999 Kevin Ruland Reverse LHS/RHS bitwise assignments. * pthread.h: Remove #include . - (__PTW32_ATTR_VALID): Add cast. + (PTW32_ATTR_VALID): Add cast. (struct pthread_t_): Add sigmask element. * dll.c: Add "extern C" for DLLMain. @@ -3962,7 +3962,7 @@ Tue Feb 2 18:07:43 1999 Kevin Ruland * create.c (pthread_create): Set sigmask in thread. - * condvar.c: Remove #include. Change sem_* to __ptw32_sem_*. + * condvar.c: Remove #include. Change sem_* to ptw32_sem_*. * attr.c: Changed #include. @@ -3973,8 +3973,8 @@ Fri Jan 29 11:56:28 1999 Ross Johnson * Makefile.in (OBJS): Add semaphore.o to list. - * semaphore.c (__ptw32_sem_timedwait): Move from private.c. - Rename sem_* to __ptw32_sem_*. + * semaphore.c (ptw32_sem_timedwait): Move from private.c. + Rename sem_* to ptw32_sem_*. * pthread.h (pthread_cond_t): Change type of sem_t. _POSIX_SEMAPHORES no longer defined. @@ -3983,11 +3983,11 @@ Fri Jan 29 11:56:28 1999 Ross Johnson Removed from source tree. * implement.h: Add semaphore function prototypes and rename all - functions to prepend '__ptw32_'. They are + functions to prepend 'ptw32_'. They are now private to the pthreads-win32 implementation. * private.c: Change #warning. - Move __ptw32_sem_timedwait() to semaphore.c. + Move ptw32_sem_timedwait() to semaphore.c. * cleanup.c: Change #warning. @@ -4039,14 +4039,14 @@ Fri Jan 22 14:31:59 1999 Ross Johnson * attr.c (pthread_attr_init): Remove unused 'result'. Cast malloc return value. - * private.c (__ptw32_callUserDestroyRoutines): Redo conditional + * private.c (ptw32_callUserDestroyRoutines): Redo conditional compilation. * misc.c (CancelableWait): C++ version uses 'throw'. * cancel.c (pthread_testcancel): Ditto. - * implement.h (class __ptw32_exception): Define for C++. + * implement.h (class ptw32_exception): Define for C++. * pthread.h: Fix C, C++, and Win32 SEH condition compilation mayhem around pthread_cleanup_* defines. C++ version now uses John @@ -4086,7 +4086,7 @@ Tue Jan 19 18:27:42 1999 Ross Johnson Tue Jan 19 18:27:42 1999 Scott Lightner - * private.c (__ptw32_sem_timedwait): 'abstime' arg really is + * private.c (ptw32_sem_timedwait): 'abstime' arg really is absolute time. Calculate relative time to wait from current time before passing timeout to new routine pthreadCancelableTimedWait(). @@ -4123,13 +4123,13 @@ Sun Jan 17 12:01:26 1999 Ross Johnson * pthread.h (PTHREAD_MUTEX_INITIALIZER): Init new 'staticinit' value to '1' and existing 'valid' value to '1'. - * global.c (__ptw32_mutex_test_init_lock): Add. + * global.c (ptw32_mutex_test_init_lock): Add. - * implement.h (__ptw32_mutex_test_init_lock.): Add extern. + * implement.h (ptw32_mutex_test_init_lock.): Add extern. - * private.c (__ptw32_processInitialize): Init critical section for + * private.c (ptw32_processInitialize): Init critical section for global lock used by _mutex_check_need_init(). - (__ptw32_processTerminate): Ditto (:s/Init/Destroy/). + (ptw32_processTerminate): Ditto (:s/Init/Destroy/). * dll.c (dllMain): Move call to FreeLibrary() so that it is only called once when the process detaches. @@ -4165,10 +4165,10 @@ Sun Jan 17 12:01:26 1999 Ross Johnson Sun Jan 17 12:01:26 1999 Ross Johnson - * private.c (__ptw32_sem_timedwait): Move from semaphore.c. + * private.c (ptw32_sem_timedwait): Move from semaphore.c. * semaphore.c : Remove redundant #includes. - (__ptw32_sem_timedwait): Move to private.c. + (ptw32_sem_timedwait): Move to private.c. (sem_wait): Add missing abstime arg to pthreadCancelableWait() call. Fri Jan 15 23:38:05 1999 Ross Johnson @@ -4183,20 +4183,20 @@ Fri Jan 15 15:41:28 1999 Ross Johnson * condvar.c (cond_timedwait): New generalised function called by both pthread_cond_wait() and pthread_cond_timedwait(). This is essentially pthread_cond_wait() renamed and modified to add the - 'abstime' arg and call the new __ptw32_sem_timedwait() instead of + 'abstime' arg and call the new ptw32_sem_timedwait() instead of sem_wait(). (pthread_cond_wait): Now just calls the internal static function cond_timedwait() with an INFINITE wait. (pthread_cond_timedwait): Now implemented. Calls the internal static function cond_timedwait(). - * implement.h (__ptw32_sem_timedwait): New internal function + * implement.h (ptw32_sem_timedwait): New internal function prototype. * misc.c (pthreadCancelableWait): Added new 'abstime' argument to allow shorter than INFINITE wait. - * semaphore.c (__ptw32_sem_timedwait): New function for internal + * semaphore.c (ptw32_sem_timedwait): New function for internal use. This is essentially sem_wait() modified to add the 'abstime' arg and call the modified (see above) pthreadCancelableWait(). @@ -4212,11 +4212,11 @@ Thu Jan 14 14:27:13 1999 Ross Johnson handling will not be included and thus thread cancellation, for example, will not work. - * cleanup.c (__ptw32_pop_cleanup): Add #warning to compile this + * cleanup.c (ptw32_pop_cleanup): Add #warning to compile this file as C++ if using a cygwin32 environment. Perhaps the whole package should be compiled using g++ under cygwin. - * private.c (__ptw32_threadStart): Change #error directive + * private.c (ptw32_threadStart): Change #error directive into #warning and bracket for __CYGWIN__ and derivative compilers. Wed Jan 13 09:34:52 1999 Ross Johnson @@ -4254,7 +4254,7 @@ Mon Jan 11 20:33:19 1999 Ross Johnson * pthread.h: Re-arrange conditional compile of pthread_cleanup-* macros. - * cleanup.c (__ptw32_push_cleanup): Provide conditional + * cleanup.c (ptw32_push_cleanup): Provide conditional compile of cleanup->prev. 1999-01-11 Tor Lillqvist @@ -4270,7 +4270,7 @@ Sat Jan 9 14:32:08 1999 Ross Johnson Tue Jan 5 16:33:04 1999 Ross Johnson - * cleanup.c (__ptw32_pop_cleanup): Add C++ version of __try/__except + * cleanup.c (ptw32_pop_cleanup): Add C++ version of __try/__except block. Move trailing "}" out of #ifdef _WIN32 block left there by (rpj's) mistake. @@ -4306,11 +4306,11 @@ Tue Dec 29 13:11:16 1998 Ross Johnson Now unimplemented. * tsd.c (pthread_setspecific): Rename tkAssocCreate to - __ptw32_tkAssocCreate. + ptw32_tkAssocCreate. (pthread_key_delete): Rename tkAssocDestroy to - __ptw32_tkAssocDestroy. + ptw32_tkAssocDestroy. - * sync.c (pthread_join): Rename threadDestroy to __ptw32_threadDestroy + * sync.c (pthread_join): Rename threadDestroy to ptw32_threadDestroy * sched.c (is_attr): attr is now **attr (was *attr), so add extra NULL pointer test. @@ -4321,8 +4321,8 @@ Tue Dec 29 13:11:16 1998 Ross Johnson Win32 thread Handle element name to match John Bossom's version. (pthread_getschedparam): Ditto. - * private.c (__ptw32_threadDestroy): Rename call to - callUserDestroyRoutines() as __ptw32_callUserDestroyRoutines() + * private.c (ptw32_threadDestroy): Rename call to + callUserDestroyRoutines() as ptw32_callUserDestroyRoutines() * misc.c: Add #include "implement.h". @@ -4332,7 +4332,7 @@ Tue Dec 29 13:11:16 1998 Ross Johnson Remove pthread_atfork() and fork() with #if 0/#endif. * create.c (pthread_create): Rename threadStart and threadDestroy calls - to __ptw32_threadStart and __ptw32_threadDestroy. + to ptw32_threadStart and ptw32_threadDestroy. * implement.h: Rename "detachedstate" to "detachstate". @@ -4416,14 +4416,14 @@ Mon Dec 7 09:44:40 1998 John Bossom * create.c (pthread_create): Replaced. - * private.c (__ptw32_processInitialize): New. - (__ptw32_processTerminate): New. - (__ptw32_threadStart): New. - (__ptw32_threadDestroy): New. - (__ptw32_cleanupStack): New. - (__ptw32_tkAssocCreate): New. - (__ptw32_tkAssocDestroy): New. - (__ptw32_callUserDestroyRoutines): New. + * private.c (ptw32_processInitialize): New. + (ptw32_processTerminate): New. + (ptw32_threadStart): New. + (ptw32_threadDestroy): New. + (ptw32_cleanupStack): New. + (ptw32_tkAssocCreate): New. + (ptw32_tkAssocDestroy): New. + (ptw32_callUserDestroyRoutines): New. * implement.h: Added non-API structures and declarations. @@ -4433,20 +4433,20 @@ Mon Dec 7 09:44:40 1998 John Bossom * dll.c (DLLmain): Replaced. * dll.c (PthreadsEntryPoint): Re-applied Anders Norlander's patch:- - Initialize __ptw32_try_enter_critical_section at startup + Initialize ptw32_try_enter_critical_section at startup and release kernel32 handle when DLL is being unloaded. Sun Dec 6 21:54:35 1998 Ross Johnson * buildlib.bat: Fix args to CL when building the .DLL - * cleanup.c (__ptw32_destructor_run_all): Fix TSD key management. + * cleanup.c (ptw32_destructor_run_all): Fix TSD key management. This is a tidy-up before TSD and Thread management is completely replaced by John Bossom's code. * tsd.c (pthread_key_create): Fix TSD key management. - * global.c (__ptw32_key_virgin_next): Initialise. + * global.c (ptw32_key_virgin_next): Initialise. * build.bat: New DOS script to compile and link a pthreads app using Microsoft's CL compiler linker. @@ -4456,15 +4456,15 @@ Sun Dec 6 21:54:35 1998 Ross Johnson 1998-12-05 Anders Norlander - * implement.h (__ptw32_try_enter_critical_section): New extern - * dll.c (__ptw32_try_enter_critical_section): New pointer to + * implement.h (ptw32_try_enter_critical_section): New extern + * dll.c (ptw32_try_enter_critical_section): New pointer to TryEnterCriticalSection if it exists; otherwise NULL. * dll.c (PthreadsEntryPoint): - Initialize __ptw32_try_enter_critical_section at startup + Initialize ptw32_try_enter_critical_section at startup and release kernel32 handle when DLL is being unloaded. * mutex.c (pthread_mutex_trylock): Replaced check for NT with - a check if __ptw32_try_enter_critical_section is valid - pointer to a function. Call __ptw32_try_enter_critical_section + a check if ptw32_try_enter_critical_section is valid + pointer to a function. Call ptw32_try_enter_critical_section instead of TryEnterCriticalSection to avoid errors on Win95. Thu Dec 3 13:32:00 1998 Ross Johnson @@ -4473,7 +4473,7 @@ Thu Dec 3 13:32:00 1998 Ross Johnson Sun Nov 15 21:24:06 1998 Ross Johnson - * cleanup.c (__ptw32_destructor_run_all): Declare missing void * arg. + * cleanup.c (ptw32_destructor_run_all): Declare missing void * arg. Fixup CVS merge conflicts. 1998-10-30 Ben Elliston @@ -4483,7 +4483,7 @@ Sun Nov 15 21:24:06 1998 Ross Johnson Fri Oct 30 15:15:50 1998 Ross Johnson - * cleanup.c (__ptw32_handler_push): Fixed bug appending new + * cleanup.c (ptw32_handler_push): Fixed bug appending new handler to list reported by Peter Slacik . (new_thread): Rename poorly named local variable to @@ -4497,12 +4497,12 @@ Sat Oct 24 18:34:59 1998 Ross Johnson Fri Oct 23 00:08:09 1998 Ross Johnson - * implement.h (__PTW32_TSD_KEY_REUSE): Add enum. + * implement.h (PTW32_TSD_KEY_REUSE): Add enum. - * private.c (__ptw32_delete_thread): Add call to - __ptw32_destructor_run_all() to clean up the threads keys. + * private.c (ptw32_delete_thread): Add call to + ptw32_destructor_run_all() to clean up the threads keys. - * cleanup.c (__ptw32_destructor_run_all): Check for no more dirty + * cleanup.c (ptw32_destructor_run_all): Check for no more dirty keys to run destructors on. Assume that the destructor call always succeeds and set the key value to NULL. @@ -4512,19 +4512,19 @@ Thu Oct 22 21:44:44 1998 Ross Johnson (pthread_key_create): Ditto. (pthread_key_delete): Ditto. - * implement.h (struct __ptw32_tsd_key): Add status member. + * implement.h (struct ptw32_tsd_key): Add status member. * tsd.c: Add description of pthread_key_delete() from the standard as a comment. Fri Oct 16 17:38:47 1998 Ross Johnson - * cleanup.c (__ptw32_destructor_run_all): Fix and improve + * cleanup.c (ptw32_destructor_run_all): Fix and improve stepping through the key table. Thu Oct 15 14:05:01 1998 Ross Johnson - * private.c (__ptw32_new_thread): Remove init of destructorstack. + * private.c (ptw32_new_thread): Remove init of destructorstack. No longer an element of pthread_t. * tsd.c (pthread_setspecific): Fix type declaration and cast. @@ -4534,34 +4534,34 @@ Thu Oct 15 14:05:01 1998 Ross Johnson Thu Oct 15 11:53:21 1998 Ross Johnson - * global.c (__ptw32_tsd_key_table): Fix declaration. + * global.c (ptw32_tsd_key_table): Fix declaration. - * implement.h(__ptw32_TSD_keys_TlsIndex): Add missing extern. - (__ptw32_tsd_mutex): Ditto. + * implement.h(ptw32_TSD_keys_TlsIndex): Add missing extern. + (ptw32_tsd_mutex): Ditto. - * create.c (__ptw32_start_call): Fix "keys" array declaration. + * create.c (ptw32_start_call): Fix "keys" array declaration. Add comment. * tsd.c (pthread_setspecific): Fix type declaration and cast. (pthread_getspecific): Ditto. - * cleanup.c (__ptw32_destructor_run_all): Declare missing loop + * cleanup.c (ptw32_destructor_run_all): Declare missing loop counter. Wed Oct 14 21:09:24 1998 Ross Johnson - * private.c (__ptw32_new_thread): Increment __ptw32_threads_count. - (__ptw32_delete_thread): Decrement __ptw32_threads_count. + * private.c (ptw32_new_thread): Increment ptw32_threads_count. + (ptw32_delete_thread): Decrement ptw32_threads_count. Remove some comments. - * exit.c (__ptw32_exit): : Fix two pthread_mutex_lock() calls that + * exit.c (ptw32_exit): : Fix two pthread_mutex_lock() calls that should have been pthread_mutex_unlock() calls. - (__ptw32_vacuum): Remove call to __ptw32_destructor_pop_all(). + (ptw32_vacuum): Remove call to ptw32_destructor_pop_all(). * create.c (pthread_create): Fix two pthread_mutex_lock() calls that should have been pthread_mutex_unlock() calls. - * global.c (__ptw32_tsd_mutex): Add mutex for TSD operations. + * global.c (ptw32_tsd_mutex): Add mutex for TSD operations. * tsd.c (pthread_key_create): Add critical section. (pthread_setspecific): Ditto. @@ -4573,24 +4573,24 @@ Wed Oct 14 21:09:24 1998 Ross Johnson Mon Oct 12 00:00:44 1998 Ross Johnson - * implement.h (__ptw32_tsd_key_table): New. + * implement.h (ptw32_tsd_key_table): New. - * create.c (__ptw32_start_call): Initialise per-thread TSD keys + * create.c (ptw32_start_call): Initialise per-thread TSD keys to NULL. * misc.c (pthread_once): Correct typo in comment. - * implement.h (__ptw32_destructor_push): Remove. - (__ptw32_destructor_pop): Remove. - (__ptw32_destructor_run_all): Rename from __ptw32_destructor_pop_all. - (__PTW32_TSD_KEY_DELETED): Add enum. - (__PTW32_TSD_KEY_INUSE): Add enum. + * implement.h (ptw32_destructor_push): Remove. + (ptw32_destructor_pop): Remove. + (ptw32_destructor_run_all): Rename from ptw32_destructor_pop_all. + (PTW32_TSD_KEY_DELETED): Add enum. + (PTW32_TSD_KEY_INUSE): Add enum. - * cleanup.c (__ptw32_destructor_push): Remove. - (__ptw32_destructor_pop): Remove. - (__ptw32_destructor_run_all): Totally revamped TSD. + * cleanup.c (ptw32_destructor_push): Remove. + (ptw32_destructor_pop): Remove. + (ptw32_destructor_run_all): Totally revamped TSD. - * dll.c (__ptw32_TSD_keys_TlsIndex): Initialise. + * dll.c (ptw32_TSD_keys_TlsIndex): Initialise. * tsd.c (pthread_setspecific): Totally revamped TSD. (pthread_getspecific): Ditto. @@ -4599,14 +4599,14 @@ Mon Oct 12 00:00:44 1998 Ross Johnson Sun Oct 11 22:44:55 1998 Ross Johnson - * global.c (__ptw32_tsd_key_table): Add new global. + * global.c (ptw32_tsd_key_table): Add new global. - * implement.h (__ptw32_tsd_key_t and struct __ptw32_tsd_key): + * implement.h (ptw32_tsd_key_t and struct ptw32_tsd_key): Add. (struct _pthread): Remove destructorstack. - * cleanup.c (__ptw32_destructor_run_all): Rename from - __ptw32_destructor_pop_all. The key destructor stack was made + * cleanup.c (ptw32_destructor_run_all): Rename from + ptw32_destructor_pop_all. The key destructor stack was made global rather than per-thread. No longer removes destructor nodes from the stack. Comments updated. @@ -4696,7 +4696,7 @@ Mon Oct 5 14:25:08 1998 Ross Johnson * config.h.in: Regenerate. - * create.c (__ptw32_start_call): Add STDCALL prefix. + * create.c (ptw32_start_call): Add STDCALL prefix. * mutex.c (pthread_mutex_init): Correct function signature. @@ -4782,30 +4782,30 @@ Thu Aug 6 15:19:22 1998 Ross Johnson and LeaveCriticalSection() calls to pass address-of lock. * fork.c (pthread_atfork): Typecast (void (*)(void *)) funcptr - in each __ptw32_handler_push() call. + in each ptw32_handler_push() call. - * exit.c (__ptw32_exit): Fix attr arg in + * exit.c (ptw32_exit): Fix attr arg in pthread_attr_getdetachstate() call. - * private.c (__ptw32_new_thread): Typecast (HANDLE) NULL. - (__ptw32_delete_thread): Ditto. + * private.c (ptw32_new_thread): Typecast (HANDLE) NULL. + (ptw32_delete_thread): Ditto. - * implement.h: (__PTW32_MAX_THREADS): Add define. This keeps + * implement.h: (PTW32_MAX_THREADS): Add define. This keeps changing in an attempt to make thread administration data types opaque and cleanup DLL startup. * dll.c (PthreadsEntryPoint): - (__ptw32_virgins): Remove malloc() and free() calls. - (__ptw32_reuse): Ditto. - (__ptw32_win32handle_map): Ditto. - (__ptw32_threads_mutex_table): Ditto. + (ptw32_virgins): Remove malloc() and free() calls. + (ptw32_reuse): Ditto. + (ptw32_win32handle_map): Ditto. + (ptw32_threads_mutex_table): Ditto. * global.c (_POSIX_THREAD_THREADS_MAX): Initialise with PTW32_MAX_THREADS. - (__ptw32_virgins): Ditto. - (__ptw32_reuse): Ditto. - (__ptw32_win32handle_map): Ditto. - (__ptw32_threads_mutex_table): Ditto. + (ptw32_virgins): Ditto. + (ptw32_reuse): Ditto. + (ptw32_win32handle_map): Ditto. + (ptw32_threads_mutex_table): Ditto. * create.c (pthread_create): Typecast (HANDLE) NULL. Typecast (unsigned (*)(void *)) start_routine. @@ -4815,14 +4815,14 @@ Thu Aug 6 15:19:22 1998 Ross Johnson (pthread_cond_destroy): Add address-of operator & to arg 1 of pthread_mutex_destroy() call. - * cleanup.c (__ptw32_destructor_pop_all): Add (int) cast to + * cleanup.c (ptw32_destructor_pop_all): Add (int) cast to pthread_getspecific() arg. - (__ptw32_destructor_pop): Add (void *) cast to "if" conditional. - (__ptw32_destructor_push): Add (void *) cast to - __ptw32_handler_push() "key" arg. + (ptw32_destructor_pop): Add (void *) cast to "if" conditional. + (ptw32_destructor_push): Add (void *) cast to + ptw32_handler_push() "key" arg. (malloc.h): Add include. - * implement.h (__ptw32_destructor_pop): Add prototype. + * implement.h (ptw32_destructor_pop): Add prototype. * tsd.c (implement.h): Add include. @@ -4852,59 +4852,59 @@ Thu Aug 6 15:19:22 1998 Ross Johnson Tue Aug 4 16:57:58 1998 Ross Johnson - * private.c (__ptw32_delete_thread): Fix typo. Add missing ';'. + * private.c (ptw32_delete_thread): Fix typo. Add missing ';'. - * global.c (__ptw32_virgins): Change types from pointer to + * global.c (ptw32_virgins): Change types from pointer to array pointer. - (__ptw32_reuse): Ditto. - (__ptw32_win32handle_map): Ditto. - (__ptw32_threads_mutex_table): Ditto. + (ptw32_reuse): Ditto. + (ptw32_win32handle_map): Ditto. + (ptw32_threads_mutex_table): Ditto. - * implement.h(__ptw32_virgins): Change types from pointer to + * implement.h(ptw32_virgins): Change types from pointer to array pointer. - (__ptw32_reuse): Ditto. - (__ptw32_win32handle_map): Ditto. - (__ptw32_threads_mutex_table): Ditto. + (ptw32_reuse): Ditto. + (ptw32_win32handle_map): Ditto. + (ptw32_threads_mutex_table): Ditto. - * private.c (__ptw32_delete_thread): Fix "entry" should be "thread". + * private.c (ptw32_delete_thread): Fix "entry" should be "thread". - * misc.c (pthread_self): Add extern for __ptw32_threadID_TlsIndex. + * misc.c (pthread_self): Add extern for ptw32_threadID_TlsIndex. * global.c: Add comment. * misc.c (pthread_once): Fix member -> dereferences. - Change __ptw32_once_flag to once_control->flag in "if" test. + Change ptw32_once_flag to once_control->flag in "if" test. Tue Aug 4 00:09:30 1998 Ross Johnson - * implement.h(__ptw32_virgins): Add extern. - (__ptw32_virgin_next): Ditto. - (__ptw32_reuse): Ditto. - (__ptw32_reuse_top): Ditto. - (__ptw32_win32handle_map): Ditto. - (__ptw32_threads_mutex_table): Ditto. + * implement.h(ptw32_virgins): Add extern. + (ptw32_virgin_next): Ditto. + (ptw32_reuse): Ditto. + (ptw32_reuse_top): Ditto. + (ptw32_win32handle_map): Ditto. + (ptw32_threads_mutex_table): Ditto. - * global.c (__ptw32_virgins): Changed from array to pointer. + * global.c (ptw32_virgins): Changed from array to pointer. Storage allocation for the array moved into dll.c. - (__ptw32_reuse): Ditto. - (__ptw32_win32handle_map): Ditto. - (__ptw32_threads_mutex_table): Ditto. + (ptw32_reuse): Ditto. + (ptw32_win32handle_map): Ditto. + (ptw32_threads_mutex_table): Ditto. * dll.c (PthreadsEntryPoint): Set up thread admin storage when DLL is loaded. * fork.c (pthread_atfork): Fix function pointer arg to all - __ptw32_handler_push() calls. Change "arg" arg to NULL in child push. + ptw32_handler_push() calls. Change "arg" arg to NULL in child push. * exit.c: Add windows.h and process.h includes. - (__ptw32_exit): Add local detachstate declaration. - (__ptw32_exit): Fix incorrect name for pthread_attr_getdetachstate(). + (ptw32_exit): Add local detachstate declaration. + (ptw32_exit): Fix incorrect name for pthread_attr_getdetachstate(). * pthread.h (_POSIX_THREAD_ATTR_STACKSIZE): Move from global.c (_POSIX_THREAD_ATTR_STACKADDR): Ditto. * create.c (pthread_create): Fix #if should be #ifdef. - (__ptw32_start_call): Remove usused variables. + (ptw32_start_call): Remove usused variables. * process.h: Create. @@ -4919,7 +4919,7 @@ Mon Aug 3 21:19:57 1998 Ross Johnson (cond_wait): Fix typo - cv was ev. (pthread_cond_broadcast): Fix two identical typos. - * cleanup.c (__ptw32_destructor_pop_all): Remove _ prefix from + * cleanup.c (ptw32_destructor_pop_all): Remove _ prefix from PTHREAD_DESTRUCTOR_ITERATIONS. * pthread.h: Move _POSIX_* values into posix.h @@ -4936,10 +4936,10 @@ Mon Aug 3 21:19:57 1998 Ross Johnson member initialisation - cancelstate, canceltype, cancel_pending. (is_attr): Make arg "attr" a const. - * implement.h (__PTW32_HANDLER_POP_LIFO): Remove definition. - (__PTW32_HANDLER_POP_FIFO): Ditto. - (__PTW32_VALID): Add missing newline escape (\). - (__ptw32_handler_node): Make element "next" a pointer. + * implement.h (PTW32_HANDLER_POP_LIFO): Remove definition. + (PTW32_HANDLER_POP_FIFO): Ditto. + (PTW32_VALID): Add missing newline escape (\). + (ptw32_handler_node): Make element "next" a pointer. 1998-08-02 Ben Elliston @@ -4964,11 +4964,11 @@ Sun Aug 2 19:03:42 1998 Ross Johnson Fri Jul 31 14:00:29 1998 Ross Johnson - * cleanup.c (__ptw32_destructor_pop): Implement. Removes + * cleanup.c (ptw32_destructor_pop): Implement. Removes destructors associated with a key without executing them. - (__ptw32_destructor_pop_all): Add FIXME comment. + (ptw32_destructor_pop_all): Add FIXME comment. - * tsd.c (pthread_key_delete): Add call to __ptw32_destructor_pop(). + * tsd.c (pthread_key_delete): Add call to ptw32_destructor_pop(). Fri Jul 31 00:05:45 1998 Ross Johnson @@ -4976,16 +4976,16 @@ Fri Jul 31 00:05:45 1998 Ross Johnson the destructor routine with the key. (pthread_key_delete): Add FIXME comment. - * exit.c (__ptw32_vacuum): Add call to - __ptw32_destructor_pop_all(). + * exit.c (ptw32_vacuum): Add call to + ptw32_destructor_pop_all(). - * implement.h (__ptw32_handler_pop_all): Add prototype. - (__ptw32_destructor_pop_all): Ditto. + * implement.h (ptw32_handler_pop_all): Add prototype. + (ptw32_destructor_pop_all): Ditto. - * cleanup.c (__ptw32_destructor_push): Implement. This is just a - call to __ptw32_handler_push(). - (__ptw32_destructor_pop_all): Implement. This is significantly - different to __ptw32_handler_pop_all(). + * cleanup.c (ptw32_destructor_push): Implement. This is just a + call to ptw32_handler_push(). + (ptw32_destructor_pop_all): Implement. This is significantly + different to ptw32_handler_pop_all(). * Makefile (SRCS): Create. Preliminary. @@ -5000,25 +5000,25 @@ Fri Jul 31 00:05:45 1998 Ross Johnson * condvar.c (windows.h): Add include. - * implement.h (__PTW32_THIS): Remove - no longer required. - (__PTW32_STACK): Use pthread_self() instead of __PTW32_THIS. + * implement.h (PTW32_THIS): Remove - no longer required. + (PTW32_STACK): Use pthread_self() instead of PTW32_THIS. Thu Jul 30 23:12:45 1998 Ross Johnson - * implement.h: Remove __ptw32_find_entry() prototype. + * implement.h: Remove ptw32_find_entry() prototype. * private.c: Extend comments. - Remove __ptw32_find_entry() - no longer needed. + Remove ptw32_find_entry() - no longer needed. - * create.c (__ptw32_start_call): Add call to TlsSetValue() to + * create.c (ptw32_start_call): Add call to TlsSetValue() to store the thread ID. * dll.c (PthreadsEntryPoint): Implement. This is called whenever a process loads the DLL. Used to initialise thread local storage. - * implement.h: Add __ptw32_threadID_TlsIndex. - Add ()s around __PTW32_VALID expression. + * implement.h: Add ptw32_threadID_TlsIndex. + Add ()s around PTW32_VALID expression. * misc.c (pthread_self): Re-implement using Win32 TLS to store the threads own ID. @@ -5026,21 +5026,21 @@ Thu Jul 30 23:12:45 1998 Ross Johnson Wed Jul 29 11:39:03 1998 Ross Johnson * private.c: Corrections in comments. - (__ptw32_new_thread): Alter "if" flow to be more natural. + (ptw32_new_thread): Alter "if" flow to be more natural. - * cleanup.c (__ptw32_handler_push): Same as below. + * cleanup.c (ptw32_handler_push): Same as below. * create.c (pthread_create): Same as below. - * private.c (__ptw32_new_thread): Rename "new" to "new_thread". + * private.c (ptw32_new_thread): Rename "new" to "new_thread". Since when has a C programmer been required to know C++? Tue Jul 28 14:04:29 1998 Ross Johnson - * implement.h: Add __PTW32_VALID macro. + * implement.h: Add PTW32_VALID macro. * sync.c (pthread_join): Modify to use the new thread - type and __ptw32_delete_thread(). Rename "target" to "thread". + type and ptw32_delete_thread(). Rename "target" to "thread". Remove extra local variable "target". (pthread_detach): Ditto. @@ -5051,16 +5051,16 @@ Tue Jul 28 14:04:29 1998 Ross Johnson type. (pthread_getschedparam): Ditto. - * private.c (__ptw32_find_thread): Fix return type and arg. + * private.c (ptw32_find_thread): Fix return type and arg. - * implement.h: Remove __PTW32_YES and __PTW32_NO. - (__ptw32_new_thread): Add prototype. - (__ptw32_find_thread): Ditto. - (__ptw32_delete_thread): Ditto. - (__ptw32_new_thread_entry): Remove prototype. - (__ptw32_find_thread_entry): Ditto. - (__ptw32_delete_thread_entry): Ditto. - ( __PTW32_NEW, __PTW32_INUSE, __PTW32_EXITED, __PTW32_REUSE): + * implement.h: Remove PTW32_YES and PTW32_NO. + (ptw32_new_thread): Add prototype. + (ptw32_find_thread): Ditto. + (ptw32_delete_thread): Ditto. + (ptw32_new_thread_entry): Remove prototype. + (ptw32_find_thread_entry): Ditto. + (ptw32_delete_thread_entry): Ditto. + ( PTW32_NEW, PTW32_INUSE, PTW32_EXITED, PTW32_REUSE): Add. @@ -5073,36 +5073,36 @@ Tue Jul 28 14:04:29 1998 Ross Johnson * exit.c (pthread_exit): Fix pthread_this should be pthread_self. * cancel.c (pthread_setcancelstate): Change - __ptw32_threads_thread_t * to pthread_t and init with + ptw32_threads_thread_t * to pthread_t and init with pthread_this(). (pthread_setcanceltype): Ditto. - * exit.c (__ptw32_exit): Add new pthread_t arg. - Rename __ptw32_delete_thread_entry to __ptw32_delete_thread. + * exit.c (ptw32_exit): Add new pthread_t arg. + Rename ptw32_delete_thread_entry to ptw32_delete_thread. Rename "us" to "thread". - (pthread_exit): Call __ptw32_exit with added thread arg. + (pthread_exit): Call ptw32_exit with added thread arg. - * create.c (__ptw32_start_call): Insert missing ")". - Add "us" arg to __ptw32_exit() call. + * create.c (ptw32_start_call): Insert missing ")". + Add "us" arg to ptw32_exit() call. (pthread_create): Modify to use new thread allocation scheme. * private.c: Added detailed explanation of the new thread allocation scheme. - (__ptw32_new_thread): Totally rewritten to use + (ptw32_new_thread): Totally rewritten to use new thread allocation scheme. - (__ptw32_delete_thread): Ditto. - (__ptw32_find_thread): Obsolete. + (ptw32_delete_thread): Ditto. + (ptw32_find_thread): Obsolete. Mon Jul 27 17:46:37 1998 Ross Johnson * create.c (pthread_create): Start of rewrite. Not completed yet. - * private.c (__ptw32_new_thread_entry): Start of rewrite. Not + * private.c (ptw32_new_thread_entry): Start of rewrite. Not complete. - * implement.h (__ptw32_threads_thread): Rename, remove thread + * implement.h (ptw32_threads_thread): Rename, remove thread member, add win32handle and ptstatus members. - (__ptw32_t): Add. + (ptw32_t): Add. * pthread.h: pthread_t is no longer mapped directly to a Win32 HANDLE type. This is so we can let the Win32 thread terminate and @@ -5111,40 +5111,40 @@ Mon Jul 27 17:46:37 1998 Ross Johnson Mon Jul 27 00:20:37 1998 Ross Johnson - * private.c (__ptw32_delete_thread_entry): Destroy the thread + * private.c (ptw32_delete_thread_entry): Destroy the thread entry attribute object before deleting the thread entry itself. * attr.c (pthread_attr_init): Initialise cancel_pending = FALSE. (pthread_attr_setdetachstate): Rename "detached" to "detachedstate". (pthread_attr_getdetachstate): Ditto. - * exit.c (__ptw32_exit): Fix incorrect check for detachedstate. + * exit.c (ptw32_exit): Fix incorrect check for detachedstate. - * implement.h (__ptw32_call_t): Remove env member. + * implement.h (ptw32_call_t): Remove env member. Sun Jul 26 13:06:12 1998 Ross Johnson - * implement.h (__ptw32_new_thread_entry): Fix prototype. - (__ptw32_find_thread_entry): Ditto. - (__ptw32_delete_thread_entry): Ditto. - (__ptw32_exit): Add prototype. + * implement.h (ptw32_new_thread_entry): Fix prototype. + (ptw32_find_thread_entry): Ditto. + (ptw32_delete_thread_entry): Ditto. + (ptw32_exit): Add prototype. - * exit.c (__ptw32_exit): New function. Called from pthread_exit() - and __ptw32_start_call() to exit the thread. It allows an extra + * exit.c (ptw32_exit): New function. Called from pthread_exit() + and ptw32_start_call() to exit the thread. It allows an extra argument which is the return code passed to _endthreadex(). - (__ptw32_exit): Move thread entry delete call from __ptw32_vacuum() + (ptw32_exit): Move thread entry delete call from ptw32_vacuum() into here. Add more explanation of thread entry deletion. - (__ptw32_exit): Clarify comment. + (ptw32_exit): Clarify comment. - * create.c (__ptw32_start_call): Change pthread_exit() call to - __ptw32_exit() call. + * create.c (ptw32_start_call): Change pthread_exit() call to + ptw32_exit() call. - * exit.c (__ptw32_vacuum): Add thread entry deletion code - moved from __ptw32_start_call(). See next item. + * exit.c (ptw32_vacuum): Add thread entry deletion code + moved from ptw32_start_call(). See next item. (pthread_exit): Remove longjmp(). Add mutex lock around thread table manipulation code. This routine now calls _enthreadex(). - * create.c (__ptw32_start_call): Remove setjmp() call and move + * create.c (ptw32_start_call): Remove setjmp() call and move cleanup code out. Call pthread_exit(NULL) to terminate the thread. 1998-07-26 Ben Elliston @@ -5159,18 +5159,18 @@ Sun Jul 26 13:06:12 1998 Ross Johnson Sun Jul 26 00:09:59 1998 Ross Johnson - * sync.c: Rename all instances of __ptw32_count_mutex to - __ptw32_table_mutex. + * sync.c: Rename all instances of ptw32_count_mutex to + ptw32_table_mutex. - * implement.h: Rename __ptw32_count_mutex to - __ptw32_table_mutex. + * implement.h: Rename ptw32_count_mutex to + ptw32_table_mutex. - * global.c: Rename __ptw32_count_mutex to - __ptw32_table_mutex. + * global.c: Rename ptw32_count_mutex to + ptw32_table_mutex. * create.c (pthread_create): Add critical sections. - (__ptw32_start_call): Rename __ptw32_count_mutex to - __ptw32_table_mutex. + (ptw32_start_call): Rename ptw32_count_mutex to + ptw32_table_mutex. * cancel.c (pthread_setcancelstate): Fix indirection bug and rename "this" to "us". @@ -5205,22 +5205,22 @@ Sun Jul 26 00:09:59 1998 Ross Johnson Only the thread itself can change it's cancelstate or canceltype, ie. the thread must exist already. - * private.c (__ptw32_delete_thread_entry): Mutex locks removed. + * private.c (ptw32_delete_thread_entry): Mutex locks removed. Mutexes must be applied at the caller level. - (__ptw32_new_thread_entry): Ditto. - (__ptw32_new_thread_entry): Init cancelstate, canceltype, and + (ptw32_new_thread_entry): Ditto. + (ptw32_new_thread_entry): Init cancelstate, canceltype, and cancel_pending to default values. - (__ptw32_new_thread_entry): Rename "this" to "new". - (__ptw32_find_thread_entry): Rename "this" to "entry". - (__ptw32_delete_thread_entry): Rename "thread_entry" to "entry". + (ptw32_new_thread_entry): Rename "this" to "new". + (ptw32_find_thread_entry): Rename "this" to "entry". + (ptw32_delete_thread_entry): Rename "thread_entry" to "entry". - * create.c (__ptw32_start_call): Mutexes changed to - __ptw32_count_mutex. All access to the threads table entries is + * create.c (ptw32_start_call): Mutexes changed to + ptw32_count_mutex. All access to the threads table entries is under the one mutex. Otherwise chaos reigns. Sat Jul 25 23:16:51 1998 Ross Johnson - * implement.h (__ptw32_threads_thread): Move cancelstate and + * implement.h (ptw32_threads_thread): Move cancelstate and canceltype members out of pthread_attr_t into here. * fork.c (fork): Add comment. @@ -5231,7 +5231,7 @@ Sat Jul 25 23:16:51 1998 Ross Johnson Sat Jul 25 00:00:13 1998 Ross Johnson - * create.c (__ptw32_start_call): Set thread priority. Ensure our + * create.c (ptw32_start_call): Set thread priority. Ensure our thread entry is removed from the thread table but only if pthread_detach() was called and there are no waiting joins. (pthread_create): Set detach flag in thread entry if the @@ -5243,30 +5243,30 @@ Sat Jul 25 00:00:13 1998 Ross Johnson * exit.c (pthread_exit): Fix indirection mistake. - * implement.h (__PTW32_THREADS_TABLE_INDEX): Add. + * implement.h (PTW32_THREADS_TABLE_INDEX): Add. - * exit.c (__ptw32_vacuum): Fix incorrect args to - __ptw32_handler_pop_all() calls. + * exit.c (ptw32_vacuum): Fix incorrect args to + ptw32_handler_pop_all() calls. Make thread entry removal conditional. * sync.c (pthread_join): Add multiple join and async detach handling. - * implement.h (__PTW32_THREADS_TABLE_INDEX): Add. + * implement.h (PTW32_THREADS_TABLE_INDEX): Add. - * global.c (__ptw32_threads_mutex_table): Add. + * global.c (ptw32_threads_mutex_table): Add. - * implement.h (__ptw32_once_flag): Remove. - (__ptw32_once_lock): Ditto. - (__ptw32_threads_mutex_table): Add. + * implement.h (ptw32_once_flag): Remove. + (ptw32_once_lock): Ditto. + (ptw32_threads_mutex_table): Add. - * global.c (__ptw32_once_flag): Remove. - (__ptw32_once_lock): Ditto. + * global.c (ptw32_once_flag): Remove. + (ptw32_once_lock): Ditto. * sync.c (pthread_join): Fix tests involving new return value - from __ptw32_find_thread_entry(). + from ptw32_find_thread_entry(). (pthread_detach): Ditto. - * private.c (__ptw32_find_thread_entry): Failure return code + * private.c (ptw32_find_thread_entry): Failure return code changed from -1 to NULL. Fri Jul 24 23:09:33 1998 Ross Johnson @@ -5288,9 +5288,9 @@ Fri Jul 24 21:13:55 1998 Ross Johnson * exit.c (pthread_exit): Add comment explaining the longjmp(). - * implement.h (__ptw32_threads_thread_t): New member cancelthread. - (__PTW32_YES): Define. - (__PTW32_NO): Define. + * implement.h (ptw32_threads_thread_t): New member cancelthread. + (PTW32_YES): Define. + (PTW32_NO): Define. (RND_SIZEOF): Remove. * create.c (pthread_create): Rename cancelability to cancelstate. @@ -5324,17 +5324,17 @@ Fri Jul 24 16:33:17 1998 Ross Johnson and join calls to the child fork. Add #includes. - * implement.h: (__ptw32_handler_push): Fix return type and stack arg + * implement.h: (ptw32_handler_push): Fix return type and stack arg type in prototype. - (__ptw32_handler_pop): Fix stack arg type in prototype. - (__ptw32_handler_pop_all): Fix stack arg type in prototype. + (ptw32_handler_pop): Fix stack arg type in prototype. + (ptw32_handler_pop_all): Fix stack arg type in prototype. - * cleanup.c (__ptw32_handler_push): Change return type to int and + * cleanup.c (ptw32_handler_push): Change return type to int and return ENOMEM if malloc() fails. * sync.c (pthread_detach): Use equality test, not assignment. - * create.c (__ptw32_start_call): Add call to Win32 CloseHandle() + * create.c (ptw32_start_call): Add call to Win32 CloseHandle() if thread is detached. 1998-07-24 Ben Elliston @@ -5347,22 +5347,22 @@ Fri Jul 24 03:00:25 1998 Ross Johnson * sync.c (pthread_join): Save valueptr arg in joinvalueptr for pthread_exit() to use. - * private.c (__ptw32_new_thread_entry): Initialise joinvalueptr to + * private.c (ptw32_new_thread_entry): Initialise joinvalueptr to NULL. - * create.c (__ptw32_start_call): Rewrite to facilitate joins. + * create.c (ptw32_start_call): Rewrite to facilitate joins. pthread_exit() will do a longjmp() back to here. Does appropriate cleanup and exit/return from the thread. (pthread_create): _beginthreadex() now passes a pointer to our thread table entry instead of just the call member of that entry. - * implement.h (__ptw32_threads_thread): New member + * implement.h (ptw32_threads_thread): New member void ** joinvalueptr. - (__ptw32_call_t): New member jmpbuf env. + (ptw32_call_t): New member jmpbuf env. * exit.c (pthread_exit): Major rewrite to handle joins and handing value pointer to joining thread. Uses longjmp() back to - __ptw32_start_call(). + ptw32_start_call(). * create.c (pthread_create): Ensure values of new attribute members are copied to the thread attribute object. @@ -5382,7 +5382,7 @@ Fri Jul 24 00:21:21 1998 Ross Johnson (pthread_detach): Implement. After checking for a valid and joinable thread, it's still a no-op. - * private.c (__ptw32_find_thread_entry): Bug prevented returning + * private.c (ptw32_find_thread_entry): Bug prevented returning an error value in some cases. * attr.c (pthread_attr_setdetachedstate): Implement. @@ -5406,7 +5406,7 @@ Fri Jul 24 00:21:21 1998 Ross Johnson (pthread_attr_getdetachstate): Implement. (pthread_attr_setdetachstate): Likewise. - * implement.h (__PTW32_CANCEL_DEFAULTS): Remove. Bit fields + * implement.h (PTW32_CANCEL_DEFAULTS): Remove. Bit fields proved to be too cumbersome. Set the defaults in attr.c using the public PTHREAD_CANCEL_* constants. @@ -5445,18 +5445,18 @@ Fri Jul 24 00:21:21 1998 Ross Johnson Fri Jul 24 00:21:21 1998 Ross Johnson - * create.c (pthread_create): Arg to __ptw32_new_thread_entry() + * create.c (pthread_create): Arg to ptw32_new_thread_entry() changed. See next entry. Move mutex locks out. Changes made yesterday and today allow us to start the new thread running rather than temporarily suspended. - * private.c (__ptw32_new_thread_entry): __ptw32_thread_table + * private.c (ptw32_new_thread_entry): ptw32_thread_table was changed back to a table of thread structures rather than pointers. As such we're trading storage for increaded speed. This routine was modified to work with the new table. Mutex lock put in around global data accesses. - (__ptw32_find_thread_entry): Ditto - (__ptw32_delete_thread_entry): Ditto + (ptw32_find_thread_entry): Ditto + (ptw32_delete_thread_entry): Ditto Thu Jul 23 23:25:30 1998 Ross Johnson @@ -5469,36 +5469,36 @@ Thu Jul 23 23:25:30 1998 Ross Johnson * implement.h: Move implementation hidden definitions from pthread.h. Add constants to index into the different handler stacks. - * cleanup.c (__ptw32_handler_push): Simplify args. Restructure. - (__ptw32_handler_pop): Simplify args. Restructure. - (__ptw32_handler_pop_all): Simplify args. Restructure. + * cleanup.c (ptw32_handler_push): Simplify args. Restructure. + (ptw32_handler_pop): Simplify args. Restructure. + (ptw32_handler_pop_all): Simplify args. Restructure. Wed Jul 22 00:16:22 1998 Ross Johnson * attr.c, implement.h, pthread.h, ChangeLog: Resolve CVS merge conflicts. - * private.c (__ptw32_find_thread_entry): Changes to return type - to support leaner __ptw32_threads_table[] which now only stores - __ptw32_thread_thread_t *. - (__ptw32_new_thread_entry): Internal changes. - (__ptw32_delete_thread_entry): Internal changes to avoid contention. + * private.c (ptw32_find_thread_entry): Changes to return type + to support leaner ptw32_threads_table[] which now only stores + ptw32_thread_thread_t *. + (ptw32_new_thread_entry): Internal changes. + (ptw32_delete_thread_entry): Internal changes to avoid contention. Calling routines changed accordingly. * pthread.h: Modified cleanup macros to use new generic push and pop. - Added destructor and atfork stacks to __ptw32_threads_thread_t. + Added destructor and atfork stacks to ptw32_threads_thread_t. - * cleanup.c (__ptw32_handler_push, __ptw32_handler_pop, - __ptw32_handler_pop_all): Renamed cleanup push and pop routines + * cleanup.c (ptw32_handler_push, ptw32_handler_pop, + ptw32_handler_pop_all): Renamed cleanup push and pop routines and made generic to handle destructors and atfork handlers as well. - * create.c (__ptw32_start_call): New function is a wrapper for + * create.c (ptw32_start_call): New function is a wrapper for all new threads. It allows us to do some cleanup when the thread returns, ie. that is otherwise only done if the thread is cancelled. - * exit.c (__ptw32_vacuum): New function contains code from - pthread_exit() that we need in the new __ptw32_start_call() + * exit.c (ptw32_vacuum): New function contains code from + pthread_exit() that we need in the new ptw32_start_call() as well. * implement.h: Various additions and minor changes. @@ -5512,12 +5512,12 @@ Wed Jul 22 00:16:22 1998 Ross Johnson * create.c (pthread_create): More clean up. - * private.c (__ptw32_find_thread_entry): Implement. - (__ptw32_delete_thread_entry): Implement. - (__ptw32_new_thread_entry): Implement. + * private.c (ptw32_find_thread_entry): Implement. + (ptw32_delete_thread_entry): Implement. + (ptw32_new_thread_entry): Implement. These functions manipulate the implementations internal thread table and are part of general code cleanup and modularisation. - They replace __ptw32_getthreadindex() which was removed. + They replace ptw32_getthreadindex() which was removed. * exit.c (pthread_exit): Changed to use the new code above. @@ -5536,22 +5536,22 @@ Wed Jul 22 00:16:22 1998 Ross Johnson (remove_attr): Likewise. (insert_attr): Likewise. - * implement.h (__ptw32_mutexattr_t): Moved to a public definition + * implement.h (ptw32_mutexattr_t): Moved to a public definition in pthread.h. There was little gain in hiding these details. - (__ptw32_condattr_t): Likewise. - (__ptw32_attr_t): Likewise. + (ptw32_condattr_t): Likewise. + (ptw32_attr_t): Likewise. * pthread.h (pthread_atfork): Add function prototype. (pthread_attr_t): Moved here from implement.h. * fork.c (pthread_atfork): Preliminary implementation. - (__ptw32_fork): Likewise. + (ptw32_fork): Likewise. Wed Jul 22 00:16:22 1998 Ross Johnson - * cleanup.c (__ptw32_cleanup_push): Implement. - (__ptw32_cleanup_pop): Implement. - (__ptw32_do_cancellation): Implement. + * cleanup.c (ptw32_cleanup_push): Implement. + (ptw32_cleanup_pop): Implement. + (ptw32_do_cancellation): Implement. These are private to the implementation. The real cleanup functions are macros. See below. @@ -5568,7 +5568,7 @@ Wed Jul 22 00:16:22 1998 Ross Johnson up to multiple of DWORD. Add function prototypes. - * private.c (__ptw32_getthreadindex): "*thread" should have been + * private.c (ptw32_getthreadindex): "*thread" should have been "thread". Detect empty slot fail condition. 1998-07-20 Ben Elliston @@ -5577,22 +5577,22 @@ Wed Jul 22 00:16:22 1998 Ross Johnson flag and mutex--make `pthread_once_t' contain these elements in their structure. The earlier version had incorrect semantics. - * pthread.h (__ptw32_once_flag): Add new variable. Remove. - (__ptw32_once_lock): Add new mutex lock to ensure integrity of - access to __ptw32_once_flag. Remove. + * pthread.h (ptw32_once_flag): Add new variable. Remove. + (ptw32_once_lock): Add new mutex lock to ensure integrity of + access to ptw32_once_flag. Remove. (pthread_once): Add function prototype. (pthread_once_t): Define this type. Mon Jul 20 02:31:05 1998 Ross Johnson - * private.c (__ptw32_getthreadindex): Implement. + * private.c (ptw32_getthreadindex): Implement. * pthread.h: Add application static data dependent on _PTHREADS_BUILD_DLL define. This is needed to avoid allocating non-sharable static data within the pthread DLL. - * implement.h: Add __ptw32_cleanup_stack_t, __ptw32_cleanup_node_t - and __PTW32_HASH_INDEX. + * implement.h: Add ptw32_cleanup_stack_t, ptw32_cleanup_node_t + and PTW32_HASH_INDEX. * exit.c (pthread_exit): Begin work on cleanup and de-allocate thread-private storage. @@ -5605,10 +5605,10 @@ Mon Jul 20 02:31:05 1998 Ross Johnson Sun Jul 19 16:26:23 1998 Ross Johnson - * implement.h: Rename pthreads_thread_count to __ptw32_threads_count. - Create __ptw32_threads_thread_t struct to keep thread specific data. + * implement.h: Rename pthreads_thread_count to ptw32_threads_count. + Create ptw32_threads_thread_t struct to keep thread specific data. - * create.c: Rename pthreads_thread_count to __ptw32_threads_count. + * create.c: Rename pthreads_thread_count to ptw32_threads_count. (pthread_create): Handle errors from CreateThread(). 1998-07-19 Ben Elliston @@ -5657,7 +5657,7 @@ Sun Jul 19 16:26:23 1998 Ross Johnson that the mutex contained withing the pthread_cond_t structure will be a critical section. Use our new POSIX type! - * implement.h (__ptw32_condattr_t): Remove shared attribute. + * implement.h (ptw32_condattr_t): Remove shared attribute. 1998-07-17 Ben Elliston @@ -5667,7 +5667,7 @@ Sun Jul 19 16:26:23 1998 Ross Johnson (pthread_mutex_t): Use a Win32 CRITICAL_SECTION type for better performance. - * implement.h (__ptw32_mutexattr_t): Remove shared attribute. + * implement.h (ptw32_mutexattr_t): Remove shared attribute. * mutex.c (pthread_mutexattr_setpshared): This optional function is no longer supported, since we want to implement POSIX mutex @@ -5725,8 +5725,8 @@ Mon Jul 13 01:09:55 1998 Ross Johnson * implement.h (PTHREAD_THREADS_MAX): Remove trailing semicolon. (PTHREAD_STACK_MIN): Specify; needs confirming. - (__ptw32_attr_t): Define this type. - (__ptw32_condattr_t): Likewise. + (ptw32_attr_t): Define this type. + (ptw32_condattr_t): Likewise. * pthread.h (pthread_mutex_t): Define this type. (pthread_condattr_t): Likewise. @@ -5747,7 +5747,7 @@ Mon Jul 13 01:09:55 1998 Ross Johnson 1998-07-12 Ben Elliston - * implement.h (__ptw32_mutexattr_t): Define this implementation + * implement.h (ptw32_mutexattr_t): Define this implementation internal type. Application programmers only see a mutex attribute object as a void pointer. diff --git a/docs/FAQ.md b/docs/FAQ.md index d62686aa..f1945aaf 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -156,13 +156,13 @@ Up to and including snapshot 2001-07-12, if not defined, the cleanup style was determined automatically from the compiler used, and one of the following was defined accordingly: - __PTW32_CLEANUP_SEH MSVC only - __PTW32_CLEANUP_CXX C++, including MSVC++, GNU G++ - __PTW32_CLEANUP_C C, including GNU GCC, not MSVC + PTW32_CLEANUP_SEH MSVC only + PTW32_CLEANUP_CXX C++, including MSVC++, GNU G++ + PTW32_CLEANUP_C C, including GNU GCC, not MSVC These defines determine the style of cleanup (see pthread.h) and, most importantly, the way that cancellation and thread exit (via -pthread_exit) is performed (see the routine __ptw32_throw() in private.c). +pthread_exit) is performed (see the routine ptw32_throw() in private.c). In short, the exceptions versions of the library throw an exception when a thread is canceled or exits (via pthread_exit()), which is @@ -171,22 +171,22 @@ the correct stack unwinding occurs regardless of where the thread is when it's canceled or exits via pthread_exit(). After snapshot 2001-07-12, unless your build explicitly defines (e.g. -via a compiler option) __PTW32_CLEANUP_SEH, __PTW32_CLEANUP_CXX, or __PTW32_CLEANUP_C, then -the build now ALWAYS defaults to __PTW32_CLEANUP_C style cleanup. This style +via a compiler option) PTW32_CLEANUP_SEH, PTW32_CLEANUP_CXX, or PTW32_CLEANUP_C, then +the build now ALWAYS defaults to PTW32_CLEANUP_C style cleanup. This style uses setjmp/longjmp in the cancellation and pthread_exit implementations, and therefore won't do stack unwinding even when linked to applications that have it (e.g. C++ apps). This is for consistency with most/all commercial Unix POSIX threads implementations. Although it was not clearly documented before, it is still necessary to -build your application using the same __PTW32_CLEANUP_* define as was +build your application using the same PTW32_CLEANUP_* define as was used for the version of the library that you link with, so that the correct parts of pthread.h are included. That is, the possible defines require the following library versions: - __PTW32_CLEANUP_SEH pthreadVSE.dll - __PTW32_CLEANUP_CXX pthreadVCE.dll or pthreadGCE.dll - __PTW32_CLEANUP_C pthreadVC.dll or pthreadGC.dll + PTW32_CLEANUP_SEH pthreadVSE.dll + PTW32_CLEANUP_CXX pthreadVCE.dll or pthreadGCE.dll + PTW32_CLEANUP_C pthreadVC.dll or pthreadGC.dll THE POINT OF ALL THIS IS: if you have not been defining one of these explicitly, then the defaults have been set according to the compiler @@ -197,12 +197,12 @@ THIS NOW CHANGES, as has been explained above. For example: If you were building your application with MSVC++ i.e. using C++ exceptions (rather than SEH) and not explicitly defining one of -__PTW32_CLEANUP_*, then __PTW32_CLEANUP_C++ was defined for you in pthread.h. +PTW32_CLEANUP_*, then PTW32_CLEANUP_C++ was defined for you in pthread.h. You should have been linking with pthreadVCE.dll, which does stack unwinding. If you now build your application as you had before, pthread.h will now -set __PTW32_CLEANUP_C as the default style, and you will need to link +set PTW32_CLEANUP_C as the default style, and you will need to link with pthreadVC.dll. Stack unwinding will now NOT occur when a thread is canceled, nor when the thread calls pthread_exit(). @@ -212,7 +212,7 @@ objects may not be destroyed or cleaned up after a thread is canceled. If you want the same behaviour as before, then you must now define -__PTW32_CLEANUP_C++ explicitly using a compiler option and link with +PTW32_CLEANUP_C++ explicitly using a compiler option and link with pthreadVCE.dll as you did before. diff --git a/docs/NEWS.md b/docs/NEWS.md index b6c57c8e..290d7be8 100644 --- a/docs/NEWS.md +++ b/docs/NEWS.md @@ -8,7 +8,7 @@ Note that this is a new major release. The major version increment introduces two ABI changes along with other naming changes that will require recompilation of linking applications and possibly some textual changes to compile-time macro references in configuration and source -files, e.g. PTW32_* changes to __PTW32_*, ptw32_* to __ptw32_*, etc. +files, e.g. PTW32_* changes to PTW32_*, ptw32_* to ptw32_*, etc. License Change -------------- @@ -240,8 +240,8 @@ pthread_attr_setname_np() - added for compatibility with other POSIX implementations. Because some implementations use different *_setname_np() prototypes you can define one of the following macros when building the library: - __PTW32_COMPATIBILITY_BSD (compatibility with NetBSD, FreeBSD) - __PTW32_COMPATIBILITY_TRU64 + PTW32_COMPATIBILITY_BSD (compatibility with NetBSD, FreeBSD) + PTW32_COMPATIBILITY_TRU64 If not defined then compatibility is with Linux and other equivalents. We don't impose a strict limit on the length of the thread name for the default compatibility case. Unlike Linux, no default thread name is set. @@ -335,8 +335,8 @@ Fixed sub-millisecond timeouts, which caused the library to busy wait. - Mark Smith Fix a race condition and crash in MCS locks. The waiter queue management -code in __ptw32_mcs_lock_acquire was racing with the queue management code -in __ptw32_mcs_lock_release and causing a segmentation fault. +code in ptw32_mcs_lock_acquire was racing with the queue management code +in ptw32_mcs_lock_release and causing a segmentation fault. - Anurag Sharma - Jonathan Brown (also reported this bug and provided a fix) @@ -897,7 +897,7 @@ suffix (1) in this snapshot. E.g. pthreadVC1.dll etc. has been kept as default, but the behaviour can now be controlled when the DLL is built to effectively switch it off. This makes the library much more sensitive to applications that assume that POSIX thread IDs are unique, i.e. -are not strictly compliant with POSIX. See the __PTW32_THREAD_ID_REUSE_INCREMENT +are not strictly compliant with POSIX. See the PTW32_THREAD_ID_REUSE_INCREMENT macro comments in config.h for details. Other changes @@ -1017,7 +1017,7 @@ Bug fixes * Bug and memory leak in sem_init() - Alex Blanco -* __ptw32_getprocessors() now returns CPU count of 1 for WinCE. +* ptw32_getprocessors() now returns CPU count of 1 for WinCE. - James Ewing * pthread_cond_wait() could be canceled at a point where it should not @@ -1078,7 +1078,7 @@ SNAPSHOT 2003-09-04 Bug fixes --------- -* __ptw32_cancelableWait() now allows cancellation of waiting implicit POSIX +* ptw32_cancelableWait() now allows cancellation of waiting implicit POSIX threads. New test @@ -1207,13 +1207,13 @@ Bug fixes * sem_timedwait() now uses tighter checks for unreasonable abstime values - that would result in unexpected timeout values. -* __ptw32_cond_wait_cleanup() no longer mysteriously consumes +* ptw32_cond_wait_cleanup() no longer mysteriously consumes CV signals but may produce more spurious wakeups. It is believed that the sem_timedwait() call is consuming a CV signal that it shouldn't. - Alexander Terekhov -* Fixed a memory leak in __ptw32_threadDestroy() for implicit threads. +* Fixed a memory leak in ptw32_threadDestroy() for implicit threads. * Fixed potential for deadlock in pthread_cond_destroy(). A deadlock could occur for statically declared CVs (PTHREAD_COND_INITIALIZER), @@ -1230,13 +1230,13 @@ Cleanup code default style. (IMPORTANT) Previously, if not defined, the cleanup style was determined automatically from the compiler/language, and one of the following was defined accordingly: - __PTW32_CLEANUP_SEH MSVC only - __PTW32_CLEANUP_CXX C++, including MSVC++, GNU G++ - __PTW32_CLEANUP_C C, including GNU GCC, not MSVC + PTW32_CLEANUP_SEH MSVC only + PTW32_CLEANUP_CXX C++, including MSVC++, GNU G++ + PTW32_CLEANUP_C C, including GNU GCC, not MSVC These defines determine the style of cleanup (see pthread.h) and, most importantly, the way that cancellation and thread exit (via -pthread_exit) is performed (see the routine __ptw32_throw() in private.c). +pthread_exit) is performed (see the routine ptw32_throw() in private.c). In short, the exceptions versions of the library throw an exception when a thread is canceled or exits (via pthread_exit()), which is @@ -1245,8 +1245,8 @@ the correct stack unwinding occurs regardless of where the thread is when it's canceled or exits via pthread_exit(). In this and future snapshots, unless the build explicitly defines (e.g. -via a compiler option) __PTW32_CLEANUP_SEH, __PTW32_CLEANUP_CXX, or __PTW32_CLEANUP_C, then -the build NOW always defaults to __PTW32_CLEANUP_C style cleanup. This style +via a compiler option) PTW32_CLEANUP_SEH, PTW32_CLEANUP_CXX, or PTW32_CLEANUP_C, then +the build NOW always defaults to PTW32_CLEANUP_C style cleanup. This style uses setjmp/longjmp in the cancellation and pthread_exit implementations, and therefore won't do stack unwinding even when linked to applications that have it (e.g. C++ apps). This is for consistency with most @@ -1254,17 +1254,17 @@ current commercial Unix POSIX threads implementations. Compaq's TRU64 may be an exception (no pun intended) and possible future trend. Although it was not clearly documented before, it is still necessary to -build your application using the same __PTW32_CLEANUP_* define as was +build your application using the same PTW32_CLEANUP_* define as was used for the version of the library that you link with, so that the correct parts of pthread.h are included. That is, the possible defines require the following library versions: - __PTW32_CLEANUP_SEH pthreadVSE.dll - __PTW32_CLEANUP_CXX pthreadVCE.dll or pthreadGCE.dll - __PTW32_CLEANUP_C pthreadVC.dll or pthreadGC.dll + PTW32_CLEANUP_SEH pthreadVSE.dll + PTW32_CLEANUP_CXX pthreadVCE.dll or pthreadGCE.dll + PTW32_CLEANUP_C pthreadVC.dll or pthreadGC.dll E.g. regardless of whether your app is C or C++, if you link with -pthreadVC.lib or libpthreadGC.a, then you must define __PTW32_CLEANUP_C. +pthreadVC.lib or libpthreadGC.a, then you must define PTW32_CLEANUP_C. THE POINT OF ALL THIS IS: if you have not been defining one of these @@ -1275,13 +1275,13 @@ THIS NOW CHANGES, as has been explained above, but to try to make this clearer here's an example: If you were building your application with MSVC++ i.e. using C++ -exceptions and not explicitly defining one of __PTW32_CLEANUP_*, then -__PTW32_CLEANUP_C++ was automatically defined for you in pthread.h. +exceptions and not explicitly defining one of PTW32_CLEANUP_*, then +PTW32_CLEANUP_C++ was automatically defined for you in pthread.h. You should have been linking with pthreadVCE.dll, which does stack unwinding. If you now build your application as you had before, pthread.h will now -automatically set __PTW32_CLEANUP_C as the default style, and you will need to +automatically set PTW32_CLEANUP_C as the default style, and you will need to link with pthreadVC.dll. Stack unwinding will now NOT occur when a thread is canceled, or the thread calls pthread_exit(). @@ -1291,7 +1291,7 @@ instantiated objects may not be destroyed or cleaned up after a thread is canceled. If you want the same behaviour as before, then you must now define -__PTW32_CLEANUP_C++ explicitly using a compiler option and link with +PTW32_CLEANUP_C++ explicitly using a compiler option and link with pthreadVCE.dll as you did before. @@ -1434,7 +1434,7 @@ consistent with Solaris. - Thomas Pfaff * Found a fix for the library and workaround for applications for -the known bug #2, i.e. where __PTW32_CLEANUP_CXX or __PTW32_CLEANUP_SEH is defined. +the known bug #2, i.e. where PTW32_CLEANUP_CXX or PTW32_CLEANUP_SEH is defined. See the "Known Bugs in this snapshot" section below. This could be made transparent to applications by replacing the macros that diff --git a/docs/README.CV.md b/docs/README.CV.md index a05e0f42..cdbbebed 100644 --- a/docs/README.CV.md +++ b/docs/README.CV.md @@ -672,7 +672,7 @@ x-cvsweb-markup&cvsroot=pthreads-win32 cleanup_args.cv = cv; cleanup_args.resultPtr = &result; - pthread_cleanup_push (__ptw32_cond_wait_cleanup, (void *) + pthread_cleanup_push (ptw32_cond_wait_cleanup, (void *) &cleanup_args); if ((result = pthread_mutex_unlock (mutex)) == 0) @@ -686,15 +686,15 @@ Sleep( 1 ); // @AT * a timeout * * Note: - * __ptw32_sem_timedwait is a cancellation point, + * ptw32_sem_timedwait is a cancellation point, * hence providing the * mechanism for making pthread_cond_wait a cancellation * point. We use the cleanup mechanism to ensure we * re-lock the mutex and decrement the waiters count * if we are canceled. */ - if (__ptw32_sem_timedwait (&(cv->sema), abstime) == -1) { - result = __PTW32_GET_ERRNO(); + if (ptw32_sem_timedwait (&(cv->sema), abstime) == -1) { + result = PTW32_GET_ERRNO(); } } @@ -976,7 +976,7 @@ Sleep( 1 ); //@AT #ifdef NEED_SEM - result = (__ptw32_increase_semaphore( &cv->sema, cv->waiters ) + result = (ptw32_increase_semaphore( &cv->sema, cv->waiters ) ? 0 : EINVAL); @@ -1137,7 +1137,7 @@ pthread_cond_destroy (pthread_cond_t * cond) return EINVAL; } - if (*cond != (pthread_cond_t) __PTW32_OBJECT_AUTO_INIT) + if (*cond != (pthread_cond_t) PTW32_OBJECT_AUTO_INIT) {(*cond cv = *cond; @@ -1182,14 +1182,14 @@ pthread_cond_destroy (pthread_cond_t * cond) else { /* - * See notes in __ptw32_cond_check_need_init() above also. + * See notes in ptw32_cond_check_need_init() above also. */ - EnterCriticalSection(&__ptw32_cond_test_init_lock); + EnterCriticalSection(&ptw32_cond_test_init_lock); /* * Check again. */ - if (*cond == (pthread_cond_t) __PTW32_OBJECT_AUTO_INIT) + if (*cond == (pthread_cond_t) PTW32_OBJECT_AUTO_INIT) {(*cond /* * This is all we need to do to destroy a statically @@ -1208,7 +1208,7 @@ pthread_cond_destroy (pthread_cond_t * cond) result = EBUSY; } - LeaveCriticalSection(&__ptw32_cond_test_init_lock); + LeaveCriticalSection(&ptw32_cond_test_init_lock); } return (result); @@ -1222,13 +1222,13 @@ typedef struct { pthread_mutex_t * mutexPtr; pthread_cond_t cv; int * resultPtr; -} __ptw32_cond_wait_cleanup_args_t; +} ptw32_cond_wait_cleanup_args_t; static void -__ptw32_cond_wait_cleanup(void * args) +ptw32_cond_wait_cleanup(void * args) { - __ptw32_cond_wait_cleanup_args_t * cleanup_args = -(__ptw32_cond_wait_cleanup_args_t *) args; + ptw32_cond_wait_cleanup_args_t * cleanup_args = +(ptw32_cond_wait_cleanup_args_t *) args; pthread_cond_t cv = cleanup_args->cv; int * resultPtr = cleanup_args->resultPtr; int eLastSignal; /* enum: 1=yes 0=no -1=cancelled/timedout w/o signal(s) @@ -1272,7 +1272,7 @@ __ptw32_cond_wait_cleanup(void * args) */ if (sem_post(&(cv->semBlockLock)) != 0) {(sem_post(&(cv->semBlockLock)) - *resultPtr = __PTW32_GET_ERRNO(); + *resultPtr = PTW32_GET_ERRNO(); return; } } @@ -1286,7 +1286,7 @@ __ptw32_cond_wait_cleanup(void * args) */ if (sem_post(&(cv->semBlockQueue)) != 0) {(sem_post(&(cv->semBlockQueue)) - *resultPtr = __PTW32_GET_ERRNO(); + *resultPtr = PTW32_GET_ERRNO(); return; } } @@ -1300,16 +1300,16 @@ __ptw32_cond_wait_cleanup(void * args) *resultPtr = result; } -} /* __ptw32_cond_wait_cleanup */ +} /* ptw32_cond_wait_cleanup */ static int -__ptw32_cond_timedwait (pthread_cond_t * cond, +ptw32_cond_timedwait (pthread_cond_t * cond, pthread_mutex_t * mutex, const struct timespec *abstime) { int result = 0; pthread_cond_t cv; - __ptw32_cond_wait_cleanup_args_t cleanup_args; + ptw32_cond_wait_cleanup_args_t cleanup_args; if (cond == NULL || *cond == NULL) {(cond @@ -1319,12 +1319,12 @@ __ptw32_cond_timedwait (pthread_cond_t * cond, /* * We do a quick check to see if we need to do more work * to initialise a static condition variable. We check - * again inside the guarded section of __ptw32_cond_check_need_init() + * again inside the guarded section of ptw32_cond_check_need_init() * to avoid race conditions. */ - if (*cond == (pthread_cond_t) __PTW32_OBJECT_AUTO_INIT) + if (*cond == (pthread_cond_t) PTW32_OBJECT_AUTO_INIT) {(*cond - result = __ptw32_cond_check_need_init(cond); + result = ptw32_cond_check_need_init(cond); } if (result != 0 && result != EBUSY) @@ -1359,7 +1359,7 @@ __ptw32_cond_timedwait (pthread_cond_t * cond, cleanup_args.cv = cv; cleanup_args.resultPtr = &result; - pthread_cleanup_push (__ptw32_cond_wait_cleanup, (void *) &cleanup_args); + pthread_cleanup_push (ptw32_cond_wait_cleanup, (void *) &cleanup_args); /* * Now we can release 'mutex' and... @@ -1376,16 +1376,16 @@ __ptw32_cond_timedwait (pthread_cond_t * cond, * * Note: * - * __ptw32_sem_timedwait is a cancellation point, + * ptw32_sem_timedwait is a cancellation point, * hence providing the mechanism for making * pthread_cond_wait a cancellation point. * We use the cleanup mechanism to ensure we * re-lock the mutex and adjust (to)unblock(ed) waiters * counts if we are cancelled, timed out or signalled. */ - if (__ptw32_sem_timedwait (&(cv->semBlockQueue), abstime) != 0) - {(__ptw32_sem_timedwait - result = __PTW32_GET_ERRNO(); + if (ptw32_sem_timedwait (&(cv->semBlockQueue), abstime) != 0) + {(ptw32_sem_timedwait + result = PTW32_GET_ERRNO(); } } @@ -1400,11 +1400,11 @@ __ptw32_cond_timedwait (pthread_cond_t * cond, */ return (result); -} /* __ptw32_cond_timedwait */ +} /* ptw32_cond_timedwait */ static int -__ptw32_cond_unblock (pthread_cond_t * cond, +ptw32_cond_unblock (pthread_cond_t * cond, int unblockAll) { int result; @@ -1421,7 +1421,7 @@ __ptw32_cond_unblock (pthread_cond_t * cond, * No-op if the CV is static and hasn't been initialised yet. * Assuming that any race condition is harmless. */ - if (cv == (pthread_cond_t) __PTW32_OBJECT_AUTO_INIT) + if (cv == (pthread_cond_t) PTW32_OBJECT_AUTO_INIT) {(cv return 0; } @@ -1502,14 +1502,14 @@ too return(result); -} /* __ptw32_cond_unblock */ +} /* ptw32_cond_unblock */ int pthread_cond_wait (pthread_cond_t * cond, pthread_mutex_t * mutex) { /* The NULL abstime arg means INFINITE waiting. */ - return(__ptw32_cond_timedwait(cond, mutex, NULL)); + return(ptw32_cond_timedwait(cond, mutex, NULL)); } /* pthread_cond_wait */ @@ -1523,7 +1523,7 @@ pthread_cond_timedwait (pthread_cond_t * cond, return EINVAL; } - return(__ptw32_cond_timedwait(cond, mutex, abstime)); + return(ptw32_cond_timedwait(cond, mutex, abstime)); } /* pthread_cond_timedwait */ @@ -1531,14 +1531,14 @@ int pthread_cond_signal (pthread_cond_t * cond) { /* The '0'(FALSE) unblockAll arg means unblock ONE waiter. */ - return(__ptw32_cond_unblock(cond, 0)); + return(ptw32_cond_unblock(cond, 0)); } /* pthread_cond_signal */ int pthread_cond_broadcast (pthread_cond_t * cond) { /* The '1'(TRUE) unblockAll arg means unblock ALL waiters. */ - return(__ptw32_cond_unblock(cond, 1)); + return(ptw32_cond_unblock(cond, 1)); } /* pthread_cond_broadcast */ diff --git a/docs/README.NONPORTABLE.md b/docs/README.NONPORTABLE.md index ea504de5..fe30cbde 100644 --- a/docs/README.NONPORTABLE.md +++ b/docs/README.NONPORTABLE.md @@ -239,7 +239,7 @@ pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout); int pthread_getname_np(pthread_t thr, char *name, int len); -If __PTW32_COMPATIBILITY_BSD or __PTW32_COMPATIBILITY_TRU64 defined +If PTW32_COMPATIBILITY_BSD or PTW32_COMPATIBILITY_TRU64 defined int pthread_setname_np(pthread_t thr, const char *name, void *arg); diff --git a/docs/README.md b/docs/README.md index d7c81813..eee68999 100644 --- a/docs/README.md +++ b/docs/README.md @@ -235,7 +235,7 @@ Other name changes All snapshots prior to and including snapshot 2000-08-13 used "_pthread_" as the prefix to library internal functions, and "_PTHREAD_" to many library internal -macros. These have now been changed to "__ptw32_" and "__PTW32_" +macros. These have now been changed to "ptw32_" and "PTW32_" respectively so as to not conflict with the ANSI standard's reservation of identifiers beginning with "_" and "__" for use by compiler implementations only. @@ -243,7 +243,7 @@ use by compiler implementations only. If you have written any applications and you are linking statically with the pthreads4w library then you may have included a call to _pthread_processInitialize. You will -now have to change that to __ptw32_processInitialize. +now have to change that to ptw32_processInitialize. Cleanup code default style @@ -252,13 +252,13 @@ Cleanup code default style Previously, if not defined, the cleanup style was determined automatically from the compiler used, and one of the following was defined accordingly: - __PTW32_CLEANUP_SEH MSVC only - __PTW32_CLEANUP_CXX C++, including MSVC++, GNU G++ - __PTW32_CLEANUP_C C, including GNU GCC, not MSVC + PTW32_CLEANUP_SEH MSVC only + PTW32_CLEANUP_CXX C++, including MSVC++, GNU G++ + PTW32_CLEANUP_C C, including GNU GCC, not MSVC These defines determine the style of cleanup (see pthread.h) and, most importantly, the way that cancellation and thread exit (via -pthread_exit) is performed (see the routine __ptw32_throw()). +pthread_exit) is performed (see the routine ptw32_throw()). In short, the exceptions versions of the library throw an exception when a thread is canceled, or exits via pthread_exit(). This exception is @@ -267,24 +267,24 @@ the correct stack unwinding occurs regardless of where the thread is when it's canceled or exits via pthread_exit(). In this snapshot, unless the build explicitly defines (e.g. via a -compiler option) __PTW32_CLEANUP_SEH, __PTW32_CLEANUP_CXX, or __PTW32_CLEANUP_C, then -the build NOW always defaults to __PTW32_CLEANUP_C style cleanup. This style +compiler option) PTW32_CLEANUP_SEH, PTW32_CLEANUP_CXX, or PTW32_CLEANUP_C, then +the build NOW always defaults to PTW32_CLEANUP_C style cleanup. This style uses setjmp/longjmp in the cancellation and pthread_exit implementations, and therefore won't do stack unwinding even when linked to applications that have it (e.g. C++ apps). This is for consistency with most/all commercial Unix POSIX threads implementations. Although it was not clearly documented before, it is still necessary to -build your application using the same __PTW32_CLEANUP_* define as was +build your application using the same PTW32_CLEANUP_* define as was used for the version of the library that you link with, so that the correct parts of pthread.h are included. That is, the possible defines require the following library versions: - __PTW32_CLEANUP_SEH pthreadVSE.dll - __PTW32_CLEANUP_CXX pthreadVCE.dll or pthreadGCE.dll - __PTW32_CLEANUP_C pthreadVC.dll or pthreadGC.dll + PTW32_CLEANUP_SEH pthreadVSE.dll + PTW32_CLEANUP_CXX pthreadVCE.dll or pthreadGCE.dll + PTW32_CLEANUP_C pthreadVC.dll or pthreadGC.dll -It is recommended that you let pthread.h use it's default __PTW32_CLEANUP_C +It is recommended that you let pthread.h use it's default PTW32_CLEANUP_C for both library and application builds. That is, don't define any of the above, and then link with pthreadVC.lib (MSVC or MSVC++) and libpthreadGC.a (MinGW GCC or G++). The reason is explained below, but @@ -509,7 +509,7 @@ at the URL above). Building the library as a statically linkable library ----------------------------------------------------- -General: __PTW32_STATIC_LIB must be defined for both the library build and the +General: PTW32_STATIC_LIB must be defined for both the library build and the application build. The makefiles supplied and used by the following 'make' command lines will define this for you. @@ -522,7 +522,7 @@ MinGW32 (creates libpthreadGCn.a as a static link lib): make clean GC-static -Define __PTW32_STATIC_LIB also when building your application. +Define PTW32_STATIC_LIB also when building your application. Building the library under Cygwin --------------------------------- diff --git a/docs/WinCE-PORT.md b/docs/WinCE-PORT.md index 28e50343..7bcfdea6 100644 --- a/docs/WinCE-PORT.md +++ b/docs/WinCE-PORT.md @@ -146,30 +146,30 @@ thread handle with GetCurrentThread() is sufficient, and it seems to work perfectly fine, so maybe DuplicateHandle was just plain useless to begin with ? ------------------------------------ -- In private.c, added some code at the beginning of __ptw32_processInitialize -to detect the case of multiple calls to __ptw32_processInitialize. +- In private.c, added some code at the beginning of ptw32_processInitialize +to detect the case of multiple calls to ptw32_processInitialize. Rational: In order to debug pthread-win32, it is easier to compile it as a regular library (it is not possible to debug DLL's on winCE). -In that case, the application must call __ptw32_rocessInitialize() +In that case, the application must call ptw32_rocessInitialize() explicitely, to initialize pthread-win32. It is safer in this circumstance -to handle the case where __ptw32_processInitialize() is called on +to handle the case where ptw32_processInitialize() is called on an already initialized library: int -__ptw32_processInitialize (void) +ptw32_processInitialize (void) { - if (__ptw32_processInitialized) { + if (ptw32_processInitialized) { /* * ignore if already initialized. this is useful for * programs that uses a non-dll pthread - * library. such programs must call __ptw32_processInitialize() explicitely, + * library. such programs must call ptw32_processInitialize() explicitely, * since this initialization routine is automatically called only when * the dll is loaded. */ return TRUE; } - __ptw32_processInitialized = TRUE; + ptw32_processInitialized = TRUE; [...] } diff --git a/errno.c b/errno.c index 36eb301e..e5e3ee9f 100644 --- a/errno.c +++ b/errno.c @@ -86,7 +86,7 @@ _errno (void) } else { - result = (int *)(&((__ptw32_thread_t *)self.p)->exitStatus); + result = (int *)(&((ptw32_thread_t *)self.p)->exitStatus); } return (result); @@ -95,7 +95,7 @@ _errno (void) #endif /* (NEED_ERRNO) */ -#if ! defined (__PTW32_BUILD_INLINED) +#if ! defined(PTW32_BUILD_INLINED) /* * Avoid "translation unit is empty" warnings */ diff --git a/global.c b/global.c index f1f0ecfc..b55a6098 100644 --- a/global.c +++ b/global.c @@ -41,65 +41,65 @@ #include "implement.h" -int __ptw32_processInitialized = __PTW32_FALSE; -__ptw32_thread_t * __ptw32_threadReuseTop = __PTW32_THREAD_REUSE_EMPTY; -__ptw32_thread_t * __ptw32_threadReuseBottom = __PTW32_THREAD_REUSE_EMPTY; -pthread_key_t __ptw32_selfThreadKey = NULL; -pthread_key_t __ptw32_cleanupKey = NULL; -pthread_cond_t __ptw32_cond_list_head = NULL; -pthread_cond_t __ptw32_cond_list_tail = NULL; +int ptw32_processInitialized = PTW32_FALSE; +ptw32_thread_t * ptw32_threadReuseTop = PTW32_THREAD_REUSE_EMPTY; +ptw32_thread_t * ptw32_threadReuseBottom = PTW32_THREAD_REUSE_EMPTY; +pthread_key_t ptw32_selfThreadKey = NULL; +pthread_key_t ptw32_cleanupKey = NULL; +pthread_cond_t ptw32_cond_list_head = NULL; +pthread_cond_t ptw32_cond_list_tail = NULL; -int __ptw32_concurrency = 0; +int ptw32_concurrency = 0; /* What features have been auto-detected */ -int __ptw32_features = 0; +int ptw32_features = 0; /* * Global [process wide] thread sequence Number */ -unsigned __int64 __ptw32_threadSeqNumber = 0; +unsigned __int64 ptw32_threadSeqNumber = 0; /* * Function pointer to QueueUserAPCEx if it exists, otherwise * it will be set at runtime to a substitute routine which cannot unblock * blocked threads. */ -DWORD (*__ptw32_register_cancellation) (PAPCFUNC, HANDLE, DWORD) = NULL; +DWORD (*ptw32_register_cancellation) (PAPCFUNC, HANDLE, DWORD) = NULL; /* * Global lock for managing pthread_t struct reuse. */ -__ptw32_mcs_lock_t __ptw32_thread_reuse_lock = 0; +ptw32_mcs_lock_t ptw32_thread_reuse_lock = 0; /* * Global lock for testing internal state of statically declared mutexes. */ -__ptw32_mcs_lock_t __ptw32_mutex_test_init_lock = 0; +ptw32_mcs_lock_t ptw32_mutex_test_init_lock = 0; /* * Global lock for testing internal state of PTHREAD_COND_INITIALIZER * created condition variables. */ -__ptw32_mcs_lock_t __ptw32_cond_test_init_lock = 0; +ptw32_mcs_lock_t ptw32_cond_test_init_lock = 0; /* * Global lock for testing internal state of PTHREAD_RWLOCK_INITIALIZER * created read/write locks. */ -__ptw32_mcs_lock_t __ptw32_rwlock_test_init_lock = 0; +ptw32_mcs_lock_t ptw32_rwlock_test_init_lock = 0; /* * Global lock for testing internal state of PTHREAD_SPINLOCK_INITIALIZER * created spin locks. */ -__ptw32_mcs_lock_t __ptw32_spinlock_test_init_lock = 0; +ptw32_mcs_lock_t ptw32_spinlock_test_init_lock = 0; /* * Global lock for condition variable linked list. The list exists * to wake up CVs when a WM_TIMECHANGE message arrives. See * w32_TimeChangeHandler.c. */ -__ptw32_mcs_lock_t __ptw32_cond_list_lock = 0; +ptw32_mcs_lock_t ptw32_cond_list_lock = 0; #if defined(_UWIN) /* diff --git a/implement.h b/implement.h index 81c5f292..5520552f 100644 --- a/implement.h +++ b/implement.h @@ -36,7 +36,7 @@ #if !defined(_IMPLEMENT_H) #define _IMPLEMENT_H -#if !defined (__PTW32_CONFIG_H) +#if !defined (PTW32_CONFIG_H) # error "config.h was not #included" #endif @@ -72,27 +72,27 @@ typedef VOID (APIENTRY *PAPCFUNC)(DWORD dwParam); # if defined(__MINGW32__) __attribute__((unused)) # endif -static int __ptw32_get_errno(void) { int err = 0; _get_errno(&err); return err; } -# define __PTW32_GET_ERRNO() __ptw32_get_errno() +static int ptw32_get_errno(void) { int err = 0; _get_errno(&err); return err; } +# define PTW32_GET_ERRNO() ptw32_get_errno() # if defined(__MINGW32__) __attribute__((unused)) # endif -static void __ptw32_set_errno(int err) { _set_errno(err); SetLastError(err); } -# define __PTW32_SET_ERRNO(err) __ptw32_set_errno(err) +static void ptw32_set_errno(int err) { _set_errno(err); SetLastError(err); } +# define PTW32_SET_ERRNO(err) ptw32_set_errno(err) #else -# define __PTW32_GET_ERRNO() (errno) +# define PTW32_GET_ERRNO() (errno) # if defined(__MINGW32__) __attribute__((unused)) # endif -static void __ptw32_set_errno(int err) { errno = err; SetLastError(err); } -# define __PTW32_SET_ERRNO(err) __ptw32_set_errno(err) +static void ptw32_set_errno(int err) { errno = err; SetLastError(err); } +# define PTW32_SET_ERRNO(err) ptw32_set_errno(err) #endif #if !defined(malloc) # include #endif -#if defined(__PTW32_CLEANUP_C) +#if defined(PTW32_CLEANUP_C) # include #endif @@ -106,42 +106,42 @@ static void __ptw32_set_errno(int err) { errno = err; SetLastError(err); } /* MSVC 7.1 doesn't like complex #if expressions */ #define INLINE -#if defined (__PTW32_BUILD_INLINED) +#if defined (PTW32_BUILD_INLINED) # if defined(HAVE_C_INLINE) || defined(__cplusplus) # undef INLINE # define INLINE inline # endif #endif -#if defined (__PTW32_CONFIG_MSVC6) -# define __PTW32_INTERLOCKED_VOLATILE +#if defined (PTW32_CONFIG_MSVC6) +# define PTW32_INTERLOCKED_VOLATILE #else -# define __PTW32_INTERLOCKED_VOLATILE volatile +# define PTW32_INTERLOCKED_VOLATILE volatile #endif -#define __PTW32_INTERLOCKED_LONG long -#define __PTW32_INTERLOCKED_PVOID PVOID -#define __PTW32_INTERLOCKED_LONGPTR __PTW32_INTERLOCKED_VOLATILE long* -#define __PTW32_INTERLOCKED_PVOID_PTR __PTW32_INTERLOCKED_VOLATILE PVOID* +#define PTW32_INTERLOCKED_LONG long +#define PTW32_INTERLOCKED_PVOID PVOID +#define PTW32_INTERLOCKED_LONGPTR PTW32_INTERLOCKED_VOLATILE long* +#define PTW32_INTERLOCKED_PVOID_PTR PTW32_INTERLOCKED_VOLATILE PVOID* #if defined(_WIN64) -# define __PTW32_INTERLOCKED_SIZE LONGLONG -# define __PTW32_INTERLOCKED_SIZEPTR __PTW32_INTERLOCKED_VOLATILE LONGLONG* +# define PTW32_INTERLOCKED_SIZE LONGLONG +# define PTW32_INTERLOCKED_SIZEPTR PTW32_INTERLOCKED_VOLATILE LONGLONG* #else -# define __PTW32_INTERLOCKED_SIZE long -# define __PTW32_INTERLOCKED_SIZEPTR __PTW32_INTERLOCKED_VOLATILE long* +# define PTW32_INTERLOCKED_SIZE long +# define PTW32_INTERLOCKED_SIZEPTR PTW32_INTERLOCKED_VOLATILE long* #endif /* * Don't allow the linker to optimize away dll.obj (dll.o) in static builds. */ -#if defined (__PTW32_STATIC_LIB) && defined (__PTW32_BUILD) && !defined (__PTW32_TEST_SNEAK_PEEK) -__PTW32_BEGIN_C_DECLS - void __ptw32_autostatic_anchor(void); +#if defined (PTW32_STATIC_LIB) && defined (PTW32_BUILD) && !defined (PTW32_TEST_SNEAK_PEEK) +PTW32_BEGIN_C_DECLS + void ptw32_autostatic_anchor(void); # if defined(__GNUC__) __attribute__((unused, used)) # endif - static void (*local_autostatic_anchor)(void) = __ptw32_autostatic_anchor; -__PTW32_END_C_DECLS + static void (*local_autostatic_anchor)(void) = ptw32_autostatic_anchor; +PTW32_END_C_DECLS #endif typedef enum @@ -167,34 +167,34 @@ typedef enum } PThreadState; -typedef struct __ptw32_mcs_node_t_ __ptw32_mcs_local_node_t; -typedef struct __ptw32_mcs_node_t_* __ptw32_mcs_lock_t; -typedef struct __ptw32_robust_node_t_ __ptw32_robust_node_t; -typedef struct __ptw32_thread_t_ __ptw32_thread_t; +typedef struct ptw32_mcs_node_t_ ptw32_mcs_local_node_t; +typedef struct ptw32_mcs_node_t_* ptw32_mcs_lock_t; +typedef struct ptw32_robust_node_t_ ptw32_robust_node_t; +typedef struct ptw32_thread_t_ ptw32_thread_t; -struct __ptw32_thread_t_ +struct ptw32_thread_t_ { unsigned __int64 seqNumber; /* Process-unique thread sequence number */ HANDLE threadH; /* Win32 thread handle - POSIX thread is invalid if threadH == 0 */ pthread_t ptHandle; /* This thread's permanent pthread_t handle */ - __ptw32_thread_t * prevReuse; /* Links threads on reuse stack */ + ptw32_thread_t * prevReuse; /* Links threads on reuse stack */ volatile PThreadState state; - __ptw32_mcs_lock_t threadLock; /* Used for serialised access to public thread state */ - __ptw32_mcs_lock_t stateLock; /* Used for async-cancel safety */ + ptw32_mcs_lock_t threadLock; /* Used for serialised access to public thread state */ + ptw32_mcs_lock_t stateLock; /* Used for async-cancel safety */ HANDLE cancelEvent; void *exitStatus; void *parms; void *keys; void *nextAssoc; -#if defined(__PTW32_CLEANUP_C) +#if defined(PTW32_CLEANUP_C) jmp_buf start_mark; /* Jump buffer follows void* so should be aligned */ -#endif /* __PTW32_CLEANUP_C */ +#endif /* PTW32_CLEANUP_C */ #if defined(HAVE_SIGSET_T) sigset_t sigmask; #endif /* HAVE_SIGSET_T */ - __ptw32_mcs_lock_t + ptw32_mcs_lock_t robustMxListLock; /* robustMxList lock */ - __ptw32_robust_node_t* + ptw32_robust_node_t* robustMxList; /* List of currenty held robust mutexes */ int ptErrno; int detachState; @@ -217,7 +217,7 @@ struct __ptw32_thread_t_ /* * Special value to mark attribute objects as valid. */ -#define __PTW32_ATTR_VALID ((unsigned long) 0xC4C0FFEE) +#define PTW32_ATTR_VALID ((unsigned long) 0xC4C0FFEE) struct pthread_attr_t_ { @@ -247,15 +247,15 @@ struct pthread_attr_t_ struct sem_t_ { int value; - __ptw32_mcs_lock_t lock; + ptw32_mcs_lock_t lock; HANDLE sem; #if defined(NEED_SEM) int leftToUnblock; #endif }; -#define __PTW32_OBJECT_AUTO_INIT ((void *)(size_t) -1) -#define __PTW32_OBJECT_INVALID NULL +#define PTW32_OBJECT_AUTO_INIT ((void *)(size_t) -1) +#define PTW32_OBJECT_INVALID NULL struct pthread_mutex_t_ { @@ -272,28 +272,28 @@ struct pthread_mutex_t_ pthread_t ownerThread; HANDLE event; /* Mutex release notification to waiting threads. */ - __ptw32_robust_node_t* + ptw32_robust_node_t* robustNode; /* Extra state for robust mutexes */ }; -enum __ptw32_robust_state_t_ +enum ptw32_robust_state_t_ { - __PTW32_ROBUST_CONSISTENT, - __PTW32_ROBUST_INCONSISTENT, - __PTW32_ROBUST_NOTRECOVERABLE + PTW32_ROBUST_CONSISTENT, + PTW32_ROBUST_INCONSISTENT, + PTW32_ROBUST_NOTRECOVERABLE }; -typedef enum __ptw32_robust_state_t_ __ptw32_robust_state_t; +typedef enum ptw32_robust_state_t_ ptw32_robust_state_t; /* * Node used to manage per-thread lists of currently-held robust mutexes. */ -struct __ptw32_robust_node_t_ +struct ptw32_robust_node_t_ { pthread_mutex_t mx; - __ptw32_robust_state_t stateInconsistent; - __ptw32_robust_node_t* prev; - __ptw32_robust_node_t* next; + ptw32_robust_state_t stateInconsistent; + ptw32_robust_node_t* prev; + ptw32_robust_node_t* next; }; struct pthread_mutexattr_t_ @@ -304,15 +304,15 @@ struct pthread_mutexattr_t_ }; /* - * Possible values, other than __PTW32_OBJECT_INVALID, + * Possible values, other than PTW32_OBJECT_INVALID, * for the "interlock" element in a spinlock. * * In this implementation, when a spinlock is initialised, * the number of cpus available to the process is checked. * If there is only one cpu then "interlock" is set equal to - * __PTW32_SPIN_USE_MUTEX and u.mutex is an initialised mutex. + * PTW32_SPIN_USE_MUTEX and u.mutex is an initialised mutex. * If the number of cpus is greater than 1 then "interlock" - * is set equal to __PTW32_SPIN_UNLOCKED and the number is + * is set equal to PTW32_SPIN_UNLOCKED and the number is * stored in u.cpus. This arrangement allows the spinlock * routines to attempt an InterlockedCompareExchange on "interlock" * immediately and, if that fails, to try the inferior mutex. @@ -320,10 +320,10 @@ struct pthread_mutexattr_t_ * "u.cpus" isn't used for anything yet, but could be used at * some point to optimise spinlock behaviour. */ -#define __PTW32_SPIN_INVALID (0) -#define __PTW32_SPIN_UNLOCKED (1) -#define __PTW32_SPIN_LOCKED (2) -#define __PTW32_SPIN_USE_MUTEX (3) +#define PTW32_SPIN_INVALID (0) +#define PTW32_SPIN_UNLOCKED (1) +#define PTW32_SPIN_LOCKED (2) +#define PTW32_SPIN_USE_MUTEX (3) struct pthread_spinlock_t_ { @@ -338,10 +338,10 @@ struct pthread_spinlock_t_ /* * MCS lock queue node - see ptw32_MCS_lock.c */ -struct __ptw32_mcs_node_t_ +struct ptw32_mcs_node_t_ { - struct __ptw32_mcs_node_t_ **lock; /* ptr to tail of queue */ - struct __ptw32_mcs_node_t_ *next; /* ptr to successor in queue */ + struct ptw32_mcs_node_t_ **lock; /* ptr to tail of queue */ + struct ptw32_mcs_node_t_ *next; /* ptr to successor in queue */ HANDLE readyFlag; /* set after lock is released by predecessor */ HANDLE nextFlag; /* set after 'next' ptr is set by @@ -355,8 +355,8 @@ struct pthread_barrier_t_ unsigned int nInitialBarrierHeight; int pshared; sem_t semBarrierBreeched; - __ptw32_mcs_lock_t lock; - __ptw32_mcs_local_node_t proxynode; + ptw32_mcs_lock_t lock; + ptw32_mcs_local_node_t proxynode; }; struct pthread_barrierattr_t_ @@ -367,8 +367,8 @@ struct pthread_barrierattr_t_ struct pthread_key_t_ { DWORD key; - void (__PTW32_CDECL *destructor) (void *); - __ptw32_mcs_lock_t keyLock; + void (PTW32_CDECL *destructor) (void *); + ptw32_mcs_lock_t keyLock; void *threads; }; @@ -378,7 +378,7 @@ typedef struct ThreadParms ThreadParms; struct ThreadParms { pthread_t tid; - void * (__PTW32_CDECL *start) (void *); + void * (PTW32_CDECL *start) (void *); void *arg; }; @@ -406,7 +406,7 @@ struct pthread_condattr_t_ int pshared; }; -#define __PTW32_RWLOCK_MAGIC 0xfacade2 +#define PTW32_RWLOCK_MAGIC 0xfacade2 struct pthread_rwlock_t_ { @@ -531,7 +531,7 @@ struct ThreadKeyAssoc * * */ - __ptw32_thread_t * thread; + ptw32_thread_t * thread; pthread_key_t key; ThreadKeyAssoc *nextKey; ThreadKeyAssoc *nextThread; @@ -540,7 +540,7 @@ struct ThreadKeyAssoc }; -#if defined(__PTW32_CLEANUP_SEH) +#if defined(PTW32_CLEANUP_SEH) /* * -------------------------------------------------------------- * MAKE_SOFTWARE_EXCEPTION @@ -577,63 +577,63 @@ struct ThreadKeyAssoc */ #define EXCEPTION_PTW32_SERVICES \ MAKE_SOFTWARE_EXCEPTION( SE_ERROR, \ - __PTW32_SERVICES_FACILITY, \ - __PTW32_SERVICES_ERROR ) + PTW32_SERVICES_FACILITY, \ + PTW32_SERVICES_ERROR ) -#define __PTW32_SERVICES_FACILITY 0xBAD -#define __PTW32_SERVICES_ERROR 0xDEED +#define PTW32_SERVICES_FACILITY 0xBAD +#define PTW32_SERVICES_ERROR 0xDEED -#endif /* __PTW32_CLEANUP_SEH */ +#endif /* PTW32_CLEANUP_SEH */ /* * Services available through EXCEPTION_PTW32_SERVICES - * and also used [as parameters to __ptw32_throw()] as + * and also used [as parameters to ptw32_throw()] as * generic exception selectors. */ -#define __PTW32_EPS_EXIT (1) -#define __PTW32_EPS_CANCEL (2) +#define PTW32_EPS_EXIT (1) +#define PTW32_EPS_CANCEL (2) /* Useful macros */ -#define __PTW32_MAX(a,b) ((a)<(b)?(b):(a)) -#define __PTW32_MIN(a,b) ((a)>(b)?(b):(a)) +#define PTW32_MAX(a,b) ((a)<(b)?(b):(a)) +#define PTW32_MIN(a,b) ((a)>(b)?(b):(a)) /* Declared in pthread_cancel.c */ -extern DWORD (*__ptw32_register_cancellation) (PAPCFUNC, HANDLE, DWORD); +extern DWORD (*ptw32_register_cancellation) (PAPCFUNC, HANDLE, DWORD); /* Thread Reuse stack bottom marker. Must not be NULL or any valid pointer to memory. */ -#define __PTW32_THREAD_REUSE_EMPTY ((__ptw32_thread_t *)(size_t) 1) +#define PTW32_THREAD_REUSE_EMPTY ((ptw32_thread_t *)(size_t) 1) -extern int __ptw32_processInitialized; -extern __ptw32_thread_t * __ptw32_threadReuseTop; -extern __ptw32_thread_t * __ptw32_threadReuseBottom; -extern pthread_key_t __ptw32_selfThreadKey; -extern pthread_key_t __ptw32_cleanupKey; -extern pthread_cond_t __ptw32_cond_list_head; -extern pthread_cond_t __ptw32_cond_list_tail; +extern int ptw32_processInitialized; +extern ptw32_thread_t * ptw32_threadReuseTop; +extern ptw32_thread_t * ptw32_threadReuseBottom; +extern pthread_key_t ptw32_selfThreadKey; +extern pthread_key_t ptw32_cleanupKey; +extern pthread_cond_t ptw32_cond_list_head; +extern pthread_cond_t ptw32_cond_list_tail; -extern int __ptw32_mutex_default_kind; +extern int ptw32_mutex_default_kind; -extern unsigned __int64 __ptw32_threadSeqNumber; +extern unsigned __int64 ptw32_threadSeqNumber; -extern int __ptw32_concurrency; +extern int ptw32_concurrency; -extern int __ptw32_features; +extern int ptw32_features; -extern __ptw32_mcs_lock_t __ptw32_thread_reuse_lock; -extern __ptw32_mcs_lock_t __ptw32_mutex_test_init_lock; -extern __ptw32_mcs_lock_t __ptw32_cond_list_lock; -extern __ptw32_mcs_lock_t __ptw32_cond_test_init_lock; -extern __ptw32_mcs_lock_t __ptw32_rwlock_test_init_lock; -extern __ptw32_mcs_lock_t __ptw32_spinlock_test_init_lock; +extern ptw32_mcs_lock_t ptw32_thread_reuse_lock; +extern ptw32_mcs_lock_t ptw32_mutex_test_init_lock; +extern ptw32_mcs_lock_t ptw32_cond_list_lock; +extern ptw32_mcs_lock_t ptw32_cond_test_init_lock; +extern ptw32_mcs_lock_t ptw32_rwlock_test_init_lock; +extern ptw32_mcs_lock_t ptw32_spinlock_test_init_lock; #if defined(_UWIN) extern int pthread_count; #endif -__PTW32_BEGIN_C_DECLS +PTW32_BEGIN_C_DECLS /* * ===================== @@ -643,85 +643,85 @@ __PTW32_BEGIN_C_DECLS * ===================== */ - int __ptw32_is_attr (const pthread_attr_t * attr); + int ptw32_is_attr (const pthread_attr_t * attr); - int __ptw32_cond_check_need_init (pthread_cond_t * cond); - int __ptw32_mutex_check_need_init (pthread_mutex_t * mutex); - int __ptw32_rwlock_check_need_init (pthread_rwlock_t * rwlock); - int __ptw32_spinlock_check_need_init (pthread_spinlock_t * lock); + int ptw32_cond_check_need_init (pthread_cond_t * cond); + int ptw32_mutex_check_need_init (pthread_mutex_t * mutex); + int ptw32_rwlock_check_need_init (pthread_rwlock_t * rwlock); + int ptw32_spinlock_check_need_init (pthread_spinlock_t * lock); - int __ptw32_robust_mutex_inherit(pthread_mutex_t * mutex); - void __ptw32_robust_mutex_add(pthread_mutex_t* mutex, pthread_t self); - void __ptw32_robust_mutex_remove(pthread_mutex_t* mutex, __ptw32_thread_t* otp); + int ptw32_robust_mutex_inherit(pthread_mutex_t * mutex); + void ptw32_robust_mutex_add(pthread_mutex_t* mutex, pthread_t self); + void ptw32_robust_mutex_remove(pthread_mutex_t* mutex, ptw32_thread_t* otp); DWORD - __ptw32_Registercancellation (PAPCFUNC callback, + ptw32_Registercancellation (PAPCFUNC callback, HANDLE threadH, DWORD callback_arg); - int __ptw32_processInitialize (void); + int ptw32_processInitialize (void); - void __ptw32_processTerminate (void); + void ptw32_processTerminate (void); - void __ptw32_threadDestroy (pthread_t tid); + void ptw32_threadDestroy (pthread_t tid); - void __ptw32_pop_cleanup_all (int execute); + void ptw32_pop_cleanup_all (int execute); - pthread_t __ptw32_new (void); + pthread_t ptw32_new (void); - pthread_t __ptw32_threadReusePop (void); + pthread_t ptw32_threadReusePop (void); - void __ptw32_threadReusePush (pthread_t thread); + void ptw32_threadReusePush (pthread_t thread); - int __ptw32_getprocessors (int *count); + int ptw32_getprocessors (int *count); - int __ptw32_setthreadpriority (pthread_t thread, int policy, int priority); + int ptw32_setthreadpriority (pthread_t thread, int policy, int priority); - void __ptw32_rwlock_cancelwrwait (void *arg); + void ptw32_rwlock_cancelwrwait (void *arg); #if ! defined (__MINGW32__) || (defined (__MSVCRT__) && ! defined (__DMC__)) unsigned __stdcall #else void #endif - __ptw32_threadStart (void *vthreadParms); + ptw32_threadStart (void *vthreadParms); - void __ptw32_callUserDestroyRoutines (pthread_t thread); + void ptw32_callUserDestroyRoutines (pthread_t thread); - int __ptw32_tkAssocCreate (__ptw32_thread_t * thread, pthread_key_t key); + int ptw32_tkAssocCreate (ptw32_thread_t * thread, pthread_key_t key); - void __ptw32_tkAssocDestroy (ThreadKeyAssoc * assoc); + void ptw32_tkAssocDestroy (ThreadKeyAssoc * assoc); - int __ptw32_semwait (sem_t * sem); + int ptw32_semwait (sem_t * sem); - DWORD __ptw32_relmillisecs (const struct timespec * abstime); + DWORD ptw32_relmillisecs (const struct timespec * abstime); - void __ptw32_mcs_lock_acquire (__ptw32_mcs_lock_t * lock, __ptw32_mcs_local_node_t * node); + void ptw32_mcs_lock_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node); - int __ptw32_mcs_lock_try_acquire (__ptw32_mcs_lock_t * lock, __ptw32_mcs_local_node_t * node); + int ptw32_mcs_lock_try_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node); - void __ptw32_mcs_lock_release (__ptw32_mcs_local_node_t * node); + void ptw32_mcs_lock_release (ptw32_mcs_local_node_t * node); - void __ptw32_mcs_node_transfer (__ptw32_mcs_local_node_t * new_node, __ptw32_mcs_local_node_t * old_node); + void ptw32_mcs_node_transfer (ptw32_mcs_local_node_t * new_node, ptw32_mcs_local_node_t * old_node); - void __ptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft); + void ptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft); - void __ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts); + void ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts); /* Declared in pthw32_calloc.c */ #if defined(NEED_CALLOC) -#define calloc(n, s) __ptw32_calloc(n, s) - void *__ptw32_calloc (size_t n, size_t s); +#define calloc(n, s) ptw32_calloc(n, s) + void *ptw32_calloc (size_t n, size_t s); #endif /* Declared in ptw32_throw.c */ -void __ptw32_throw (DWORD exception); +void ptw32_throw (DWORD exception); -__PTW32_END_C_DECLS +PTW32_END_C_DECLS #if defined(_UWIN_) # if defined(_MT) -__PTW32_BEGIN_C_DECLS +PTW32_BEGIN_C_DECLS _CRTIMP unsigned long __cdecl _beginthread (void (__cdecl *) (void *), unsigned, void *); @@ -731,7 +731,7 @@ __PTW32_BEGIN_C_DECLS void *, unsigned, unsigned *); _CRTIMP void __cdecl _endthreadex (unsigned); -__PTW32_END_C_DECLS +PTW32_END_C_DECLS # endif #else @@ -774,14 +774,14 @@ __PTW32_END_C_DECLS * The above aren't available in Mingw32 as of gcc 4.5.2 so define our own. */ #if defined(__cplusplus) -# define __PTW32_TO_VLONG64PTR(ptr) reinterpret_cast(ptr) +# define PTW32_TO_VLONG64PTR(ptr) reinterpret_cast(ptr) #else -# define __PTW32_TO_VLONG64PTR(ptr) (ptr) +# define PTW32_TO_VLONG64PTR(ptr) (ptr) #endif #if defined(__GNUC__) # if defined(_WIN64) -# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_64(location, value, comparand) \ +# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_64(location, value, comparand) \ ({ \ __typeof (value) _result; \ __asm__ __volatile__ \ @@ -793,7 +793,7 @@ __PTW32_END_C_DECLS :"memory", "cc"); \ _result; \ }) -# define __PTW32_INTERLOCKED_EXCHANGE_64(location, value) \ +# define PTW32_INTERLOCKED_EXCHANGE_64(location, value) \ ({ \ __typeof (value) _result; \ __asm__ __volatile__ \ @@ -804,7 +804,7 @@ __PTW32_END_C_DECLS :"memory", "cc"); \ _result; \ }) -# define __PTW32_INTERLOCKED_EXCHANGE_ADD_64(location, value) \ +# define PTW32_INTERLOCKED_EXCHANGE_ADD_64(location, value) \ ({ \ __typeof (value) _result; \ __asm__ __volatile__ \ @@ -816,9 +816,9 @@ __PTW32_END_C_DECLS :"memory", "cc"); \ _result; \ }) -# define __PTW32_INTERLOCKED_INCREMENT_64(location) \ +# define PTW32_INTERLOCKED_INCREMENT_64(location) \ ({ \ - __PTW32_INTERLOCKED_LONG _temp = 1; \ + PTW32_INTERLOCKED_LONG _temp = 1; \ __asm__ __volatile__ \ ( \ "lock\n\t" \ @@ -828,9 +828,9 @@ __PTW32_END_C_DECLS :"memory", "cc"); \ ++_temp; \ }) -# define __PTW32_INTERLOCKED_DECREMENT_64(location) \ +# define PTW32_INTERLOCKED_DECREMENT_64(location) \ ({ \ - __PTW32_INTERLOCKED_LONG _temp = -1; \ + PTW32_INTERLOCKED_LONG _temp = -1; \ __asm__ __volatile__ \ ( \ "lock\n\t" \ @@ -841,7 +841,7 @@ __PTW32_END_C_DECLS --_temp; \ }) #endif -# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG(location, value, comparand) \ +# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG(location, value, comparand) \ ({ \ __typeof (value) _result; \ __asm__ __volatile__ \ @@ -853,7 +853,7 @@ __PTW32_END_C_DECLS :"memory", "cc"); \ _result; \ }) -# define __PTW32_INTERLOCKED_EXCHANGE_LONG(location, value) \ +# define PTW32_INTERLOCKED_EXCHANGE_LONG(location, value) \ ({ \ __typeof (value) _result; \ __asm__ __volatile__ \ @@ -864,7 +864,7 @@ __PTW32_END_C_DECLS :"memory", "cc"); \ _result; \ }) -# define __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG(location, value) \ +# define PTW32_INTERLOCKED_EXCHANGE_ADD_LONG(location, value) \ ({ \ __typeof (value) _result; \ __asm__ __volatile__ \ @@ -876,9 +876,9 @@ __PTW32_END_C_DECLS :"memory", "cc"); \ _result; \ }) -# define __PTW32_INTERLOCKED_INCREMENT_LONG(location) \ +# define PTW32_INTERLOCKED_INCREMENT_LONG(location) \ ({ \ - __PTW32_INTERLOCKED_LONG _temp = 1; \ + PTW32_INTERLOCKED_LONG _temp = 1; \ __asm__ __volatile__ \ ( \ "lock\n\t" \ @@ -888,9 +888,9 @@ __PTW32_END_C_DECLS :"memory", "cc"); \ ++_temp; \ }) -# define __PTW32_INTERLOCKED_DECREMENT_LONG(location) \ +# define PTW32_INTERLOCKED_DECREMENT_LONG(location) \ ({ \ - __PTW32_INTERLOCKED_LONG _temp = -1; \ + PTW32_INTERLOCKED_LONG _temp = -1; \ __asm__ __volatile__ \ ( \ "lock\n\t" \ @@ -900,52 +900,52 @@ __PTW32_END_C_DECLS :"memory", "cc"); \ --_temp; \ }) -# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR(location, value, comparand) \ - __PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE ((__PTW32_INTERLOCKED_SIZEPTR)location, \ - (__PTW32_INTERLOCKED_SIZE)value, \ - (__PTW32_INTERLOCKED_SIZE)comparand) -# define __PTW32_INTERLOCKED_EXCHANGE_PTR(location, value) \ - __PTW32_INTERLOCKED_EXCHANGE_SIZE ((__PTW32_INTERLOCKED_SIZEPTR)location, \ - (__PTW32_INTERLOCKED_SIZE)value) +# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR(location, value, comparand) \ + PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE ((PTW32_INTERLOCKED_SIZEPTR)location, \ + (PTW32_INTERLOCKED_SIZE)value, \ + (PTW32_INTERLOCKED_SIZE)comparand) +# define PTW32_INTERLOCKED_EXCHANGE_PTR(location, value) \ + PTW32_INTERLOCKED_EXCHANGE_SIZE ((PTW32_INTERLOCKED_SIZEPTR)location, \ + (PTW32_INTERLOCKED_SIZE)value) #else # if defined(_WIN64) -# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_64(p,v,c) InterlockedCompareExchange64 (__PTW32_TO_VLONG64PTR(p),(v),(c)) -# define __PTW32_INTERLOCKED_EXCHANGE_64(p,v) InterlockedExchange64 (__PTW32_TO_VLONG64PTR(p),(v)) -# define __PTW32_INTERLOCKED_EXCHANGE_ADD_64(p,v) InterlockedExchangeAdd64 (__PTW32_TO_VLONG64PTR(p),(v)) -# define __PTW32_INTERLOCKED_INCREMENT_64(p) InterlockedIncrement64 (__PTW32_TO_VLONG64PTR(p)) -# define __PTW32_INTERLOCKED_DECREMENT_64(p) InterlockedDecrement64 (__PTW32_TO_VLONG64PTR(p)) +# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_64(p,v,c) InterlockedCompareExchange64 (PTW32_TO_VLONG64PTR(p),(v),(c)) +# define PTW32_INTERLOCKED_EXCHANGE_64(p,v) InterlockedExchange64 (PTW32_TO_VLONG64PTR(p),(v)) +# define PTW32_INTERLOCKED_EXCHANGE_ADD_64(p,v) InterlockedExchangeAdd64 (PTW32_TO_VLONG64PTR(p),(v)) +# define PTW32_INTERLOCKED_INCREMENT_64(p) InterlockedIncrement64 (PTW32_TO_VLONG64PTR(p)) +# define PTW32_INTERLOCKED_DECREMENT_64(p) InterlockedDecrement64 (PTW32_TO_VLONG64PTR(p)) # endif -# if defined (__PTW32_CONFIG_MSVC6) && !defined(_WIN64) -# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG(location, value, comparand) \ +# if defined (PTW32_CONFIG_MSVC6) && !defined(_WIN64) +# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG(location, value, comparand) \ ((LONG)InterlockedCompareExchange((PVOID *)(location), (PVOID)(value), (PVOID)(comparand))) # else -# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG InterlockedCompareExchange +# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG InterlockedCompareExchange # endif -# define __PTW32_INTERLOCKED_EXCHANGE_LONG(p,v) InterlockedExchange((p),(v)) -# define __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG(p,v) InterlockedExchangeAdd((p),(v)) -# define __PTW32_INTERLOCKED_INCREMENT_LONG(p) InterlockedIncrement((p)) -# define __PTW32_INTERLOCKED_DECREMENT_LONG(p) InterlockedDecrement((p)) -# if defined (__PTW32_CONFIG_MSVC6) && !defined(_WIN64) -# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR InterlockedCompareExchange -# define __PTW32_INTERLOCKED_EXCHANGE_PTR(location, value) \ +# define PTW32_INTERLOCKED_EXCHANGE_LONG(p,v) InterlockedExchange((p),(v)) +# define PTW32_INTERLOCKED_EXCHANGE_ADD_LONG(p,v) InterlockedExchangeAdd((p),(v)) +# define PTW32_INTERLOCKED_INCREMENT_LONG(p) InterlockedIncrement((p)) +# define PTW32_INTERLOCKED_DECREMENT_LONG(p) InterlockedDecrement((p)) +# if defined (PTW32_CONFIG_MSVC6) && !defined(_WIN64) +# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR InterlockedCompareExchange +# define PTW32_INTERLOCKED_EXCHANGE_PTR(location, value) \ ((PVOID)InterlockedExchange((LPLONG)(location), (LONG)(value))) # else -# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR(p,v,c) InterlockedCompareExchangePointer((p),(v),(c)) -# define __PTW32_INTERLOCKED_EXCHANGE_PTR(p,v) InterlockedExchangePointer((p),(v)) +# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR(p,v,c) InterlockedCompareExchangePointer((p),(v),(c)) +# define PTW32_INTERLOCKED_EXCHANGE_PTR(p,v) InterlockedExchangePointer((p),(v)) # endif #endif #if defined(_WIN64) -# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE(p,v,c) __PTW32_INTERLOCKED_COMPARE_EXCHANGE_64 (__PTW32_TO_VLONG64PTR(p),(v),(c)) -# define __PTW32_INTERLOCKED_EXCHANGE_SIZE(p,v) __PTW32_INTERLOCKED_EXCHANGE_64 (__PTW32_TO_VLONG64PTR(p),(v)) -# define __PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE(p,v) __PTW32_INTERLOCKED_EXCHANGE_ADD_64 (__PTW32_TO_VLONG64PTR(p),(v)) -# define __PTW32_INTERLOCKED_INCREMENT_SIZE(p) __PTW32_INTERLOCKED_INCREMENT_64 (__PTW32_TO_VLONG64PTR(p)) -# define __PTW32_INTERLOCKED_DECREMENT_SIZE(p) __PTW32_INTERLOCKED_DECREMENT_64 (__PTW32_TO_VLONG64PTR(p)) +# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE(p,v,c) PTW32_INTERLOCKED_COMPARE_EXCHANGE_64 (PTW32_TO_VLONG64PTR(p),(v),(c)) +# define PTW32_INTERLOCKED_EXCHANGE_SIZE(p,v) PTW32_INTERLOCKED_EXCHANGE_64 (PTW32_TO_VLONG64PTR(p),(v)) +# define PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE(p,v) PTW32_INTERLOCKED_EXCHANGE_ADD_64 (PTW32_TO_VLONG64PTR(p),(v)) +# define PTW32_INTERLOCKED_INCREMENT_SIZE(p) PTW32_INTERLOCKED_INCREMENT_64 (PTW32_TO_VLONG64PTR(p)) +# define PTW32_INTERLOCKED_DECREMENT_SIZE(p) PTW32_INTERLOCKED_DECREMENT_64 (PTW32_TO_VLONG64PTR(p)) #else -# define __PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE(p,v,c) __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG((p),(v),(c)) -# define __PTW32_INTERLOCKED_EXCHANGE_SIZE(p,v) __PTW32_INTERLOCKED_EXCHANGE_LONG((p),(v)) -# define __PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE(p,v) __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG((p),(v)) -# define __PTW32_INTERLOCKED_INCREMENT_SIZE(p) __PTW32_INTERLOCKED_INCREMENT_LONG((p)) -# define __PTW32_INTERLOCKED_DECREMENT_SIZE(p) __PTW32_INTERLOCKED_DECREMENT_LONG((p)) +# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE(p,v,c) PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG((p),(v),(c)) +# define PTW32_INTERLOCKED_EXCHANGE_SIZE(p,v) PTW32_INTERLOCKED_EXCHANGE_LONG((p),(v)) +# define PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE(p,v) PTW32_INTERLOCKED_EXCHANGE_ADD_LONG((p),(v)) +# define PTW32_INTERLOCKED_INCREMENT_SIZE(p) PTW32_INTERLOCKED_INCREMENT_LONG((p)) +# define PTW32_INTERLOCKED_DECREMENT_SIZE(p) PTW32_INTERLOCKED_DECREMENT_LONG((p)) #endif #if defined(NEED_CREATETHREAD) diff --git a/manual/pthread_setname_np.html b/manual/pthread_setname_np.html index 5e4e8b13..d3dc1e37 100644 --- a/manual/pthread_setname_np.html +++ b/manual/pthread_setname_np.html @@ -35,8 +35,8 @@

                                                              thr, char * name, int len);

                                                              -

                                                              #if defined (__PTW32_COMPATIBILITY_BSD) || -defined (__PTW32_COMPATIBILITY_TRU64)
                                                              int +

                                                              #if defined (PTW32_COMPATIBILITY_BSD) || +defined (PTW32_COMPATIBILITY_TRU64)
                                                              int pthread_setname_np(pthread_t thr, const char * name, void * arg);

                                                              @@ -47,7 +47,7 @@

                                                              Description

                                                              pthread_setname_np() sets the descriptive name of the thread. It takes the following arguments.

                                                              -

                                                              #if defined (__PTW32_COMPATIBILITY_BSD)

                                                              +

                                                              #if defined (PTW32_COMPATIBILITY_BSD)

@@ -78,7 +78,7 @@

Description

-

#elif defined (__PTW32_COMPATIBILITY_TRU64)

+

#elif defined (PTW32_COMPATIBILITY_TRU64)

diff --git a/need_errno.h b/need_errno.h index fc79f2ec..e84e3cd0 100644 --- a/need_errno.h +++ b/need_errno.h @@ -59,22 +59,22 @@ extern "C" { #endif #endif -#if defined(__PTW32_STATIC_LIB) && defined(_MSC_VER) && _MSC_VER >= 1400 -# define __PTW32_STATIC_TLSLIB +#if defined(PTW32_STATIC_LIB) && defined(_MSC_VER) && _MSC_VER >= 1400 +# define PTW32_STATIC_TLSLIB #endif -#if defined (__PTW32_STATIC_LIB) || defined (__PTW32_STATIC_TLSLIB) -# define __PTW32_DLLPORT -#elif defined (__PTW32_BUILD) -# define __PTW32_DLLPORT __declspec (dllexport) +#if defined (PTW32_STATIC_LIB) || defined (PTW32_STATIC_TLSLIB) +# define PTW32_DLLPORT +#elif defined (PTW32_BUILD) +# define PTW32_DLLPORT __declspec (dllexport) # else -# define __PTW32_DLLPORT __declspec (dllimport) +# define PTW32_DLLPORT __declspec (dllimport) # endif /* declare reference to errno */ #if (defined(_MT) || defined(_MD) || defined(_DLL)) && !defined(_MAC) -__PTW32_DLLPORT int * __cdecl _errno(void); +PTW32_DLLPORT int * __cdecl _errno(void); #define errno (*_errno()) #else /* ndef _MT && ndef _MD && ndef _DLL */ _CRTIMP extern int errno; @@ -138,7 +138,7 @@ _CRTIMP extern int errno; /* * POSIX 2008 - robust mutexes. */ -#if __PTW32_VERSION_MAJOR > 2 +#if PTW32_VERSION_MAJOR > 2 # if !defined(EOWNERDEAD) # define EOWNERDEAD 1000 # endif diff --git a/pthread.h b/pthread.h index a270e6c7..901208e7 100644 --- a/pthread.h +++ b/pthread.h @@ -61,11 +61,11 @@ * C++ apps). This is currently consistent with most/all commercial Unix * POSIX threads implementations. */ -#if !defined( __PTW32_CLEANUP_SEH ) && !defined( __PTW32_CLEANUP_CXX ) && !defined( __PTW32_CLEANUP_C ) -# define __PTW32_CLEANUP_C +#if !defined( PTW32_CLEANUP_SEH ) && !defined( PTW32_CLEANUP_CXX ) && !defined( PTW32_CLEANUP_C ) +# define PTW32_CLEANUP_C #endif -#if defined( __PTW32_CLEANUP_SEH ) && ( !defined( _MSC_VER ) && !defined (__PTW32_RC_MSC)) +#if defined( PTW32_CLEANUP_SEH ) && ( !defined( _MSC_VER ) && !defined (PTW32_RC_MSC)) #error ERROR [__FILE__, line __LINE__]: SEH is not supported for this compiler. #endif @@ -76,24 +76,24 @@ */ #if !defined(RC_INVOKED) -#undef __PTW32_LEVEL -#undef __PTW32_LEVEL_MAX -#define __PTW32_LEVEL_MAX 3 +#undef PTW32_LEVEL +#undef PTW32_LEVEL_MAX +#define PTW32_LEVEL_MAX 3 #if _POSIX_C_SOURCE >= 200112L /* POSIX.1-2001 and later */ -# define __PTW32_LEVEL __PTW32_LEVEL_MAX /* include everything */ +# define PTW32_LEVEL PTW32_LEVEL_MAX /* include everything */ #elif defined INCLUDE_NP /* earlier than POSIX.1-2001, but... */ -# define __PTW32_LEVEL 2 /* include non-portable extensions */ +# define PTW32_LEVEL 2 /* include non-portable extensions */ #elif _POSIX_C_SOURCE >= 199309L /* POSIX.1-1993 */ -# define __PTW32_LEVEL 1 /* include 1b, 1c, and 1d */ +# define PTW32_LEVEL 1 /* include 1b, 1c, and 1d */ #elif defined _POSIX_SOURCE /* early POSIX */ -# define __PTW32_LEVEL 0 /* minimal support */ +# define PTW32_LEVEL 0 /* minimal support */ #else /* unspecified support level */ -# define __PTW32_LEVEL __PTW32_LEVEL_MAX /* include everything anyway */ +# define PTW32_LEVEL PTW32_LEVEL_MAX /* include everything anyway */ #endif /* @@ -170,8 +170,8 @@ */ enum { /* Boolean values to make us independent of system includes. */ - __PTW32_FALSE = 0, - __PTW32_TRUE = (! __PTW32_FALSE) + PTW32_FALSE = 0, + PTW32_TRUE = (! PTW32_FALSE) }; #include @@ -378,7 +378,7 @@ enum #define SEM_VALUE_MAX INT_MAX -#if defined(_UWIN) && __PTW32_LEVEL >= __PTW32_LEVEL_MAX +#if defined(_UWIN) && PTW32_LEVEL >= PTW32_LEVEL_MAX # include #else /* Generic handle type - intended to provide the lifetime-uniqueness that @@ -397,14 +397,14 @@ enum */ typedef struct { void * p; /* Pointer to actual object */ -#if __PTW32_VERSION_MAJOR > 2 +#if PTW32_VERSION_MAJOR > 2 size_t x; /* Extra information - reuse count etc */ #else unsigned int x; /* Extra information - reuse count etc */ #endif -} __ptw32_handle_t; +} ptw32_handle_t; -typedef __ptw32_handle_t pthread_t; +typedef ptw32_handle_t pthread_t; typedef struct pthread_attr_t_ * pthread_attr_t; typedef struct pthread_once_t_ pthread_once_t; typedef struct pthread_key_t_ * pthread_key_t; @@ -487,9 +487,9 @@ enum * ==================== * ==================== */ -#if __PTW32_VERSION_MAJOR > 2 +#if PTW32_VERSION_MAJOR > 2 -#define PTHREAD_ONCE_INIT { 0, __PTW32_FALSE } +#define PTHREAD_ONCE_INIT { 0, PTW32_FALSE } struct pthread_once_t_ { @@ -499,7 +499,7 @@ struct pthread_once_t_ #else -#define PTHREAD_ONCE_INIT { __PTW32_FALSE, 0, 0, 0 } +#define PTHREAD_ONCE_INIT { PTW32_FALSE, 0, 0, 0 } struct pthread_once_t_ { @@ -555,7 +555,7 @@ enum }; -typedef struct __ptw32_cleanup_t __ptw32_cleanup_t; +typedef struct ptw32_cleanup_t ptw32_cleanup_t; #if defined(_MSC_VER) /* Disable MSVC 'anachronism used' warning */ @@ -563,29 +563,29 @@ typedef struct __ptw32_cleanup_t __ptw32_cleanup_t; #pragma warning( disable : 4229 ) #endif -typedef void (* __PTW32_CDECL __ptw32_cleanup_callback_t)(void *); +typedef void (* PTW32_CDECL ptw32_cleanup_callback_t)(void *); #if defined(_MSC_VER) #pragma warning( pop ) #endif -struct __ptw32_cleanup_t +struct ptw32_cleanup_t { - __ptw32_cleanup_callback_t routine; + ptw32_cleanup_callback_t routine; void *arg; - struct __ptw32_cleanup_t *prev; + struct ptw32_cleanup_t *prev; }; -#if defined(__PTW32_CLEANUP_SEH) +#if defined(PTW32_CLEANUP_SEH) /* * WIN32 SEH version of cancel cleanup. */ #define pthread_cleanup_push( _rout, _arg ) \ { \ - __ptw32_cleanup_t _cleanup; \ + ptw32_cleanup_t _cleanup; \ \ - _cleanup.routine = (__ptw32_cleanup_callback_t)(_rout); \ + _cleanup.routine = (ptw32_cleanup_callback_t)(_rout); \ _cleanup.arg = (_arg); \ __try \ { \ @@ -601,9 +601,9 @@ struct __ptw32_cleanup_t } \ } -#else /* __PTW32_CLEANUP_SEH */ +#else /* PTW32_CLEANUP_SEH */ -#if defined(__PTW32_CLEANUP_C) +#if defined(PTW32_CLEANUP_C) /* * C implementation of PThreads cancel cleanup @@ -611,17 +611,17 @@ struct __ptw32_cleanup_t #define pthread_cleanup_push( _rout, _arg ) \ { \ - __ptw32_cleanup_t _cleanup; \ + ptw32_cleanup_t _cleanup; \ \ - __ptw32_push_cleanup( &_cleanup, (__ptw32_cleanup_callback_t) (_rout), (_arg) ); \ + ptw32_push_cleanup( &_cleanup, (ptw32_cleanup_callback_t) (_rout), (_arg) ); \ #define pthread_cleanup_pop( _execute ) \ - (void) __ptw32_pop_cleanup( _execute ); \ + (void) ptw32_pop_cleanup( _execute ); \ } -#else /* __PTW32_CLEANUP_C */ +#else /* PTW32_CLEANUP_C */ -#if defined(__PTW32_CLEANUP_CXX) +#if defined(PTW32_CLEANUP_CXX) /* * C++ version of cancel cleanup. @@ -641,7 +641,7 @@ struct __ptw32_cleanup_t * of how the code exits the scope * (i.e. such as by an exception) */ - __ptw32_cleanup_callback_t cleanUpRout; + ptw32_cleanup_callback_t cleanUpRout; void * obj; int executeIt; @@ -657,7 +657,7 @@ struct __ptw32_cleanup_t } PThreadCleanup( - __ptw32_cleanup_callback_t routine, + ptw32_cleanup_callback_t routine, void * arg ) : cleanUpRout( routine ), obj( arg ), @@ -690,7 +690,7 @@ struct __ptw32_cleanup_t */ #define pthread_cleanup_push( _rout, _arg ) \ { \ - PThreadCleanup cleanup((__ptw32_cleanup_callback_t)(_rout), \ + PThreadCleanup cleanup((ptw32_cleanup_callback_t)(_rout), \ (void *) (_arg) ); #define pthread_cleanup_pop( _execute ) \ @@ -701,11 +701,11 @@ struct __ptw32_cleanup_t #error ERROR [__FILE__, line __LINE__]: Cleanup type undefined. -#endif /* __PTW32_CLEANUP_CXX */ +#endif /* PTW32_CLEANUP_CXX */ -#endif /* __PTW32_CLEANUP_C */ +#endif /* PTW32_CLEANUP_C */ -#endif /* __PTW32_CLEANUP_SEH */ +#endif /* PTW32_CLEANUP_SEH */ /* @@ -716,289 +716,289 @@ struct __ptw32_cleanup_t * =============== */ -__PTW32_BEGIN_C_DECLS +PTW32_BEGIN_C_DECLS /* * PThread Attribute Functions */ -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_init (pthread_attr_t * attr); +PTW32_DLLPORT int PTW32_CDECL pthread_attr_init (pthread_attr_t * attr); -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_destroy (pthread_attr_t * attr); +PTW32_DLLPORT int PTW32_CDECL pthread_attr_destroy (pthread_attr_t * attr); -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_getaffinity_np (const pthread_attr_t * attr, +PTW32_DLLPORT int PTW32_CDECL pthread_attr_getaffinity_np (const pthread_attr_t * attr, size_t cpusetsize, cpu_set_t * cpuset); -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_getdetachstate (const pthread_attr_t * attr, +PTW32_DLLPORT int PTW32_CDECL pthread_attr_getdetachstate (const pthread_attr_t * attr, int *detachstate); -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_getstackaddr (const pthread_attr_t * attr, +PTW32_DLLPORT int PTW32_CDECL pthread_attr_getstackaddr (const pthread_attr_t * attr, void **stackaddr); -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_getstacksize (const pthread_attr_t * attr, +PTW32_DLLPORT int PTW32_CDECL pthread_attr_getstacksize (const pthread_attr_t * attr, size_t * stacksize); -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_setaffinity_np (pthread_attr_t * attr, +PTW32_DLLPORT int PTW32_CDECL pthread_attr_setaffinity_np (pthread_attr_t * attr, size_t cpusetsize, const cpu_set_t * cpuset); -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_setdetachstate (pthread_attr_t * attr, +PTW32_DLLPORT int PTW32_CDECL pthread_attr_setdetachstate (pthread_attr_t * attr, int detachstate); -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_setstackaddr (pthread_attr_t * attr, +PTW32_DLLPORT int PTW32_CDECL pthread_attr_setstackaddr (pthread_attr_t * attr, void *stackaddr); -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_setstacksize (pthread_attr_t * attr, +PTW32_DLLPORT int PTW32_CDECL pthread_attr_setstacksize (pthread_attr_t * attr, size_t stacksize); -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_getschedparam (const pthread_attr_t *attr, +PTW32_DLLPORT int PTW32_CDECL pthread_attr_getschedparam (const pthread_attr_t *attr, struct sched_param *param); -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_setschedparam (pthread_attr_t *attr, +PTW32_DLLPORT int PTW32_CDECL pthread_attr_setschedparam (pthread_attr_t *attr, const struct sched_param *param); -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_setschedpolicy (pthread_attr_t *, +PTW32_DLLPORT int PTW32_CDECL pthread_attr_setschedpolicy (pthread_attr_t *, int); -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_getschedpolicy (const pthread_attr_t *, +PTW32_DLLPORT int PTW32_CDECL pthread_attr_getschedpolicy (const pthread_attr_t *, int *); -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_setinheritsched(pthread_attr_t * attr, +PTW32_DLLPORT int PTW32_CDECL pthread_attr_setinheritsched(pthread_attr_t * attr, int inheritsched); -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_getinheritsched(const pthread_attr_t * attr, +PTW32_DLLPORT int PTW32_CDECL pthread_attr_getinheritsched(const pthread_attr_t * attr, int * inheritsched); -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_setscope (pthread_attr_t *, +PTW32_DLLPORT int PTW32_CDECL pthread_attr_setscope (pthread_attr_t *, int); -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_getscope (const pthread_attr_t *, +PTW32_DLLPORT int PTW32_CDECL pthread_attr_getscope (const pthread_attr_t *, int *); /* * PThread Functions */ -__PTW32_DLLPORT int __PTW32_CDECL pthread_create (pthread_t * tid, +PTW32_DLLPORT int PTW32_CDECL pthread_create (pthread_t * tid, const pthread_attr_t * attr, - void * (__PTW32_CDECL *start) (void *), + void * (PTW32_CDECL *start) (void *), void *arg); -__PTW32_DLLPORT int __PTW32_CDECL pthread_detach (pthread_t tid); +PTW32_DLLPORT int PTW32_CDECL pthread_detach (pthread_t tid); -__PTW32_DLLPORT int __PTW32_CDECL pthread_equal (pthread_t t1, +PTW32_DLLPORT int PTW32_CDECL pthread_equal (pthread_t t1, pthread_t t2); -__PTW32_DLLPORT void __PTW32_CDECL pthread_exit (void *value_ptr); +PTW32_DLLPORT void PTW32_CDECL pthread_exit (void *value_ptr); -__PTW32_DLLPORT int __PTW32_CDECL pthread_join (pthread_t thread, +PTW32_DLLPORT int PTW32_CDECL pthread_join (pthread_t thread, void **value_ptr); -__PTW32_DLLPORT pthread_t __PTW32_CDECL pthread_self (void); +PTW32_DLLPORT pthread_t PTW32_CDECL pthread_self (void); -__PTW32_DLLPORT int __PTW32_CDECL pthread_cancel (pthread_t thread); +PTW32_DLLPORT int PTW32_CDECL pthread_cancel (pthread_t thread); -__PTW32_DLLPORT int __PTW32_CDECL pthread_setcancelstate (int state, +PTW32_DLLPORT int PTW32_CDECL pthread_setcancelstate (int state, int *oldstate); -__PTW32_DLLPORT int __PTW32_CDECL pthread_setcanceltype (int type, +PTW32_DLLPORT int PTW32_CDECL pthread_setcanceltype (int type, int *oldtype); -__PTW32_DLLPORT void __PTW32_CDECL pthread_testcancel (void); +PTW32_DLLPORT void PTW32_CDECL pthread_testcancel (void); -__PTW32_DLLPORT int __PTW32_CDECL pthread_once (pthread_once_t * once_control, - void (__PTW32_CDECL *init_routine) (void)); +PTW32_DLLPORT int PTW32_CDECL pthread_once (pthread_once_t * once_control, + void (PTW32_CDECL *init_routine) (void)); -#if __PTW32_LEVEL >= __PTW32_LEVEL_MAX -__PTW32_DLLPORT __ptw32_cleanup_t * __PTW32_CDECL __ptw32_pop_cleanup (int execute); +#if PTW32_LEVEL >= PTW32_LEVEL_MAX +PTW32_DLLPORT ptw32_cleanup_t * PTW32_CDECL ptw32_pop_cleanup (int execute); -__PTW32_DLLPORT void __PTW32_CDECL __ptw32_push_cleanup (__ptw32_cleanup_t * cleanup, - __ptw32_cleanup_callback_t routine, +PTW32_DLLPORT void PTW32_CDECL ptw32_push_cleanup (ptw32_cleanup_t * cleanup, + ptw32_cleanup_callback_t routine, void *arg); -#endif /* __PTW32_LEVEL >= __PTW32_LEVEL_MAX */ +#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */ /* * Thread Specific Data Functions */ -__PTW32_DLLPORT int __PTW32_CDECL pthread_key_create (pthread_key_t * key, - void (__PTW32_CDECL *destructor) (void *)); +PTW32_DLLPORT int PTW32_CDECL pthread_key_create (pthread_key_t * key, + void (PTW32_CDECL *destructor) (void *)); -__PTW32_DLLPORT int __PTW32_CDECL pthread_key_delete (pthread_key_t key); +PTW32_DLLPORT int PTW32_CDECL pthread_key_delete (pthread_key_t key); -__PTW32_DLLPORT int __PTW32_CDECL pthread_setspecific (pthread_key_t key, +PTW32_DLLPORT int PTW32_CDECL pthread_setspecific (pthread_key_t key, const void *value); -__PTW32_DLLPORT void * __PTW32_CDECL pthread_getspecific (pthread_key_t key); +PTW32_DLLPORT void * PTW32_CDECL pthread_getspecific (pthread_key_t key); /* * Mutex Attribute Functions */ -__PTW32_DLLPORT int __PTW32_CDECL pthread_mutexattr_init (pthread_mutexattr_t * attr); +PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_init (pthread_mutexattr_t * attr); -__PTW32_DLLPORT int __PTW32_CDECL pthread_mutexattr_destroy (pthread_mutexattr_t * attr); +PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_destroy (pthread_mutexattr_t * attr); -__PTW32_DLLPORT int __PTW32_CDECL pthread_mutexattr_getpshared (const pthread_mutexattr_t +PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_getpshared (const pthread_mutexattr_t * attr, int *pshared); -__PTW32_DLLPORT int __PTW32_CDECL pthread_mutexattr_setpshared (pthread_mutexattr_t * attr, +PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_setpshared (pthread_mutexattr_t * attr, int pshared); -__PTW32_DLLPORT int __PTW32_CDECL pthread_mutexattr_settype (pthread_mutexattr_t * attr, int kind); -__PTW32_DLLPORT int __PTW32_CDECL pthread_mutexattr_gettype (const pthread_mutexattr_t * attr, int *kind); +PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_settype (pthread_mutexattr_t * attr, int kind); +PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_gettype (const pthread_mutexattr_t * attr, int *kind); -__PTW32_DLLPORT int __PTW32_CDECL pthread_mutexattr_setrobust( +PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_setrobust( pthread_mutexattr_t *attr, int robust); -__PTW32_DLLPORT int __PTW32_CDECL pthread_mutexattr_getrobust( +PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_getrobust( const pthread_mutexattr_t * attr, int * robust); /* * Barrier Attribute Functions */ -__PTW32_DLLPORT int __PTW32_CDECL pthread_barrierattr_init (pthread_barrierattr_t * attr); +PTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_init (pthread_barrierattr_t * attr); -__PTW32_DLLPORT int __PTW32_CDECL pthread_barrierattr_destroy (pthread_barrierattr_t * attr); +PTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_destroy (pthread_barrierattr_t * attr); -__PTW32_DLLPORT int __PTW32_CDECL pthread_barrierattr_getpshared (const pthread_barrierattr_t +PTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_getpshared (const pthread_barrierattr_t * attr, int *pshared); -__PTW32_DLLPORT int __PTW32_CDECL pthread_barrierattr_setpshared (pthread_barrierattr_t * attr, +PTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_setpshared (pthread_barrierattr_t * attr, int pshared); /* * Mutex Functions */ -__PTW32_DLLPORT int __PTW32_CDECL pthread_mutex_init (pthread_mutex_t * mutex, +PTW32_DLLPORT int PTW32_CDECL pthread_mutex_init (pthread_mutex_t * mutex, const pthread_mutexattr_t * attr); -__PTW32_DLLPORT int __PTW32_CDECL pthread_mutex_destroy (pthread_mutex_t * mutex); +PTW32_DLLPORT int PTW32_CDECL pthread_mutex_destroy (pthread_mutex_t * mutex); -__PTW32_DLLPORT int __PTW32_CDECL pthread_mutex_lock (pthread_mutex_t * mutex); +PTW32_DLLPORT int PTW32_CDECL pthread_mutex_lock (pthread_mutex_t * mutex); -__PTW32_DLLPORT int __PTW32_CDECL pthread_mutex_timedlock(pthread_mutex_t * mutex, +PTW32_DLLPORT int PTW32_CDECL pthread_mutex_timedlock(pthread_mutex_t * mutex, const struct timespec *abstime); -__PTW32_DLLPORT int __PTW32_CDECL pthread_mutex_trylock (pthread_mutex_t * mutex); +PTW32_DLLPORT int PTW32_CDECL pthread_mutex_trylock (pthread_mutex_t * mutex); -__PTW32_DLLPORT int __PTW32_CDECL pthread_mutex_unlock (pthread_mutex_t * mutex); +PTW32_DLLPORT int PTW32_CDECL pthread_mutex_unlock (pthread_mutex_t * mutex); -__PTW32_DLLPORT int __PTW32_CDECL pthread_mutex_consistent (pthread_mutex_t * mutex); +PTW32_DLLPORT int PTW32_CDECL pthread_mutex_consistent (pthread_mutex_t * mutex); /* * Spinlock Functions */ -__PTW32_DLLPORT int __PTW32_CDECL pthread_spin_init (pthread_spinlock_t * lock, int pshared); +PTW32_DLLPORT int PTW32_CDECL pthread_spin_init (pthread_spinlock_t * lock, int pshared); -__PTW32_DLLPORT int __PTW32_CDECL pthread_spin_destroy (pthread_spinlock_t * lock); +PTW32_DLLPORT int PTW32_CDECL pthread_spin_destroy (pthread_spinlock_t * lock); -__PTW32_DLLPORT int __PTW32_CDECL pthread_spin_lock (pthread_spinlock_t * lock); +PTW32_DLLPORT int PTW32_CDECL pthread_spin_lock (pthread_spinlock_t * lock); -__PTW32_DLLPORT int __PTW32_CDECL pthread_spin_trylock (pthread_spinlock_t * lock); +PTW32_DLLPORT int PTW32_CDECL pthread_spin_trylock (pthread_spinlock_t * lock); -__PTW32_DLLPORT int __PTW32_CDECL pthread_spin_unlock (pthread_spinlock_t * lock); +PTW32_DLLPORT int PTW32_CDECL pthread_spin_unlock (pthread_spinlock_t * lock); /* * Barrier Functions */ -__PTW32_DLLPORT int __PTW32_CDECL pthread_barrier_init (pthread_barrier_t * barrier, +PTW32_DLLPORT int PTW32_CDECL pthread_barrier_init (pthread_barrier_t * barrier, const pthread_barrierattr_t * attr, unsigned int count); -__PTW32_DLLPORT int __PTW32_CDECL pthread_barrier_destroy (pthread_barrier_t * barrier); +PTW32_DLLPORT int PTW32_CDECL pthread_barrier_destroy (pthread_barrier_t * barrier); -__PTW32_DLLPORT int __PTW32_CDECL pthread_barrier_wait (pthread_barrier_t * barrier); +PTW32_DLLPORT int PTW32_CDECL pthread_barrier_wait (pthread_barrier_t * barrier); /* * Condition Variable Attribute Functions */ -__PTW32_DLLPORT int __PTW32_CDECL pthread_condattr_init (pthread_condattr_t * attr); +PTW32_DLLPORT int PTW32_CDECL pthread_condattr_init (pthread_condattr_t * attr); -__PTW32_DLLPORT int __PTW32_CDECL pthread_condattr_destroy (pthread_condattr_t * attr); +PTW32_DLLPORT int PTW32_CDECL pthread_condattr_destroy (pthread_condattr_t * attr); -__PTW32_DLLPORT int __PTW32_CDECL pthread_condattr_getpshared (const pthread_condattr_t * attr, +PTW32_DLLPORT int PTW32_CDECL pthread_condattr_getpshared (const pthread_condattr_t * attr, int *pshared); -__PTW32_DLLPORT int __PTW32_CDECL pthread_condattr_setpshared (pthread_condattr_t * attr, +PTW32_DLLPORT int PTW32_CDECL pthread_condattr_setpshared (pthread_condattr_t * attr, int pshared); /* * Condition Variable Functions */ -__PTW32_DLLPORT int __PTW32_CDECL pthread_cond_init (pthread_cond_t * cond, +PTW32_DLLPORT int PTW32_CDECL pthread_cond_init (pthread_cond_t * cond, const pthread_condattr_t * attr); -__PTW32_DLLPORT int __PTW32_CDECL pthread_cond_destroy (pthread_cond_t * cond); +PTW32_DLLPORT int PTW32_CDECL pthread_cond_destroy (pthread_cond_t * cond); -__PTW32_DLLPORT int __PTW32_CDECL pthread_cond_wait (pthread_cond_t * cond, +PTW32_DLLPORT int PTW32_CDECL pthread_cond_wait (pthread_cond_t * cond, pthread_mutex_t * mutex); -__PTW32_DLLPORT int __PTW32_CDECL pthread_cond_timedwait (pthread_cond_t * cond, +PTW32_DLLPORT int PTW32_CDECL pthread_cond_timedwait (pthread_cond_t * cond, pthread_mutex_t * mutex, const struct timespec *abstime); -__PTW32_DLLPORT int __PTW32_CDECL pthread_cond_signal (pthread_cond_t * cond); +PTW32_DLLPORT int PTW32_CDECL pthread_cond_signal (pthread_cond_t * cond); -__PTW32_DLLPORT int __PTW32_CDECL pthread_cond_broadcast (pthread_cond_t * cond); +PTW32_DLLPORT int PTW32_CDECL pthread_cond_broadcast (pthread_cond_t * cond); /* * Scheduling */ -__PTW32_DLLPORT int __PTW32_CDECL pthread_setschedparam (pthread_t thread, +PTW32_DLLPORT int PTW32_CDECL pthread_setschedparam (pthread_t thread, int policy, const struct sched_param *param); -__PTW32_DLLPORT int __PTW32_CDECL pthread_getschedparam (pthread_t thread, +PTW32_DLLPORT int PTW32_CDECL pthread_getschedparam (pthread_t thread, int *policy, struct sched_param *param); -__PTW32_DLLPORT int __PTW32_CDECL pthread_setconcurrency (int); +PTW32_DLLPORT int PTW32_CDECL pthread_setconcurrency (int); -__PTW32_DLLPORT int __PTW32_CDECL pthread_getconcurrency (void); +PTW32_DLLPORT int PTW32_CDECL pthread_getconcurrency (void); /* * Read-Write Lock Functions */ -__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlock_init(pthread_rwlock_t *lock, +PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_init(pthread_rwlock_t *lock, const pthread_rwlockattr_t *attr); -__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlock_destroy(pthread_rwlock_t *lock); +PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_destroy(pthread_rwlock_t *lock); -__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlock_tryrdlock(pthread_rwlock_t *); +PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_tryrdlock(pthread_rwlock_t *); -__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlock_trywrlock(pthread_rwlock_t *); +PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_trywrlock(pthread_rwlock_t *); -__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlock_rdlock(pthread_rwlock_t *lock); +PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_rdlock(pthread_rwlock_t *lock); -__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlock_timedrdlock(pthread_rwlock_t *lock, +PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_timedrdlock(pthread_rwlock_t *lock, const struct timespec *abstime); -__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlock_wrlock(pthread_rwlock_t *lock); +PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_wrlock(pthread_rwlock_t *lock); -__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlock_timedwrlock(pthread_rwlock_t *lock, +PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_timedwrlock(pthread_rwlock_t *lock, const struct timespec *abstime); -__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlock_unlock(pthread_rwlock_t *lock); +PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_unlock(pthread_rwlock_t *lock); -__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlockattr_init (pthread_rwlockattr_t * attr); +PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_init (pthread_rwlockattr_t * attr); -__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlockattr_destroy (pthread_rwlockattr_t * attr); +PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_destroy (pthread_rwlockattr_t * attr); -__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * attr, +PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * attr, int *pshared); -__PTW32_DLLPORT int __PTW32_CDECL pthread_rwlockattr_setpshared (pthread_rwlockattr_t * attr, +PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_setpshared (pthread_rwlockattr_t * attr, int pshared); -#if __PTW32_LEVEL >= __PTW32_LEVEL_MAX - 1 +#if PTW32_LEVEL >= PTW32_LEVEL_MAX - 1 /* * Signal Functions. Should be defined in but MSVC and MinGW32 * already have signal.h that don't define these. */ -__PTW32_DLLPORT int __PTW32_CDECL pthread_kill(pthread_t thread, int sig); +PTW32_DLLPORT int PTW32_CDECL pthread_kill(pthread_t thread, int sig); /* * Non-portable functions @@ -1007,55 +1007,55 @@ __PTW32_DLLPORT int __PTW32_CDECL pthread_kill(pthread_t thread, int sig); /* * Compatibility with Linux. */ -__PTW32_DLLPORT int __PTW32_CDECL pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, +PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, int kind); -__PTW32_DLLPORT int __PTW32_CDECL pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, +PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, int *kind); -__PTW32_DLLPORT int __PTW32_CDECL pthread_timedjoin_np(pthread_t thread, +PTW32_DLLPORT int PTW32_CDECL pthread_timedjoin_np(pthread_t thread, void **value_ptr, const struct timespec *abstime); -__PTW32_DLLPORT int __PTW32_CDECL pthread_tryjoin_np(pthread_t thread, +PTW32_DLLPORT int PTW32_CDECL pthread_tryjoin_np(pthread_t thread, void **value_ptr); -__PTW32_DLLPORT int __PTW32_CDECL pthread_setaffinity_np(pthread_t thread, +PTW32_DLLPORT int PTW32_CDECL pthread_setaffinity_np(pthread_t thread, size_t cpusetsize, const cpu_set_t *cpuset); -__PTW32_DLLPORT int __PTW32_CDECL pthread_getaffinity_np(pthread_t thread, +PTW32_DLLPORT int PTW32_CDECL pthread_getaffinity_np(pthread_t thread, size_t cpusetsize, cpu_set_t *cpuset); /* * Possibly supported by other POSIX threads implementations */ -__PTW32_DLLPORT int __PTW32_CDECL pthread_delay_np (struct timespec * interval); -__PTW32_DLLPORT int __PTW32_CDECL pthread_num_processors_np(void); -__PTW32_DLLPORT unsigned __int64 __PTW32_CDECL pthread_getunique_np(pthread_t thread); +PTW32_DLLPORT int PTW32_CDECL pthread_delay_np (struct timespec * interval); +PTW32_DLLPORT int PTW32_CDECL pthread_num_processors_np(void); +PTW32_DLLPORT unsigned __int64 PTW32_CDECL pthread_getunique_np(pthread_t thread); /* * Useful if an application wants to statically link * the lib rather than load the DLL at run-time. */ -__PTW32_DLLPORT int __PTW32_CDECL pthread_win32_process_attach_np(void); -__PTW32_DLLPORT int __PTW32_CDECL pthread_win32_process_detach_np(void); -__PTW32_DLLPORT int __PTW32_CDECL pthread_win32_thread_attach_np(void); -__PTW32_DLLPORT int __PTW32_CDECL pthread_win32_thread_detach_np(void); +PTW32_DLLPORT int PTW32_CDECL pthread_win32_process_attach_np(void); +PTW32_DLLPORT int PTW32_CDECL pthread_win32_process_detach_np(void); +PTW32_DLLPORT int PTW32_CDECL pthread_win32_thread_attach_np(void); +PTW32_DLLPORT int PTW32_CDECL pthread_win32_thread_detach_np(void); /* * Returns the first parameter "abstime" modified to represent the current system time. * If "relative" is not NULL it represents an interval to add to "abstime". */ -__PTW32_DLLPORT struct timespec * __PTW32_CDECL pthread_win32_getabstime_np( +PTW32_DLLPORT struct timespec * PTW32_CDECL pthread_win32_getabstime_np( struct timespec * abstime, const struct timespec * relative); /* * Features that are auto-detected at load/run time. */ -__PTW32_DLLPORT int __PTW32_CDECL pthread_win32_test_features_np(int); -enum __ptw32_features +PTW32_DLLPORT int PTW32_CDECL pthread_win32_test_features_np(int); +enum ptw32_features { - __PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE = 0x0001, /* System provides it. */ - __PTW32_ALERTABLE_ASYNC_CANCEL = 0x0002 /* Can cancel blocked threads. */ + PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE = 0x0001, /* System provides it. */ + PTW32_ALERTABLE_ASYNC_CANCEL = 0x0002 /* Can cancel blocked threads. */ }; /* @@ -1066,36 +1066,36 @@ enum __ptw32_features * WM_TIMECHANGE message. It can be passed directly to * pthread_create() as a new thread if desired. */ -__PTW32_DLLPORT void * __PTW32_CDECL pthread_timechange_handler_np(void *); +PTW32_DLLPORT void * PTW32_CDECL pthread_timechange_handler_np(void *); -#endif /* __PTW32_LEVEL >= __PTW32_LEVEL_MAX - 1 */ +#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX - 1 */ -#if __PTW32_LEVEL >= __PTW32_LEVEL_MAX +#if PTW32_LEVEL >= PTW32_LEVEL_MAX /* * Returns the Win32 HANDLE for the POSIX thread. */ -__PTW32_DLLPORT void * __PTW32_CDECL pthread_getw32threadhandle_np(pthread_t thread); +PTW32_DLLPORT void * PTW32_CDECL pthread_getw32threadhandle_np(pthread_t thread); /* * Returns the win32 thread ID for POSIX thread. */ -__PTW32_DLLPORT unsigned long __PTW32_CDECL pthread_getw32threadid_np (pthread_t thread); +PTW32_DLLPORT unsigned long PTW32_CDECL pthread_getw32threadid_np (pthread_t thread); /* * Sets the POSIX thread name. If _MSC_VER is defined the name should be displayed by * the MSVS debugger. */ -#if defined (__PTW32_COMPATIBILITY_BSD) || defined (__PTW32_COMPATIBILITY_TRU64) +#if defined (PTW32_COMPATIBILITY_BSD) || defined (PTW32_COMPATIBILITY_TRU64) #define PTHREAD_MAX_NAMELEN_NP 16 -__PTW32_DLLPORT int __PTW32_CDECL pthread_setname_np (pthread_t thr, const char * name, void * arg); -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_setname_np (pthread_attr_t * attr, const char * name, void * arg); +PTW32_DLLPORT int PTW32_CDECL pthread_setname_np (pthread_t thr, const char * name, void * arg); +PTW32_DLLPORT int PTW32_CDECL pthread_attr_setname_np (pthread_attr_t * attr, const char * name, void * arg); #else -__PTW32_DLLPORT int __PTW32_CDECL pthread_setname_np (pthread_t thr, const char * name); -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_setname_np (pthread_attr_t * attr, const char * name); +PTW32_DLLPORT int PTW32_CDECL pthread_setname_np (pthread_t thr, const char * name); +PTW32_DLLPORT int PTW32_CDECL pthread_attr_setname_np (pthread_attr_t * attr, const char * name); #endif -__PTW32_DLLPORT int __PTW32_CDECL pthread_getname_np (pthread_t thr, char * name, int len); -__PTW32_DLLPORT int __PTW32_CDECL pthread_attr_getname_np (pthread_attr_t * attr, char * name, int len); +PTW32_DLLPORT int PTW32_CDECL pthread_getname_np (pthread_t thr, char * name, int len); +PTW32_DLLPORT int PTW32_CDECL pthread_attr_getname_np (pthread_attr_t * attr, char * name, int len); /* @@ -1113,11 +1113,11 @@ __PTW32_DLLPORT int __PTW32_CDECL pthread_attr_getname_np (pthread_attr_t * att * argument to TimedWait is simply passed to * WaitForMultipleObjects. */ -__PTW32_DLLPORT int __PTW32_CDECL pthreadCancelableWait (void *waitHandle); -__PTW32_DLLPORT int __PTW32_CDECL pthreadCancelableTimedWait (void *waitHandle, +PTW32_DLLPORT int PTW32_CDECL pthreadCancelableWait (void *waitHandle); +PTW32_DLLPORT int PTW32_CDECL pthreadCancelableTimedWait (void *waitHandle, unsigned long timeout); -#endif /* __PTW32_LEVEL >= __PTW32_LEVEL_MAX */ +#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */ /* * Declare a thread-safe errno for Open Watcom @@ -1130,9 +1130,9 @@ __PTW32_DLLPORT int __PTW32_CDECL pthreadCancelableTimedWait (void *waitHandle, # endif #endif -#if defined (__PTW32_USES_SEPARATE_CRT) && (defined(__PTW32_CLEANUP_CXX) || defined(__PTW32_CLEANUP_SEH)) -typedef void (*__ptw32_terminate_handler)(); -__PTW32_DLLPORT __ptw32_terminate_handler __PTW32_CDECL pthread_win32_set_terminate_np(__ptw32_terminate_handler termFunction); +#if defined (PTW32_USES_SEPARATE_CRT) && (defined(PTW32_CLEANUP_CXX) || defined(PTW32_CLEANUP_SEH)) +typedef void (*ptw32_terminate_handler)(); +PTW32_DLLPORT ptw32_terminate_handler PTW32_CDECL pthread_win32_set_terminate_np(ptw32_terminate_handler termFunction); #endif #if defined(__cplusplus) @@ -1140,37 +1140,37 @@ __PTW32_DLLPORT __ptw32_terminate_handler __PTW32_CDECL pthread_win32_set_termi /* * Internal exceptions */ -class __ptw32_exception {}; -class __ptw32_exception_cancel : public __ptw32_exception {}; -class __ptw32_exception_exit : public __ptw32_exception {}; +class ptw32_exception {}; +class ptw32_exception_cancel : public ptw32_exception {}; +class ptw32_exception_exit : public ptw32_exception {}; #endif -#if __PTW32_LEVEL >= __PTW32_LEVEL_MAX +#if PTW32_LEVEL >= PTW32_LEVEL_MAX /* FIXME: This is only required if the library was built using SEH */ /* * Get internal SEH tag */ -__PTW32_DLLPORT unsigned long __PTW32_CDECL __ptw32_get_exception_services_code(void); +PTW32_DLLPORT unsigned long PTW32_CDECL ptw32_get_exception_services_code(void); -#endif /* __PTW32_LEVEL >= __PTW32_LEVEL_MAX */ +#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */ -#if !defined (__PTW32_BUILD) +#if !defined (PTW32_BUILD) -#if defined(__PTW32_CLEANUP_SEH) +#if defined(PTW32_CLEANUP_SEH) /* * Redefine the SEH __except keyword to ensure that applications * propagate our internal exceptions up to the library's internal handlers. */ #define __except( E ) \ - __except( ( GetExceptionCode() == __ptw32_get_exception_services_code() ) \ + __except( ( GetExceptionCode() == ptw32_get_exception_services_code() ) \ ? EXCEPTION_CONTINUE_SEARCH : ( E ) ) -#endif /* __PTW32_CLEANUP_SEH */ +#endif /* PTW32_CLEANUP_SEH */ -#if defined(__PTW32_CLEANUP_CXX) +#if defined(PTW32_CLEANUP_CXX) /* * Redefine the C++ catch keyword to ensure that applications @@ -1204,25 +1204,25 @@ __PTW32_DLLPORT unsigned long __PTW32_CDECL __ptw32_get_exception_services_code #endif #define __PtW32CatchAll \ - catch( __ptw32_exception & ) { throw; } \ + catch( ptw32_exception & ) { throw; } \ catch( ... ) #else /* _MSC_VER */ #define catch( E ) \ - catch( __ptw32_exception & ) { throw; } \ + catch( ptw32_exception & ) { throw; } \ catch( E ) #endif /* _MSC_VER */ -#endif /* __PTW32_CLEANUP_CXX */ +#endif /* PTW32_CLEANUP_CXX */ -#endif /* ! __PTW32_BUILD */ +#endif /* ! PTW32_BUILD */ -__PTW32_END_C_DECLS +PTW32_END_C_DECLS -#undef __PTW32_LEVEL -#undef __PTW32_LEVEL_MAX +#undef PTW32_LEVEL +#undef PTW32_LEVEL_MAX #endif /* ! RC_INVOKED */ diff --git a/pthread_attr_destroy.c b/pthread_attr_destroy.c index cc9a4717..21b44777 100644 --- a/pthread_attr_destroy.c +++ b/pthread_attr_destroy.c @@ -65,7 +65,7 @@ pthread_attr_destroy (pthread_attr_t * attr) * ------------------------------------------------------ */ { - if (__ptw32_is_attr (attr) != 0) + if (ptw32_is_attr (attr) != 0) { return EINVAL; } diff --git a/pthread_attr_getaffinity_np.c b/pthread_attr_getaffinity_np.c index adec7305..cabaad50 100644 --- a/pthread_attr_getaffinity_np.c +++ b/pthread_attr_getaffinity_np.c @@ -43,7 +43,7 @@ int pthread_attr_getaffinity_np (const pthread_attr_t * attr, size_t cpusetsize, cpu_set_t * cpuset) { - if (__ptw32_is_attr (attr) != 0 || cpuset == NULL) + if (ptw32_is_attr (attr) != 0 || cpuset == NULL) { return EINVAL; } diff --git a/pthread_attr_getdetachstate.c b/pthread_attr_getdetachstate.c index 2d8bbb07..72aaba29 100644 --- a/pthread_attr_getdetachstate.c +++ b/pthread_attr_getdetachstate.c @@ -78,7 +78,7 @@ pthread_attr_getdetachstate (const pthread_attr_t * attr, int *detachstate) * ------------------------------------------------------ */ { - if (__ptw32_is_attr (attr) != 0 || detachstate == NULL) + if (ptw32_is_attr (attr) != 0 || detachstate == NULL) { return EINVAL; } diff --git a/pthread_attr_getinheritsched.c b/pthread_attr_getinheritsched.c index 6a24862f..1d54bfb4 100644 --- a/pthread_attr_getinheritsched.c +++ b/pthread_attr_getinheritsched.c @@ -43,7 +43,7 @@ int pthread_attr_getinheritsched (const pthread_attr_t * attr, int *inheritsched) { - if (__ptw32_is_attr (attr) != 0 || inheritsched == NULL) + if (ptw32_is_attr (attr) != 0 || inheritsched == NULL) { return EINVAL; } diff --git a/pthread_attr_getschedparam.c b/pthread_attr_getschedparam.c index 515a0af9..3ac1392e 100644 --- a/pthread_attr_getschedparam.c +++ b/pthread_attr_getschedparam.c @@ -44,7 +44,7 @@ int pthread_attr_getschedparam (const pthread_attr_t * attr, struct sched_param *param) { - if (__ptw32_is_attr (attr) != 0 || param == NULL) + if (ptw32_is_attr (attr) != 0 || param == NULL) { return EINVAL; } diff --git a/pthread_attr_getschedpolicy.c b/pthread_attr_getschedpolicy.c index 85762f38..d50cdb88 100644 --- a/pthread_attr_getschedpolicy.c +++ b/pthread_attr_getschedpolicy.c @@ -43,7 +43,7 @@ int pthread_attr_getschedpolicy (const pthread_attr_t * attr, int *policy) { - if (__ptw32_is_attr (attr) != 0 || policy == NULL) + if (ptw32_is_attr (attr) != 0 || policy == NULL) { return EINVAL; } diff --git a/pthread_attr_getstackaddr.c b/pthread_attr_getstackaddr.c index 2a218059..c2d68477 100644 --- a/pthread_attr_getstackaddr.c +++ b/pthread_attr_getstackaddr.c @@ -83,7 +83,7 @@ pthread_attr_getstackaddr (const pthread_attr_t * attr, void **stackaddr) { #if defined( _POSIX_THREAD_ATTR_STACKADDR ) && _POSIX_THREAD_ATTR_STACKADDR != -1 - if (__ptw32_is_attr (attr) != 0) + if (ptw32_is_attr (attr) != 0) { return EINVAL; } diff --git a/pthread_attr_getstacksize.c b/pthread_attr_getstacksize.c index 3916a7c7..abbc2250 100644 --- a/pthread_attr_getstacksize.c +++ b/pthread_attr_getstacksize.c @@ -84,7 +84,7 @@ pthread_attr_getstacksize (const pthread_attr_t * attr, size_t * stacksize) { #if defined(_POSIX_THREAD_ATTR_STACKSIZE) && _POSIX_THREAD_ATTR_STACKSIZE != -1 - if (__ptw32_is_attr (attr) != 0) + if (ptw32_is_attr (attr) != 0) { return EINVAL; } diff --git a/pthread_attr_init.c b/pthread_attr_init.c index ff671e75..7ed5facf 100644 --- a/pthread_attr_init.c +++ b/pthread_attr_init.c @@ -115,7 +115,7 @@ pthread_attr_init (pthread_attr_t * attr) attr_result->cpuset = ((_sched_cpu_set_vector_*)&cpuset)->_cpuset; attr_result->thrname = NULL; - attr_result->valid = __PTW32_ATTR_VALID; + attr_result->valid = PTW32_ATTR_VALID; *attr = attr_result; diff --git a/pthread_attr_setaffinity_np.c b/pthread_attr_setaffinity_np.c index c3da27e5..035c7a1b 100644 --- a/pthread_attr_setaffinity_np.c +++ b/pthread_attr_setaffinity_np.c @@ -43,7 +43,7 @@ int pthread_attr_setaffinity_np (pthread_attr_t * attr, size_t cpusetsize, const cpu_set_t * cpuset) { - if (__ptw32_is_attr (attr) != 0 || cpuset == NULL) + if (ptw32_is_attr (attr) != 0 || cpuset == NULL) { return EINVAL; } diff --git a/pthread_attr_setdetachstate.c b/pthread_attr_setdetachstate.c index b12ff955..2b33a5dc 100644 --- a/pthread_attr_setdetachstate.c +++ b/pthread_attr_setdetachstate.c @@ -77,7 +77,7 @@ pthread_attr_setdetachstate (pthread_attr_t * attr, int detachstate) * ------------------------------------------------------ */ { - if (__ptw32_is_attr (attr) != 0) + if (ptw32_is_attr (attr) != 0) { return EINVAL; } diff --git a/pthread_attr_setinheritsched.c b/pthread_attr_setinheritsched.c index 003a821d..f38ba4e5 100644 --- a/pthread_attr_setinheritsched.c +++ b/pthread_attr_setinheritsched.c @@ -43,7 +43,7 @@ int pthread_attr_setinheritsched (pthread_attr_t * attr, int inheritsched) { - if (__ptw32_is_attr (attr) != 0) + if (ptw32_is_attr (attr) != 0) { return EINVAL; } diff --git a/pthread_attr_setname_np.c b/pthread_attr_setname_np.c index 3161bf19..d82f8db6 100644 --- a/pthread_attr_setname_np.c +++ b/pthread_attr_setname_np.c @@ -38,7 +38,7 @@ #include "pthread.h" #include "implement.h" -#if defined (__PTW32_COMPATIBILITY_BSD) || defined (__PTW32_COMPATIBILITY_TRU64) +#if defined (PTW32_COMPATIBILITY_BSD) || defined (PTW32_COMPATIBILITY_TRU64) int pthread_attr_setname_np(pthread_attr_t * attr, const char *name, void *arg) { diff --git a/pthread_attr_setschedparam.c b/pthread_attr_setschedparam.c index 36e64eb0..fefc32ef 100644 --- a/pthread_attr_setschedparam.c +++ b/pthread_attr_setschedparam.c @@ -46,7 +46,7 @@ pthread_attr_setschedparam (pthread_attr_t * attr, { int priority; - if (__ptw32_is_attr (attr) != 0 || param == NULL) + if (ptw32_is_attr (attr) != 0 || param == NULL) { return EINVAL; } diff --git a/pthread_attr_setschedpolicy.c b/pthread_attr_setschedpolicy.c index af6fb9e9..fc0252f3 100644 --- a/pthread_attr_setschedpolicy.c +++ b/pthread_attr_setschedpolicy.c @@ -43,7 +43,7 @@ int pthread_attr_setschedpolicy (pthread_attr_t * attr, int policy) { - if (__ptw32_is_attr (attr) != 0) + if (ptw32_is_attr (attr) != 0) { return EINVAL; } diff --git a/pthread_attr_setstackaddr.c b/pthread_attr_setstackaddr.c index 20a53dd4..157bfe95 100644 --- a/pthread_attr_setstackaddr.c +++ b/pthread_attr_setstackaddr.c @@ -83,7 +83,7 @@ pthread_attr_setstackaddr (pthread_attr_t * attr, void *stackaddr) { #if defined( _POSIX_THREAD_ATTR_STACKADDR ) && _POSIX_THREAD_ATTR_STACKADDR != -1 - if (__ptw32_is_attr (attr) != 0) + if (ptw32_is_attr (attr) != 0) { return EINVAL; } diff --git a/pthread_attr_setstacksize.c b/pthread_attr_setstacksize.c index fe930ef9..be58f214 100644 --- a/pthread_attr_setstacksize.c +++ b/pthread_attr_setstacksize.c @@ -94,7 +94,7 @@ pthread_attr_setstacksize (pthread_attr_t * attr, size_t stacksize) #endif - if (__ptw32_is_attr (attr) != 0) + if (ptw32_is_attr (attr) != 0) { return EINVAL; } diff --git a/pthread_barrier_destroy.c b/pthread_barrier_destroy.c index a2904c0e..ad560872 100644 --- a/pthread_barrier_destroy.c +++ b/pthread_barrier_destroy.c @@ -44,14 +44,14 @@ pthread_barrier_destroy (pthread_barrier_t * barrier) { int result = 0; pthread_barrier_t b; - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; - if (barrier == NULL || *barrier == (pthread_barrier_t) __PTW32_OBJECT_INVALID) + if (barrier == NULL || *barrier == (pthread_barrier_t) PTW32_OBJECT_INVALID) { return EINVAL; } - if (0 != __ptw32_mcs_lock_try_acquire(&(*barrier)->lock, &node)) + if (0 != ptw32_mcs_lock_try_acquire(&(*barrier)->lock, &node)) { return EBUSY; } @@ -66,7 +66,7 @@ pthread_barrier_destroy (pthread_barrier_t * barrier) { if (0 == (result = sem_destroy (&(b->semBarrierBreeched)))) { - *barrier = (pthread_barrier_t) __PTW32_OBJECT_INVALID; + *barrier = (pthread_barrier_t) PTW32_OBJECT_INVALID; /* * Release the lock before freeing b. * @@ -77,7 +77,7 @@ pthread_barrier_destroy (pthread_barrier_t * barrier) * pthread_barrier_t_ to an instance. This is a change to the ABI * and will require a major version number increment. */ - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); (void) free (b); return 0; } @@ -100,6 +100,6 @@ pthread_barrier_destroy (pthread_barrier_t * barrier) } } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); return (result); } diff --git a/pthread_barrier_wait.c b/pthread_barrier_wait.c index ad180f4b..d1681ffb 100644 --- a/pthread_barrier_wait.c +++ b/pthread_barrier_wait.c @@ -46,14 +46,14 @@ pthread_barrier_wait (pthread_barrier_t * barrier) int result; pthread_barrier_t b; - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; - if (barrier == NULL || *barrier == (pthread_barrier_t) __PTW32_OBJECT_INVALID) + if (barrier == NULL || *barrier == (pthread_barrier_t) PTW32_OBJECT_INVALID) { return EINVAL; } - __ptw32_mcs_lock_acquire(&(*barrier)->lock, &node); + ptw32_mcs_lock_acquire(&(*barrier)->lock, &node); b = *barrier; if (--b->nCurrentBarrierHeight == 0) @@ -63,7 +63,7 @@ pthread_barrier_wait (pthread_barrier_t * barrier) * Move our MCS local node to the global scope barrier handle so that the * last thread out (not necessarily us) can release the lock. */ - __ptw32_mcs_node_transfer(&b->proxynode, &node); + ptw32_mcs_node_transfer(&b->proxynode, &node); /* * Any threads that have not quite entered sem_wait below when the @@ -76,7 +76,7 @@ pthread_barrier_wait (pthread_barrier_t * barrier) } else { - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); /* * Use the non-cancelable version of sem_wait(). * @@ -86,16 +86,16 @@ pthread_barrier_wait (pthread_barrier_t * barrier) * If pthread_barrier_destroy is called at that moment then the * barrier will be destroyed along with the semas. */ - result = __ptw32_semwait (&(b->semBarrierBreeched)); + result = ptw32_semwait (&(b->semBarrierBreeched)); } - if ((__PTW32_INTERLOCKED_LONG)__PTW32_INTERLOCKED_INCREMENT_LONG ((__PTW32_INTERLOCKED_LONGPTR)&b->nCurrentBarrierHeight) - == (__PTW32_INTERLOCKED_LONG)b->nInitialBarrierHeight) + if ((PTW32_INTERLOCKED_LONG)PTW32_INTERLOCKED_INCREMENT_LONG((PTW32_INTERLOCKED_LONGPTR)&b->nCurrentBarrierHeight) + == (PTW32_INTERLOCKED_LONG)b->nInitialBarrierHeight) { /* * We are the last thread to cross this barrier */ - __ptw32_mcs_lock_release(&b->proxynode); + ptw32_mcs_lock_release(&b->proxynode); if (0 == result) { result = PTHREAD_BARRIER_SERIAL_THREAD; diff --git a/pthread_cancel.c b/pthread_cancel.c index fddf216c..f6906539 100644 --- a/pthread_cancel.c +++ b/pthread_cancel.c @@ -41,34 +41,34 @@ #include "context.h" static void -__ptw32_cancel_self (void) +ptw32_cancel_self (void) { - __ptw32_throw (__PTW32_EPS_CANCEL); + ptw32_throw (PTW32_EPS_CANCEL); /* Never reached */ } static void CALLBACK -__ptw32_cancel_callback (ULONG_PTR unused) +ptw32_cancel_callback (ULONG_PTR unused) { - __ptw32_throw (__PTW32_EPS_CANCEL); + ptw32_throw (PTW32_EPS_CANCEL); /* Never reached */ } /* - * __ptw32_Registercancellation() - + * ptw32_Registercancellation() - * Must have args of same type as QueueUserAPCEx because this function * is a substitute for QueueUserAPCEx if it's not available. */ DWORD -__ptw32_Registercancellation (PAPCFUNC unused1, HANDLE threadH, DWORD unused2) +ptw32_Registercancellation (PAPCFUNC unused1, HANDLE threadH, DWORD unused2) { CONTEXT context; context.ContextFlags = CONTEXT_CONTROL; GetThreadContext (threadH, &context); - __PTW32_PROGCTR (context) = (DWORD_PTR) __ptw32_cancel_self; + PTW32_PROGCTR (context) = (DWORD_PTR) ptw32_cancel_self; SetThreadContext (threadH, &context); return 0; } @@ -100,8 +100,8 @@ pthread_cancel (pthread_t thread) int result; int cancel_self; pthread_t self; - __ptw32_thread_t * tp; - __ptw32_mcs_local_node_t stateLock; + ptw32_thread_t * tp; + ptw32_mcs_local_node_t stateLock; /* * Validate the thread id. This method works for pthreads-win32 because @@ -127,12 +127,12 @@ pthread_cancel (pthread_t thread) */ cancel_self = pthread_equal (thread, self); - tp = (__ptw32_thread_t *) thread.p; + tp = (ptw32_thread_t *) thread.p; /* * Lock for async-cancel safety. */ - __ptw32_mcs_lock_acquire (&tp->stateLock, &stateLock); + ptw32_mcs_lock_acquire (&tp->stateLock, &stateLock); if (tp->cancelType == PTHREAD_CANCEL_ASYNCHRONOUS && tp->cancelState == PTHREAD_CANCEL_ENABLE @@ -143,8 +143,8 @@ pthread_cancel (pthread_t thread) tp->state = PThreadStateCanceling; tp->cancelState = PTHREAD_CANCEL_DISABLE; - __ptw32_mcs_lock_release (&stateLock); - __ptw32_throw (__PTW32_EPS_CANCEL); + ptw32_mcs_lock_release (&stateLock); + ptw32_throw (PTW32_EPS_CANCEL); /* Never reached */ } @@ -161,11 +161,11 @@ pthread_cancel (pthread_t thread) /* * If alertdrv and QueueUserAPCEx is available then the following * will result in a call to QueueUserAPCEx with the args given, otherwise - * this will result in a call to __ptw32_Registercancellation and only + * this will result in a call to ptw32_Registercancellation and only * the threadH arg will be used. */ - __ptw32_register_cancellation ((PAPCFUNC)__ptw32_cancel_callback, threadH, 0); - __ptw32_mcs_lock_release (&stateLock); + ptw32_register_cancellation ((PAPCFUNC)ptw32_cancel_callback, threadH, 0); + ptw32_mcs_lock_release (&stateLock); ResumeThread (threadH); } } @@ -188,7 +188,7 @@ pthread_cancel (pthread_t thread) result = ESRCH; } - __ptw32_mcs_lock_release (&stateLock); + ptw32_mcs_lock_release (&stateLock); } return (result); diff --git a/pthread_cond_destroy.c b/pthread_cond_destroy.c index f1928fd5..ceb33319 100644 --- a/pthread_cond_destroy.c +++ b/pthread_cond_destroy.c @@ -128,8 +128,8 @@ pthread_cond_destroy (pthread_cond_t * cond) if (*cond != PTHREAD_COND_INITIALIZER) { - __ptw32_mcs_local_node_t node; - __ptw32_mcs_lock_acquire(&__ptw32_cond_list_lock, &node); + ptw32_mcs_local_node_t node; + ptw32_mcs_lock_acquire(&ptw32_cond_list_lock, &node); cv = *cond; @@ -138,9 +138,9 @@ pthread_cond_destroy (pthread_cond_t * cond) * all already signaled waiters to let them retract their * waiter status - SEE NOTE 1 ABOVE!!! */ - if (__ptw32_semwait (&(cv->semBlockLock)) != 0) /* Non-cancelable */ + if (ptw32_semwait (&(cv->semBlockLock)) != 0) /* Non-cancelable */ { - result = __PTW32_GET_ERRNO(); + result = PTW32_GET_ERRNO(); } else { @@ -157,7 +157,7 @@ pthread_cond_destroy (pthread_cond_t * cond) if (result != 0) { - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); return result; } @@ -168,7 +168,7 @@ pthread_cond_destroy (pthread_cond_t * cond) { if (sem_post (&(cv->semBlockLock)) != 0) { - result = __PTW32_GET_ERRNO(); + result = PTW32_GET_ERRNO(); } result1 = pthread_mutex_unlock (&(cv->mtxUnblockLock)); result2 = EBUSY; @@ -182,11 +182,11 @@ pthread_cond_destroy (pthread_cond_t * cond) if (sem_destroy (&(cv->semBlockLock)) != 0) { - result = __PTW32_GET_ERRNO(); + result = PTW32_GET_ERRNO(); } if (sem_destroy (&(cv->semBlockQueue)) != 0) { - result1 = __PTW32_GET_ERRNO(); + result1 = PTW32_GET_ERRNO(); } if ((result2 = pthread_mutex_unlock (&(cv->mtxUnblockLock))) == 0) { @@ -195,18 +195,18 @@ pthread_cond_destroy (pthread_cond_t * cond) /* Unlink the CV from the list */ - if (__ptw32_cond_list_head == cv) + if (ptw32_cond_list_head == cv) { - __ptw32_cond_list_head = cv->next; + ptw32_cond_list_head = cv->next; } else { cv->prev->next = cv->next; } - if (__ptw32_cond_list_tail == cv) + if (ptw32_cond_list_tail == cv) { - __ptw32_cond_list_tail = cv->prev; + ptw32_cond_list_tail = cv->prev; } else { @@ -216,15 +216,15 @@ pthread_cond_destroy (pthread_cond_t * cond) (void) free (cv); } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); } else { - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; /* - * See notes in __ptw32_cond_check_need_init() above also. + * See notes in ptw32_cond_check_need_init() above also. */ - __ptw32_mcs_lock_acquire(&__ptw32_cond_test_init_lock, &node); + ptw32_mcs_lock_acquire(&ptw32_cond_test_init_lock, &node); /* * Check again. @@ -248,7 +248,7 @@ pthread_cond_destroy (pthread_cond_t * cond) result = EBUSY; } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); } return ((result != 0) ? result : ((result1 != 0) ? result1 : result2)); diff --git a/pthread_cond_init.c b/pthread_cond_init.c index 127c7b48..7f2d4df4 100644 --- a/pthread_cond_init.c +++ b/pthread_cond_init.c @@ -103,13 +103,13 @@ pthread_cond_init (pthread_cond_t * cond, const pthread_condattr_t * attr) if (sem_init (&(cv->semBlockLock), 0, 1) != 0) { - result = __PTW32_GET_ERRNO(); + result = PTW32_GET_ERRNO(); goto FAIL0; } if (sem_init (&(cv->semBlockQueue), 0, 0) != 0) { - result = __PTW32_GET_ERRNO(); + result = PTW32_GET_ERRNO(); goto FAIL1; } @@ -140,26 +140,26 @@ pthread_cond_init (pthread_cond_t * cond, const pthread_condattr_t * attr) DONE: if (0 == result) { - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; - __ptw32_mcs_lock_acquire(&__ptw32_cond_list_lock, &node); + ptw32_mcs_lock_acquire(&ptw32_cond_list_lock, &node); cv->next = NULL; - cv->prev = __ptw32_cond_list_tail; + cv->prev = ptw32_cond_list_tail; - if (__ptw32_cond_list_tail != NULL) + if (ptw32_cond_list_tail != NULL) { - __ptw32_cond_list_tail->next = cv; + ptw32_cond_list_tail->next = cv; } - __ptw32_cond_list_tail = cv; + ptw32_cond_list_tail = cv; - if (__ptw32_cond_list_head == NULL) + if (ptw32_cond_list_head == NULL) { - __ptw32_cond_list_head = cv; + ptw32_cond_list_head = cv; } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); } *cond = cv; diff --git a/pthread_cond_signal.c b/pthread_cond_signal.c index 226fd133..31ff0532 100644 --- a/pthread_cond_signal.c +++ b/pthread_cond_signal.c @@ -45,7 +45,7 @@ #include "implement.h" static INLINE int -__ptw32_cond_unblock (pthread_cond_t * cond, int unblockAll) +ptw32_cond_unblock (pthread_cond_t * cond, int unblockAll) /* * Notes. * @@ -112,9 +112,9 @@ __ptw32_cond_unblock (pthread_cond_t * cond, int unblockAll) else if (cv->nWaitersBlocked > cv->nWaitersGone) { /* Use the non-cancellable version of sem_wait() */ - if (__ptw32_semwait (&(cv->semBlockLock)) != 0) + if (ptw32_semwait (&(cv->semBlockLock)) != 0) { - result = __PTW32_GET_ERRNO(); + result = PTW32_GET_ERRNO(); (void) pthread_mutex_unlock (&(cv->mtxUnblockLock)); return result; } @@ -143,13 +143,13 @@ __ptw32_cond_unblock (pthread_cond_t * cond, int unblockAll) { if (sem_post_multiple (&(cv->semBlockQueue), nSignalsToIssue) != 0) { - result = __PTW32_GET_ERRNO(); + result = PTW32_GET_ERRNO(); } } return result; -} /* __ptw32_cond_unblock */ +} /* ptw32_cond_unblock */ int pthread_cond_signal (pthread_cond_t * cond) @@ -189,7 +189,7 @@ pthread_cond_signal (pthread_cond_t * cond) /* * The '0'(FALSE) unblockAll arg means unblock ONE waiter. */ - return (__ptw32_cond_unblock (cond, 0)); + return (ptw32_cond_unblock (cond, 0)); } /* pthread_cond_signal */ @@ -228,6 +228,6 @@ pthread_cond_broadcast (pthread_cond_t * cond) /* * The TRUE unblockAll arg means unblock ALL waiters. */ - return (__ptw32_cond_unblock (cond, __PTW32_TRUE)); + return (ptw32_cond_unblock (cond, PTW32_TRUE)); } /* pthread_cond_broadcast */ diff --git a/pthread_cond_wait.c b/pthread_cond_wait.c index fdb11ce2..57957b3c 100644 --- a/pthread_cond_wait.c +++ b/pthread_cond_wait.c @@ -271,13 +271,13 @@ typedef struct pthread_mutex_t *mutexPtr; pthread_cond_t cv; int *resultPtr; -} __ptw32_cond_wait_cleanup_args_t; +} ptw32_cond_wait_cleanup_args_t; -static void __PTW32_CDECL -__ptw32_cond_wait_cleanup (void *args) +static void PTW32_CDECL +ptw32_cond_wait_cleanup (void *args) { - __ptw32_cond_wait_cleanup_args_t *cleanup_args = - (__ptw32_cond_wait_cleanup_args_t *) args; + ptw32_cond_wait_cleanup_args_t *cleanup_args = + (ptw32_cond_wait_cleanup_args_t *) args; pthread_cond_t cv = cleanup_args->cv; int *resultPtr = cleanup_args->resultPtr; int nSignalsWasLeft; @@ -302,9 +302,9 @@ __ptw32_cond_wait_cleanup (void *args) else if (INT_MAX / 2 == ++(cv->nWaitersGone)) { /* Use the non-cancellable version of sem_wait() */ - if (__ptw32_semwait (&(cv->semBlockLock)) != 0) + if (ptw32_semwait (&(cv->semBlockLock)) != 0) { - *resultPtr = __PTW32_GET_ERRNO(); + *resultPtr = PTW32_GET_ERRNO(); /* * This is a fatal error for this CV, * so we deliberately don't unlock @@ -315,7 +315,7 @@ __ptw32_cond_wait_cleanup (void *args) cv->nWaitersBlocked -= cv->nWaitersGone; if (sem_post (&(cv->semBlockLock)) != 0) { - *resultPtr = __PTW32_GET_ERRNO(); + *resultPtr = PTW32_GET_ERRNO(); /* * This is a fatal error for this CV, * so we deliberately don't unlock @@ -336,7 +336,7 @@ __ptw32_cond_wait_cleanup (void *args) { if (sem_post (&(cv->semBlockLock)) != 0) { - *resultPtr = __PTW32_GET_ERRNO(); + *resultPtr = PTW32_GET_ERRNO(); return; } } @@ -349,15 +349,15 @@ __ptw32_cond_wait_cleanup (void *args) { *resultPtr = result; } -} /* __ptw32_cond_wait_cleanup */ +} /* ptw32_cond_wait_cleanup */ static INLINE int -__ptw32_cond_timedwait (pthread_cond_t * cond, +ptw32_cond_timedwait (pthread_cond_t * cond, pthread_mutex_t * mutex, const struct timespec *abstime) { int result = 0; pthread_cond_t cv; - __ptw32_cond_wait_cleanup_args_t cleanup_args; + ptw32_cond_wait_cleanup_args_t cleanup_args; if (cond == NULL || *cond == NULL) { @@ -367,12 +367,12 @@ __ptw32_cond_timedwait (pthread_cond_t * cond, /* * We do a quick check to see if we need to do more work * to initialise a static condition variable. We check - * again inside the guarded section of __ptw32_cond_check_need_init() + * again inside the guarded section of ptw32_cond_check_need_init() * to avoid race conditions. */ if (*cond == PTHREAD_COND_INITIALIZER) { - result = __ptw32_cond_check_need_init (cond); + result = ptw32_cond_check_need_init (cond); } if (result != 0 && result != EBUSY) @@ -385,14 +385,14 @@ __ptw32_cond_timedwait (pthread_cond_t * cond, /* Thread can be cancelled in sem_wait() but this is OK */ if (sem_wait (&(cv->semBlockLock)) != 0) { - return __PTW32_GET_ERRNO(); + return PTW32_GET_ERRNO(); } ++(cv->nWaitersBlocked); if (sem_post (&(cv->semBlockLock)) != 0) { - return __PTW32_GET_ERRNO(); + return PTW32_GET_ERRNO(); } /* @@ -402,10 +402,10 @@ __ptw32_cond_timedwait (pthread_cond_t * cond, cleanup_args.cv = cv; cleanup_args.resultPtr = &result; -#if defined (__PTW32_CONFIG_MSVC7) +#if defined(PTW32_CONFIG_MSVC7) #pragma inline_depth(0) #endif - pthread_cleanup_push (__ptw32_cond_wait_cleanup, (void *) &cleanup_args); + pthread_cleanup_push (ptw32_cond_wait_cleanup, (void *) &cleanup_args); /* * Now we can release 'mutex' and... @@ -431,7 +431,7 @@ __ptw32_cond_timedwait (pthread_cond_t * cond, */ if (sem_timedwait (&(cv->semBlockQueue), abstime) != 0) { - result = __PTW32_GET_ERRNO(); + result = PTW32_GET_ERRNO(); } } @@ -439,7 +439,7 @@ __ptw32_cond_timedwait (pthread_cond_t * cond, * Always cleanup */ pthread_cleanup_pop (1); -#if defined (__PTW32_CONFIG_MSVC7) +#if defined(PTW32_CONFIG_MSVC7) #pragma inline_depth() #endif @@ -448,7 +448,7 @@ __ptw32_cond_timedwait (pthread_cond_t * cond, */ return result; -} /* __ptw32_cond_timedwait */ +} /* ptw32_cond_timedwait */ int @@ -504,7 +504,7 @@ pthread_cond_wait (pthread_cond_t * cond, pthread_mutex_t * mutex) /* * The NULL abstime arg means INFINITE waiting. */ - return (__ptw32_cond_timedwait (cond, mutex, NULL)); + return (ptw32_cond_timedwait (cond, mutex, NULL)); } /* pthread_cond_wait */ @@ -563,6 +563,6 @@ pthread_cond_timedwait (pthread_cond_t * cond, return EINVAL; } - return (__ptw32_cond_timedwait (cond, mutex, abstime)); + return (ptw32_cond_timedwait (cond, mutex, abstime)); } /* pthread_cond_timedwait */ diff --git a/pthread_delay_np.c b/pthread_delay_np.c index 9aad6409..ce3e7d51 100644 --- a/pthread_delay_np.c +++ b/pthread_delay_np.c @@ -88,7 +88,7 @@ pthread_delay_np (struct timespec *interval) DWORD millisecs; DWORD status; pthread_t self; - __ptw32_thread_t * sp; + ptw32_thread_t * sp; if (interval == NULL) { @@ -132,7 +132,7 @@ pthread_delay_np (struct timespec *interval) return ENOMEM; } - sp = (__ptw32_thread_t *) self.p; + sp = (ptw32_thread_t *) self.p; if (sp->cancelState == PTHREAD_CANCEL_ENABLE) { @@ -143,21 +143,21 @@ pthread_delay_np (struct timespec *interval) if (WAIT_OBJECT_0 == (status = WaitForSingleObject (sp->cancelEvent, wait_time))) { - __ptw32_mcs_local_node_t stateLock; + ptw32_mcs_local_node_t stateLock; /* * Canceling! */ - __ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); + ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); if (sp->state < PThreadStateCanceling) { sp->state = PThreadStateCanceling; sp->cancelState = PTHREAD_CANCEL_DISABLE; - __ptw32_mcs_lock_release (&stateLock); + ptw32_mcs_lock_release (&stateLock); - __ptw32_throw (__PTW32_EPS_CANCEL); + ptw32_throw (PTW32_EPS_CANCEL); } - __ptw32_mcs_lock_release (&stateLock); + ptw32_mcs_lock_release (&stateLock); return ESRCH; } else if (status != WAIT_TIMEOUT) diff --git a/pthread_detach.c b/pthread_detach.c index 4062487f..597c579f 100644 --- a/pthread_detach.c +++ b/pthread_detach.c @@ -77,11 +77,11 @@ pthread_detach (pthread_t thread) */ { int result; - BOOL destroyIt = __PTW32_FALSE; - __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; - __ptw32_mcs_local_node_t reuseLock; + BOOL destroyIt = PTW32_FALSE; + ptw32_thread_t * tp = (ptw32_thread_t *) thread.p; + ptw32_mcs_local_node_t reuseLock; - __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &reuseLock); + ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &reuseLock); if (NULL == tp || thread.x != tp->ptHandle.x) @@ -94,21 +94,21 @@ pthread_detach (pthread_t thread) } else { - __ptw32_mcs_local_node_t stateLock; + ptw32_mcs_local_node_t stateLock; /* - * Joinable __ptw32_thread_t structs are not scavenged until + * Joinable ptw32_thread_t structs are not scavenged until * a join or detach is done. The thread may have exited already, * but all of the state and locks etc are still there. */ result = 0; - __ptw32_mcs_lock_acquire (&tp->stateLock, &stateLock); + ptw32_mcs_lock_acquire (&tp->stateLock, &stateLock); if (tp->state < PThreadStateLast) { tp->detachState = PTHREAD_CREATE_DETACHED; if (tp->state == PThreadStateExiting) { - destroyIt = __PTW32_TRUE; + destroyIt = PTW32_TRUE; } } else if (tp->detachState != PTHREAD_CREATE_DETACHED) @@ -116,12 +116,12 @@ pthread_detach (pthread_t thread) /* * Thread is joinable and has exited or is exiting. */ - destroyIt = __PTW32_TRUE; + destroyIt = PTW32_TRUE; } - __ptw32_mcs_lock_release (&stateLock); + ptw32_mcs_lock_release (&stateLock); } - __ptw32_mcs_lock_release(&reuseLock); + ptw32_mcs_lock_release(&reuseLock); if (result == 0) { @@ -133,7 +133,7 @@ pthread_detach (pthread_t thread) * detached. Need to wait in case it's still exiting. */ (void) WaitForSingleObject(tp->threadH, INFINITE); - __ptw32_threadDestroy (thread); + ptw32_threadDestroy (thread); } } diff --git a/pthread_exit.c b/pthread_exit.c index 58679af6..a567c3d3 100644 --- a/pthread_exit.c +++ b/pthread_exit.c @@ -67,13 +67,13 @@ pthread_exit (void *value_ptr) * ------------------------------------------------------ */ { - __ptw32_thread_t * sp; + ptw32_thread_t * sp; /* * Don't use pthread_self() to avoid creating an implicit POSIX thread handle * unnecessarily. */ - sp = (__ptw32_thread_t *) pthread_getspecific (__ptw32_selfThreadKey); + sp = (ptw32_thread_t *) pthread_getspecific (ptw32_selfThreadKey); #if defined(_UWIN) if (--pthread_count <= 0) @@ -87,7 +87,7 @@ pthread_exit (void *value_ptr) * Win32 thread that has never called a pthreads-win32 routine that * required a POSIX handle. * - * Implicit POSIX handles are cleaned up in __ptw32_throw() now. + * Implicit POSIX handles are cleaned up in ptw32_throw() now. */ #if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__) @@ -101,8 +101,7 @@ pthread_exit (void *value_ptr) sp->exitStatus = value_ptr; - __ptw32_throw (__PTW32_EPS_EXIT); + ptw32_throw (PTW32_EPS_EXIT); /* Never reached. */ - } diff --git a/pthread_getconcurrency.c b/pthread_getconcurrency.c index 7f6cdb4d..135b1e9f 100644 --- a/pthread_getconcurrency.c +++ b/pthread_getconcurrency.c @@ -43,5 +43,5 @@ int pthread_getconcurrency (void) { - return __ptw32_concurrency; + return ptw32_concurrency; } diff --git a/pthread_getname_np.c b/pthread_getname_np.c index 8fc32b1c..a52b9aab 100644 --- a/pthread_getname_np.c +++ b/pthread_getname_np.c @@ -39,8 +39,8 @@ int pthread_getname_np(pthread_t thr, char *name, int len) { - __ptw32_mcs_local_node_t threadLock; - __ptw32_thread_t * tp; + ptw32_mcs_local_node_t threadLock; + ptw32_thread_t * tp; char * s, * d; int result; @@ -55,15 +55,15 @@ pthread_getname_np(pthread_t thr, char *name, int len) return result; } - tp = (__ptw32_thread_t *) thr.p; + tp = (ptw32_thread_t *) thr.p; - __ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); + ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); for (s = tp->name, d = name; *s && d < &name[len - 1]; *d++ = *s++) {} *d = '\0'; - __ptw32_mcs_lock_release (&threadLock); + ptw32_mcs_lock_release (&threadLock); return result; } diff --git a/pthread_getschedparam.c b/pthread_getschedparam.c index 5b10d6c7..bd0aa885 100644 --- a/pthread_getschedparam.c +++ b/pthread_getschedparam.c @@ -71,7 +71,7 @@ pthread_getschedparam (pthread_t thread, int *policy, * for the target thread. It must not return the actual thread * priority as altered by any system priority adjustments etc. */ - param->sched_priority = ((__ptw32_thread_t *)thread.p)->sched_priority; + param->sched_priority = ((ptw32_thread_t *)thread.p)->sched_priority; return 0; } diff --git a/pthread_getunique_np.c b/pthread_getunique_np.c index 51e11fb1..7e7ef6f7 100755 --- a/pthread_getunique_np.c +++ b/pthread_getunique_np.c @@ -45,5 +45,5 @@ unsigned __int64 pthread_getunique_np (pthread_t thread) { - return ((__ptw32_thread_t*)thread.p)->seqNumber; + return ((ptw32_thread_t*)thread.p)->seqNumber; } diff --git a/pthread_getw32threadhandle_np.c b/pthread_getw32threadhandle_np.c index 3ecdaa80..f91160be 100644 --- a/pthread_getw32threadhandle_np.c +++ b/pthread_getw32threadhandle_np.c @@ -51,7 +51,7 @@ HANDLE pthread_getw32threadhandle_np (pthread_t thread) { - return ((__ptw32_thread_t *)thread.p)->threadH; + return ((ptw32_thread_t *)thread.p)->threadH; } /* @@ -63,5 +63,5 @@ pthread_getw32threadhandle_np (pthread_t thread) DWORD pthread_getw32threadid_np (pthread_t thread) { - return ((__ptw32_thread_t *)thread.p)->thread; + return ((ptw32_thread_t *)thread.p)->thread; } diff --git a/pthread_join.c b/pthread_join.c index a2dd8959..4984756f 100644 --- a/pthread_join.c +++ b/pthread_join.c @@ -86,10 +86,10 @@ pthread_join (pthread_t thread, void **value_ptr) { int result; pthread_t self; - __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; - __ptw32_mcs_local_node_t node; + ptw32_thread_t * tp = (ptw32_thread_t *) thread.p; + ptw32_mcs_local_node_t node; - __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); + ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &node); if (NULL == tp || thread.x != tp->ptHandle.x) @@ -105,7 +105,7 @@ pthread_join (pthread_t thread, void **value_ptr) result = 0; } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); if (result == 0) { diff --git a/pthread_key_create.c b/pthread_key_create.c index a23585c3..e98504ee 100644 --- a/pthread_key_create.c +++ b/pthread_key_create.c @@ -46,7 +46,7 @@ #endif int -pthread_key_create (pthread_key_t * key, void (__PTW32_CDECL *destructor) (void *)) +pthread_key_create (pthread_key_t * key, void (PTW32_CDECL *destructor) (void *)) /* * ------------------------------------------------------ * DOCPUBLIC diff --git a/pthread_key_delete.c b/pthread_key_delete.c index 0c44d058..1b825e9f 100644 --- a/pthread_key_delete.c +++ b/pthread_key_delete.c @@ -68,7 +68,7 @@ pthread_key_delete (pthread_key_t key) * ------------------------------------------------------ */ { - __ptw32_mcs_local_node_t keyLock; + ptw32_mcs_local_node_t keyLock; int result = 0; if (key != NULL) @@ -76,7 +76,7 @@ pthread_key_delete (pthread_key_t key) if (key->threads != NULL && key->destructor != NULL) { ThreadKeyAssoc *assoc; - __ptw32_mcs_lock_acquire (&(key->keyLock), &keyLock); + ptw32_mcs_lock_acquire (&(key->keyLock), &keyLock); /* * Run through all Thread<-->Key associations * for this key. @@ -87,8 +87,8 @@ pthread_key_delete (pthread_key_t key) */ while ((assoc = (ThreadKeyAssoc *) key->threads) != NULL) { - __ptw32_mcs_local_node_t threadLock; - __ptw32_thread_t * thread = assoc->thread; + ptw32_mcs_local_node_t threadLock; + ptw32_thread_t * thread = assoc->thread; if (assoc == NULL) { @@ -96,25 +96,25 @@ pthread_key_delete (pthread_key_t key) break; } - __ptw32_mcs_lock_acquire (&(thread->threadLock), &threadLock); + ptw32_mcs_lock_acquire (&(thread->threadLock), &threadLock); /* * Since we are starting at the head of the key's threads * chain, this will also point key->threads at the next assoc. * While we hold key->keyLock, no other thread can insert * a new assoc for this key via pthread_setspecific. */ - __ptw32_tkAssocDestroy (assoc); - __ptw32_mcs_lock_release (&threadLock); + ptw32_tkAssocDestroy (assoc); + ptw32_mcs_lock_release (&threadLock); } - __ptw32_mcs_lock_release (&keyLock); + ptw32_mcs_lock_release (&keyLock); } TlsFree (key->key); if (key->destructor != NULL) { /* A thread could be holding the keyLock */ - __ptw32_mcs_lock_acquire (&(key->keyLock), &keyLock); - __ptw32_mcs_lock_release (&keyLock); + ptw32_mcs_lock_acquire (&(key->keyLock), &keyLock); + ptw32_mcs_lock_release (&keyLock); } #if defined( _DEBUG ) diff --git a/pthread_kill.c b/pthread_kill.c index 3efc421a..ffaf3dec 100644 --- a/pthread_kill.c +++ b/pthread_kill.c @@ -88,12 +88,12 @@ pthread_kill (pthread_t thread, int sig) } else { - __ptw32_mcs_local_node_t node; - __ptw32_thread_t * tp; + ptw32_mcs_local_node_t node; + ptw32_thread_t * tp; - __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); + ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &node); - tp = (__ptw32_thread_t *) thread.p; + tp = (ptw32_thread_t *) thread.p; if (NULL == tp || thread.x != tp->ptHandle.x @@ -102,7 +102,7 @@ pthread_kill (pthread_t thread, int sig) result = ESRCH; } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); } return result; diff --git a/pthread_mutex_consistent.c b/pthread_mutex_consistent.c index 1253b0e2..3f33fc94 100755 --- a/pthread_mutex_consistent.c +++ b/pthread_mutex_consistent.c @@ -76,21 +76,21 @@ INLINE int -__ptw32_robust_mutex_inherit(pthread_mutex_t * mutex) +ptw32_robust_mutex_inherit(pthread_mutex_t * mutex) { int result; pthread_mutex_t mx = *mutex; - __ptw32_robust_node_t* robust = mx->robustNode; + ptw32_robust_node_t* robust = mx->robustNode; - switch ((LONG)__PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( - (__PTW32_INTERLOCKED_LONGPTR)&robust->stateInconsistent, - (__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_INCONSISTENT, - (__PTW32_INTERLOCKED_LONG)-1 /* The terminating thread sets this */)) + switch ((LONG)PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( + (PTW32_INTERLOCKED_LONGPTR)&robust->stateInconsistent, + (PTW32_INTERLOCKED_LONG)PTW32_ROBUST_INCONSISTENT, + (PTW32_INTERLOCKED_LONG)-1 /* The terminating thread sets this */)) { case -1L: result = EOWNERDEAD; break; - case (LONG)__PTW32_ROBUST_NOTRECOVERABLE: + case (LONG)PTW32_ROBUST_NOTRECOVERABLE: result = ENOTRECOVERABLE; break; default: @@ -115,12 +115,12 @@ __ptw32_robust_mutex_inherit(pthread_mutex_t * mutex) INLINE void -__ptw32_robust_mutex_add(pthread_mutex_t* mutex, pthread_t self) +ptw32_robust_mutex_add(pthread_mutex_t* mutex, pthread_t self) { - __ptw32_robust_node_t** list; + ptw32_robust_node_t** list; pthread_mutex_t mx = *mutex; - __ptw32_thread_t* tp = (__ptw32_thread_t*)self.p; - __ptw32_robust_node_t* robust = mx->robustNode; + ptw32_thread_t* tp = (ptw32_thread_t*)self.p; + ptw32_robust_node_t* robust = mx->robustNode; list = &tp->robustMxList; mx->ownerThread = self; @@ -141,13 +141,13 @@ __ptw32_robust_mutex_add(pthread_mutex_t* mutex, pthread_t self) INLINE void -__ptw32_robust_mutex_remove(pthread_mutex_t* mutex, __ptw32_thread_t* otp) +ptw32_robust_mutex_remove(pthread_mutex_t* mutex, ptw32_thread_t* otp) { - __ptw32_robust_node_t** list; + ptw32_robust_node_t** list; pthread_mutex_t mx = *mutex; - __ptw32_robust_node_t* robust = mx->robustNode; + ptw32_robust_node_t* robust = mx->robustNode; - list = &(((__ptw32_thread_t*)mx->ownerThread.p)->robustMxList); + list = &(((ptw32_thread_t*)mx->ownerThread.p)->robustMxList); mx->ownerThread.p = otp; if (robust->next != NULL) { @@ -179,10 +179,10 @@ pthread_mutex_consistent (pthread_mutex_t* mutex) } if (mx->kind >= 0 - || (__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_INCONSISTENT != __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( - (__PTW32_INTERLOCKED_LONGPTR)&mx->robustNode->stateInconsistent, - (__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_CONSISTENT, - (__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_INCONSISTENT)) + || (PTW32_INTERLOCKED_LONG)PTW32_ROBUST_INCONSISTENT != PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( + (PTW32_INTERLOCKED_LONGPTR)&mx->robustNode->stateInconsistent, + (PTW32_INTERLOCKED_LONG)PTW32_ROBUST_CONSISTENT, + (PTW32_INTERLOCKED_LONG)PTW32_ROBUST_INCONSISTENT)) { result = EINVAL; } diff --git a/pthread_mutex_destroy.c b/pthread_mutex_destroy.c index 688201f1..4fe1ba9e 100644 --- a/pthread_mutex_destroy.c +++ b/pthread_mutex_destroy.c @@ -114,13 +114,13 @@ pthread_mutex_destroy (pthread_mutex_t * mutex) } else { - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; /* - * See notes in __ptw32_mutex_check_need_init() above also. + * See notes in ptw32_mutex_check_need_init() above also. */ - __ptw32_mcs_lock_acquire(&__ptw32_mutex_test_init_lock, &node); + ptw32_mcs_lock_acquire(&ptw32_mutex_test_init_lock, &node); /* * Check again. @@ -143,7 +143,7 @@ pthread_mutex_destroy (pthread_mutex_t * mutex) */ result = EBUSY; } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); } return (result); diff --git a/pthread_mutex_init.c b/pthread_mutex_init.c index bc61dfcd..beb06d1f 100644 --- a/pthread_mutex_init.c +++ b/pthread_mutex_init.c @@ -104,14 +104,14 @@ pthread_mutex_init (pthread_mutex_t * mutex, const pthread_mutexattr_t * attr) */ mx->kind = -mx->kind - 1; - mx->robustNode = (__ptw32_robust_node_t*) malloc(sizeof(__ptw32_robust_node_t)); + mx->robustNode = (ptw32_robust_node_t*) malloc(sizeof(ptw32_robust_node_t)); if (NULL == mx->robustNode) { result = ENOMEM; } else { - mx->robustNode->stateInconsistent = __PTW32_ROBUST_CONSISTENT; + mx->robustNode->stateInconsistent = PTW32_ROBUST_CONSISTENT; mx->robustNode->mx = mx; mx->robustNode->next = NULL; mx->robustNode->prev = NULL; @@ -123,8 +123,8 @@ pthread_mutex_init (pthread_mutex_t * mutex, const pthread_mutexattr_t * attr) { mx->ownerThread.p = NULL; - mx->event = CreateEvent (NULL, __PTW32_FALSE, /* manual reset = No */ - __PTW32_FALSE, /* initial state = not signalled */ + mx->event = CreateEvent (NULL, PTW32_FALSE, /* manual reset = No */ + PTW32_FALSE, /* initial state = not signalled */ NULL); /* event name */ if (0 == mx->event) diff --git a/pthread_mutex_lock.c b/pthread_mutex_lock.c index fcfedaa8..a9028425 100644 --- a/pthread_mutex_lock.c +++ b/pthread_mutex_lock.c @@ -60,12 +60,12 @@ pthread_mutex_lock (pthread_mutex_t * mutex) /* * We do a quick check to see if we need to do more work * to initialise a static mutex. We check - * again inside the guarded section of __ptw32_mutex_check_need_init() + * again inside the guarded section of ptw32_mutex_check_need_init() * to avoid race conditions. */ if (mx >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) { - if ((result = __ptw32_mutex_check_need_init (mutex)) != 0) + if ((result = ptw32_mutex_check_need_init (mutex)) != 0) { return (result); } @@ -79,13 +79,13 @@ pthread_mutex_lock (pthread_mutex_t * mutex) /* Non-robust */ if (PTHREAD_MUTEX_NORMAL == kind) { - if ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( - (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (__PTW32_INTERLOCKED_LONG) 1) != 0) + if ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONG) 1) != 0) { - while ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( - (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (__PTW32_INTERLOCKED_LONG) -1) != 0) + while ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONG) -1) != 0) { if (WAIT_OBJECT_0 != WaitForSingleObject (mx->event, INFINITE)) { @@ -99,10 +99,10 @@ pthread_mutex_lock (pthread_mutex_t * mutex) { pthread_t self = pthread_self(); - if ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( - (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (__PTW32_INTERLOCKED_LONG) 1, - (__PTW32_INTERLOCKED_LONG) 0) == 0) + if ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONG) 1, + (PTW32_INTERLOCKED_LONG) 0) == 0) { mx->recursive_count = 1; mx->ownerThread = self; @@ -122,9 +122,9 @@ pthread_mutex_lock (pthread_mutex_t * mutex) } else { - while ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( - (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (__PTW32_INTERLOCKED_LONG) -1) != 0) + while ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONG) -1) != 0) { if (WAIT_OBJECT_0 != WaitForSingleObject (mx->event, INFINITE)) { @@ -149,11 +149,11 @@ pthread_mutex_lock (pthread_mutex_t * mutex) * All types record the current owner thread. * The mutex is added to a per thread list when ownership is acquired. */ - __ptw32_robust_state_t* statePtr = &mx->robustNode->stateInconsistent; + ptw32_robust_state_t* statePtr = &mx->robustNode->stateInconsistent; - if ((__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_NOTRECOVERABLE == __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( - (__PTW32_INTERLOCKED_LONGPTR)statePtr, - (__PTW32_INTERLOCKED_LONG)0)) + if ((PTW32_INTERLOCKED_LONG)PTW32_ROBUST_NOTRECOVERABLE == PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( + (PTW32_INTERLOCKED_LONGPTR)statePtr, + (PTW32_INTERLOCKED_LONG)0)) { result = ENOTRECOVERABLE; } @@ -165,24 +165,24 @@ pthread_mutex_lock (pthread_mutex_t * mutex) if (PTHREAD_MUTEX_NORMAL == kind) { - if ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( - (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (__PTW32_INTERLOCKED_LONG) 1) != 0) + if ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONG) 1) != 0) { - while (0 == (result = __ptw32_robust_mutex_inherit(mutex)) - && (__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( - (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (__PTW32_INTERLOCKED_LONG) -1) != 0) + while (0 == (result = ptw32_robust_mutex_inherit(mutex)) + && (PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONG) -1) != 0) { if (WAIT_OBJECT_0 != WaitForSingleObject (mx->event, INFINITE)) { result = EINVAL; break; } - if ((__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_NOTRECOVERABLE == - __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( - (__PTW32_INTERLOCKED_LONGPTR)statePtr, - (__PTW32_INTERLOCKED_LONG)0)) + if ((PTW32_INTERLOCKED_LONG)PTW32_ROBUST_NOTRECOVERABLE == + PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( + (PTW32_INTERLOCKED_LONGPTR)statePtr, + (PTW32_INTERLOCKED_LONG)0)) { /* Unblock the next thread */ SetEvent(mx->event); @@ -197,22 +197,22 @@ pthread_mutex_lock (pthread_mutex_t * mutex) * Add mutex to the per-thread robust mutex currently-held list. * If the thread terminates, all mutexes in this list will be unlocked. */ - __ptw32_robust_mutex_add(mutex, self); + ptw32_robust_mutex_add(mutex, self); } } else { - if ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( - (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (__PTW32_INTERLOCKED_LONG) 1, - (__PTW32_INTERLOCKED_LONG) 0) == 0) + if ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONG) 1, + (PTW32_INTERLOCKED_LONG) 0) == 0) { mx->recursive_count = 1; /* * Add mutex to the per-thread robust mutex currently-held list. * If the thread terminates, all mutexes in this list will be unlocked. */ - __ptw32_robust_mutex_add(mutex, self); + ptw32_robust_mutex_add(mutex, self); } else { @@ -229,20 +229,20 @@ pthread_mutex_lock (pthread_mutex_t * mutex) } else { - while (0 == (result = __ptw32_robust_mutex_inherit(mutex)) - && (__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( - (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (__PTW32_INTERLOCKED_LONG) -1) != 0) + while (0 == (result = ptw32_robust_mutex_inherit(mutex)) + && (PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONG) -1) != 0) { if (WAIT_OBJECT_0 != WaitForSingleObject (mx->event, INFINITE)) { result = EINVAL; break; } - if ((__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_NOTRECOVERABLE == - __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( - (__PTW32_INTERLOCKED_LONGPTR)statePtr, - (__PTW32_INTERLOCKED_LONG)0)) + if ((PTW32_INTERLOCKED_LONG)PTW32_ROBUST_NOTRECOVERABLE == + PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( + (PTW32_INTERLOCKED_LONGPTR)statePtr, + (PTW32_INTERLOCKED_LONG)0)) { /* Unblock the next thread */ SetEvent(mx->event); @@ -258,7 +258,7 @@ pthread_mutex_lock (pthread_mutex_t * mutex) * Add mutex to the per-thread robust mutex currently-held list. * If the thread terminates, all mutexes in this list will be unlocked. */ - __ptw32_robust_mutex_add(mutex, self); + ptw32_robust_mutex_add(mutex, self); } } } diff --git a/pthread_mutex_timedlock.c b/pthread_mutex_timedlock.c index 10d5bd15..c09a540a 100644 --- a/pthread_mutex_timedlock.c +++ b/pthread_mutex_timedlock.c @@ -41,7 +41,7 @@ static INLINE int -__ptw32_timed_eventwait (HANDLE event, const struct timespec *abstime) +ptw32_timed_eventwait (HANDLE event, const struct timespec *abstime) /* * ------------------------------------------------------ * DESCRIPTION @@ -83,7 +83,7 @@ __ptw32_timed_eventwait (HANDLE event, const struct timespec *abstime) /* * Calculate timeout as milliseconds from current system time. */ - milliseconds = __ptw32_relmillisecs (abstime); + milliseconds = ptw32_relmillisecs (abstime); } status = WaitForSingleObject (event, milliseconds); @@ -103,7 +103,7 @@ __ptw32_timed_eventwait (HANDLE event, const struct timespec *abstime) return 0; -} /* __ptw32_timed_semwait */ +} /* ptw32_timed_semwait */ int @@ -125,12 +125,12 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, /* * We do a quick check to see if we need to do more work * to initialise a static mutex. We check - * again inside the guarded section of __ptw32_mutex_check_need_init() + * again inside the guarded section of ptw32_mutex_check_need_init() * to avoid race conditions. */ if (mx >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) { - if ((result = __ptw32_mutex_check_need_init (mutex)) != 0) + if ((result = ptw32_mutex_check_need_init (mutex)) != 0) { return (result); } @@ -143,15 +143,15 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, { if (mx->kind == PTHREAD_MUTEX_NORMAL) { - if ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( - (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (__PTW32_INTERLOCKED_LONG) 1) != 0) + if ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONG) 1) != 0) { - while ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( - (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (__PTW32_INTERLOCKED_LONG) -1) != 0) + while ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONG) -1) != 0) { - if (0 != (result = __ptw32_timed_eventwait (mx->event, abstime))) + if (0 != (result = ptw32_timed_eventwait (mx->event, abstime))) { return result; } @@ -162,10 +162,10 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, { pthread_t self = pthread_self(); - if ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( - (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (__PTW32_INTERLOCKED_LONG) 1, - (__PTW32_INTERLOCKED_LONG) 0) == 0) + if ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONG) 1, + (PTW32_INTERLOCKED_LONG) 0) == 0) { mx->recursive_count = 1; mx->ownerThread = self; @@ -185,11 +185,11 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, } else { - while ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( - (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (__PTW32_INTERLOCKED_LONG) -1) != 0) + while ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONG) -1) != 0) { - if (0 != (result = __ptw32_timed_eventwait (mx->event, abstime))) + if (0 != (result = ptw32_timed_eventwait (mx->event, abstime))) { return result; } @@ -208,11 +208,11 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, * All types record the current owner thread. * The mutex is added to a per thread list when ownership is acquired. */ - __ptw32_robust_state_t* statePtr = &mx->robustNode->stateInconsistent; + ptw32_robust_state_t* statePtr = &mx->robustNode->stateInconsistent; - if ((__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_NOTRECOVERABLE == __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( - (__PTW32_INTERLOCKED_LONGPTR)statePtr, - (__PTW32_INTERLOCKED_LONG)0)) + if ((PTW32_INTERLOCKED_LONG)PTW32_ROBUST_NOTRECOVERABLE == PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( + (PTW32_INTERLOCKED_LONGPTR)statePtr, + (PTW32_INTERLOCKED_LONG)0)) { result = ENOTRECOVERABLE; } @@ -224,23 +224,23 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, if (PTHREAD_MUTEX_NORMAL == kind) { - if ((__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( - (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (__PTW32_INTERLOCKED_LONG) 1) != 0) + if ((PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONG) 1) != 0) { - while (0 == (result = __ptw32_robust_mutex_inherit(mutex)) - && (__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( - (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (__PTW32_INTERLOCKED_LONG) -1) != 0) + while (0 == (result = ptw32_robust_mutex_inherit(mutex)) + && (PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONG) -1) != 0) { - if (0 != (result = __ptw32_timed_eventwait (mx->event, abstime))) + if (0 != (result = ptw32_timed_eventwait (mx->event, abstime))) { return result; } - if ((__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_NOTRECOVERABLE == - __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( - (__PTW32_INTERLOCKED_LONGPTR)statePtr, - (__PTW32_INTERLOCKED_LONG)0)) + if ((PTW32_INTERLOCKED_LONG)PTW32_ROBUST_NOTRECOVERABLE == + PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( + (PTW32_INTERLOCKED_LONGPTR)statePtr, + (PTW32_INTERLOCKED_LONG)0)) { /* Unblock the next thread */ SetEvent(mx->event); @@ -255,7 +255,7 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, * Add mutex to the per-thread robust mutex currently-held list. * If the thread terminates, all mutexes in this list will be unlocked. */ - __ptw32_robust_mutex_add(mutex, self); + ptw32_robust_mutex_add(mutex, self); } } } @@ -263,17 +263,17 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, { pthread_t self = pthread_self(); - if (0 == (__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( - (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (__PTW32_INTERLOCKED_LONG) 1, - (__PTW32_INTERLOCKED_LONG) 0)) + if (0 == (PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG( + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONG) 1, + (PTW32_INTERLOCKED_LONG) 0)) { mx->recursive_count = 1; /* * Add mutex to the per-thread robust mutex currently-held list. * If the thread terminates, all mutexes in this list will be unlocked. */ - __ptw32_robust_mutex_add(mutex, self); + ptw32_robust_mutex_add(mutex, self); } else { @@ -290,21 +290,21 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, } else { - while (0 == (result = __ptw32_robust_mutex_inherit(mutex)) - && (__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG( - (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (__PTW32_INTERLOCKED_LONG) -1) != 0) + while (0 == (result = ptw32_robust_mutex_inherit(mutex)) + && (PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_EXCHANGE_LONG( + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONG) -1) != 0) { - if (0 != (result = __ptw32_timed_eventwait (mx->event, abstime))) + if (0 != (result = ptw32_timed_eventwait (mx->event, abstime))) { return result; } } - if ((__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_NOTRECOVERABLE == - __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( - (__PTW32_INTERLOCKED_LONGPTR)statePtr, - (__PTW32_INTERLOCKED_LONG)0)) + if ((PTW32_INTERLOCKED_LONG)PTW32_ROBUST_NOTRECOVERABLE == + PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( + (PTW32_INTERLOCKED_LONGPTR)statePtr, + (PTW32_INTERLOCKED_LONG)0)) { /* Unblock the next thread */ SetEvent(mx->event); @@ -317,7 +317,7 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, * Add mutex to the per-thread robust mutex currently-held list. * If the thread terminates, all mutexes in this list will be unlocked. */ - __ptw32_robust_mutex_add(mutex, self); + ptw32_robust_mutex_add(mutex, self); } } } diff --git a/pthread_mutex_trylock.c b/pthread_mutex_trylock.c index 405542a2..2022a340 100644 --- a/pthread_mutex_trylock.c +++ b/pthread_mutex_trylock.c @@ -58,12 +58,12 @@ pthread_mutex_trylock (pthread_mutex_t * mutex) /* * We do a quick check to see if we need to do more work * to initialise a static mutex. We check - * again inside the guarded section of __ptw32_mutex_check_need_init() + * again inside the guarded section of ptw32_mutex_check_need_init() * to avoid race conditions. */ if (mx >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) { - if ((result = __ptw32_mutex_check_need_init (mutex)) != 0) + if ((result = ptw32_mutex_check_need_init (mutex)) != 0) { return (result); } @@ -75,10 +75,10 @@ pthread_mutex_trylock (pthread_mutex_t * mutex) if (kind >= 0) { /* Non-robust */ - if (0 == (__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ( - (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (__PTW32_INTERLOCKED_LONG) 1, - (__PTW32_INTERLOCKED_LONG) 0)) + if (0 == (PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ( + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONG) 1, + (PTW32_INTERLOCKED_LONG) 0)) { if (kind != PTHREAD_MUTEX_NORMAL) { @@ -107,12 +107,12 @@ pthread_mutex_trylock (pthread_mutex_t * mutex) * The mutex is added to a per thread list when ownership is acquired. */ pthread_t self; - __ptw32_robust_state_t* statePtr = &mx->robustNode->stateInconsistent; + ptw32_robust_state_t* statePtr = &mx->robustNode->stateInconsistent; - if ((__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_NOTRECOVERABLE == - __PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( - (__PTW32_INTERLOCKED_LONGPTR)statePtr, - (__PTW32_INTERLOCKED_LONG)0)) + if ((PTW32_INTERLOCKED_LONG)PTW32_ROBUST_NOTRECOVERABLE == + PTW32_INTERLOCKED_EXCHANGE_ADD_LONG( + (PTW32_INTERLOCKED_LONGPTR)statePtr, + (PTW32_INTERLOCKED_LONG)0)) { return ENOTRECOVERABLE; } @@ -120,16 +120,16 @@ pthread_mutex_trylock (pthread_mutex_t * mutex) self = pthread_self(); kind = -kind - 1; /* Convert to non-robust range */ - if (0 == (__PTW32_INTERLOCKED_LONG) __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ( - (__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (__PTW32_INTERLOCKED_LONG) 1, - (__PTW32_INTERLOCKED_LONG) 0)) + if (0 == (PTW32_INTERLOCKED_LONG) PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ( + (PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONG) 1, + (PTW32_INTERLOCKED_LONG) 0)) { if (kind != PTHREAD_MUTEX_NORMAL) { mx->recursive_count = 1; } - __ptw32_robust_mutex_add(mutex, self); + ptw32_robust_mutex_add(mutex, self); } else { @@ -140,10 +140,10 @@ pthread_mutex_trylock (pthread_mutex_t * mutex) } else { - if (EOWNERDEAD == (result = __ptw32_robust_mutex_inherit(mutex))) + if (EOWNERDEAD == (result = ptw32_robust_mutex_inherit(mutex))) { mx->recursive_count = 1; - __ptw32_robust_mutex_add(mutex, self); + ptw32_robust_mutex_add(mutex, self); } else { diff --git a/pthread_mutex_unlock.c b/pthread_mutex_unlock.c index 740f443f..3bf6246c 100644 --- a/pthread_mutex_unlock.c +++ b/pthread_mutex_unlock.c @@ -65,8 +65,8 @@ pthread_mutex_unlock (pthread_mutex_t * mutex) { LONG idx; - idx = (LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG ((__PTW32_INTERLOCKED_LONGPTR)&mx->lock_idx, - (__PTW32_INTERLOCKED_LONG)0); + idx = (LONG) PTW32_INTERLOCKED_EXCHANGE_LONG ((PTW32_INTERLOCKED_LONGPTR)&mx->lock_idx, + (PTW32_INTERLOCKED_LONG)0); if (idx != 0) { if (idx < 0) @@ -90,8 +90,8 @@ pthread_mutex_unlock (pthread_mutex_t * mutex) { mx->ownerThread.p = NULL; - if ((LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG ((__PTW32_INTERLOCKED_LONGPTR)&mx->lock_idx, - (__PTW32_INTERLOCKED_LONG)0) < 0L) + if ((LONG) PTW32_INTERLOCKED_EXCHANGE_LONG ((PTW32_INTERLOCKED_LONGPTR)&mx->lock_idx, + (PTW32_INTERLOCKED_LONG)0) < 0L) { /* Someone may be waiting on that mutex */ if (SetEvent (mx->event) == 0) @@ -119,15 +119,15 @@ pthread_mutex_unlock (pthread_mutex_t * mutex) */ if (pthread_equal (mx->ownerThread, self)) { - __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ((__PTW32_INTERLOCKED_LONGPTR) &mx->robustNode->stateInconsistent, - (__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_NOTRECOVERABLE, - (__PTW32_INTERLOCKED_LONG)__PTW32_ROBUST_INCONSISTENT); + PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG((PTW32_INTERLOCKED_LONGPTR) &mx->robustNode->stateInconsistent, + (PTW32_INTERLOCKED_LONG)PTW32_ROBUST_NOTRECOVERABLE, + (PTW32_INTERLOCKED_LONG)PTW32_ROBUST_INCONSISTENT); if (PTHREAD_MUTEX_NORMAL == kind) { - __ptw32_robust_mutex_remove(mutex, NULL); + ptw32_robust_mutex_remove(mutex, NULL); - if ((LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG ((__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (__PTW32_INTERLOCKED_LONG) 0) < 0) + if ((LONG) PTW32_INTERLOCKED_EXCHANGE_LONG((PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONG) 0) < 0) { /* * Someone may be waiting on that mutex. @@ -143,10 +143,10 @@ pthread_mutex_unlock (pthread_mutex_t * mutex) if (kind != PTHREAD_MUTEX_RECURSIVE || 0 == --mx->recursive_count) { - __ptw32_robust_mutex_remove(mutex, NULL); + ptw32_robust_mutex_remove(mutex, NULL); - if ((LONG) __PTW32_INTERLOCKED_EXCHANGE_LONG ((__PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, - (__PTW32_INTERLOCKED_LONG) 0) < 0) + if ((LONG) PTW32_INTERLOCKED_EXCHANGE_LONG((PTW32_INTERLOCKED_LONGPTR) &mx->lock_idx, + (PTW32_INTERLOCKED_LONG) 0) < 0) { /* * Someone may be waiting on that mutex. diff --git a/pthread_num_processors_np.c b/pthread_num_processors_np.c index 3549f160..2c197799 100644 --- a/pthread_num_processors_np.c +++ b/pthread_num_processors_np.c @@ -49,7 +49,7 @@ pthread_num_processors_np (void) { int count; - if (__ptw32_getprocessors (&count) != 0) + if (ptw32_getprocessors (&count) != 0) { count = 1; } diff --git a/pthread_once.c b/pthread_once.c index a1636253..7c0e3698 100644 --- a/pthread_once.c +++ b/pthread_once.c @@ -40,40 +40,40 @@ #include "implement.h" int -pthread_once (pthread_once_t * once_control, void (__PTW32_CDECL *init_routine) (void)) +pthread_once (pthread_once_t * once_control, void (PTW32_CDECL *init_routine) (void)) { if (once_control == NULL || init_routine == NULL) { return EINVAL; } - - if ((__PTW32_INTERLOCKED_LONG)__PTW32_FALSE == - (__PTW32_INTERLOCKED_LONG)__PTW32_INTERLOCKED_EXCHANGE_ADD_LONG ((__PTW32_INTERLOCKED_LONGPTR)&once_control->done, - (__PTW32_INTERLOCKED_LONG)0)) /* MBR fence */ + + if ((PTW32_INTERLOCKED_LONG)PTW32_FALSE == + (PTW32_INTERLOCKED_LONG)PTW32_INTERLOCKED_EXCHANGE_ADD_LONG((PTW32_INTERLOCKED_LONGPTR)&once_control->done, + (PTW32_INTERLOCKED_LONG)0)) /* MBR fence */ { - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; - __ptw32_mcs_lock_acquire((__ptw32_mcs_lock_t *)&once_control->lock, &node); + ptw32_mcs_lock_acquire((ptw32_mcs_lock_t *)&once_control->lock, &node); if (!once_control->done) { -#if defined (__PTW32_CONFIG_MSVC7) +#if defined(PTW32_CONFIG_MSVC7) #pragma inline_depth(0) #endif - pthread_cleanup_push(__ptw32_mcs_lock_release, &node); + pthread_cleanup_push(ptw32_mcs_lock_release, &node); (*init_routine)(); pthread_cleanup_pop(0); -#if defined (__PTW32_CONFIG_MSVC7) +#if defined(PTW32_CONFIG_MSVC7) #pragma inline_depth() #endif - once_control->done = __PTW32_TRUE; + once_control->done = PTW32_TRUE; } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); } return 0; diff --git a/pthread_rwlock_destroy.c b/pthread_rwlock_destroy.c index 359ad36f..4003b9cc 100644 --- a/pthread_rwlock_destroy.c +++ b/pthread_rwlock_destroy.c @@ -56,7 +56,7 @@ pthread_rwlock_destroy (pthread_rwlock_t * rwlock) { rwl = *rwlock; - if (rwl->nMagic != __PTW32_RWLOCK_MAGIC) + if (rwl->nMagic != PTW32_RWLOCK_MAGIC) { return EINVAL; } @@ -110,11 +110,11 @@ pthread_rwlock_destroy (pthread_rwlock_t * rwlock) } else { - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; /* - * See notes in __ptw32_rwlock_check_need_init() above also. + * See notes in ptw32_rwlock_check_need_init() above also. */ - __ptw32_mcs_lock_acquire(&__ptw32_rwlock_test_init_lock, &node); + ptw32_mcs_lock_acquire(&ptw32_rwlock_test_init_lock, &node); /* * Check again. @@ -138,7 +138,7 @@ pthread_rwlock_destroy (pthread_rwlock_t * rwlock) result = EBUSY; } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); } return ((result != 0) ? result : ((result1 != 0) ? result1 : result2)); diff --git a/pthread_rwlock_init.c b/pthread_rwlock_init.c index 4903dd0d..6ae412e0 100644 --- a/pthread_rwlock_init.c +++ b/pthread_rwlock_init.c @@ -89,7 +89,7 @@ pthread_rwlock_init (pthread_rwlock_t * rwlock, goto FAIL2; } - rwl->nMagic = __PTW32_RWLOCK_MAGIC; + rwl->nMagic = PTW32_RWLOCK_MAGIC; result = 0; goto DONE; diff --git a/pthread_rwlock_rdlock.c b/pthread_rwlock_rdlock.c index 1d141c18..9a503c51 100644 --- a/pthread_rwlock_rdlock.c +++ b/pthread_rwlock_rdlock.c @@ -55,12 +55,12 @@ pthread_rwlock_rdlock (pthread_rwlock_t * rwlock) /* * We do a quick check to see if we need to do more work * to initialise a static rwlock. We check - * again inside the guarded section of __ptw32_rwlock_check_need_init() + * again inside the guarded section of ptw32_rwlock_check_need_init() * to avoid race conditions. */ if (*rwlock == PTHREAD_RWLOCK_INITIALIZER) { - result = __ptw32_rwlock_check_need_init (rwlock); + result = ptw32_rwlock_check_need_init (rwlock); if (result != 0 && result != EBUSY) { @@ -70,7 +70,7 @@ pthread_rwlock_rdlock (pthread_rwlock_t * rwlock) rwl = *rwlock; - if (rwl->nMagic != __PTW32_RWLOCK_MAGIC) + if (rwl->nMagic != PTW32_RWLOCK_MAGIC) { return EINVAL; } diff --git a/pthread_rwlock_timedrdlock.c b/pthread_rwlock_timedrdlock.c index 3099ad97..e75bf5bf 100644 --- a/pthread_rwlock_timedrdlock.c +++ b/pthread_rwlock_timedrdlock.c @@ -56,12 +56,12 @@ pthread_rwlock_timedrdlock (pthread_rwlock_t * rwlock, /* * We do a quick check to see if we need to do more work * to initialise a static rwlock. We check - * again inside the guarded section of __ptw32_rwlock_check_need_init() + * again inside the guarded section of ptw32_rwlock_check_need_init() * to avoid race conditions. */ if (*rwlock == PTHREAD_RWLOCK_INITIALIZER) { - result = __ptw32_rwlock_check_need_init (rwlock); + result = ptw32_rwlock_check_need_init (rwlock); if (result != 0 && result != EBUSY) { @@ -71,7 +71,7 @@ pthread_rwlock_timedrdlock (pthread_rwlock_t * rwlock, rwl = *rwlock; - if (rwl->nMagic != __PTW32_RWLOCK_MAGIC) + if (rwl->nMagic != PTW32_RWLOCK_MAGIC) { return EINVAL; } diff --git a/pthread_rwlock_timedwrlock.c b/pthread_rwlock_timedwrlock.c index 86f085f8..f74fecb4 100644 --- a/pthread_rwlock_timedwrlock.c +++ b/pthread_rwlock_timedwrlock.c @@ -56,12 +56,12 @@ pthread_rwlock_timedwrlock (pthread_rwlock_t * rwlock, /* * We do a quick check to see if we need to do more work * to initialise a static rwlock. We check - * again inside the guarded section of __ptw32_rwlock_check_need_init() + * again inside the guarded section of ptw32_rwlock_check_need_init() * to avoid race conditions. */ if (*rwlock == PTHREAD_RWLOCK_INITIALIZER) { - result = __ptw32_rwlock_check_need_init (rwlock); + result = ptw32_rwlock_check_need_init (rwlock); if (result != 0 && result != EBUSY) { @@ -71,7 +71,7 @@ pthread_rwlock_timedwrlock (pthread_rwlock_t * rwlock, rwl = *rwlock; - if (rwl->nMagic != __PTW32_RWLOCK_MAGIC) + if (rwl->nMagic != PTW32_RWLOCK_MAGIC) { return EINVAL; } @@ -106,10 +106,10 @@ pthread_rwlock_timedwrlock (pthread_rwlock_t * rwlock, * This routine may be a cancellation point * according to POSIX 1003.1j section 18.1.2. */ -#if defined (__PTW32_CONFIG_MSVC7) +#if defined(PTW32_CONFIG_MSVC7) #pragma inline_depth(0) #endif - pthread_cleanup_push (__ptw32_rwlock_cancelwrwait, (void *) rwl); + pthread_cleanup_push (ptw32_rwlock_cancelwrwait, (void *) rwl); do { @@ -121,7 +121,7 @@ pthread_rwlock_timedwrlock (pthread_rwlock_t * rwlock, while (result == 0 && rwl->nCompletedSharedAccessCount < 0); pthread_cleanup_pop ((result != 0) ? 1 : 0); -#if defined (__PTW32_CONFIG_MSVC7) +#if defined(PTW32_CONFIG_MSVC7) #pragma inline_depth() #endif diff --git a/pthread_rwlock_tryrdlock.c b/pthread_rwlock_tryrdlock.c index f95c412d..1d019f2e 100644 --- a/pthread_rwlock_tryrdlock.c +++ b/pthread_rwlock_tryrdlock.c @@ -55,12 +55,12 @@ pthread_rwlock_tryrdlock (pthread_rwlock_t * rwlock) /* * We do a quick check to see if we need to do more work * to initialise a static rwlock. We check - * again inside the guarded section of __ptw32_rwlock_check_need_init() + * again inside the guarded section of ptw32_rwlock_check_need_init() * to avoid race conditions. */ if (*rwlock == PTHREAD_RWLOCK_INITIALIZER) { - result = __ptw32_rwlock_check_need_init (rwlock); + result = ptw32_rwlock_check_need_init (rwlock); if (result != 0 && result != EBUSY) { @@ -70,7 +70,7 @@ pthread_rwlock_tryrdlock (pthread_rwlock_t * rwlock) rwl = *rwlock; - if (rwl->nMagic != __PTW32_RWLOCK_MAGIC) + if (rwl->nMagic != PTW32_RWLOCK_MAGIC) { return EINVAL; } diff --git a/pthread_rwlock_trywrlock.c b/pthread_rwlock_trywrlock.c index 373d3a90..7efc9038 100644 --- a/pthread_rwlock_trywrlock.c +++ b/pthread_rwlock_trywrlock.c @@ -55,12 +55,12 @@ pthread_rwlock_trywrlock (pthread_rwlock_t * rwlock) /* * We do a quick check to see if we need to do more work * to initialise a static rwlock. We check - * again inside the guarded section of __ptw32_rwlock_check_need_init() + * again inside the guarded section of ptw32_rwlock_check_need_init() * to avoid race conditions. */ if (*rwlock == PTHREAD_RWLOCK_INITIALIZER) { - result = __ptw32_rwlock_check_need_init (rwlock); + result = ptw32_rwlock_check_need_init (rwlock); if (result != 0 && result != EBUSY) { @@ -70,7 +70,7 @@ pthread_rwlock_trywrlock (pthread_rwlock_t * rwlock) rwl = *rwlock; - if (rwl->nMagic != __PTW32_RWLOCK_MAGIC) + if (rwl->nMagic != PTW32_RWLOCK_MAGIC) { return EINVAL; } diff --git a/pthread_rwlock_unlock.c b/pthread_rwlock_unlock.c index a01e993f..b975fbb0 100644 --- a/pthread_rwlock_unlock.c +++ b/pthread_rwlock_unlock.c @@ -62,7 +62,7 @@ pthread_rwlock_unlock (pthread_rwlock_t * rwlock) rwl = *rwlock; - if (rwl->nMagic != __PTW32_RWLOCK_MAGIC) + if (rwl->nMagic != PTW32_RWLOCK_MAGIC) { return EINVAL; } diff --git a/pthread_rwlock_wrlock.c b/pthread_rwlock_wrlock.c index 36037e06..31c80563 100644 --- a/pthread_rwlock_wrlock.c +++ b/pthread_rwlock_wrlock.c @@ -55,12 +55,12 @@ pthread_rwlock_wrlock (pthread_rwlock_t * rwlock) /* * We do a quick check to see if we need to do more work * to initialise a static rwlock. We check - * again inside the guarded section of __ptw32_rwlock_check_need_init() + * again inside the guarded section of ptw32_rwlock_check_need_init() * to avoid race conditions. */ if (*rwlock == PTHREAD_RWLOCK_INITIALIZER) { - result = __ptw32_rwlock_check_need_init (rwlock); + result = ptw32_rwlock_check_need_init (rwlock); if (result != 0 && result != EBUSY) { @@ -70,7 +70,7 @@ pthread_rwlock_wrlock (pthread_rwlock_t * rwlock) rwl = *rwlock; - if (rwl->nMagic != __PTW32_RWLOCK_MAGIC) + if (rwl->nMagic != PTW32_RWLOCK_MAGIC) { return EINVAL; } @@ -102,10 +102,10 @@ pthread_rwlock_wrlock (pthread_rwlock_t * rwlock) * This routine may be a cancellation point * according to POSIX 1003.1j section 18.1.2. */ -#if defined (__PTW32_CONFIG_MSVC7) +#if defined(PTW32_CONFIG_MSVC7) #pragma inline_depth(0) #endif - pthread_cleanup_push (__ptw32_rwlock_cancelwrwait, (void *) rwl); + pthread_cleanup_push (ptw32_rwlock_cancelwrwait, (void *) rwl); do { @@ -115,7 +115,7 @@ pthread_rwlock_wrlock (pthread_rwlock_t * rwlock) while (result == 0 && rwl->nCompletedSharedAccessCount < 0); pthread_cleanup_pop ((result != 0) ? 1 : 0); -#if defined (__PTW32_CONFIG_MSVC7) +#if defined(PTW32_CONFIG_MSVC7) #pragma inline_depth() #endif diff --git a/pthread_self.c b/pthread_self.c index 67d45f6a..22392518 100644 --- a/pthread_self.c +++ b/pthread_self.c @@ -63,14 +63,14 @@ pthread_self (void) { pthread_t self; pthread_t nil = {NULL, 0}; - __ptw32_thread_t * sp; + ptw32_thread_t * sp; #if defined(_UWIN) - if (!__ptw32_selfThreadKey) + if (!ptw32_selfThreadKey) return nil; #endif - sp = (__ptw32_thread_t *) pthread_getspecific (__ptw32_selfThreadKey); + sp = (ptw32_thread_t *) pthread_getspecific (ptw32_selfThreadKey); if (sp != NULL) { @@ -78,14 +78,14 @@ pthread_self (void) } else { - int fail = __PTW32_FALSE; + int fail = PTW32_FALSE; /* * Need to create an implicit 'self' for the currently * executing thread. */ - self = __ptw32_new (); - sp = (__ptw32_thread_t *) self.p; + self = ptw32_new (); + sp = (ptw32_thread_t *) self.p; if (sp != NULL) { @@ -117,7 +117,7 @@ pthread_self (void) &sp->threadH, 0, FALSE, DUPLICATE_SAME_ACCESS)) { - fail = __PTW32_TRUE; + fail = PTW32_TRUE; } #endif @@ -141,16 +141,16 @@ pthread_self (void) { sp->cpuset = (size_t) vThreadMask; } - else fail = __PTW32_TRUE; + else fail = PTW32_TRUE; } - else fail = __PTW32_TRUE; + else fail = PTW32_TRUE; } - else fail = __PTW32_TRUE; + else fail = PTW32_TRUE; #endif sp->sched_priority = GetThreadPriority (sp->threadH); - pthread_setspecific (__ptw32_selfThreadKey, (void *) sp); + pthread_setspecific (ptw32_selfThreadKey, (void *) sp); } } @@ -160,7 +160,7 @@ pthread_self (void) * Thread structs are never freed but are reused so if this * continues to fail at least we don't leak memory. */ - __ptw32_threadReusePush (self); + ptw32_threadReusePush (self); /* * As this is a win32 thread calling us and we have failed, * return a value that makes sense to win32. diff --git a/pthread_setaffinity.c b/pthread_setaffinity.c index badf2e5a..97bddf21 100644 --- a/pthread_setaffinity.c +++ b/pthread_setaffinity.c @@ -89,13 +89,13 @@ pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, #else int result = 0; - __ptw32_thread_t * tp; - __ptw32_mcs_local_node_t node; + ptw32_thread_t * tp; + ptw32_mcs_local_node_t node; cpu_set_t processCpuset; - __ptw32_mcs_lock_acquire (&__ptw32_thread_reuse_lock, &node); + ptw32_mcs_lock_acquire (&ptw32_thread_reuse_lock, &node); - tp = (__ptw32_thread_t *) thread.p; + tp = (ptw32_thread_t *) thread.p; if (NULL == tp || thread.x != tp->ptHandle.x || NULL == tp->threadH) { @@ -107,7 +107,7 @@ pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, { if (sched_getaffinity(0, sizeof(cpu_set_t), &processCpuset)) { - result = __PTW32_GET_ERRNO(); + result = PTW32_GET_ERRNO(); } else { @@ -147,7 +147,7 @@ pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, } } - __ptw32_mcs_lock_release (&node); + ptw32_mcs_lock_release (&node); return result; @@ -195,12 +195,12 @@ pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t *cpuset) #else int result = 0; - __ptw32_thread_t * tp; - __ptw32_mcs_local_node_t node; + ptw32_thread_t * tp; + ptw32_mcs_local_node_t node; - __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); + ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &node); - tp = (__ptw32_thread_t *) thread.p; + tp = (ptw32_thread_t *) thread.p; if (NULL == tp || thread.x != tp->ptHandle.x || NULL == tp->threadH) { @@ -232,7 +232,7 @@ pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t *cpuset) } } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); return result; diff --git a/pthread_setcancelstate.c b/pthread_setcancelstate.c index 82272537..f1ffb65f 100644 --- a/pthread_setcancelstate.c +++ b/pthread_setcancelstate.c @@ -81,10 +81,10 @@ pthread_setcancelstate (int state, int *oldstate) * ------------------------------------------------------ */ { - __ptw32_mcs_local_node_t stateLock; + ptw32_mcs_local_node_t stateLock; int result = 0; pthread_t self = pthread_self (); - __ptw32_thread_t * sp = (__ptw32_thread_t *) self.p; + ptw32_thread_t * sp = (ptw32_thread_t *) self.p; if (sp == NULL || (state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE)) @@ -95,7 +95,7 @@ pthread_setcancelstate (int state, int *oldstate) /* * Lock for async-cancel safety. */ - __ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); + ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); if (oldstate != NULL) { @@ -114,13 +114,13 @@ pthread_setcancelstate (int state, int *oldstate) sp->state = PThreadStateCanceling; sp->cancelState = PTHREAD_CANCEL_DISABLE; ResetEvent (sp->cancelEvent); - __ptw32_mcs_lock_release (&stateLock); - __ptw32_throw (__PTW32_EPS_CANCEL); + ptw32_mcs_lock_release (&stateLock); + ptw32_throw (PTW32_EPS_CANCEL); /* Never reached */ } - __ptw32_mcs_lock_release (&stateLock); + ptw32_mcs_lock_release (&stateLock); return (result); diff --git a/pthread_setcanceltype.c b/pthread_setcanceltype.c index 54d7cb68..a03c51ac 100644 --- a/pthread_setcanceltype.c +++ b/pthread_setcanceltype.c @@ -81,10 +81,10 @@ pthread_setcanceltype (int type, int *oldtype) * ------------------------------------------------------ */ { - __ptw32_mcs_local_node_t stateLock; + ptw32_mcs_local_node_t stateLock; int result = 0; pthread_t self = pthread_self (); - __ptw32_thread_t * sp = (__ptw32_thread_t *) self.p; + ptw32_thread_t * sp = (ptw32_thread_t *) self.p; if (sp == NULL || (type != PTHREAD_CANCEL_DEFERRED @@ -96,7 +96,7 @@ pthread_setcanceltype (int type, int *oldtype) /* * Lock for async-cancel safety. */ - __ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); + ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); if (oldtype != NULL) { @@ -115,13 +115,13 @@ pthread_setcanceltype (int type, int *oldtype) sp->state = PThreadStateCanceling; sp->cancelState = PTHREAD_CANCEL_DISABLE; ResetEvent (sp->cancelEvent); - __ptw32_mcs_lock_release (&stateLock); - __ptw32_throw (__PTW32_EPS_CANCEL); + ptw32_mcs_lock_release (&stateLock); + ptw32_throw (PTW32_EPS_CANCEL); /* Never reached */ } - __ptw32_mcs_lock_release (&stateLock); + ptw32_mcs_lock_release (&stateLock); return (result); diff --git a/pthread_setconcurrency.c b/pthread_setconcurrency.c index 2ba301eb..cb63a0b2 100644 --- a/pthread_setconcurrency.c +++ b/pthread_setconcurrency.c @@ -49,7 +49,7 @@ pthread_setconcurrency (int level) } else { - __ptw32_concurrency = level; + ptw32_concurrency = level; return 0; } } diff --git a/pthread_setname_np.c b/pthread_setname_np.c index 2cfb0446..d42b3706 100644 --- a/pthread_setname_np.c +++ b/pthread_setname_np.c @@ -70,17 +70,17 @@ SetThreadName( DWORD dwThreadID, char* threadName) } #endif -#if defined (__PTW32_COMPATIBILITY_BSD) || defined (__PTW32_COMPATIBILITY_TRU64) +#if defined(PTW32_COMPATIBILITY_BSD) || defined(PTW32_COMPATIBILITY_TRU64) int pthread_setname_np(pthread_t thr, const char *name, void *arg) { - __ptw32_mcs_local_node_t threadLock; + ptw32_mcs_local_node_t threadLock; int len; int result; char tmpbuf[PTHREAD_MAX_NAMELEN_NP]; char * newname; char * oldname; - __ptw32_thread_t * tp; + ptw32_thread_t * tp; #if defined(_MSC_VER) DWORD Win32ThreadID; #endif @@ -122,9 +122,9 @@ pthread_setname_np(pthread_t thr, const char *name, void *arg) } #endif - tp = (__ptw32_thread_t *) thr.p; + tp = (ptw32_thread_t *) thr.p; - __ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); + ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); oldname = tp->name; tp->name = newname; @@ -133,7 +133,7 @@ pthread_setname_np(pthread_t thr, const char *name, void *arg) free(oldname); } - __ptw32_mcs_lock_release (&threadLock); + ptw32_mcs_lock_release (&threadLock); return 0; } @@ -141,11 +141,11 @@ pthread_setname_np(pthread_t thr, const char *name, void *arg) int pthread_setname_np(pthread_t thr, const char *name) { - __ptw32_mcs_local_node_t threadLock; + ptw32_mcs_local_node_t threadLock; int result; char * newname; char * oldname; - __ptw32_thread_t * tp; + ptw32_thread_t * tp; #if defined(_MSC_VER) DWORD Win32ThreadID; #endif @@ -172,9 +172,9 @@ pthread_setname_np(pthread_t thr, const char *name) } #endif - tp = (__ptw32_thread_t *) thr.p; + tp = (ptw32_thread_t *) thr.p; - __ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); + ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); oldname = tp->name; tp->name = newname; @@ -183,7 +183,7 @@ pthread_setname_np(pthread_t thr, const char *name) free(oldname); } - __ptw32_mcs_lock_release (&threadLock); + ptw32_mcs_lock_release (&threadLock); return 0; } diff --git a/pthread_setschedparam.c b/pthread_setschedparam.c index 8ed2a6b8..c3a645e3 100644 --- a/pthread_setschedparam.c +++ b/pthread_setschedparam.c @@ -1,6 +1,6 @@ /* * sched_setschedparam.c - * + * * Description: * POSIX thread functions that deal with thread scheduling. * @@ -69,17 +69,17 @@ pthread_setschedparam (pthread_t thread, int policy, return ENOTSUP; } - return (__ptw32_setthreadpriority (thread, policy, param->sched_priority)); + return (ptw32_setthreadpriority (thread, policy, param->sched_priority)); } int -__ptw32_setthreadpriority (pthread_t thread, int policy, int priority) +ptw32_setthreadpriority (pthread_t thread, int policy, int priority) { int prio; - __ptw32_mcs_local_node_t threadLock; + ptw32_mcs_local_node_t threadLock; int result = 0; - __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; + ptw32_thread_t * tp = (ptw32_thread_t *) thread.p; prio = priority; @@ -107,7 +107,7 @@ __ptw32_setthreadpriority (pthread_t thread, int policy, int priority) #endif - __ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); + ptw32_mcs_lock_acquire (&tp->threadLock, &threadLock); /* If this fails, the current priority is unchanged. */ if (0 == SetThreadPriority (tp->threadH, prio)) @@ -123,7 +123,7 @@ __ptw32_setthreadpriority (pthread_t thread, int policy, int priority) tp->sched_priority = priority; } - __ptw32_mcs_lock_release (&threadLock); + ptw32_mcs_lock_release (&threadLock); return result; } diff --git a/pthread_setspecific.c b/pthread_setspecific.c index f0d9747c..00161871 100644 --- a/pthread_setspecific.c +++ b/pthread_setspecific.c @@ -70,7 +70,7 @@ pthread_setspecific (pthread_key_t key, const void *value) pthread_t self; int result = 0; - if (key != __ptw32_selfThreadKey) + if (key != ptw32_selfThreadKey) { /* * Using pthread_self will implicitly create @@ -89,7 +89,7 @@ pthread_setspecific (pthread_key_t key, const void *value) * Resolve catch-22 of registering thread with selfThread * key */ - __ptw32_thread_t * sp = (__ptw32_thread_t *) pthread_getspecific (__ptw32_selfThreadKey); + ptw32_thread_t * sp = (ptw32_thread_t *) pthread_getspecific (ptw32_selfThreadKey); if (sp == NULL) { @@ -111,9 +111,9 @@ pthread_setspecific (pthread_key_t key, const void *value) { if (self.p != NULL && key->destructor != NULL && value != NULL) { - __ptw32_mcs_local_node_t keyLock; - __ptw32_mcs_local_node_t threadLock; - __ptw32_thread_t * sp = (__ptw32_thread_t *) self.p; + ptw32_mcs_local_node_t keyLock; + ptw32_mcs_local_node_t threadLock; + ptw32_thread_t * sp = (ptw32_thread_t *) self.p; /* * Only require associations if we have to * call user destroy routine. @@ -125,8 +125,8 @@ pthread_setspecific (pthread_key_t key, const void *value) */ ThreadKeyAssoc *assoc; - __ptw32_mcs_lock_acquire(&(key->keyLock), &keyLock); - __ptw32_mcs_lock_acquire(&(sp->threadLock), &threadLock); + ptw32_mcs_lock_acquire(&(key->keyLock), &keyLock); + ptw32_mcs_lock_acquire(&(sp->threadLock), &threadLock); assoc = (ThreadKeyAssoc *) sp->keys; /* @@ -149,11 +149,11 @@ pthread_setspecific (pthread_key_t key, const void *value) */ if (assoc == NULL) { - result = __ptw32_tkAssocCreate (sp, key); + result = ptw32_tkAssocCreate (sp, key); } - __ptw32_mcs_lock_release(&threadLock); - __ptw32_mcs_lock_release(&keyLock); + ptw32_mcs_lock_release(&threadLock); + ptw32_mcs_lock_release(&keyLock); } if (result == 0) diff --git a/pthread_spin_destroy.c b/pthread_spin_destroy.c index c25873a6..bce8ac53 100644 --- a/pthread_spin_destroy.c +++ b/pthread_spin_destroy.c @@ -53,14 +53,14 @@ pthread_spin_destroy (pthread_spinlock_t * lock) if ((s = *lock) != PTHREAD_SPINLOCK_INITIALIZER) { - if (s->interlock == __PTW32_SPIN_USE_MUTEX) + if (s->interlock == PTW32_SPIN_USE_MUTEX) { result = pthread_mutex_destroy (&(s->u.mutex)); } - else if ((__PTW32_INTERLOCKED_LONG) __PTW32_SPIN_UNLOCKED != - __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ((__PTW32_INTERLOCKED_LONGPTR) &s->interlock, - (__PTW32_INTERLOCKED_LONG) __PTW32_SPIN_INVALID, - (__PTW32_INTERLOCKED_LONG) __PTW32_SPIN_UNLOCKED)) + else if ((PTW32_INTERLOCKED_LONG) PTW32_SPIN_UNLOCKED != + PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ((PTW32_INTERLOCKED_LONGPTR) &s->interlock, + (PTW32_INTERLOCKED_LONG) PTW32_SPIN_INVALID, + (PTW32_INTERLOCKED_LONG) PTW32_SPIN_UNLOCKED)) { result = EINVAL; } @@ -78,11 +78,11 @@ pthread_spin_destroy (pthread_spinlock_t * lock) else { /* - * See notes in __ptw32_spinlock_check_need_init() above also. + * See notes in ptw32_spinlock_check_need_init() above also. */ - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; - __ptw32_mcs_lock_acquire(&__ptw32_spinlock_test_init_lock, &node); + ptw32_mcs_lock_acquire(&ptw32_spinlock_test_init_lock, &node); /* * Check again. @@ -106,7 +106,7 @@ pthread_spin_destroy (pthread_spinlock_t * lock) result = EBUSY; } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); } return (result); diff --git a/pthread_spin_init.c b/pthread_spin_init.c index ea760453..ce2b27ae 100644 --- a/pthread_spin_init.c +++ b/pthread_spin_init.c @@ -52,7 +52,7 @@ pthread_spin_init (pthread_spinlock_t * lock, int pshared) return EINVAL; } - if (0 != __ptw32_getprocessors (&cpus)) + if (0 != ptw32_getprocessors (&cpus)) { cpus = 1; } @@ -92,7 +92,7 @@ pthread_spin_init (pthread_spinlock_t * lock, int pshared) if (cpus > 1) { s->u.cpus = cpus; - s->interlock = __PTW32_SPIN_UNLOCKED; + s->interlock = PTW32_SPIN_UNLOCKED; } else { @@ -105,7 +105,7 @@ pthread_spin_init (pthread_spinlock_t * lock, int pshared) result = pthread_mutex_init (&(s->u.mutex), &ma); if (0 == result) { - s->interlock = __PTW32_SPIN_USE_MUTEX; + s->interlock = PTW32_SPIN_USE_MUTEX; } } (void) pthread_mutexattr_destroy (&ma); diff --git a/pthread_spin_lock.c b/pthread_spin_lock.c index 54e7281a..2bc59e26 100644 --- a/pthread_spin_lock.c +++ b/pthread_spin_lock.c @@ -54,7 +54,7 @@ pthread_spin_lock (pthread_spinlock_t * lock) { int result; - if ((result = __ptw32_spinlock_check_need_init (lock)) != 0) + if ((result = ptw32_spinlock_check_need_init (lock)) != 0) { return (result); } @@ -62,18 +62,18 @@ pthread_spin_lock (pthread_spinlock_t * lock) s = *lock; - while ((__PTW32_INTERLOCKED_LONG) __PTW32_SPIN_LOCKED == - __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ((__PTW32_INTERLOCKED_LONGPTR) &s->interlock, - (__PTW32_INTERLOCKED_LONG) __PTW32_SPIN_LOCKED, - (__PTW32_INTERLOCKED_LONG) __PTW32_SPIN_UNLOCKED)) + while ((PTW32_INTERLOCKED_LONG) PTW32_SPIN_LOCKED == + PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ((PTW32_INTERLOCKED_LONGPTR) &s->interlock, + (PTW32_INTERLOCKED_LONG) PTW32_SPIN_LOCKED, + (PTW32_INTERLOCKED_LONG) PTW32_SPIN_UNLOCKED)) { } - if (s->interlock == __PTW32_SPIN_LOCKED) + if (s->interlock == PTW32_SPIN_LOCKED) { return 0; } - else if (s->interlock == __PTW32_SPIN_USE_MUTEX) + else if (s->interlock == PTW32_SPIN_USE_MUTEX) { return pthread_mutex_lock (&(s->u.mutex)); } diff --git a/pthread_spin_trylock.c b/pthread_spin_trylock.c index b177f6af..67f65677 100644 --- a/pthread_spin_trylock.c +++ b/pthread_spin_trylock.c @@ -54,7 +54,7 @@ pthread_spin_trylock (pthread_spinlock_t * lock) { int result; - if ((result = __ptw32_spinlock_check_need_init (lock)) != 0) + if ((result = ptw32_spinlock_check_need_init (lock)) != 0) { return (result); } @@ -63,15 +63,15 @@ pthread_spin_trylock (pthread_spinlock_t * lock) s = *lock; switch ((long) - __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ((__PTW32_INTERLOCKED_LONGPTR) &s->interlock, - (__PTW32_INTERLOCKED_LONG) __PTW32_SPIN_LOCKED, - (__PTW32_INTERLOCKED_LONG) __PTW32_SPIN_UNLOCKED)) + PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ((PTW32_INTERLOCKED_LONGPTR) &s->interlock, + (PTW32_INTERLOCKED_LONG) PTW32_SPIN_LOCKED, + (PTW32_INTERLOCKED_LONG) PTW32_SPIN_UNLOCKED)) { - case __PTW32_SPIN_UNLOCKED: + case PTW32_SPIN_UNLOCKED: return 0; - case __PTW32_SPIN_LOCKED: + case PTW32_SPIN_LOCKED: return EBUSY; - case __PTW32_SPIN_USE_MUTEX: + case PTW32_SPIN_USE_MUTEX: return pthread_mutex_trylock (&(s->u.mutex)); } diff --git a/pthread_spin_unlock.c b/pthread_spin_unlock.c index 5c9d5481..3cb44965 100644 --- a/pthread_spin_unlock.c +++ b/pthread_spin_unlock.c @@ -58,14 +58,14 @@ pthread_spin_unlock (pthread_spinlock_t * lock) } switch ((long) - __PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ((__PTW32_INTERLOCKED_LONGPTR) &s->interlock, - (__PTW32_INTERLOCKED_LONG) __PTW32_SPIN_UNLOCKED, - (__PTW32_INTERLOCKED_LONG) __PTW32_SPIN_LOCKED)) + PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG ((PTW32_INTERLOCKED_LONGPTR) &s->interlock, + (PTW32_INTERLOCKED_LONG) PTW32_SPIN_UNLOCKED, + (PTW32_INTERLOCKED_LONG) PTW32_SPIN_LOCKED)) { - case __PTW32_SPIN_LOCKED: - case __PTW32_SPIN_UNLOCKED: + case PTW32_SPIN_LOCKED: + case PTW32_SPIN_UNLOCKED: return 0; - case __PTW32_SPIN_USE_MUTEX: + case PTW32_SPIN_USE_MUTEX: return pthread_mutex_unlock (&(s->u.mutex)); } diff --git a/pthread_testcancel.c b/pthread_testcancel.c index 999f0e80..b475a98e 100644 --- a/pthread_testcancel.c +++ b/pthread_testcancel.c @@ -70,9 +70,9 @@ pthread_testcancel (void) * ------------------------------------------------------ */ { - __ptw32_mcs_local_node_t stateLock; + ptw32_mcs_local_node_t stateLock; pthread_t self = pthread_self (); - __ptw32_thread_t * sp = (__ptw32_thread_t *) self.p; + ptw32_thread_t * sp = (ptw32_thread_t *) self.p; if (sp == NULL) { @@ -89,17 +89,17 @@ pthread_testcancel (void) return; } - __ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); + ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); if (sp->cancelState != PTHREAD_CANCEL_DISABLE) { ResetEvent(sp->cancelEvent); sp->state = PThreadStateCanceling; sp->cancelState = PTHREAD_CANCEL_DISABLE; - __ptw32_mcs_lock_release (&stateLock); - __ptw32_throw (__PTW32_EPS_CANCEL); + ptw32_mcs_lock_release (&stateLock); + ptw32_throw (PTW32_EPS_CANCEL); /* Never returns here */ } - __ptw32_mcs_lock_release (&stateLock); + ptw32_mcs_lock_release (&stateLock); } /* pthread_testcancel */ diff --git a/pthread_timechange_handler_np.c b/pthread_timechange_handler_np.c index c1b92e2b..d34d0a3a 100644 --- a/pthread_timechange_handler_np.c +++ b/pthread_timechange_handler_np.c @@ -92,11 +92,11 @@ pthread_timechange_handler_np (void *arg) { int result = 0; pthread_cond_t cv; - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; - __ptw32_mcs_lock_acquire(&__ptw32_cond_list_lock, &node); + ptw32_mcs_lock_acquire(&ptw32_cond_list_lock, &node); - cv = __ptw32_cond_list_head; + cv = ptw32_cond_list_head; while (cv != NULL && 0 == result) { @@ -104,7 +104,7 @@ pthread_timechange_handler_np (void *arg) cv = cv->next; } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); return (void *) (size_t) (result != 0 ? EAGAIN : 0); } diff --git a/pthread_timedjoin_np.c b/pthread_timedjoin_np.c index ab2898ae..de341d89 100644 --- a/pthread_timedjoin_np.c +++ b/pthread_timedjoin_np.c @@ -100,8 +100,8 @@ pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec int result; pthread_t self; DWORD milliseconds; - __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; - __ptw32_mcs_local_node_t node; + ptw32_thread_t * tp = (ptw32_thread_t *) thread.p; + ptw32_mcs_local_node_t node; if (abstime == NULL) { @@ -112,10 +112,10 @@ pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec /* * Calculate timeout as milliseconds from current system time. */ - milliseconds = __ptw32_relmillisecs (abstime); + milliseconds = ptw32_relmillisecs (abstime); } - __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); + ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &node); if (NULL == tp || thread.x != tp->ptHandle.x) @@ -131,7 +131,7 @@ pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec result = 0; } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); if (result == 0) { diff --git a/pthread_tryjoin_np.c b/pthread_tryjoin_np.c index aa9861d4..56a148c4 100644 --- a/pthread_tryjoin_np.c +++ b/pthread_tryjoin_np.c @@ -93,10 +93,10 @@ pthread_tryjoin_np (pthread_t thread, void **value_ptr) { int result; pthread_t self; - __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; - __ptw32_mcs_local_node_t node; + ptw32_thread_t * tp = (ptw32_thread_t *) thread.p; + ptw32_mcs_local_node_t node; - __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); + ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &node); if (NULL == tp || thread.x != tp->ptHandle.x) @@ -112,7 +112,7 @@ pthread_tryjoin_np (pthread_t thread, void **value_ptr) result = 0; } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); if (result == 0) { diff --git a/pthread_win32_attach_detach_np.c b/pthread_win32_attach_detach_np.c index b7f16cb1..3b33816f 100644 --- a/pthread_win32_attach_detach_np.c +++ b/pthread_win32_attach_detach_np.c @@ -39,14 +39,14 @@ #include "pthread.h" #include "implement.h" #include -#if ! (defined(__GNUC__) || defined (__PTW32_CONFIG_MSVC7) || defined(WINCE)) +#if ! (defined(__GNUC__) || defined (PTW32_CONFIG_MSVC7) || defined(WINCE)) # include #endif /* * Handle to quserex.dll */ -static HINSTANCE __ptw32_h_quserex; +static HINSTANCE ptw32_h_quserex; BOOL pthread_win32_process_attach_np () @@ -54,19 +54,19 @@ pthread_win32_process_attach_np () TCHAR QuserExDLLPathBuf[1024]; BOOL result = TRUE; - result = __ptw32_processInitialize (); + result = ptw32_processInitialize (); #if defined(_UWIN) pthread_count++; #endif #if defined(__GNUC__) - __ptw32_features = 0; + ptw32_features = 0; #else /* * This is obsolete now. */ - __ptw32_features = __PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE; + ptw32_features = PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE; #endif /* @@ -76,44 +76,44 @@ pthread_win32_process_attach_np () * * This should take care of any security issues. */ -#if defined(__GNUC__) || defined (__PTW32_CONFIG_MSVC7) +#if defined(__GNUC__) || defined (PTW32_CONFIG_MSVC7) if(GetSystemDirectory(QuserExDLLPathBuf, sizeof(QuserExDLLPathBuf))) { (void) strncat(QuserExDLLPathBuf, "\\QUSEREX.DLL", sizeof(QuserExDLLPathBuf) - strlen(QuserExDLLPathBuf) - 1); - __ptw32_h_quserex = LoadLibrary(QuserExDLLPathBuf); + ptw32_h_quserex = LoadLibrary(QuserExDLLPathBuf); } #else # if ! defined(WINCE) if(GetSystemDirectory(QuserExDLLPathBuf, sizeof(QuserExDLLPathBuf)/sizeof(TCHAR)) && 0 == _tcsncat_s(QuserExDLLPathBuf, _countof(QuserExDLLPathBuf), TEXT("\\QUSEREX.DLL"), 12)) { - __ptw32_h_quserex = LoadLibrary(QuserExDLLPathBuf); + ptw32_h_quserex = LoadLibrary(QuserExDLLPathBuf); } # endif #endif - if (__ptw32_h_quserex != NULL) + if (ptw32_h_quserex != NULL) { - __ptw32_register_cancellation = (DWORD (*)(PAPCFUNC, HANDLE, DWORD)) + ptw32_register_cancellation = (DWORD (*)(PAPCFUNC, HANDLE, DWORD)) #if defined(NEED_UNICODE_CONSTS) - GetProcAddress (__ptw32_h_quserex, + GetProcAddress (ptw32_h_quserex, (const TCHAR *) TEXT ("QueueUserAPCEx")); #else - GetProcAddress (__ptw32_h_quserex, (LPCSTR) "QueueUserAPCEx"); + GetProcAddress (ptw32_h_quserex, (LPCSTR) "QueueUserAPCEx"); #endif } - if (NULL == __ptw32_register_cancellation) + if (NULL == ptw32_register_cancellation) { - __ptw32_register_cancellation = __ptw32_Registercancellation; + ptw32_register_cancellation = ptw32_Registercancellation; - if (__ptw32_h_quserex != NULL) + if (ptw32_h_quserex != NULL) { - (void) FreeLibrary (__ptw32_h_quserex); + (void) FreeLibrary (ptw32_h_quserex); } - __ptw32_h_quserex = 0; + ptw32_h_quserex = 0; } else { @@ -122,24 +122,24 @@ pthread_win32_process_attach_np () queue_user_apc_ex_init = (BOOL (*)(VOID)) #if defined(NEED_UNICODE_CONSTS) - GetProcAddress (__ptw32_h_quserex, + GetProcAddress (ptw32_h_quserex, (const TCHAR *) TEXT ("QueueUserAPCEx_Init")); #else - GetProcAddress (__ptw32_h_quserex, (LPCSTR) "QueueUserAPCEx_Init"); + GetProcAddress (ptw32_h_quserex, (LPCSTR) "QueueUserAPCEx_Init"); #endif if (queue_user_apc_ex_init == NULL || !queue_user_apc_ex_init ()) { - __ptw32_register_cancellation = __ptw32_Registercancellation; + ptw32_register_cancellation = ptw32_Registercancellation; - (void) FreeLibrary (__ptw32_h_quserex); - __ptw32_h_quserex = 0; + (void) FreeLibrary (ptw32_h_quserex); + ptw32_h_quserex = 0; } } - if (__ptw32_h_quserex) + if (ptw32_h_quserex) { - __ptw32_features |= __PTW32_ALERTABLE_ASYNC_CANCEL; + ptw32_features |= PTW32_ALERTABLE_ASYNC_CANCEL; } return result; @@ -149,9 +149,9 @@ pthread_win32_process_attach_np () BOOL pthread_win32_process_detach_np () { - if (__ptw32_processInitialized) + if (ptw32_processInitialized) { - __ptw32_thread_t * sp = (__ptw32_thread_t *) pthread_getspecific (__ptw32_selfThreadKey); + ptw32_thread_t * sp = (ptw32_thread_t *) pthread_getspecific (ptw32_selfThreadKey); if (sp != NULL) { @@ -161,10 +161,10 @@ pthread_win32_process_detach_np () */ if (sp->detachState == PTHREAD_CREATE_DETACHED) { - __ptw32_threadDestroy (sp->ptHandle); - if (__ptw32_selfThreadKey) + ptw32_threadDestroy (sp->ptHandle); + if (ptw32_selfThreadKey) { - TlsSetValue (__ptw32_selfThreadKey->key, NULL); + TlsSetValue (ptw32_selfThreadKey->key, NULL); } } } @@ -172,26 +172,26 @@ pthread_win32_process_detach_np () /* * The DLL is being unmapped from the process's address space */ - __ptw32_processTerminate (); + ptw32_processTerminate (); - if (__ptw32_h_quserex) + if (ptw32_h_quserex) { /* Close QueueUserAPCEx */ BOOL (*queue_user_apc_ex_fini) (VOID); queue_user_apc_ex_fini = (BOOL (*)(VOID)) #if defined(NEED_UNICODE_CONSTS) - GetProcAddress (__ptw32_h_quserex, + GetProcAddress (ptw32_h_quserex, (const TCHAR *) TEXT ("QueueUserAPCEx_Fini")); #else - GetProcAddress (__ptw32_h_quserex, (LPCSTR) "QueueUserAPCEx_Fini"); + GetProcAddress (ptw32_h_quserex, (LPCSTR) "QueueUserAPCEx_Fini"); #endif if (queue_user_apc_ex_fini != NULL) { (void) queue_user_apc_ex_fini (); } - (void) FreeLibrary (__ptw32_h_quserex); + (void) FreeLibrary (ptw32_h_quserex); } } @@ -207,26 +207,26 @@ pthread_win32_thread_attach_np () BOOL pthread_win32_thread_detach_np () { - if (__ptw32_processInitialized) + if (ptw32_processInitialized) { /* * Don't use pthread_self() - to avoid creating an implicit POSIX thread handle * unnecessarily. */ - __ptw32_thread_t * sp = (__ptw32_thread_t *) pthread_getspecific (__ptw32_selfThreadKey); + ptw32_thread_t * sp = (ptw32_thread_t *) pthread_getspecific (ptw32_selfThreadKey); if (sp != NULL) // otherwise Win32 thread with no implicit POSIX handle. { - __ptw32_mcs_local_node_t stateLock; - __ptw32_callUserDestroyRoutines (sp->ptHandle); + ptw32_mcs_local_node_t stateLock; + ptw32_callUserDestroyRoutines (sp->ptHandle); - __ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); + ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); sp->state = PThreadStateLast; /* * If the thread is joinable at this point then it MUST be joined * or detached explicitly by the application. */ - __ptw32_mcs_lock_release (&stateLock); + ptw32_mcs_lock_release (&stateLock); /* * Robust Mutexes @@ -234,10 +234,10 @@ pthread_win32_thread_detach_np () while (sp->robustMxList != NULL) { pthread_mutex_t mx = sp->robustMxList->mx; - __ptw32_robust_mutex_remove(&mx, sp); - (void) __PTW32_INTERLOCKED_EXCHANGE_LONG( - (__PTW32_INTERLOCKED_LONGPTR)&mx->robustNode->stateInconsistent, - (__PTW32_INTERLOCKED_LONG)-1); + ptw32_robust_mutex_remove(&mx, sp); + (void) PTW32_INTERLOCKED_EXCHANGE_LONG( + (PTW32_INTERLOCKED_LONGPTR)&mx->robustNode->stateInconsistent, + (PTW32_INTERLOCKED_LONG)-1); /* * If there are no waiters then the next thread to block will * sleep, wake up immediately and then go back to sleep. @@ -249,11 +249,11 @@ pthread_win32_thread_detach_np () if (sp->detachState == PTHREAD_CREATE_DETACHED) { - __ptw32_threadDestroy (sp->ptHandle); + ptw32_threadDestroy (sp->ptHandle); - if (__ptw32_selfThreadKey) + if (ptw32_selfThreadKey) { - TlsSetValue (__ptw32_selfThreadKey->key, NULL); + TlsSetValue (ptw32_selfThreadKey->key, NULL); } } } @@ -265,5 +265,5 @@ pthread_win32_thread_detach_np () BOOL pthread_win32_test_features_np (int feature_mask) { - return ((__ptw32_features & feature_mask) == feature_mask); + return ((ptw32_features & feature_mask) == feature_mask); } diff --git a/ptw32_MCS_lock.c b/ptw32_MCS_lock.c index 2f121073..1f7fe89f 100644 --- a/ptw32_MCS_lock.c +++ b/ptw32_MCS_lock.c @@ -56,33 +56,33 @@ * * Usage of MCS locks: * - * - you need a global __ptw32_mcs_lock_t instance initialised to 0 or NULL. - * - you need a local thread-scope __ptw32_mcs_local_node_t instance, which + * - you need a global ptw32_mcs_lock_t instance initialised to 0 or NULL. + * - you need a local thread-scope ptw32_mcs_local_node_t instance, which * may serve several different locks but you need at least one node for * every lock held concurrently by a thread. * * E.g.: * - * __ptw32_mcs_lock_t lock1 = 0; - * __ptw32_mcs_lock_t lock2 = 0; + * ptw32_mcs_lock_t lock1 = 0; + * ptw32_mcs_lock_t lock2 = 0; * * void *mythread(void *arg) * { - * __ptw32_mcs_local_node_t node; + * ptw32_mcs_local_node_t node; * - * __ptw32_mcs_acquire (&lock1, &node); - * __ptw32_mcs_lock_release (&node); + * ptw32_mcs_acquire (&lock1, &node); + * ptw32_mcs_lock_release (&node); * - * __ptw32_mcs_lock_acquire (&lock2, &node); - * __ptw32_mcs_lock_release (&node); + * ptw32_mcs_lock_acquire (&lock2, &node); + * ptw32_mcs_lock_release (&node); * { - * __ptw32_mcs_local_node_t nodex; + * ptw32_mcs_local_node_t nodex; * - * __ptw32_mcs_lock_acquire (&lock1, &node); - * __ptw32_mcs_lock_acquire (&lock2, &nodex); + * ptw32_mcs_lock_acquire (&lock1, &node); + * ptw32_mcs_lock_acquire (&lock2, &nodex); * - * __ptw32_mcs_lock_release (&nodex); - * __ptw32_mcs_lock_release (&node); + * ptw32_mcs_lock_release (&nodex); + * ptw32_mcs_lock_release (&node); * } * return (void *)0; * } @@ -98,18 +98,18 @@ #include "implement.h" /* - * __ptw32_mcs_flag_set -- notify another thread about an event. + * ptw32_mcs_flag_set -- notify another thread about an event. * * Set event if an event handle has been stored in the flag, and * set flag to -1 otherwise. Note that -1 cannot be a valid handle value. */ INLINE void -__ptw32_mcs_flag_set (HANDLE * flag) +ptw32_mcs_flag_set (HANDLE * flag) { - HANDLE e = (HANDLE) (__PTW32_INTERLOCKED_SIZE)__PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE( - (__PTW32_INTERLOCKED_SIZEPTR)flag, - (__PTW32_INTERLOCKED_SIZE)-1, - (__PTW32_INTERLOCKED_SIZE)0); + HANDLE e = (HANDLE) (PTW32_INTERLOCKED_SIZE)PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE( + (PTW32_INTERLOCKED_SIZEPTR)flag, + (PTW32_INTERLOCKED_SIZE)-1, + (PTW32_INTERLOCKED_SIZE)0); /* * NOTE: when e == -1 and the MSVC debugger is attached to * the process, we get an exception that halts the @@ -128,26 +128,26 @@ __ptw32_mcs_flag_set (HANDLE * flag) } /* - * __ptw32_mcs_flag_wait -- wait for notification from another. + * ptw32_mcs_flag_wait -- wait for notification from another. * * Store an event handle in the flag and wait on it if the flag has not been * set, and proceed without creating an event otherwise. */ INLINE void -__ptw32_mcs_flag_wait (HANDLE * flag) +ptw32_mcs_flag_wait (HANDLE * flag) { - if ((__PTW32_INTERLOCKED_SIZE)0 == - __PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE ((__PTW32_INTERLOCKED_SIZEPTR)flag, - (__PTW32_INTERLOCKED_SIZE)0)) /* MBR fence */ + if ((PTW32_INTERLOCKED_SIZE)0 == + PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE((PTW32_INTERLOCKED_SIZEPTR)flag, + (PTW32_INTERLOCKED_SIZE)0)) /* MBR fence */ { /* the flag is not set. create event. */ - HANDLE e = CreateEvent(NULL, __PTW32_FALSE, __PTW32_FALSE, NULL); + HANDLE e = CreateEvent(NULL, PTW32_FALSE, PTW32_FALSE, NULL); - if ((__PTW32_INTERLOCKED_SIZE)0 == __PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE( - (__PTW32_INTERLOCKED_SIZEPTR)flag, - (__PTW32_INTERLOCKED_SIZE)e, - (__PTW32_INTERLOCKED_SIZE)0)) + if ((PTW32_INTERLOCKED_SIZE)0 == PTW32_INTERLOCKED_COMPARE_EXCHANGE_SIZE( + (PTW32_INTERLOCKED_SIZEPTR)flag, + (PTW32_INTERLOCKED_SIZE)e, + (PTW32_INTERLOCKED_SIZE)0)) { /* stored handle in the flag. wait on it now. */ WaitForSingleObject(e, INFINITE); @@ -158,20 +158,20 @@ __ptw32_mcs_flag_wait (HANDLE * flag) } /* - * __ptw32_mcs_lock_acquire -- acquire an MCS lock. + * ptw32_mcs_lock_acquire -- acquire an MCS lock. * * See: * J. M. Mellor-Crummey and M. L. Scott. * Algorithms for Scalable Synchronization on Shared-Memory Multiprocessors. * ACM Transactions on Computer Systems, 9(1):21-65, Feb. 1991. */ -#if defined (__PTW32_BUILD_INLINED) +#if defined(PTW32_BUILD_INLINED) INLINE -#endif /* __PTW32_BUILD_INLINED */ +#endif /* PTW32_BUILD_INLINED */ void -__ptw32_mcs_lock_acquire (__ptw32_mcs_lock_t * lock, __ptw32_mcs_local_node_t * node) +ptw32_mcs_lock_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node) { - __ptw32_mcs_local_node_t *pred; + ptw32_mcs_local_node_t *pred; node->lock = lock; node->nextFlag = 0; @@ -179,87 +179,87 @@ __ptw32_mcs_lock_acquire (__ptw32_mcs_lock_t * lock, __ptw32_mcs_local_node_t * node->next = 0; /* initially, no successor */ /* queue for the lock */ - pred = (__ptw32_mcs_local_node_t *)__PTW32_INTERLOCKED_EXCHANGE_PTR ((__PTW32_INTERLOCKED_PVOID_PTR)lock, - (__PTW32_INTERLOCKED_PVOID)node); + pred = (ptw32_mcs_local_node_t *)PTW32_INTERLOCKED_EXCHANGE_PTR((PTW32_INTERLOCKED_PVOID_PTR)lock, + (PTW32_INTERLOCKED_PVOID)node); if (0 != pred) { /* the lock was not free. link behind predecessor. */ - __PTW32_INTERLOCKED_EXCHANGE_PTR ((__PTW32_INTERLOCKED_PVOID_PTR)&pred->next, (__PTW32_INTERLOCKED_PVOID)node); - __ptw32_mcs_flag_set(&pred->nextFlag); - __ptw32_mcs_flag_wait(&node->readyFlag); + PTW32_INTERLOCKED_EXCHANGE_PTR ((PTW32_INTERLOCKED_PVOID_PTR)&pred->next, (PTW32_INTERLOCKED_PVOID)node); + ptw32_mcs_flag_set(&pred->nextFlag); + ptw32_mcs_flag_wait(&node->readyFlag); } } /* - * __ptw32_mcs_lock_release -- release an MCS lock. + * ptw32_mcs_lock_release -- release an MCS lock. * * See: * J. M. Mellor-Crummey and M. L. Scott. * Algorithms for Scalable Synchronization on Shared-Memory Multiprocessors. * ACM Transactions on Computer Systems, 9(1):21-65, Feb. 1991. */ -#if defined (__PTW32_BUILD_INLINED) +#if defined(PTW32_BUILD_INLINED) INLINE -#endif /* __PTW32_BUILD_INLINED */ +#endif /* PTW32_BUILD_INLINED */ void -__ptw32_mcs_lock_release (__ptw32_mcs_local_node_t * node) +ptw32_mcs_lock_release (ptw32_mcs_local_node_t * node) { - __ptw32_mcs_lock_t *lock = node->lock; - __ptw32_mcs_local_node_t *next = - (__ptw32_mcs_local_node_t *) - __PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE ((__PTW32_INTERLOCKED_SIZEPTR)&node->next, (__PTW32_INTERLOCKED_SIZE)0); /* MBR fence */ + ptw32_mcs_lock_t *lock = node->lock; + ptw32_mcs_local_node_t *next = + (ptw32_mcs_local_node_t *) + PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE((PTW32_INTERLOCKED_SIZEPTR)&node->next, (PTW32_INTERLOCKED_SIZE)0); /* MBR fence */ if (0 == next) { /* no known successor */ - if (node == (__ptw32_mcs_local_node_t *) - __PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR ((__PTW32_INTERLOCKED_PVOID_PTR)lock, - (__PTW32_INTERLOCKED_PVOID)0, - (__PTW32_INTERLOCKED_PVOID)node)) + if (node == (ptw32_mcs_local_node_t *) + PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR((PTW32_INTERLOCKED_PVOID_PTR)lock, + (PTW32_INTERLOCKED_PVOID)0, + (PTW32_INTERLOCKED_PVOID)node)) { /* no successor, lock is free now */ return; } /* wait for successor */ - __ptw32_mcs_flag_wait(&node->nextFlag); - next = (__ptw32_mcs_local_node_t *) - __PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE ((__PTW32_INTERLOCKED_SIZEPTR)&node->next, (__PTW32_INTERLOCKED_SIZE)0); /* MBR fence */ + ptw32_mcs_flag_wait(&node->nextFlag); + next = (ptw32_mcs_local_node_t *) + PTW32_INTERLOCKED_EXCHANGE_ADD_SIZE ((PTW32_INTERLOCKED_SIZEPTR)&node->next, (PTW32_INTERLOCKED_SIZE)0); /* MBR fence */ } else { /* Even if the next is non-0, the successor may still be trying to set the next flag on us, therefore we must wait. */ - __ptw32_mcs_flag_wait(&node->nextFlag); + ptw32_mcs_flag_wait(&node->nextFlag); } /* pass the lock */ - __ptw32_mcs_flag_set(&next->readyFlag); + ptw32_mcs_flag_set(&next->readyFlag); } /* - * __ptw32_mcs_lock_try_acquire + * ptw32_mcs_lock_try_acquire */ -#if defined (__PTW32_BUILD_INLINED) +#if defined(PTW32_BUILD_INLINED) INLINE -#endif /* __PTW32_BUILD_INLINED */ +#endif /* PTW32_BUILD_INLINED */ int -__ptw32_mcs_lock_try_acquire (__ptw32_mcs_lock_t * lock, __ptw32_mcs_local_node_t * node) +ptw32_mcs_lock_try_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node) { node->lock = lock; node->nextFlag = 0; node->readyFlag = 0; node->next = 0; /* initially, no successor */ - return ((__PTW32_INTERLOCKED_PVOID)__PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR ((__PTW32_INTERLOCKED_PVOID_PTR)lock, - (__PTW32_INTERLOCKED_PVOID)node, - (__PTW32_INTERLOCKED_PVOID)0) - == (__PTW32_INTERLOCKED_PVOID)0) ? 0 : EBUSY; + return ((PTW32_INTERLOCKED_PVOID)PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR((PTW32_INTERLOCKED_PVOID_PTR)lock, + (PTW32_INTERLOCKED_PVOID)node, + (PTW32_INTERLOCKED_PVOID)0) + == (PTW32_INTERLOCKED_PVOID)0) ? 0 : EBUSY; } /* - * __ptw32_mcs_node_transfer -- move an MCS lock local node, usually from thread + * ptw32_mcs_node_transfer -- move an MCS lock local node, usually from thread * space to, for example, global space so that another thread can release * the lock on behalf of the current lock owner. * @@ -269,20 +269,20 @@ __ptw32_mcs_lock_try_acquire (__ptw32_mcs_lock_t * lock, __ptw32_mcs_local_node_ * * Should only be called by the thread that has the lock. */ -#if defined (__PTW32_BUILD_INLINED) +#if defined(PTW32_BUILD_INLINED) INLINE -#endif /* __PTW32_BUILD_INLINED */ +#endif /* PTW32_BUILD_INLINED */ void -__ptw32_mcs_node_transfer (__ptw32_mcs_local_node_t * new_node, __ptw32_mcs_local_node_t * old_node) +ptw32_mcs_node_transfer (ptw32_mcs_local_node_t * new_node, ptw32_mcs_local_node_t * old_node) { new_node->lock = old_node->lock; new_node->nextFlag = 0; /* Not needed - used only in initial Acquire */ new_node->readyFlag = 0; /* Not needed - we were waiting on this */ new_node->next = 0; - if ((__ptw32_mcs_local_node_t *)__PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR ((__PTW32_INTERLOCKED_PVOID_PTR)new_node->lock, - (__PTW32_INTERLOCKED_PVOID)new_node, - (__PTW32_INTERLOCKED_PVOID)old_node) + if ((ptw32_mcs_local_node_t *)PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR((PTW32_INTERLOCKED_PVOID_PTR)new_node->lock, + (PTW32_INTERLOCKED_PVOID)new_node, + (PTW32_INTERLOCKED_PVOID)old_node) != old_node) { /* @@ -294,7 +294,7 @@ __ptw32_mcs_node_transfer (__ptw32_mcs_local_node_t * new_node, __ptw32_mcs_loca } /* we must wait for the next Node to finish inserting itself. */ - __ptw32_mcs_flag_wait(&old_node->nextFlag); + ptw32_mcs_flag_wait(&old_node->nextFlag); /* * Copy the nextFlag state also so we don't block on it when releasing * this lock. diff --git a/ptw32_callUserDestroyRoutines.c b/ptw32_callUserDestroyRoutines.c index 9d85e050..b82e5860 100644 --- a/ptw32_callUserDestroyRoutines.c +++ b/ptw32_callUserDestroyRoutines.c @@ -40,7 +40,7 @@ #include "pthread.h" #include "implement.h" -#if defined(__PTW32_CLEANUP_CXX) +#if defined(PTW32_CLEANUP_CXX) # if defined(_MSC_VER) # include # elif defined(__WATCOMC__) @@ -58,7 +58,7 @@ #endif void -__ptw32_callUserDestroyRoutines (pthread_t thread) +ptw32_callUserDestroyRoutines (pthread_t thread) /* * ------------------------------------------------------------------- * DOCPRIVATE @@ -80,11 +80,11 @@ __ptw32_callUserDestroyRoutines (pthread_t thread) if (thread.p != NULL) { - __ptw32_mcs_local_node_t threadLock; - __ptw32_mcs_local_node_t keyLock; + ptw32_mcs_local_node_t threadLock; + ptw32_mcs_local_node_t keyLock; int assocsRemaining; int iterations = 0; - __ptw32_thread_t * sp = (__ptw32_thread_t *) thread.p; + ptw32_thread_t * sp = (ptw32_thread_t *) thread.p; /* * Run through all Thread<-->Key associations @@ -97,7 +97,7 @@ __ptw32_callUserDestroyRoutines (pthread_t thread) assocsRemaining = 0; iterations++; - __ptw32_mcs_lock_acquire(&(sp->threadLock), &threadLock); + ptw32_mcs_lock_acquire(&(sp->threadLock), &threadLock); /* * The pointer to the next assoc is stored in the thread struct so that * the assoc destructor in pthread_key_delete can adjust it @@ -107,7 +107,7 @@ __ptw32_callUserDestroyRoutines (pthread_t thread) * before us. */ sp->nextAssoc = sp->keys; - __ptw32_mcs_lock_release(&threadLock); + ptw32_mcs_lock_release(&threadLock); for (;;) { @@ -120,12 +120,12 @@ __ptw32_callUserDestroyRoutines (pthread_t thread) * both assoc guards, but in the reverse order to our convention, * so we must be careful to avoid deadlock. */ - __ptw32_mcs_lock_acquire(&(sp->threadLock), &threadLock); + ptw32_mcs_lock_acquire(&(sp->threadLock), &threadLock); if ((assoc = (ThreadKeyAssoc *)sp->nextAssoc) == NULL) { /* Finished */ - __ptw32_mcs_lock_release(&threadLock); + ptw32_mcs_lock_release(&threadLock); break; } else @@ -140,9 +140,9 @@ __ptw32_callUserDestroyRoutines (pthread_t thread) * If we fail, we need to relinquish the first lock and the * processor and then try to acquire them all again. */ - if (__ptw32_mcs_lock_try_acquire(&(assoc->key->keyLock), &keyLock) == EBUSY) + if (ptw32_mcs_lock_try_acquire(&(assoc->key->keyLock), &keyLock) == EBUSY) { - __ptw32_mcs_lock_release(&threadLock); + ptw32_mcs_lock_release(&threadLock); Sleep(0); /* * Go around again. @@ -179,8 +179,8 @@ __ptw32_callUserDestroyRoutines (pthread_t thread) * pthread_setspecific can also be run from destructors and * also needs to be able to access the assocs. */ - __ptw32_mcs_lock_release(&threadLock); - __ptw32_mcs_lock_release(&keyLock); + ptw32_mcs_lock_release(&threadLock); + ptw32_mcs_lock_release(&keyLock); assocsRemaining++; @@ -223,12 +223,12 @@ __ptw32_callUserDestroyRoutines (pthread_t thread) * Remove association from both the key and thread chains * and reclaim it's memory resources. */ - __ptw32_tkAssocDestroy (assoc); - __ptw32_mcs_lock_release(&threadLock); - __ptw32_mcs_lock_release(&keyLock); + ptw32_tkAssocDestroy (assoc); + ptw32_mcs_lock_release(&threadLock); + ptw32_mcs_lock_release(&keyLock); } } } while (assocsRemaining); } -} /* __ptw32_callUserDestroyRoutines */ +} /* ptw32_callUserDestroyRoutines */ diff --git a/ptw32_calloc.c b/ptw32_calloc.c index 926801c0..5874793a 100644 --- a/ptw32_calloc.c +++ b/ptw32_calloc.c @@ -42,7 +42,7 @@ #if defined(NEED_CALLOC) void * -__ptw32_calloc (size_t n, size_t s) +ptw32_calloc (size_t n, size_t s) { unsigned int m = n * s; void *p; diff --git a/ptw32_cond_check_need_init.c b/ptw32_cond_check_need_init.c index 1e849d01..85032b87 100644 --- a/ptw32_cond_check_need_init.c +++ b/ptw32_cond_check_need_init.c @@ -42,16 +42,16 @@ INLINE int -__ptw32_cond_check_need_init (pthread_cond_t * cond) +ptw32_cond_check_need_init (pthread_cond_t * cond) { int result = 0; - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; /* * The following guarded test is specifically for statically * initialised condition variables (via PTHREAD_OBJECT_INITIALIZER). */ - __ptw32_mcs_lock_acquire(&__ptw32_cond_test_init_lock, &node); + ptw32_mcs_lock_acquire(&ptw32_cond_test_init_lock, &node); /* * We got here possibly under race @@ -74,7 +74,7 @@ __ptw32_cond_check_need_init (pthread_cond_t * cond) result = EINVAL; } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); return result; } diff --git a/ptw32_getprocessors.c b/ptw32_getprocessors.c index 1f524159..453fa87c 100644 --- a/ptw32_getprocessors.c +++ b/ptw32_getprocessors.c @@ -42,7 +42,7 @@ /* - * __ptw32_getprocessors() + * ptw32_getprocessors() * * Get the number of CPUs available to the process. * @@ -55,7 +55,7 @@ * newly initialised spinlocks will notice. */ int -__ptw32_getprocessors (int *count) +ptw32_getprocessors (int *count) { DWORD_PTR vProcessCPUs; DWORD_PTR vSystemCPUs; diff --git a/ptw32_is_attr.c b/ptw32_is_attr.c index f8fe0778..858d25f4 100644 --- a/ptw32_is_attr.c +++ b/ptw32_is_attr.c @@ -40,10 +40,10 @@ #include "implement.h" int -__ptw32_is_attr (const pthread_attr_t * attr) +ptw32_is_attr (const pthread_attr_t * attr) { /* Return 0 if the attr object is valid, non-zero otherwise. */ return (attr == NULL || - *attr == NULL || (*attr)->valid != __PTW32_ATTR_VALID); + *attr == NULL || (*attr)->valid != PTW32_ATTR_VALID); } diff --git a/ptw32_mutex_check_need_init.c b/ptw32_mutex_check_need_init.c index c7b1301d..4e9e7b8d 100644 --- a/ptw32_mutex_check_need_init.c +++ b/ptw32_mutex_check_need_init.c @@ -39,22 +39,22 @@ #include "pthread.h" #include "implement.h" -static struct pthread_mutexattr_t_ __ptw32_recursive_mutexattr_s = +static struct pthread_mutexattr_t_ ptw32_recursive_mutexattr_s = {PTHREAD_PROCESS_PRIVATE, PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_STALLED}; -static struct pthread_mutexattr_t_ __ptw32_errorcheck_mutexattr_s = +static struct pthread_mutexattr_t_ ptw32_errorcheck_mutexattr_s = {PTHREAD_PROCESS_PRIVATE, PTHREAD_MUTEX_ERRORCHECK, PTHREAD_MUTEX_STALLED}; -static pthread_mutexattr_t __ptw32_recursive_mutexattr = &__ptw32_recursive_mutexattr_s; -static pthread_mutexattr_t __ptw32_errorcheck_mutexattr = &__ptw32_errorcheck_mutexattr_s; +static pthread_mutexattr_t ptw32_recursive_mutexattr = &ptw32_recursive_mutexattr_s; +static pthread_mutexattr_t ptw32_errorcheck_mutexattr = &ptw32_errorcheck_mutexattr_s; INLINE int -__ptw32_mutex_check_need_init (pthread_mutex_t * mutex) +ptw32_mutex_check_need_init (pthread_mutex_t * mutex) { register int result = 0; register pthread_mutex_t mtx; - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; - __ptw32_mcs_lock_acquire(&__ptw32_mutex_test_init_lock, &node); + ptw32_mcs_lock_acquire(&ptw32_mutex_test_init_lock, &node); /* * We got here possibly under race @@ -72,11 +72,11 @@ __ptw32_mutex_check_need_init (pthread_mutex_t * mutex) } else if (mtx == PTHREAD_RECURSIVE_MUTEX_INITIALIZER) { - result = pthread_mutex_init (mutex, &__ptw32_recursive_mutexattr); + result = pthread_mutex_init (mutex, &ptw32_recursive_mutexattr); } else if (mtx == PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) { - result = pthread_mutex_init (mutex, &__ptw32_errorcheck_mutexattr); + result = pthread_mutex_init (mutex, &ptw32_errorcheck_mutexattr); } else if (mtx == NULL) { @@ -88,7 +88,7 @@ __ptw32_mutex_check_need_init (pthread_mutex_t * mutex) result = EINVAL; } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); return (result); } diff --git a/ptw32_new.c b/ptw32_new.c index 767fba6e..33d03365 100644 --- a/ptw32_new.c +++ b/ptw32_new.c @@ -41,38 +41,38 @@ pthread_t -__ptw32_new (void) +ptw32_new (void) { pthread_t t; pthread_t nil = {NULL, 0}; - __ptw32_thread_t * tp; + ptw32_thread_t * tp; /* * If there's a reusable pthread_t then use it. */ - t = __ptw32_threadReusePop (); + t = ptw32_threadReusePop (); if (NULL != t.p) { - tp = (__ptw32_thread_t *) t.p; + tp = (ptw32_thread_t *) t.p; } else { /* No reuse threads available */ - tp = (__ptw32_thread_t *) calloc (1, sizeof(__ptw32_thread_t)); + tp = (ptw32_thread_t *) calloc (1, sizeof(ptw32_thread_t)); if (tp == NULL) { return nil; } - /* ptHandle.p needs to point to it's parent __ptw32_thread_t. */ + /* ptHandle.p needs to point to it's parent ptw32_thread_t. */ t.p = tp->ptHandle.p = tp; t.x = tp->ptHandle.x = 0; } /* Set default state. */ - tp->seqNumber = ++__ptw32_threadSeqNumber; + tp->seqNumber = ++ptw32_threadSeqNumber; tp->sched_priority = THREAD_PRIORITY_NORMAL; tp->detachState = PTHREAD_CREATE_JOINABLE; tp->cancelState = PTHREAD_CANCEL_ENABLE; @@ -85,16 +85,15 @@ __ptw32_new (void) #if defined(HAVE_CPU_AFFINITY) CPU_ZERO((cpu_set_t*)&tp->cpuset); #endif - tp->cancelEvent = CreateEvent (0, (int) __PTW32_TRUE, /* manualReset */ - (int) __PTW32_FALSE, /* setSignaled */ + tp->cancelEvent = CreateEvent (0, (int) PTW32_TRUE, /* manualReset */ + (int) PTW32_FALSE, /* setSignaled */ NULL); if (tp->cancelEvent == NULL) { - __ptw32_threadReusePush (tp->ptHandle); + ptw32_threadReusePush (tp->ptHandle); return nil; } return t; - } diff --git a/ptw32_processInitialize.c b/ptw32_processInitialize.c index d7b85f94..10679821 100644 --- a/ptw32_processInitialize.c +++ b/ptw32_processInitialize.c @@ -42,7 +42,7 @@ int -__ptw32_processInitialize (void) +ptw32_processInitialize (void) /* * ------------------------------------------------------ * DOCPRIVATE @@ -56,7 +56,7 @@ __ptw32_processInitialize (void) * This function performs process wide initialization for * the pthread library. * If successful, this routine sets the global variable - * __ptw32_processInitialized to TRUE. + * ptw32_processInitialized to TRUE. * * RESULTS * TRUE if successful, @@ -65,72 +65,72 @@ __ptw32_processInitialize (void) * ------------------------------------------------------ */ { - if (__ptw32_processInitialized) + if (ptw32_processInitialized) { - return __PTW32_TRUE; + return PTW32_TRUE; } /* * Explicitly initialise all variables from global.c */ - __ptw32_threadReuseTop = __PTW32_THREAD_REUSE_EMPTY; - __ptw32_threadReuseBottom = __PTW32_THREAD_REUSE_EMPTY; - __ptw32_selfThreadKey = NULL; - __ptw32_cleanupKey = NULL; - __ptw32_cond_list_head = NULL; - __ptw32_cond_list_tail = NULL; + ptw32_threadReuseTop = PTW32_THREAD_REUSE_EMPTY; + ptw32_threadReuseBottom = PTW32_THREAD_REUSE_EMPTY; + ptw32_selfThreadKey = NULL; + ptw32_cleanupKey = NULL; + ptw32_cond_list_head = NULL; + ptw32_cond_list_tail = NULL; - __ptw32_concurrency = 0; + ptw32_concurrency = 0; /* What features have been auto-detected */ - __ptw32_features = 0; + ptw32_features = 0; /* * Global [process wide] thread sequence Number */ - __ptw32_threadSeqNumber = 0; + ptw32_threadSeqNumber = 0; /* * Function pointer to QueueUserAPCEx if it exists, otherwise * it will be set at runtime to a substitute routine which cannot unblock * blocked threads. */ - __ptw32_register_cancellation = NULL; + ptw32_register_cancellation = NULL; /* * Global lock for managing pthread_t struct reuse. */ - __ptw32_thread_reuse_lock = 0; + ptw32_thread_reuse_lock = 0; /* * Global lock for testing internal state of statically declared mutexes. */ - __ptw32_mutex_test_init_lock = 0; + ptw32_mutex_test_init_lock = 0; /* * Global lock for testing internal state of PTHREAD_COND_INITIALIZER * created condition variables. */ - __ptw32_cond_test_init_lock = 0; + ptw32_cond_test_init_lock = 0; /* * Global lock for testing internal state of PTHREAD_RWLOCK_INITIALIZER * created read/write locks. */ - __ptw32_rwlock_test_init_lock = 0; + ptw32_rwlock_test_init_lock = 0; /* * Global lock for testing internal state of PTHREAD_SPINLOCK_INITIALIZER * created spin locks. */ - __ptw32_spinlock_test_init_lock = 0; + ptw32_spinlock_test_init_lock = 0; /* * Global lock for condition variable linked list. The list exists * to wake up CVs when a WM_TIMECHANGE message arrives. See * w32_TimeChangeHandler.c. */ - __ptw32_cond_list_lock = 0; + ptw32_cond_list_lock = 0; #if defined(_UWIN) /* @@ -139,18 +139,16 @@ __ptw32_processInitialize (void) pthread_count = 0; #endif - __ptw32_processInitialized = __PTW32_TRUE; + ptw32_processInitialized = PTW32_TRUE; /* * Initialize Keys */ - if ((pthread_key_create (&__ptw32_selfThreadKey, NULL) != 0) || - (pthread_key_create (&__ptw32_cleanupKey, NULL) != 0)) + if ((pthread_key_create (&ptw32_selfThreadKey, NULL) != 0) || + (pthread_key_create (&ptw32_cleanupKey, NULL) != 0)) { - - __ptw32_processTerminate (); + ptw32_processTerminate (); } - return (__ptw32_processInitialized); - + return (ptw32_processInitialized); } /* processInitialize */ diff --git a/ptw32_processTerminate.c b/ptw32_processTerminate.c index b8cf9f15..7696aac3 100644 --- a/ptw32_processTerminate.c +++ b/ptw32_processTerminate.c @@ -42,7 +42,7 @@ void -__ptw32_processTerminate (void) +ptw32_processTerminate (void) /* * ------------------------------------------------------ * DOCPRIVATE @@ -56,7 +56,7 @@ __ptw32_processTerminate (void) * This function performs process wide termination for * the pthread library. * This routine sets the global variable - * __ptw32_processInitialized to FALSE + * ptw32_processInitialized to FALSE * * RESULTS * N/A @@ -64,44 +64,44 @@ __ptw32_processTerminate (void) * ------------------------------------------------------ */ { - if (__ptw32_processInitialized) + if (ptw32_processInitialized) { - __ptw32_thread_t * tp, * tpNext; - __ptw32_mcs_local_node_t node; + ptw32_thread_t * tp, * tpNext; + ptw32_mcs_local_node_t node; - if (__ptw32_selfThreadKey != NULL) + if (ptw32_selfThreadKey != NULL) { /* - * Release __ptw32_selfThreadKey + * Release ptw32_selfThreadKey */ - pthread_key_delete (__ptw32_selfThreadKey); + pthread_key_delete (ptw32_selfThreadKey); - __ptw32_selfThreadKey = NULL; + ptw32_selfThreadKey = NULL; } - if (__ptw32_cleanupKey != NULL) + if (ptw32_cleanupKey != NULL) { /* - * Release __ptw32_cleanupKey + * Release ptw32_cleanupKey */ - pthread_key_delete (__ptw32_cleanupKey); + pthread_key_delete (ptw32_cleanupKey); - __ptw32_cleanupKey = NULL; + ptw32_cleanupKey = NULL; } - __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); + ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &node); - tp = __ptw32_threadReuseTop; - while (tp != __PTW32_THREAD_REUSE_EMPTY) + tp = ptw32_threadReuseTop; + while (tp != PTW32_THREAD_REUSE_EMPTY) { tpNext = tp->prevReuse; free (tp); tp = tpNext; } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); - __ptw32_processInitialized = __PTW32_FALSE; + ptw32_processInitialized = PTW32_FALSE; } } /* processTerminate */ diff --git a/ptw32_relmillisecs.c b/ptw32_relmillisecs.c index 34b2c4ea..0e75ef6b 100644 --- a/ptw32_relmillisecs.c +++ b/ptw32_relmillisecs.c @@ -43,11 +43,11 @@ static const int64_t NANOSEC_PER_SEC = 1000000000; static const int64_t NANOSEC_PER_MILLISEC = 1000000; static const int64_t MILLISEC_PER_SEC = 1000; -#if defined (__PTW32_BUILD_INLINED) +#if defined (PTW32_BUILD_INLINED) INLINE -#endif /* __PTW32_BUILD_INLINED */ +#endif /* PTW32_BUILD_INLINED */ DWORD -__ptw32_relmillisecs (const struct timespec * abstime) +ptw32_relmillisecs (const struct timespec * abstime) { DWORD milliseconds; int64_t tmpAbsNanoseconds; @@ -82,7 +82,7 @@ __ptw32_relmillisecs (const struct timespec * abstime) GetSystemTimeAsFileTime(&ft); # endif - __ptw32_filetime_to_timespec(&ft, &currSysTime); + ptw32_filetime_to_timespec(&ft, &currSysTime); tmpCurrNanoseconds = (int64_t)currSysTime.tv_nsec + ((int64_t)currSysTime.tv_sec * NANOSEC_PER_SEC); @@ -143,7 +143,7 @@ pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * GetSystemTimeAsFileTime(&ft); # endif - __ptw32_filetime_to_timespec(&ft, &currSysTime); + ptw32_filetime_to_timespec(&ft, &currSysTime); sec = currSysTime.tv_sec; nsec = currSysTime.tv_nsec; diff --git a/ptw32_reuse.c b/ptw32_reuse.c index 822e4bb2..ac2d9e24 100644 --- a/ptw32_reuse.c +++ b/ptw32_reuse.c @@ -50,18 +50,18 @@ * time. * * The original pthread_t struct plus all copies of it contain the address of - * the thread state struct __ptw32_thread_t_ (p), plus a reuse counter (x). Each - * __ptw32_thread_t contains the original copy of it's pthread_t (ptHandle). - * Once malloced, a __ptw32_thread_t_ struct is not freed until the process exits. + * the thread state struct ptw32_thread_t_ (p), plus a reuse counter (x). Each + * ptw32_thread_t contains the original copy of it's pthread_t (ptHandle). + * Once malloced, a ptw32_thread_t_ struct is not freed until the process exits. * * The thread reuse stack is a simple LILO stack managed through a singly - * linked list element in the __ptw32_thread_t. + * linked list element in the ptw32_thread_t. * - * Each time a thread is destroyed, the __ptw32_thread_t address is pushed onto the + * Each time a thread is destroyed, the ptw32_thread_t address is pushed onto the * reuse stack after it's ptHandle's reuse counter has been incremented. * * The following can now be said from this: - * - two pthread_t's refer to the same thread iff their __ptw32_thread_t reference + * - two pthread_t's refer to the same thread iff their ptw32_thread_t reference * pointers are equal and their reuse counters are equal. That is, * * equal = (a.p == b.p && a.x == b.x) @@ -69,7 +69,7 @@ * - a pthread_t copy refers to a destroyed thread if the reuse counter in * the copy is not equal to (i.e less than) the reuse counter in the original. * - * threadDestroyed = (copy.x != ((__ptw32_thread_t *)copy.p)->ptHandle.x) + * threadDestroyed = (copy.x != ((ptw32_thread_t *)copy.p)->ptHandle.x) * */ @@ -77,24 +77,24 @@ * Pop a clean pthread_t struct off the reuse stack. */ pthread_t -__ptw32_threadReusePop (void) +ptw32_threadReusePop (void) { pthread_t t = {NULL, 0}; - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; - __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); + ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &node); - if (__PTW32_THREAD_REUSE_EMPTY != __ptw32_threadReuseTop) + if (PTW32_THREAD_REUSE_EMPTY != ptw32_threadReuseTop) { - __ptw32_thread_t * tp; + ptw32_thread_t * tp; - tp = __ptw32_threadReuseTop; + tp = ptw32_threadReuseTop; - __ptw32_threadReuseTop = tp->prevReuse; + ptw32_threadReuseTop = tp->prevReuse; - if (__PTW32_THREAD_REUSE_EMPTY == __ptw32_threadReuseTop) + if (PTW32_THREAD_REUSE_EMPTY == ptw32_threadReuseTop) { - __ptw32_threadReuseBottom = __PTW32_THREAD_REUSE_EMPTY; + ptw32_threadReuseBottom = PTW32_THREAD_REUSE_EMPTY; } tp->prevReuse = NULL; @@ -102,10 +102,9 @@ __ptw32_threadReusePop (void) t = tp->ptHandle; } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); return t; - } /* @@ -115,41 +114,42 @@ __ptw32_threadReusePop (void) * destroyed before this, or never initialised. */ void -__ptw32_threadReusePush (pthread_t thread) +ptw32_threadReusePush (pthread_t thread) { - __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; + ptw32_thread_t * tp = (ptw32_thread_t *) thread.p; pthread_t t; - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; - __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); + ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &node); t = tp->ptHandle; - memset(tp, 0, sizeof(__ptw32_thread_t)); + memset(tp, 0, sizeof(ptw32_thread_t)); /* Must restore the original POSIX handle that we just wiped. */ tp->ptHandle = t; /* Bump the reuse counter now */ -#if defined (__PTW32_THREAD_ID_REUSE_INCREMENT) - tp->ptHandle.x += __PTW32_THREAD_ID_REUSE_INCREMENT; +#if defined(PTW32_THREAD_ID_REUSE_INCREMENT) + tp->ptHandle.x += PTW32_THREAD_ID_REUSE_INCREMENT; #else tp->ptHandle.x++; #endif tp->state = PThreadStateReuse; - tp->prevReuse = __PTW32_THREAD_REUSE_EMPTY; + tp->prevReuse = PTW32_THREAD_REUSE_EMPTY; - if (__PTW32_THREAD_REUSE_EMPTY != __ptw32_threadReuseBottom) + if (PTW32_THREAD_REUSE_EMPTY != ptw32_threadReuseBottom) { - __ptw32_threadReuseBottom->prevReuse = tp; + ptw32_threadReuseBottom->prevReuse = tp; } else { - __ptw32_threadReuseTop = tp; + ptw32_threadReuseTop = tp; } - __ptw32_threadReuseBottom = tp; + ptw32_threadReuseBottom = tp; - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); } + diff --git a/ptw32_rwlock_cancelwrwait.c b/ptw32_rwlock_cancelwrwait.c index 8f15996c..a5c33a9c 100644 --- a/ptw32_rwlock_cancelwrwait.c +++ b/ptw32_rwlock_cancelwrwait.c @@ -40,7 +40,7 @@ #include "implement.h" void -__ptw32_rwlock_cancelwrwait (void *arg) +ptw32_rwlock_cancelwrwait (void *arg) { pthread_rwlock_t rwl = (pthread_rwlock_t) arg; diff --git a/ptw32_rwlock_check_need_init.c b/ptw32_rwlock_check_need_init.c index 014f8d1a..54d870fe 100644 --- a/ptw32_rwlock_check_need_init.c +++ b/ptw32_rwlock_check_need_init.c @@ -40,16 +40,16 @@ #include "implement.h" INLINE int -__ptw32_rwlock_check_need_init (pthread_rwlock_t * rwlock) +ptw32_rwlock_check_need_init (pthread_rwlock_t * rwlock) { int result = 0; - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; /* * The following guarded test is specifically for statically * initialised rwlocks (via PTHREAD_RWLOCK_INITIALIZER). */ - __ptw32_mcs_lock_acquire(&__ptw32_rwlock_test_init_lock, &node); + ptw32_mcs_lock_acquire(&ptw32_rwlock_test_init_lock, &node); /* * We got here possibly under race @@ -73,7 +73,7 @@ __ptw32_rwlock_check_need_init (pthread_rwlock_t * rwlock) result = EINVAL; } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); return result; } diff --git a/ptw32_semwait.c b/ptw32_semwait.c index ae21181b..85896c9b 100644 --- a/ptw32_semwait.c +++ b/ptw32_semwait.c @@ -44,7 +44,7 @@ int -__ptw32_semwait (sem_t * sem) +ptw32_semwait (sem_t * sem) /* * ------------------------------------------------------ * DESCRIPTION @@ -68,14 +68,14 @@ __ptw32_semwait (sem_t * sem) * ------------------------------------------------------ */ { - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; int v; int result = 0; sem_t s = *sem; - __ptw32_mcs_lock_acquire(&s->lock, &node); + ptw32_mcs_lock_acquire(&s->lock, &node); v = --s->value; - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); if (v < 0) { @@ -83,13 +83,13 @@ __ptw32_semwait (sem_t * sem) if (WaitForSingleObject (s->sem, INFINITE) == WAIT_OBJECT_0) { #if defined(NEED_SEM) - __ptw32_mcs_lock_acquire(&s->lock, &node); + ptw32_mcs_lock_acquire(&s->lock, &node); if (s->leftToUnblock > 0) { --s->leftToUnblock; SetEvent(s->sem); } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); #endif return 0; } @@ -101,10 +101,10 @@ return 0; if (result != 0) { - __PTW32_SET_ERRNO(result); + PTW32_SET_ERRNO(result); return -1; } return 0; -} /* __ptw32_semwait */ +} /* ptw32_semwait */ diff --git a/ptw32_spinlock_check_need_init.c b/ptw32_spinlock_check_need_init.c index 1ca7afaf..f932f46b 100644 --- a/ptw32_spinlock_check_need_init.c +++ b/ptw32_spinlock_check_need_init.c @@ -41,16 +41,16 @@ INLINE int -__ptw32_spinlock_check_need_init (pthread_spinlock_t * lock) +ptw32_spinlock_check_need_init (pthread_spinlock_t * lock) { int result = 0; - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; /* * The following guarded test is specifically for statically * initialised spinlocks (via PTHREAD_SPINLOCK_INITIALIZER). */ - __ptw32_mcs_lock_acquire(&__ptw32_spinlock_test_init_lock, &node); + ptw32_mcs_lock_acquire(&ptw32_spinlock_test_init_lock, &node); /* * We got here possibly under race @@ -74,7 +74,7 @@ __ptw32_spinlock_check_need_init (pthread_spinlock_t * lock) result = EINVAL; } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); return (result); } diff --git a/ptw32_threadDestroy.c b/ptw32_threadDestroy.c index 5b135563..6e94ac60 100644 --- a/ptw32_threadDestroy.c +++ b/ptw32_threadDestroy.c @@ -42,9 +42,9 @@ void -__ptw32_threadDestroy (pthread_t thread) +ptw32_threadDestroy (pthread_t thread) { - __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; + ptw32_thread_t * tp = (ptw32_thread_t *) thread.p; if (tp != NULL) { @@ -61,7 +61,7 @@ __ptw32_threadDestroy (pthread_t thread) * This also sets the thread state to PThreadStateInitial before * it is finally set to PThreadStateReuse. */ - __ptw32_threadReusePush (thread); + ptw32_threadReusePush (thread); if (cancelEvent != NULL) { @@ -79,5 +79,5 @@ __ptw32_threadDestroy (pthread_t thread) #endif } -} /* __ptw32_threadDestroy */ +} /* ptw32_threadDestroy */ diff --git a/ptw32_threadStart.c b/ptw32_threadStart.c index fc41ca24..b87846d0 100644 --- a/ptw32_threadStart.c +++ b/ptw32_threadStart.c @@ -41,11 +41,11 @@ #include "implement.h" #include -#if defined(__PTW32_CLEANUP_C) +#if defined(PTW32_CLEANUP_C) # include #endif -#if defined(__PTW32_CLEANUP_SEH) +#if defined(PTW32_CLEANUP_SEH) static DWORD ExceptionFilter (EXCEPTION_POINTERS * ep, DWORD * ei) @@ -65,7 +65,6 @@ ExceptionFilter (EXCEPTION_POINTERS * ep, DWORD * ei) } return EXCEPTION_EXECUTE_HANDLER; - break; } default: { @@ -76,15 +75,14 @@ ExceptionFilter (EXCEPTION_POINTERS * ep, DWORD * ei) */ pthread_t self = pthread_self (); - __ptw32_callUserDestroyRoutines (self); + ptw32_callUserDestroyRoutines (self); return EXCEPTION_CONTINUE_SEARCH; - break; } } } -#elif defined(__PTW32_CLEANUP_CXX) +#elif defined(PTW32_CLEANUP_CXX) #if defined(_MSC_VER) # include @@ -103,10 +101,10 @@ using # endif #endif -#endif /* __PTW32_CLEANUP_CXX */ +#endif /* PTW32_CLEANUP_CXX */ /* - * MSVC6 does not optimize __ptw32_threadStart() safely + * MSVC6 does not optimize ptw32_threadStart() safely * (i.e. tests/context1.c fails with "abnormal program * termination" in some configurations), and there's no * point to optimizing this routine anyway @@ -122,28 +120,28 @@ unsigned #else void #endif -__ptw32_threadStart (void *vthreadParms) +ptw32_threadStart (void *vthreadParms) { ThreadParms * threadParms = (ThreadParms *) vthreadParms; pthread_t self; - __ptw32_thread_t * sp; - void * (__PTW32_CDECL *start) (void *); + ptw32_thread_t * sp; + void * (PTW32_CDECL *start) (void *); void * arg; -#if defined(__PTW32_CLEANUP_SEH) +#if defined(PTW32_CLEANUP_SEH) DWORD ei[] = { 0, 0, 0 }; #endif -#if defined(__PTW32_CLEANUP_C) +#if defined(PTW32_CLEANUP_C) int setjmp_rc; #endif - __ptw32_mcs_local_node_t stateLock; + ptw32_mcs_local_node_t stateLock; void * status = (void *) 0; self = threadParms->tid; - sp = (__ptw32_thread_t *) self.p; + sp = (ptw32_thread_t *) self.p; start = threadParms->start; arg = threadParms->arg; @@ -158,17 +156,17 @@ __ptw32_threadStart (void *vthreadParms) sp->thread = GetCurrentThreadId (); #endif - pthread_setspecific (__ptw32_selfThreadKey, sp); + pthread_setspecific (ptw32_selfThreadKey, sp); /* * Here we're using stateLock as a general-purpose lock * to make the new thread wait until the creating thread * has the new handle. */ - __ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); + ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); sp->state = PThreadStateRunning; - __ptw32_mcs_lock_release (&stateLock); + ptw32_mcs_lock_release (&stateLock); -#if defined(__PTW32_CLEANUP_SEH) +#if defined(PTW32_CLEANUP_SEH) __try { @@ -188,14 +186,14 @@ __ptw32_threadStart (void *vthreadParms) { switch (ei[0]) { - case __PTW32_EPS_CANCEL: + case PTW32_EPS_CANCEL: status = sp->exitStatus = PTHREAD_CANCELED; #if defined(_UWIN) if (--pthread_count <= 0) exit (0); #endif break; - case __PTW32_EPS_EXIT: + case PTW32_EPS_EXIT: status = sp->exitStatus; break; default: @@ -204,9 +202,9 @@ __ptw32_threadStart (void *vthreadParms) } } -#else /* __PTW32_CLEANUP_SEH */ +#else /* PTW32_CLEANUP_SEH */ -#if defined(__PTW32_CLEANUP_C) +#if defined(PTW32_CLEANUP_C) setjmp_rc = setjmp (sp->start_mark); @@ -222,10 +220,10 @@ __ptw32_threadStart (void *vthreadParms) { switch (setjmp_rc) { - case __PTW32_EPS_CANCEL: + case PTW32_EPS_CANCEL: status = sp->exitStatus = PTHREAD_CANCELED; break; - case __PTW32_EPS_EXIT: + case PTW32_EPS_EXIT: status = sp->exitStatus; break; default: @@ -234,23 +232,23 @@ __ptw32_threadStart (void *vthreadParms) } } -#else /* __PTW32_CLEANUP_C */ +#else /* PTW32_CLEANUP_C */ -#if defined(__PTW32_CLEANUP_CXX) +#if defined(PTW32_CLEANUP_CXX) try { status = sp->exitStatus = (*start) (arg); sp->state = PThreadStateExiting; } - catch (__ptw32_exception_cancel &) + catch (ptw32_exception_cancel &) { /* * Thread was canceled. */ status = sp->exitStatus = PTHREAD_CANCELED; } - catch (__ptw32_exception_exit &) + catch (ptw32_exception_exit &) { /* * Thread was exited via pthread_exit(). @@ -271,11 +269,11 @@ __ptw32_threadStart (void *vthreadParms) #error ERROR [__FILE__, line __LINE__]: Cleanup type undefined. -#endif /* __PTW32_CLEANUP_CXX */ -#endif /* __PTW32_CLEANUP_C */ -#endif /* __PTW32_CLEANUP_SEH */ +#endif /* PTW32_CLEANUP_CXX */ +#endif /* PTW32_CLEANUP_C */ +#endif /* PTW32_CLEANUP_SEH */ -#if defined (__PTW32_STATIC_LIB) +#if defined (PTW32_STATIC_LIB) /* * We need to cleanup the pthread now if we have * been statically linked, in which case the cleanup @@ -307,7 +305,7 @@ __ptw32_threadStart (void *vthreadParms) return (unsigned)(size_t) status; #endif -} /* __ptw32_threadStart */ +} /* ptw32_threadStart */ /* * Reset optimization @@ -316,9 +314,9 @@ __ptw32_threadStart (void *vthreadParms) # pragma optimize("", on) #endif -#if defined (__PTW32_USES_SEPARATE_CRT) && (defined(__PTW32_CLEANUP_CXX) || defined(__PTW32_CLEANUP_SEH)) -__ptw32_terminate_handler -pthread_win32_set_terminate_np(__ptw32_terminate_handler termFunction) +#if defined (PTW32_USES_SEPARATE_CRT) && (defined(PTW32_CLEANUP_CXX) || defined(PTW32_CLEANUP_SEH)) +ptw32_terminate_handler +pthread_win32_set_terminate_np(ptw32_terminate_handler termFunction) { return set_terminate(termFunction); } diff --git a/ptw32_throw.c b/ptw32_throw.c index 45337d25..565a1d8e 100644 --- a/ptw32_throw.c +++ b/ptw32_throw.c @@ -40,12 +40,12 @@ #include "pthread.h" #include "implement.h" -#if defined(__PTW32_CLEANUP_C) +#if defined(PTW32_CLEANUP_C) # include #endif /* - * __ptw32_throw + * ptw32_throw * * All cancelled and explicitly exited POSIX threads go through * here. This routine knows how to exit both POSIX initiated threads and @@ -53,21 +53,21 @@ * C++, and SEH). */ void -__ptw32_throw (DWORD exception) +ptw32_throw (DWORD exception) { /* * Don't use pthread_self() to avoid creating an implicit POSIX thread handle * unnecessarily. */ - __ptw32_thread_t * sp = (__ptw32_thread_t *) pthread_getspecific (__ptw32_selfThreadKey); + ptw32_thread_t * sp = (ptw32_thread_t *) pthread_getspecific (ptw32_selfThreadKey); -#if defined(__PTW32_CLEANUP_SEH) +#if defined(PTW32_CLEANUP_SEH) DWORD exceptionInformation[3]; #endif sp->state = PThreadStateExiting; - if (exception != __PTW32_EPS_CANCEL && exception != __PTW32_EPS_EXIT) + if (exception != PTW32_EPS_CANCEL && exception != PTW32_EPS_EXIT) { /* Should never enter here */ exit (1); @@ -82,23 +82,23 @@ __ptw32_throw (DWORD exception) * residue (i.e. cleanup handlers, POSIX thread handle etc). */ #if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__) - unsigned exitCode = 0; + unsigned int exitCode = 0; switch (exception) { - case __PTW32_EPS_CANCEL: - exitCode = (unsigned)(size_t) PTHREAD_CANCELED; + case PTW32_EPS_CANCEL: + exitCode = (unsigned int)(size_t) PTHREAD_CANCELED; break; - case __PTW32_EPS_EXIT: + case PTW32_EPS_EXIT: if (NULL != sp) { - exitCode = (unsigned)(size_t) sp->exitStatus; + exitCode = (unsigned int)(size_t) sp->exitStatus; } break; } #endif -#if defined (__PTW32_STATIC_LIB) +#if defined(PTW32_STATIC_LIB) pthread_win32_thread_detach_np (); @@ -112,7 +112,7 @@ __ptw32_throw (DWORD exception) } -#if defined(__PTW32_CLEANUP_SEH) +#if defined(PTW32_CLEANUP_SEH) exceptionInformation[0] = (DWORD) (exception); @@ -121,24 +121,24 @@ __ptw32_throw (DWORD exception) RaiseException (EXCEPTION_PTW32_SERVICES, 0, 3, (ULONG_PTR *) exceptionInformation); -#else /* __PTW32_CLEANUP_SEH */ +#else /* PTW32_CLEANUP_SEH */ -#if defined(__PTW32_CLEANUP_C) +#if defined(PTW32_CLEANUP_C) - __ptw32_pop_cleanup_all (1); + ptw32_pop_cleanup_all (1); longjmp (sp->start_mark, exception); -#else /* __PTW32_CLEANUP_C */ +#else /* PTW32_CLEANUP_C */ -#if defined(__PTW32_CLEANUP_CXX) +#if defined(PTW32_CLEANUP_CXX) switch (exception) { - case __PTW32_EPS_CANCEL: - throw __ptw32_exception_cancel (); + case PTW32_EPS_CANCEL: + throw ptw32_exception_cancel (); break; - case __PTW32_EPS_EXIT: - throw __ptw32_exception_exit (); + case PTW32_EPS_EXIT: + throw ptw32_exception_exit (); break; } @@ -146,29 +146,29 @@ __ptw32_throw (DWORD exception) #error ERROR [__FILE__, line __LINE__]: Cleanup type undefined. -#endif /* __PTW32_CLEANUP_CXX */ +#endif /* PTW32_CLEANUP_CXX */ -#endif /* __PTW32_CLEANUP_C */ +#endif /* PTW32_CLEANUP_C */ -#endif /* __PTW32_CLEANUP_SEH */ +#endif /* PTW32_CLEANUP_SEH */ /* Never reached */ } void -__ptw32_pop_cleanup_all (int execute) +ptw32_pop_cleanup_all (int execute) { - while (NULL != __ptw32_pop_cleanup (execute)) + while (NULL != ptw32_pop_cleanup (execute)) { } } DWORD -__ptw32_get_exception_services_code (void) +ptw32_get_exception_services_code (void) { -#if defined(__PTW32_CLEANUP_SEH) +#if defined(PTW32_CLEANUP_SEH) return EXCEPTION_PTW32_SERVICES; diff --git a/ptw32_timespec.c b/ptw32_timespec.c index a57a6c57..c42a33e6 100644 --- a/ptw32_timespec.c +++ b/ptw32_timespec.c @@ -43,11 +43,11 @@ /* * time between jan 1, 1601 and jan 1, 1970 in units of 100 nanoseconds */ -#define __PTW32_TIMESPEC_TO_FILETIME_OFFSET \ +#define PTW32_TIMESPEC_TO_FILETIME_OFFSET \ ( ((uint64_t) 27111902UL << 32) + (uint64_t) 3577643008UL ) INLINE void -__ptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft) +ptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft) /* * ------------------------------------------------------------------- * converts struct timespec @@ -58,11 +58,11 @@ __ptw32_timespec_to_filetime (const struct timespec *ts, FILETIME * ft) */ { *(uint64_t *) ft = ts->tv_sec * 10000000UL - + (ts->tv_nsec + 50) / 100 + __PTW32_TIMESPEC_TO_FILETIME_OFFSET; + + (ts->tv_nsec + 50) / 100 + PTW32_TIMESPEC_TO_FILETIME_OFFSET; } INLINE void -__ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts) +ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts) /* * ------------------------------------------------------------------- * converts FILETIME (as set by GetSystemTimeAsFileTime), where the time is @@ -73,8 +73,8 @@ __ptw32_filetime_to_timespec (const FILETIME * ft, struct timespec *ts) */ { ts->tv_sec = - (int) ((*(uint64_t *) ft - __PTW32_TIMESPEC_TO_FILETIME_OFFSET) / 10000000UL); + (int) ((*(uint64_t *) ft - PTW32_TIMESPEC_TO_FILETIME_OFFSET) / 10000000UL); ts->tv_nsec = - (int) ((*(uint64_t *) ft - __PTW32_TIMESPEC_TO_FILETIME_OFFSET - + (int) ((*(uint64_t *) ft - PTW32_TIMESPEC_TO_FILETIME_OFFSET - ((uint64_t) ts->tv_sec * (uint64_t) 10000000UL)) * 100); } diff --git a/ptw32_tkAssocCreate.c b/ptw32_tkAssocCreate.c index d860a0ac..9e637c17 100644 --- a/ptw32_tkAssocCreate.c +++ b/ptw32_tkAssocCreate.c @@ -42,7 +42,7 @@ int -__ptw32_tkAssocCreate (__ptw32_thread_t * sp, pthread_key_t key) +ptw32_tkAssocCreate (ptw32_thread_t * sp, pthread_key_t key) /* * ------------------------------------------------------------------- * This routine creates an association that @@ -56,7 +56,7 @@ __ptw32_tkAssocCreate (__ptw32_thread_t * sp, pthread_key_t key) * * Notes: * 1) New associations are pushed to the beginning of the - * chain so that the internal __ptw32_selfThreadKey association + * chain so that the internal ptw32_selfThreadKey association * is always last, thus allowing selfThreadExit to * be implicitly called last by pthread_exit. * 2) @@ -117,4 +117,4 @@ __ptw32_tkAssocCreate (__ptw32_thread_t * sp, pthread_key_t key) return (0); -} /* __ptw32_tkAssocCreate */ +} /* ptw32_tkAssocCreate */ diff --git a/ptw32_tkAssocDestroy.c b/ptw32_tkAssocDestroy.c index 63839ea7..7ccb3924 100644 --- a/ptw32_tkAssocDestroy.c +++ b/ptw32_tkAssocDestroy.c @@ -42,7 +42,7 @@ void -__ptw32_tkAssocDestroy (ThreadKeyAssoc * assoc) +ptw32_tkAssocDestroy (ThreadKeyAssoc * assoc) /* * ------------------------------------------------------------------- * This routine releases all resources for the given ThreadKeyAssoc @@ -113,4 +113,4 @@ __ptw32_tkAssocDestroy (ThreadKeyAssoc * assoc) free (assoc); } -} /* __ptw32_tkAssocDestroy */ +} /* ptw32_tkAssocDestroy */ diff --git a/sched.h b/sched.h index 81630d94..c5246e27 100644 --- a/sched.h +++ b/sched.h @@ -104,7 +104,7 @@ struct timespec /* * Microsoft VC++6.0 lacks these *_PTR types */ -#if defined(_MSC_VER) && _MSC_VER < 1300 && !defined (__PTW32_HAVE_DWORD_PTR) +#if defined(_MSC_VER) && _MSC_VER < 1300 && !defined (PTW32_HAVE_DWORD_PTR) typedef unsigned long ULONG_PTR; typedef ULONG_PTR DWORD_PTR; #endif @@ -161,18 +161,18 @@ typedef union size_t _align; } cpu_set_t; -__PTW32_BEGIN_C_DECLS +PTW32_BEGIN_C_DECLS -__PTW32_DLLPORT int __PTW32_CDECL sched_yield (void); +PTW32_DLLPORT int PTW32_CDECL sched_yield (void); -__PTW32_DLLPORT int __PTW32_CDECL sched_get_priority_min (int policy); +PTW32_DLLPORT int PTW32_CDECL sched_get_priority_min (int policy); -__PTW32_DLLPORT int __PTW32_CDECL sched_get_priority_max (int policy); +PTW32_DLLPORT int PTW32_CDECL sched_get_priority_max (int policy); /* FIXME: this declaration of sched_setscheduler() is NOT as prescribed * by POSIX; it lacks const struct sched_param * as third argument. */ -__PTW32_DLLPORT int __PTW32_CDECL sched_setscheduler (pid_t pid, int policy); +PTW32_DLLPORT int PTW32_CDECL sched_setscheduler (pid_t pid, int policy); /* FIXME: In addition to the above five functions, POSIX also requires: * @@ -185,30 +185,30 @@ __PTW32_DLLPORT int __PTW32_CDECL sched_setscheduler (pid_t pid, int policy); /* Compatibility with Linux - not standard in POSIX * FIXME: consider occluding within a _GNU_SOURCE (or similar) feature test. */ -__PTW32_DLLPORT int __PTW32_CDECL sched_setaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *mask); +PTW32_DLLPORT int PTW32_CDECL sched_setaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *mask); -__PTW32_DLLPORT int __PTW32_CDECL sched_getaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *mask); +PTW32_DLLPORT int PTW32_CDECL sched_getaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *mask); /* * Support routines and macros for cpu_set_t */ -__PTW32_DLLPORT int __PTW32_CDECL _sched_affinitycpucount (const cpu_set_t *set); +PTW32_DLLPORT int PTW32_CDECL _sched_affinitycpucount (const cpu_set_t *set); -__PTW32_DLLPORT void __PTW32_CDECL _sched_affinitycpuzero (cpu_set_t *pset); +PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuzero (cpu_set_t *pset); -__PTW32_DLLPORT void __PTW32_CDECL _sched_affinitycpuset (int cpu, cpu_set_t *pset); +PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuset (int cpu, cpu_set_t *pset); -__PTW32_DLLPORT void __PTW32_CDECL _sched_affinitycpuclr (int cpu, cpu_set_t *pset); +PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuclr (int cpu, cpu_set_t *pset); -__PTW32_DLLPORT int __PTW32_CDECL _sched_affinitycpuisset (int cpu, const cpu_set_t *pset); +PTW32_DLLPORT int PTW32_CDECL _sched_affinitycpuisset (int cpu, const cpu_set_t *pset); -__PTW32_DLLPORT void __PTW32_CDECL _sched_affinitycpuand(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2); +PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuand(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2); -__PTW32_DLLPORT void __PTW32_CDECL _sched_affinitycpuor(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2); +PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuor(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2); -__PTW32_DLLPORT void __PTW32_CDECL _sched_affinitycpuxor(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2); +PTW32_DLLPORT void PTW32_CDECL _sched_affinitycpuxor(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2); -__PTW32_DLLPORT int __PTW32_CDECL _sched_affinitycpuequal (const cpu_set_t *pset1, const cpu_set_t *pset2); +PTW32_DLLPORT int PTW32_CDECL _sched_affinitycpuequal (const cpu_set_t *pset1, const cpu_set_t *pset2); /* Note that this macro returns ENOTSUP rather than ENOSYS, as * might be expected. However, returning ENOSYS should mean that @@ -229,7 +229,7 @@ __PTW32_DLLPORT int __PTW32_CDECL _sched_affinitycpuequal (const cpu_set_t *pse #define sched_rr_get_interval(_pid, _interval) \ ( errno = ENOTSUP, (int) -1 ) -__PTW32_END_C_DECLS +PTW32_END_C_DECLS #undef __SCHED_H_SOURCED__ #endif /* !_SCHED_H */ diff --git a/sched_get_priority_max.c b/sched_get_priority_max.c index 10c6b3ba..6b28b029 100644 --- a/sched_get_priority_max.c +++ b/sched_get_priority_max.c @@ -122,15 +122,15 @@ sched_get_priority_max (int policy) { if (policy < SCHED_MIN || policy > SCHED_MAX) { - __PTW32_SET_ERRNO(EINVAL); + PTW32_SET_ERRNO(EINVAL); return -1; } #if (THREAD_PRIORITY_LOWEST > THREAD_PRIORITY_NORMAL) /* WinCE? */ - return __PTW32_MAX (THREAD_PRIORITY_IDLE, THREAD_PRIORITY_TIME_CRITICAL); + return PTW32_MAX (THREAD_PRIORITY_IDLE, THREAD_PRIORITY_TIME_CRITICAL); #else /* This is independent of scheduling policy in Win32. */ - return __PTW32_MAX (THREAD_PRIORITY_IDLE, THREAD_PRIORITY_TIME_CRITICAL); + return PTW32_MAX (THREAD_PRIORITY_IDLE, THREAD_PRIORITY_TIME_CRITICAL); #endif } diff --git a/sched_get_priority_min.c b/sched_get_priority_min.c index 24eb5af6..84c8362d 100644 --- a/sched_get_priority_min.c +++ b/sched_get_priority_min.c @@ -123,15 +123,15 @@ sched_get_priority_min (int policy) { if (policy < SCHED_MIN || policy > SCHED_MAX) { - __PTW32_SET_ERRNO(EINVAL); + PTW32_SET_ERRNO(EINVAL); return -1; } #if (THREAD_PRIORITY_LOWEST > THREAD_PRIORITY_NORMAL) /* WinCE? */ - return __PTW32_MIN (THREAD_PRIORITY_IDLE, THREAD_PRIORITY_TIME_CRITICAL); + return PTW32_MIN (THREAD_PRIORITY_IDLE, THREAD_PRIORITY_TIME_CRITICAL); #else /* This is independent of scheduling policy in Win32. */ - return __PTW32_MIN (THREAD_PRIORITY_IDLE, THREAD_PRIORITY_TIME_CRITICAL); + return PTW32_MIN (THREAD_PRIORITY_IDLE, THREAD_PRIORITY_TIME_CRITICAL); #endif } diff --git a/sched_getscheduler.c b/sched_getscheduler.c index 28995d98..bff9c779 100644 --- a/sched_getscheduler.c +++ b/sched_getscheduler.c @@ -55,11 +55,11 @@ sched_getscheduler (pid_t pid) if (pid != selfPid) { HANDLE h = - OpenProcess (PROCESS_QUERY_INFORMATION, __PTW32_FALSE, (DWORD) pid); + OpenProcess (PROCESS_QUERY_INFORMATION, PTW32_FALSE, (DWORD) pid); if (NULL == h) { - __PTW32_SET_ERRNO(((0xFF & ERROR_ACCESS_DENIED) == GetLastError()) ? EPERM : ESRCH); + PTW32_SET_ERRNO(((0xFF & ERROR_ACCESS_DENIED) == GetLastError()) ? EPERM : ESRCH); return -1; } else diff --git a/sched_setaffinity.c b/sched_setaffinity.c index 39c4c0ea..3ab77207 100644 --- a/sched_setaffinity.c +++ b/sched_setaffinity.c @@ -112,7 +112,7 @@ sched_setaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *set) targetPid = (int) GetCurrentProcessId (); } - h = OpenProcess (PROCESS_QUERY_INFORMATION|PROCESS_SET_INFORMATION, __PTW32_FALSE, (DWORD) targetPid); + h = OpenProcess (PROCESS_QUERY_INFORMATION|PROCESS_SET_INFORMATION, PTW32_FALSE, (DWORD) targetPid); if (NULL == h) { @@ -163,7 +163,7 @@ sched_setaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *set) if (result != 0) { - __PTW32_SET_ERRNO(result); + PTW32_SET_ERRNO(result); return -1; } else @@ -173,7 +173,7 @@ sched_setaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *set) #else - __PTW32_SET_ERRNO(ENOSYS); + PTW32_SET_ERRNO(ENOSYS); return -1; #endif @@ -242,7 +242,7 @@ sched_getaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *set) targetPid = (int) GetCurrentProcessId (); } - h = OpenProcess (PROCESS_QUERY_INFORMATION, __PTW32_FALSE, (DWORD) targetPid); + h = OpenProcess (PROCESS_QUERY_INFORMATION, PTW32_FALSE, (DWORD) targetPid); if (NULL == h) { @@ -269,7 +269,7 @@ sched_getaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *set) if (result != 0) { - __PTW32_SET_ERRNO(result); + PTW32_SET_ERRNO(result); return -1; } else diff --git a/sched_setscheduler.c b/sched_setscheduler.c index 8d9cf72f..6473599c 100644 --- a/sched_setscheduler.c +++ b/sched_setscheduler.c @@ -57,11 +57,11 @@ sched_setscheduler (pid_t pid, int policy) if (pid != selfPid) { HANDLE h = - OpenProcess (PROCESS_SET_INFORMATION, __PTW32_FALSE, (DWORD) pid); + OpenProcess (PROCESS_SET_INFORMATION, PTW32_FALSE, (DWORD) pid); if (NULL == h) { - __PTW32_SET_ERRNO((GetLastError () == (0xFF & ERROR_ACCESS_DENIED)) ? EPERM : ESRCH); + PTW32_SET_ERRNO((GetLastError () == (0xFF & ERROR_ACCESS_DENIED)) ? EPERM : ESRCH); return -1; } else @@ -71,7 +71,7 @@ sched_setscheduler (pid_t pid, int policy) if (SCHED_OTHER != policy) { - __PTW32_SET_ERRNO(ENOSYS); + PTW32_SET_ERRNO(ENOSYS); return -1; } diff --git a/sem_close.c b/sem_close.c index eef4c675..3071d813 100644 --- a/sem_close.c +++ b/sem_close.c @@ -55,6 +55,6 @@ int sem_close (sem_t * sem) { - __PTW32_SET_ERRNO(ENOSYS); + PTW32_SET_ERRNO(ENOSYS); return -1; } /* sem_close */ diff --git a/sem_destroy.c b/sem_destroy.c index 471741b2..563aa182 100644 --- a/sem_destroy.c +++ b/sem_destroy.c @@ -83,10 +83,10 @@ sem_destroy (sem_t * sem) } else { - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; s = *sem; - if ((result = __ptw32_mcs_lock_try_acquire(&s->lock, &node)) == 0) + if ((result = ptw32_mcs_lock_try_acquire(&s->lock, &node)) == 0) { if (s->value < 0) { @@ -104,13 +104,13 @@ sem_destroy (sem_t * sem) result = EINVAL; } } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); } } if (result != 0) { - __PTW32_SET_ERRNO(result); + PTW32_SET_ERRNO(result); return -1; } diff --git a/sem_getvalue.c b/sem_getvalue.c index 2e043db5..64745c81 100644 --- a/sem_getvalue.c +++ b/sem_getvalue.c @@ -81,16 +81,16 @@ sem_getvalue (sem_t * sem, int *sval) { int result = 0; - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; register sem_t s = *sem; - __ptw32_mcs_lock_acquire(&s->lock, &node); + ptw32_mcs_lock_acquire(&s->lock, &node); *sval = s->value; - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); if (result != 0) { - __PTW32_SET_ERRNO(result); + PTW32_SET_ERRNO(result); return -1; } diff --git a/sem_init.c b/sem_init.c index bd9ec305..105fef7a 100644 --- a/sem_init.c +++ b/sem_init.c @@ -116,8 +116,8 @@ sem_init (sem_t * sem, int pshared, unsigned int value) #if defined(NEED_SEM) s->sem = CreateEvent (NULL, - __PTW32_FALSE, /* auto (not manual) reset */ - __PTW32_FALSE, /* initial state is unset */ + PTW32_FALSE, /* auto (not manual) reset */ + PTW32_FALSE, /* initial state is unset */ NULL); if (0 == s->sem) @@ -150,7 +150,7 @@ sem_init (sem_t * sem, int pshared, unsigned int value) if (result != 0) { - __PTW32_SET_ERRNO(result); + PTW32_SET_ERRNO(result); return -1; } diff --git a/sem_open.c b/sem_open.c index 68021eb5..d89b46c4 100644 --- a/sem_open.c +++ b/sem_open.c @@ -60,6 +60,6 @@ sem_t * of ENOSYS as a resultant errno state; nevertheless, it makes sense * to retain the POSIX.1b-1993 conforming behaviour here. */ - __PTW32_SET_ERRNO(ENOSYS); + PTW32_SET_ERRNO(ENOSYS); return SEM_FAILED; } /* sem_open */ diff --git a/sem_post.c b/sem_post.c index 786c5dd5..1e7c8d47 100644 --- a/sem_post.c +++ b/sem_post.c @@ -77,10 +77,10 @@ sem_post (sem_t * sem) { int result = 0; - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; sem_t s = *sem; - __ptw32_mcs_lock_acquire(&s->lock, &node); + ptw32_mcs_lock_acquire(&s->lock, &node); if (s->value < SEM_VALUE_MAX) { #if defined(NEED_SEM) @@ -103,11 +103,11 @@ sem_post (sem_t * sem) { result = ERANGE; } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); if (result != 0) { - __PTW32_SET_ERRNO(result); + PTW32_SET_ERRNO(result); return -1; } diff --git a/sem_post_multiple.c b/sem_post_multiple.c index a7a78df6..4f60e0d7 100644 --- a/sem_post_multiple.c +++ b/sem_post_multiple.c @@ -78,12 +78,12 @@ sem_post_multiple (sem_t * sem, int count) * ------------------------------------------------------ */ { - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; int result = 0; long waiters; sem_t s = *sem; - __ptw32_mcs_lock_acquire(&s->lock, &node); + ptw32_mcs_lock_acquire(&s->lock, &node); if (s->value <= (SEM_VALUE_MAX - count)) { @@ -118,11 +118,11 @@ sem_post_multiple (sem_t * sem, int count) { result = ERANGE; } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); if (result != 0) { - __PTW32_SET_ERRNO(result); + PTW32_SET_ERRNO(result); return -1; } diff --git a/sem_timedwait.c b/sem_timedwait.c index 5b22e863..a03058fc 100644 --- a/sem_timedwait.c +++ b/sem_timedwait.c @@ -54,14 +54,14 @@ typedef struct { } sem_timedwait_cleanup_args_t; -static void __PTW32_CDECL -__ptw32_sem_timedwait_cleanup (void * args) +static void PTW32_CDECL +ptw32_sem_timedwait_cleanup (void * args) { - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; sem_timedwait_cleanup_args_t * a = (sem_timedwait_cleanup_args_t *)args; sem_t s = a->sem; - __ptw32_mcs_lock_acquire(&s->lock, &node); + ptw32_mcs_lock_acquire(&s->lock, &node); /* * We either timed out or were cancelled. * If someone has posted between then and now we try to take the semaphore. @@ -91,7 +91,7 @@ __ptw32_sem_timedwait_cleanup (void * args) */ #endif } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); } @@ -135,7 +135,7 @@ sem_timedwait (sem_t * sem, const struct timespec *abstime) * ------------------------------------------------------ */ { - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; DWORD milliseconds; int v; int result = 0; @@ -152,12 +152,12 @@ sem_timedwait (sem_t * sem, const struct timespec *abstime) /* * Calculate timeout as milliseconds from current system time. */ - milliseconds = __ptw32_relmillisecs (abstime); + milliseconds = ptw32_relmillisecs (abstime); } - __ptw32_mcs_lock_acquire(&s->lock, &node); + ptw32_mcs_lock_acquire(&s->lock, &node); v = --s->value; - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); if (v < 0) { @@ -169,17 +169,17 @@ sem_timedwait (sem_t * sem, const struct timespec *abstime) cleanup_args.sem = s; cleanup_args.resultPtr = &result; -#if defined (__PTW32_CONFIG_MSVC7) +#if defined (PTW32_CONFIG_MSVC7) #pragma inline_depth(0) #endif /* Must wait */ - pthread_cleanup_push(__ptw32_sem_timedwait_cleanup, (void *) &cleanup_args); + pthread_cleanup_push(ptw32_sem_timedwait_cleanup, (void *) &cleanup_args); #if defined(NEED_SEM) timedout = #endif result = pthreadCancelableTimedWait (s->sem, milliseconds); pthread_cleanup_pop(result); -#if defined (__PTW32_CONFIG_MSVC7) +#if defined (PTW32_CONFIG_MSVC7) #pragma inline_depth() #endif @@ -187,13 +187,13 @@ sem_timedwait (sem_t * sem, const struct timespec *abstime) if (!timedout) { - __ptw32_mcs_lock_acquire(&s->lock, &node); + ptw32_mcs_lock_acquire(&s->lock, &node); if (s->leftToUnblock > 0) { --s->leftToUnblock; SetEvent(s->sem); } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); } #endif /* NEED_SEM */ @@ -203,7 +203,7 @@ sem_timedwait (sem_t * sem, const struct timespec *abstime) if (result != 0) { - __PTW32_SET_ERRNO(result); + PTW32_SET_ERRNO(result); return -1; } diff --git a/sem_trywait.c b/sem_trywait.c index a0e1cd12..6af58ba3 100644 --- a/sem_trywait.c +++ b/sem_trywait.c @@ -80,9 +80,9 @@ sem_trywait (sem_t * sem) { int result = 0; sem_t s = *sem; - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; - __ptw32_mcs_lock_acquire(&s->lock, &node); + ptw32_mcs_lock_acquire(&s->lock, &node); if (s->value > 0) { @@ -93,11 +93,11 @@ sem_trywait (sem_t * sem) result = EAGAIN; } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); if (result != 0) { - __PTW32_SET_ERRNO(result); + PTW32_SET_ERRNO(result); return -1; } diff --git a/sem_unlink.c b/sem_unlink.c index f14fff1b..1cb3b7b7 100644 --- a/sem_unlink.c +++ b/sem_unlink.c @@ -55,6 +55,6 @@ int sem_unlink (const char *name) { - __PTW32_SET_ERRNO(ENOSYS); + PTW32_SET_ERRNO(ENOSYS); return -1; } /* sem_unlink */ diff --git a/sem_wait.c b/sem_wait.c index bceea5ab..4d896fe7 100644 --- a/sem_wait.c +++ b/sem_wait.c @@ -48,13 +48,13 @@ #include "implement.h" -static void __PTW32_CDECL -__ptw32_sem_wait_cleanup(void * sem) +static void PTW32_CDECL +ptw32_sem_wait_cleanup(void * sem) { sem_t s = (sem_t) sem; - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; - __ptw32_mcs_lock_acquire(&s->lock, &node); + ptw32_mcs_lock_acquire(&s->lock, &node); /* * If sema is destroyed do nothing, otherwise:- * If the sema is posted between us being canceled and us locking @@ -77,7 +77,7 @@ __ptw32_sem_wait_cleanup(void * sem) */ #endif /* NEED_SEM */ } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); } int @@ -111,28 +111,28 @@ sem_wait (sem_t * sem) * ------------------------------------------------------ */ { - __ptw32_mcs_local_node_t node; + ptw32_mcs_local_node_t node; int v; int result = 0; sem_t s = *sem; pthread_testcancel(); - __ptw32_mcs_lock_acquire(&s->lock, &node); + ptw32_mcs_lock_acquire(&s->lock, &node); v = --s->value; - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); if (v < 0) { -#if defined (__PTW32_CONFIG_MSVC7) +#if defined (PTW32_CONFIG_MSVC7) #pragma inline_depth(0) #endif /* Must wait */ - pthread_cleanup_push(__ptw32_sem_wait_cleanup, (void *) s); + pthread_cleanup_push(ptw32_sem_wait_cleanup, (void *) s); result = pthreadCancelableWait (s->sem); /* Cleanup if we're canceled or on any other error */ pthread_cleanup_pop(result); -#if defined (__PTW32_CONFIG_MSVC7) +#if defined (PTW32_CONFIG_MSVC7) #pragma inline_depth() #endif } @@ -140,24 +140,23 @@ sem_wait (sem_t * sem) if (!result) { - __ptw32_mcs_lock_acquire(&s->lock, &node); + ptw32_mcs_lock_acquire(&s->lock, &node); if (s->leftToUnblock > 0) { --s->leftToUnblock; SetEvent(s->sem); } - __ptw32_mcs_lock_release(&node); + ptw32_mcs_lock_release(&node); } #endif /* NEED_SEM */ if (result != 0) { - __PTW32_SET_ERRNO(result); + PTW32_SET_ERRNO(result); return -1; } return 0; - } /* sem_wait */ diff --git a/semaphore.h b/semaphore.h index f3eaa189..b2da2125 100644 --- a/semaphore.h +++ b/semaphore.h @@ -79,38 +79,38 @@ typedef struct sem_t_ * sem_t; */ #define SEM_FAILED (sem_t *)(-1) -__PTW32_BEGIN_C_DECLS +PTW32_BEGIN_C_DECLS /* Function prototypes: some are implemented as stubs, which * always fail; (FIXME: identify them). */ -__PTW32_DLLPORT int __PTW32_CDECL sem_init (sem_t * sem, +PTW32_DLLPORT int PTW32_CDECL sem_init (sem_t * sem, int pshared, unsigned int value); -__PTW32_DLLPORT int __PTW32_CDECL sem_destroy (sem_t * sem); +PTW32_DLLPORT int PTW32_CDECL sem_destroy (sem_t * sem); -__PTW32_DLLPORT int __PTW32_CDECL sem_trywait (sem_t * sem); +PTW32_DLLPORT int PTW32_CDECL sem_trywait (sem_t * sem); -__PTW32_DLLPORT int __PTW32_CDECL sem_wait (sem_t * sem); +PTW32_DLLPORT int PTW32_CDECL sem_wait (sem_t * sem); -__PTW32_DLLPORT int __PTW32_CDECL sem_timedwait (sem_t * sem, +PTW32_DLLPORT int PTW32_CDECL sem_timedwait (sem_t * sem, const struct timespec * abstime); -__PTW32_DLLPORT int __PTW32_CDECL sem_post (sem_t * sem); +PTW32_DLLPORT int PTW32_CDECL sem_post (sem_t * sem); -__PTW32_DLLPORT int __PTW32_CDECL sem_post_multiple (sem_t * sem, +PTW32_DLLPORT int PTW32_CDECL sem_post_multiple (sem_t * sem, int count); -__PTW32_DLLPORT sem_t * __PTW32_CDECL sem_open (const char *, int, ...); +PTW32_DLLPORT sem_t * PTW32_CDECL sem_open (const char *, int, ...); -__PTW32_DLLPORT int __PTW32_CDECL sem_close (sem_t * sem); +PTW32_DLLPORT int PTW32_CDECL sem_close (sem_t * sem); -__PTW32_DLLPORT int __PTW32_CDECL sem_unlink (const char * name); +PTW32_DLLPORT int PTW32_CDECL sem_unlink (const char * name); -__PTW32_DLLPORT int __PTW32_CDECL sem_getvalue (sem_t * sem, +PTW32_DLLPORT int PTW32_CDECL sem_getvalue (sem_t * sem, int * sval); -__PTW32_END_C_DECLS +PTW32_END_C_DECLS #endif /* !SEMAPHORE_H */ diff --git a/signal.c b/signal.c index 86b6947c..a0fe48f8 100644 --- a/signal.c +++ b/signal.c @@ -66,7 +66,7 @@ * structures. * * pthread_kill() eventually calls a routine similar to - * __ptw32_cancel_thread() which manipulates the target + * ptw32_cancel_thread() which manipulates the target * threads processor context to cause the thread to * run the handler launcher routine. pthread_kill() must * save the target threads current context so that the @@ -89,12 +89,12 @@ #if defined(HAVE_SIGSET_T) static void -__ptw32_signal_thread () +ptw32_signal_thread () { } static void -__ptw32_signal_callhandler () +ptw32_signal_callhandler () { } diff --git a/tests/Bmakefile b/tests/Bmakefile index a386861a..6feb900d 100644 --- a/tests/Bmakefile +++ b/tests/Bmakefile @@ -50,15 +50,15 @@ OPTIM = -O2 XXLIBS = cw32mti.lib ws2_32.lib # C++ Exceptions -BCEFLAGS = -P -D__PtW32NoCatchWarn -D__PTW32_CLEANUP_CXX +BCEFLAGS = -P -D__PtW32NoCatchWarn -DPTW32_CLEANUP_CXX BCELIB = pthreadBCE$(PTW32_VER).lib BCEDLL = pthreadBCE$(PTW32_VER).dll # C cleanup code -BCFLAGS = -D__PTW32_CLEANUP_C +BCFLAGS = -DPTW32_CLEANUP_C BCLIB = pthreadBC$(PTW32_VER).lib BCDLL = pthreadBC$(PTW32_VER).dll # C++ Exceptions in application - using VC version of pthreads dll -BCXFLAGS = -D__PTW32_CLEANUP_C +BCXFLAGS = -DPTW32_CLEANUP_C # Defaults CPLIB = $(BCLIB) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index fc8e7fde..3ce0ec88 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -73,8 +73,8 @@ foreach(t ${TESTS}) continue() endif() - add_testcase(${test} VCE __PTW32_CLEANUP_CXX ) - add_testcase(${test} VSE __PTW32_CLEANUP_SEH ) - add_testcase(${test} VC __PTW32_CLEANUP_C ) + add_testcase(${test} VCE PTW32_CLEANUP_CXX ) + add_testcase(${test} VSE PTW32_CLEANUP_SEH ) + add_testcase(${test} VC PTW32_CLEANUP_C ) endforeach(t) diff --git a/tests/ChangeLog b/tests/ChangeLog index beda9e32..00658950 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -50,16 +50,16 @@ 2016-12-20 Ross Johnson - * all (PTW32_*): rename to __PTW32_*. - (ptw32_*): rename to __ptw32_*. + * all (PTW32_*): rename to PTW32_*. + (ptw32_*): rename to ptw32_*. (PtW32*): rename to __PtW32*. * GNUmakefile: removed; must now configure from GNUmakefile.in. 2016-12-18 Ross Johnson - * test.c (__PTW32_TEST_SNEAK_PEEK): #define this to prevent some + * test.c (PTW32_TEST_SNEAK_PEEK): #define this to prevent some tests from failing (specifically "make GCX-small-static") with - undefined __ptw32_autostatic_anchor. Checked in ../implement.h. + undefined ptw32_autostatic_anchor. Checked in ../implement.h. * GNUMakfile.in: Rename testsuite log to test-specific name and do not remove. * GNUMakfile.in: Add realclean target @@ -245,7 +245,7 @@ 2012-09-22 Ross Johnson * pthread_win32_attach_detach_np.c (pthread_win32_detach_thread_np): - Check for NULL __ptw32_selfThreadKey before call to TlsSetKey(). Need + Check for NULL ptw32_selfThreadKey before call to TlsSetKey(). Need to find where this is being set to NULL before this point. Was consistently failing tests/seamphore3.c in all GC static builds and never seen in GC DLL builds. May also be responsible for diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index 7a4623db..e6317288 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -152,49 +152,49 @@ help: @ $(ECHO) "$(MAKE) clean GC TESTS="foo bar" (to build individual tests \"foo.c and bar.c\" with C and run using GC dll)" GC: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CC) XXCFLAGS="-DPTW32_CLEANUP_C" allpassed GC-asm: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" all-asm + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CC) XXCFLAGS="-DPTW32_CLEANUP_C" all-asm GC-bench: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" XXLIBS="benchlib.o" all-bench + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CC) XXCFLAGS="-DPTW32_CLEANUP_C" XXLIBS="benchlib.o" all-bench GC-bench-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)d" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" XXLIBS="benchlib.o" OPT="${DOPT}" all-bench + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)d" CC=$(CC) XXCFLAGS="-DPTW32_CLEANUP_C" XXLIBS="benchlib.o" OPT="${DOPT}" all-bench GC-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)d" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)d" CC=$(CC) XXCFLAGS="-DPTW32_CLEANUP_C" OPT="${DOPT}" allpassed GC-static GC-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CC) XXCFLAGS="-DPTW32_CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed GC-static-debug GC-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)d" CC=$(CC) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)d" CC=$(CC) XXCFLAGS="-DPTW32_CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed GCE: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(PTW32_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__PTW32_CLEANUP_CXX" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(PTW32_VER)" CC=$(CXX) XXCFLAGS="-mthreads -DPTW32_CLEANUP_CXX" allpassed GCE-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(PTW32_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_CXX" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(PTW32_VER)d" CC=$(CXX) XXCFLAGS="-DPTW32_CLEANUP_CXX" OPT="${DOPT}" allpassed GCE-static GCE-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(PTW32_VER)" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_CXX -D__PTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(PTW32_VER)" CC=$(CXX) XXCFLAGS="-DPTW32_CLEANUP_CXX -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed GCE-static-debug GCE-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(PTW32_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_CXX -D__PTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GCE$(PTW32_VER)d" CC=$(CXX) XXCFLAGS="-DPTW32_CLEANUP_CXX -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed GCX: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CXX) XXCFLAGS="-mthreads -D__PTW32_CLEANUP_C" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CXX) XXCFLAGS="-mthreads -DPTW32_CLEANUP_C" allpassed GCX-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_C" OPT="${DOPT}" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)d" CC=$(CXX) XXCFLAGS="-DPTW32_CLEANUP_C" OPT="${DOPT}" allpassed GCX-static GCX-small-static: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)" CC=$(CXX) XXCFLAGS="-DPTW32_CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" DLL="" allpassed GCX-static-debug GCX-small-static-debug: - @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)d" CC=$(CXX) XXCFLAGS="-D__PTW32_CLEANUP_C -D__PTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed + @ $(MAKE) --no-builtin-rules TEST=$@ GCX="GC$(PTW32_VER)d" CC=$(CXX) XXCFLAGS="-DPTW32_CLEANUP_C -DPTW32_STATIC_LIB -Wl,-Bstatic" OPT="$(DOPT)" DLL="" allpassed all-asm: $(ASM) @ $(ECHO) "ALL TESTS COMPILED TO ASSEMBLER CODE" diff --git a/tests/Makefile b/tests/Makefile index 36efaf7b..3557d3a6 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -23,7 +23,7 @@ OPTIM = /O2 /Ob0 XXLIBS = ws2_32.lib # C++ Exceptions -VCEFLAGS = /EHs /TP /D__PtW32NoCatchWarn /D__PTW32_CLEANUP_CXX +VCEFLAGS = /EHs /TP /D__PtW32NoCatchWarn /DPTW32_CLEANUP_CXX VCELIB = libpthreadVCE$(PTW32_VER).lib VCEIMP = pthreadVCE$(PTW32_VER).lib VCEDLL = pthreadVCE$(PTW32_VER).dll @@ -31,7 +31,7 @@ VCELIBD = libpthreadVCE$(PTW32_VER)d.lib VCEIMPD = pthreadVCE$(PTW32_VER)d.lib VCEDLLD = pthreadVCE$(PTW32_VER)d.dll # Structured Exceptions -VSEFLAGS = /D__PTW32_CLEANUP_SEH +VSEFLAGS = /DPTW32_CLEANUP_SEH VSELIB = libpthreadVSE$(PTW32_VER).lib VSEIMP = pthreadVSE$(PTW32_VER).lib VSEDLL = pthreadVSE$(PTW32_VER).dll @@ -39,7 +39,7 @@ VSELIBD = libpthreadVSE$(PTW32_VER)d.lib VSEIMPD = pthreadVSE$(PTW32_VER)d.lib VSEDLLD = pthreadVSE$(PTW32_VER)d.dll # C cleanup code -VCFLAGS = /D__PTW32_CLEANUP_C +VCFLAGS = /DPTW32_CLEANUP_C VCLIB = libpthreadVC$(PTW32_VER).lib VCIMP = pthreadVC$(PTW32_VER).lib VCDLL = pthreadVC$(PTW32_VER).dll @@ -47,7 +47,7 @@ VCLIBD = libpthreadVC$(PTW32_VER)d.lib VCIMPD = pthreadVC$(PTW32_VER)d.lib VCDLLD = pthreadVC$(PTW32_VER)d.dll # C++ Exceptions in application - using VC version of pthreads dll -VCXFLAGS = /EHs /TP /D__PTW32_CLEANUP_C +VCXFLAGS = /EHs /TP /DPTW32_CLEANUP_C # Defaults CPLIB = $(VCLIB) diff --git a/tests/Wmakefile b/tests/Wmakefile index 053880dd..7f919dca 100644 --- a/tests/Wmakefile +++ b/tests/Wmakefile @@ -52,15 +52,15 @@ OPTIM = -od XXLIBS = # C++ Exceptions -WCEFLAGS = -xs -d__PtW32NoCatchWarn -d__PTW32_CLEANUP_CXX +WCEFLAGS = -xs -d__PtW32NoCatchWarn -dPTW32_CLEANUP_CXX WCELIB = pthreadWCE$(DLL_VER).lib WCEDLL = pthreadWCE$(DLL_VER).dll # C cleanup code -WCFLAGS = -d__PTW32_CLEANUP_C +WCFLAGS = -dPTW32_CLEANUP_C WCLIB = pthreadWC$(DLL_VER).lib WCDLL = pthreadWC$(DLL_VER).dll # C++ Exceptions in application - using WC version of pthreads dll -WCXFLAGS = -xs -d__PTW32_CLEANUP_C +WCXFLAGS = -xs -dPTW32_CLEANUP_C CFLAGS= -w4 -e25 -d_REENTRANT -zq -bm $(OPTIM) -5r -bt=nt -mf -d2 diff --git a/tests/affinity2.c b/tests/affinity2.c index 73bfb4b2..b2849c5d 100644 --- a/tests/affinity2.c +++ b/tests/affinity2.c @@ -69,7 +69,7 @@ main() if (result != 0) { int err = -#if defined (__PTW32_USES_SEPARATE_CRT) +#if defined (PTW32_USES_SEPARATE_CRT) GetLastError(); #else errno; diff --git a/tests/benchlib.c b/tests/benchlib.c index 055ea042..6b724b9d 100644 --- a/tests/benchlib.c +++ b/tests/benchlib.c @@ -46,8 +46,8 @@ int old_mutex_use = OLD_WIN32CS; -BOOL (WINAPI *__ptw32_try_enter_critical_section)(LPCRITICAL_SECTION) = NULL; -HINSTANCE __ptw32_h_kernel32; +BOOL (WINAPI *ptw32_try_enter_critical_section)(LPCRITICAL_SECTION) = NULL; +HINSTANCE ptw32_h_kernel32; void dummy_call(int * a) @@ -109,21 +109,21 @@ old_mutex_init(old_mutex_t *mutex, const old_mutexattr_t *attr) /* * Load KERNEL32 and try to get address of TryEnterCriticalSection */ - __ptw32_h_kernel32 = LoadLibrary(TEXT("KERNEL32.DLL")); - __ptw32_try_enter_critical_section = (BOOL (WINAPI *)(LPCRITICAL_SECTION)) + ptw32_h_kernel32 = LoadLibrary(TEXT("KERNEL32.DLL")); + ptw32_try_enter_critical_section = (BOOL (WINAPI *)(LPCRITICAL_SECTION)) #if defined(NEED_UNICODE_CONSTS) - GetProcAddress(__ptw32_h_kernel32, + GetProcAddress(ptw32_h_kernel32, (const TCHAR *)TEXT("TryEnterCriticalSection")); #else - GetProcAddress(__ptw32_h_kernel32, + GetProcAddress(ptw32_h_kernel32, (LPCSTR) "TryEnterCriticalSection"); #endif - if (__ptw32_try_enter_critical_section != NULL) + if (ptw32_try_enter_critical_section != NULL) { InitializeCriticalSection(&cs); - if ((*__ptw32_try_enter_critical_section)(&cs)) + if ((*ptw32_try_enter_critical_section)(&cs)) { LeaveCriticalSection(&cs); } @@ -132,15 +132,15 @@ old_mutex_init(old_mutex_t *mutex, const old_mutexattr_t *attr) /* * Not really supported (Win98?). */ - __ptw32_try_enter_critical_section = NULL; + ptw32_try_enter_critical_section = NULL; } DeleteCriticalSection(&cs); } - if (__ptw32_try_enter_critical_section == NULL) + if (ptw32_try_enter_critical_section == NULL) { - (void) FreeLibrary(__ptw32_h_kernel32); - __ptw32_h_kernel32 = 0; + (void) FreeLibrary(ptw32_h_kernel32); + ptw32_h_kernel32 = 0; } if (old_mutex_use == OLD_WIN32CS) @@ -188,7 +188,7 @@ old_mutex_lock(old_mutex_t *mutex) return EINVAL; } - if (*mutex == (old_mutex_t) __PTW32_OBJECT_AUTO_INIT) + if (*mutex == (old_mutex_t) PTW32_OBJECT_AUTO_INIT) { /* * Don't use initialisers when benchtesting. @@ -229,7 +229,7 @@ old_mutex_unlock(old_mutex_t *mutex) mx = *mutex; - if (mx != (old_mutex_t) __PTW32_OBJECT_AUTO_INIT) + if (mx != (old_mutex_t) PTW32_OBJECT_AUTO_INIT) { if (mx->mutex == 0) { @@ -260,7 +260,7 @@ old_mutex_trylock(old_mutex_t *mutex) return EINVAL; } - if (*mutex == (old_mutex_t) __PTW32_OBJECT_AUTO_INIT) + if (*mutex == (old_mutex_t) PTW32_OBJECT_AUTO_INIT) { /* * Don't use initialisers when benchtesting. @@ -274,11 +274,11 @@ old_mutex_trylock(old_mutex_t *mutex) { if (mx->mutex == 0) { - if (__ptw32_try_enter_critical_section == NULL) + if (ptw32_try_enter_critical_section == NULL) { result = 0; } - else if ((*__ptw32_try_enter_critical_section)(&mx->cs) != TRUE) + else if ((*ptw32_try_enter_critical_section)(&mx->cs) != TRUE) { result = EBUSY; } @@ -314,7 +314,7 @@ old_mutex_destroy(old_mutex_t *mutex) return EINVAL; } - if (*mutex != (old_mutex_t) __PTW32_OBJECT_AUTO_INIT) + if (*mutex != (old_mutex_t) PTW32_OBJECT_AUTO_INIT) { mx = *mutex; @@ -349,10 +349,10 @@ old_mutex_destroy(old_mutex_t *mutex) result = EINVAL; } - if (__ptw32_try_enter_critical_section != NULL) + if (ptw32_try_enter_critical_section != NULL) { - (void) FreeLibrary(__ptw32_h_kernel32); - __ptw32_h_kernel32 = 0; + (void) FreeLibrary(ptw32_h_kernel32); + ptw32_h_kernel32 = 0; } return(result); diff --git a/tests/benchtest.h b/tests/benchtest.h index 6a22b4b3..f95a61bf 100644 --- a/tests/benchtest.h +++ b/tests/benchtest.h @@ -52,10 +52,10 @@ struct old_mutexattr_t_ { typedef struct old_mutexattr_t_ * old_mutexattr_t; -extern BOOL (WINAPI *__ptw32_try_enter_critical_section)(LPCRITICAL_SECTION); -extern HINSTANCE __ptw32_h_kernel32; +extern BOOL (WINAPI *ptw32_try_enter_critical_section)(LPCRITICAL_SECTION); +extern HINSTANCE ptw32_h_kernel32; -#define __PTW32_OBJECT_AUTO_INIT ((void *) -1) +#define PTW32_OBJECT_AUTO_INIT ((void *) -1) void dummy_call(int * a); void interlocked_inc_with_conditionals(int *a); diff --git a/tests/benchtest1.c b/tests/benchtest1.c index 23e8d727..57d689b9 100644 --- a/tests/benchtest1.c +++ b/tests/benchtest1.c @@ -45,13 +45,13 @@ #include "benchtest.h" -#define __PTW32_MUTEX_TYPES +#define PTW32_MUTEX_TYPES #define ITERATIONS 10000000L pthread_mutex_t mx; pthread_mutexattr_t ma; -__PTW32_STRUCT_TIMEB currSysTimeStart; -__PTW32_STRUCT_TIMEB currSysTimeStop; +PTW32_STRUCT_TIMEB currSysTimeStart; +PTW32_STRUCT_TIMEB currSysTimeStop; long durationMilliSecs; long overHeadMilliSecs = 0; int two = 2; @@ -67,16 +67,16 @@ int iter; * when doing the overhead timing with an empty loop. */ #define TESTSTART \ - { int i, j = 0, k = 0; __PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; + { int i, j = 0, k = 0; PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; #define TESTSTOP \ - }; __PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } + }; PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } void runTest (char * testNameString, int mType) { -#ifdef __PTW32_MUTEX_TYPES +#ifdef PTW32_MUTEX_TYPES assert(pthread_mutexattr_settype(&ma, mType) == 0); #endif assert(pthread_mutex_init(&mx, &ma) == 0); @@ -222,7 +222,7 @@ main (int argc, char *argv[]) /* * Now we can start the actual tests */ -#ifdef __PTW32_MUTEX_TYPES +#ifdef PTW32_MUTEX_TYPES runTest("PTHREAD_MUTEX_DEFAULT", PTHREAD_MUTEX_DEFAULT); runTest("PTHREAD_MUTEX_NORMAL", PTHREAD_MUTEX_NORMAL); @@ -238,7 +238,7 @@ main (int argc, char *argv[]) pthread_mutexattr_setrobust(&ma, PTHREAD_MUTEX_ROBUST); -#ifdef __PTW32_MUTEX_TYPES +#ifdef PTW32_MUTEX_TYPES runTest("PTHREAD_MUTEX_DEFAULT (Robust)", PTHREAD_MUTEX_DEFAULT); runTest("PTHREAD_MUTEX_NORMAL (Robust)", PTHREAD_MUTEX_NORMAL); diff --git a/tests/benchtest2.c b/tests/benchtest2.c index e28c10e6..2e8771c3 100644 --- a/tests/benchtest2.c +++ b/tests/benchtest2.c @@ -48,7 +48,7 @@ #include "benchtest.h" -#define __PTW32_MUTEX_TYPES +#define PTW32_MUTEX_TYPES #define ITERATIONS 100000L pthread_mutex_t gate1, gate2; @@ -57,8 +57,8 @@ CRITICAL_SECTION cs1, cs2; pthread_mutexattr_t ma; long durationMilliSecs; long overHeadMilliSecs = 0; -__PTW32_STRUCT_TIMEB currSysTimeStart; -__PTW32_STRUCT_TIMEB currSysTimeStop; +PTW32_STRUCT_TIMEB currSysTimeStart; +PTW32_STRUCT_TIMEB currSysTimeStop; pthread_t worker; int running = 0; @@ -70,10 +70,10 @@ int running = 0; * when doing the overhead timing with an empty loop. */ #define TESTSTART \ - { int i, j = 0, k = 0; __PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; + { int i, j = 0, k = 0; PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; #define TESTSTOP \ - }; __PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } + }; PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } void * @@ -140,7 +140,7 @@ CSThread(void * arg) void runTest (char * testNameString, int mType) { -#ifdef __PTW32_MUTEX_TYPES +#ifdef PTW32_MUTEX_TYPES assert(pthread_mutexattr_settype(&ma, mType) == 0); #endif assert(pthread_mutex_init(&gate1, &ma) == 0); @@ -285,7 +285,7 @@ main (int argc, char *argv[]) /* * Now we can start the actual tests */ -#ifdef __PTW32_MUTEX_TYPES +#ifdef PTW32_MUTEX_TYPES runTest("PTHREAD_MUTEX_DEFAULT", PTHREAD_MUTEX_DEFAULT); runTest("PTHREAD_MUTEX_NORMAL", PTHREAD_MUTEX_NORMAL); @@ -301,7 +301,7 @@ main (int argc, char *argv[]) pthread_mutexattr_setrobust(&ma, PTHREAD_MUTEX_ROBUST); -#ifdef __PTW32_MUTEX_TYPES +#ifdef PTW32_MUTEX_TYPES runTest("PTHREAD_MUTEX_DEFAULT (Robust)", PTHREAD_MUTEX_DEFAULT); runTest("PTHREAD_MUTEX_NORMAL (Robust)", PTHREAD_MUTEX_NORMAL); diff --git a/tests/benchtest3.c b/tests/benchtest3.c index 1bc5a041..5cf1ed06 100644 --- a/tests/benchtest3.c +++ b/tests/benchtest3.c @@ -45,14 +45,14 @@ #include "benchtest.h" -#define __PTW32_MUTEX_TYPES +#define PTW32_MUTEX_TYPES #define ITERATIONS 10000000L pthread_mutex_t mx; old_mutex_t ox; pthread_mutexattr_t ma; -__PTW32_STRUCT_TIMEB currSysTimeStart; -__PTW32_STRUCT_TIMEB currSysTimeStop; +PTW32_STRUCT_TIMEB currSysTimeStart; +PTW32_STRUCT_TIMEB currSysTimeStop; long durationMilliSecs; long overHeadMilliSecs = 0; @@ -64,10 +64,10 @@ long overHeadMilliSecs = 0; * when doing the overhead timing with an empty loop. */ #define TESTSTART \ - { int i, j = 0, k = 0; __PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; + { int i, j = 0, k = 0; PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; #define TESTSTOP \ - }; __PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } + }; PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } void * @@ -97,7 +97,7 @@ runTest (char * testNameString, int mType) { pthread_t t; -#ifdef __PTW32_MUTEX_TYPES +#ifdef PTW32_MUTEX_TYPES (void) pthread_mutexattr_settype(&ma, mType); #endif assert(pthread_mutex_init(&mx, &ma) == 0); @@ -174,7 +174,7 @@ main (int argc, char *argv[]) /* * Now we can start the actual tests */ -#ifdef __PTW32_MUTEX_TYPES +#ifdef PTW32_MUTEX_TYPES runTest("PTHREAD_MUTEX_DEFAULT", PTHREAD_MUTEX_DEFAULT); runTest("PTHREAD_MUTEX_NORMAL", PTHREAD_MUTEX_NORMAL); @@ -190,7 +190,7 @@ main (int argc, char *argv[]) pthread_mutexattr_setrobust(&ma, PTHREAD_MUTEX_ROBUST); -#ifdef __PTW32_MUTEX_TYPES +#ifdef PTW32_MUTEX_TYPES runTest("PTHREAD_MUTEX_DEFAULT (Robust)", PTHREAD_MUTEX_DEFAULT); runTest("PTHREAD_MUTEX_NORMAL (Robust)", PTHREAD_MUTEX_NORMAL); diff --git a/tests/benchtest4.c b/tests/benchtest4.c index 51cd2568..21f03595 100644 --- a/tests/benchtest4.c +++ b/tests/benchtest4.c @@ -45,14 +45,14 @@ #include "benchtest.h" -#define __PTW32_MUTEX_TYPES +#define PTW32_MUTEX_TYPES #define ITERATIONS 10000000L pthread_mutex_t mx; old_mutex_t ox; pthread_mutexattr_t ma; -__PTW32_STRUCT_TIMEB currSysTimeStart; -__PTW32_STRUCT_TIMEB currSysTimeStop; +PTW32_STRUCT_TIMEB currSysTimeStart; +PTW32_STRUCT_TIMEB currSysTimeStop; long durationMilliSecs; long overHeadMilliSecs = 0; @@ -64,10 +64,10 @@ long overHeadMilliSecs = 0; * when doing the overhead timing with an empty loop. */ #define TESTSTART \ - { int i, j = 0, k = 0; __PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; + { int i, j = 0, k = 0; PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; #define TESTSTOP \ - }; __PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } + }; PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } void @@ -79,7 +79,7 @@ oldRunTest (char * testNameString, int mType) void runTest (char * testNameString, int mType) { -#ifdef __PTW32_MUTEX_TYPES +#ifdef PTW32_MUTEX_TYPES pthread_mutexattr_settype(&ma, mType); #endif pthread_mutex_init(&mx, &ma); @@ -155,7 +155,7 @@ main (int argc, char *argv[]) /* * Now we can start the actual tests */ -#ifdef __PTW32_MUTEX_TYPES +#ifdef PTW32_MUTEX_TYPES runTest("PTHREAD_MUTEX_DEFAULT", PTHREAD_MUTEX_DEFAULT); runTest("PTHREAD_MUTEX_NORMAL", PTHREAD_MUTEX_NORMAL); @@ -171,7 +171,7 @@ main (int argc, char *argv[]) pthread_mutexattr_setrobust(&ma, PTHREAD_MUTEX_ROBUST); -#ifdef __PTW32_MUTEX_TYPES +#ifdef PTW32_MUTEX_TYPES runTest("PTHREAD_MUTEX_DEFAULT (Robust)", PTHREAD_MUTEX_DEFAULT); runTest("PTHREAD_MUTEX_NORMAL (Robust)", PTHREAD_MUTEX_NORMAL); diff --git a/tests/benchtest5.c b/tests/benchtest5.c index d4fd515a..8717a0d7 100644 --- a/tests/benchtest5.c +++ b/tests/benchtest5.c @@ -50,8 +50,8 @@ sem_t sema; HANDLE w32sema; -__PTW32_STRUCT_TIMEB currSysTimeStart; -__PTW32_STRUCT_TIMEB currSysTimeStop; +PTW32_STRUCT_TIMEB currSysTimeStart; +PTW32_STRUCT_TIMEB currSysTimeStop; long durationMilliSecs; long overHeadMilliSecs = 0; int one = 1; @@ -65,10 +65,10 @@ int zero = 0; * when doing the overhead timing with an empty loop. */ #define TESTSTART \ - { int i, j = 0, k = 0; __PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; + { int i, j = 0, k = 0; PTW32_FTIME(&currSysTimeStart); for (i = 0; i < ITERATIONS; i++) { j++; #define TESTSTOP \ - }; __PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } + }; PTW32_FTIME(&currSysTimeStop); if (j + k == i) j++; } void diff --git a/tests/cancel9.c b/tests/cancel9.c index 52468ac4..14e223ba 100644 --- a/tests/cancel9.c +++ b/tests/cancel9.c @@ -160,7 +160,7 @@ main () pthread_t t; void *result; - if (pthread_win32_test_features_np (__PTW32_ALERTABLE_ASYNC_CANCEL)) + if (pthread_win32_test_features_np (PTW32_ALERTABLE_ASYNC_CANCEL)) { printf ("Cancel sleeping thread.\n"); assert (pthread_create (&t, NULL, test_sleep, NULL) == 0); diff --git a/tests/cleanup1.c b/tests/cleanup1.c index 85d0e0d2..ac308c18 100644 --- a/tests/cleanup1.c +++ b/tests/cleanup1.c @@ -98,7 +98,7 @@ typedef struct { static sharedInt_t pop_count; static void -#ifdef __PTW32_CLEANUP_C +#ifdef PTW32_CLEANUP_C __cdecl #endif increment_pop_count(void * arg) diff --git a/tests/context1.c b/tests/context1.c index ee5d33dc..133d1a7d 100644 --- a/tests/context1.c +++ b/tests/context1.c @@ -109,7 +109,7 @@ main() assert(pthread_create(&t, NULL, func, NULL) == 0); - hThread = ((__ptw32_thread_t *)t.p)->threadH; + hThread = ((ptw32_thread_t *)t.p)->threadH; Sleep(500); @@ -125,7 +125,7 @@ main() context.ContextFlags = CONTEXT_CONTROL; GetThreadContext(hThread, &context); - __PTW32_PROGCTR (context) = (DWORD_PTR) anotherEnding; + PTW32_PROGCTR (context) = (DWORD_PTR) anotherEnding; SetThreadContext(hThread, &context); ResumeThread(hThread); } diff --git a/tests/context2.c b/tests/context2.c index 4a4d9837..9b750fdc 100644 --- a/tests/context2.c +++ b/tests/context2.c @@ -123,7 +123,7 @@ main() assert(pthread_create(&t, NULL, func, NULL) == 0); - hThread = ((__ptw32_thread_t *)t.p)->threadH; + hThread = ((ptw32_thread_t *)t.p)->threadH; Sleep(500); @@ -139,7 +139,7 @@ main() context.ContextFlags = CONTEXT_CONTROL; GetThreadContext(hThread, &context); - __PTW32_PROGCTR (context) = (DWORD_PTR) anotherEnding; + PTW32_PROGCTR (context) = (DWORD_PTR) anotherEnding; SetThreadContext(hThread, &context); ResumeThread(hThread); } diff --git a/tests/exception3.c b/tests/exception3.c index f7ae3118..f134846b 100644 --- a/tests/exception3.c +++ b/tests/exception3.c @@ -149,7 +149,7 @@ exceptionedThread(void * arg) { int dummy = 0x1; -#if defined (__PTW32_USES_SEPARATE_CRT) && (defined(__PTW32_CLEANUP_CXX) || defined(__PTW32_CLEANUP_SEH)) +#if defined (PTW32_USES_SEPARATE_CRT) && (defined(PTW32_CLEANUP_CXX) || defined(PTW32_CLEANUP_SEH)) printf("PTW32_USES_SEPARATE_CRT is defined\n"); pthread_win32_set_terminate_np(&terminateFunction); set_terminate(&wrongTerminateFunction); diff --git a/tests/name_np1.c b/tests/name_np1.c index 61bbdefa..1aebd424 100644 --- a/tests/name_np1.c +++ b/tests/name_np1.c @@ -55,7 +55,7 @@ static int washere = 0; static pthread_barrier_t sync; -#if defined (__PTW32_COMPATIBILITY_BSD) +#if defined (PTW32_COMPATIBILITY_BSD) static int seqno = 0; #endif @@ -81,10 +81,10 @@ main() assert(pthread_barrier_init(&sync, NULL, 2) == 0); assert(pthread_create(&t, NULL, func, NULL) == 0); -#if defined (__PTW32_COMPATIBILITY_BSD) +#if defined (PTW32_COMPATIBILITY_BSD) seqno++; assert(pthread_setname_np(t, "MyThread%d", (void *)&seqno) == 0); -#elif defined (__PTW32_COMPATIBILITY_TRU64) +#elif defined (PTW32_COMPATIBILITY_TRU64) assert(pthread_setname_np(t, "MyThread1", NULL) == 0); #else assert(pthread_setname_np(t, "MyThread1") == 0); diff --git a/tests/name_np2.c b/tests/name_np2.c index 4c098ec7..d9f08f98 100644 --- a/tests/name_np2.c +++ b/tests/name_np2.c @@ -57,7 +57,7 @@ static int washere = 0; static pthread_attr_t attr; static pthread_barrier_t sync; -#if defined (__PTW32_COMPATIBILITY_BSD) +#if defined (PTW32_COMPATIBILITY_BSD) static int seqno = 0; #endif @@ -81,10 +81,10 @@ main() pthread_t t; assert(pthread_attr_init(&attr) == 0); -#if defined (__PTW32_COMPATIBILITY_BSD) +#if defined (PTW32_COMPATIBILITY_BSD) seqno++; assert(pthread_attr_setname_np(&attr, "MyThread%d", (void *)&seqno) == 0); -#elif defined (__PTW32_COMPATIBILITY_TRU64) +#elif defined (PTW32_COMPATIBILITY_TRU64) assert(pthread_attr_setname_np(&attr, "MyThread1", NULL) == 0); #else assert(pthread_attr_setname_np(&attr, "MyThread1") == 0); diff --git a/tests/once3.c b/tests/once3.c index 54073eca..461b3a41 100644 --- a/tests/once3.c +++ b/tests/once3.c @@ -103,7 +103,7 @@ main() pthread_t t[NUM_THREADS][NUM_ONCE]; int i, j; -#if defined (__PTW32_CONFIG_MSVC6) && defined(__PTW32_CLEANUP_CXX) +#if defined (PTW32_CONFIG_MSVC6) && defined(PTW32_CLEANUP_CXX) puts("If this test fails or hangs, rebuild the library with /EHa instead of /EHs."); puts("(This is a known issue with Microsoft VC++6.0.)"); fflush(stdout); diff --git a/tests/once4.c b/tests/once4.c index af8d22c6..df470e39 100644 --- a/tests/once4.c +++ b/tests/once4.c @@ -138,7 +138,7 @@ main() pthread_t t[NUM_THREADS][NUM_ONCE]; int i, j; -#if defined (__PTW32_CONFIG_MSVC6) && defined(__PTW32_CLEANUP_CXX) +#if defined (PTW32_CONFIG_MSVC6) && defined(PTW32_CLEANUP_CXX) puts("If this test fails or hangs, rebuild the library with /EHa instead of /EHs."); puts("(This is a known issue with Microsoft VC++6.0.)"); fflush(stdout); diff --git a/tests/self1.c b/tests/self1.c index ef3a7779..36ad7764 100644 --- a/tests/self1.c +++ b/tests/self1.c @@ -52,7 +52,7 @@ main(int argc, char * argv[]) */ pthread_t self; -#if defined (__PTW32_STATIC_LIB) && !(defined(_MSC_VER) || defined(__MINGW32__)) +#if defined (PTW32_STATIC_LIB) && !(defined(_MSC_VER) || defined(__MINGW32__)) pthread_win32_process_attach_np(); #endif @@ -60,7 +60,7 @@ main(int argc, char * argv[]) assert(self.p != NULL); -#if defined (__PTW32_STATIC_LIB) && !(defined(_MSC_VER) || defined(__MINGW32__)) +#if defined (PTW32_STATIC_LIB) && !(defined(_MSC_VER) || defined(__MINGW32__)) pthread_win32_process_detach_np(); #endif return 0; diff --git a/tests/semaphore1.c b/tests/semaphore1.c index ca5051b1..8ea39120 100644 --- a/tests/semaphore1.c +++ b/tests/semaphore1.c @@ -84,7 +84,7 @@ thr(void * arg) if ( result == -1 ) { int err = -#if defined (__PTW32_USES_SEPARATE_CRT) +#if defined (PTW32_USES_SEPARATE_CRT) GetLastError(); #else errno; @@ -130,7 +130,7 @@ main() if (result2 == -1) { int err = -#if defined (__PTW32_USES_SEPARATE_CRT) +#if defined (PTW32_USES_SEPARATE_CRT) GetLastError(); #else errno; diff --git a/tests/sizes.c b/tests/sizes.c index 31a146d2..30ab601a 100644 --- a/tests/sizes.c +++ b/tests/sizes.c @@ -11,7 +11,7 @@ main() printf("Sizes of pthreads-win32 structs\n"); printf("-------------------------------\n"); printf("%30s %4d\n", "pthread_t", (int)sizeof(pthread_t)); - printf("%30s %4d\n", "__ptw32_thread_t", (int)sizeof(__ptw32_thread_t)); + printf("%30s %4d\n", "ptw32_thread_t", (int)sizeof(ptw32_thread_t)); printf("%30s %4d\n", "pthread_attr_t_", (int)sizeof(struct pthread_attr_t_)); printf("%30s %4d\n", "sem_t_", (int)sizeof(struct sem_t_)); printf("%30s %4d\n", "pthread_mutex_t_", (int)sizeof(struct pthread_mutex_t_)); @@ -25,8 +25,8 @@ main() printf("%30s %4d\n", "pthread_rwlock_t_", (int)sizeof(struct pthread_rwlock_t_)); printf("%30s %4d\n", "pthread_rwlockattr_t_", (int)sizeof(struct pthread_rwlockattr_t_)); printf("%30s %4d\n", "pthread_once_t_", (int)sizeof(struct pthread_once_t_)); - printf("%30s %4d\n", "__ptw32_cleanup_t", (int)sizeof(struct __ptw32_cleanup_t)); - printf("%30s %4d\n", "__ptw32_mcs_node_t_", (int)sizeof(struct __ptw32_mcs_node_t_)); + printf("%30s %4d\n", "ptw32_cleanup_t", (int)sizeof(struct ptw32_cleanup_t)); + printf("%30s %4d\n", "ptw32_mcs_node_t_", (int)sizeof(struct ptw32_mcs_node_t_)); printf("%30s %4d\n", "sched_param", (int)sizeof(struct sched_param)); printf("-------------------------------\n"); diff --git a/tests/spin4.c b/tests/spin4.c index 0aea33f1..5734560f 100644 --- a/tests/spin4.c +++ b/tests/spin4.c @@ -39,8 +39,8 @@ #include pthread_spinlock_t lock = PTHREAD_SPINLOCK_INITIALIZER; -__PTW32_STRUCT_TIMEB currSysTimeStart; -__PTW32_STRUCT_TIMEB currSysTimeStop; +PTW32_STRUCT_TIMEB currSysTimeStart; +PTW32_STRUCT_TIMEB currSysTimeStop; #define GetDurationMilliSecs(_TStart, _TStop) ((_TStop.time*1000+_TStop.millitm) \ - (_TStart.time*1000+_TStart.millitm)) @@ -49,11 +49,11 @@ static int washere = 0; void * func(void * arg) { - __PTW32_FTIME(&currSysTimeStart); + PTW32_FTIME(&currSysTimeStart); washere = 1; assert(pthread_spin_lock(&lock) == 0); assert(pthread_spin_unlock(&lock) == 0); - __PTW32_FTIME(&currSysTimeStop); + PTW32_FTIME(&currSysTimeStop); return (void *)(size_t)GetDurationMilliSecs(currSysTimeStart, currSysTimeStop); } @@ -64,7 +64,7 @@ main() void* result = (void*)0; pthread_t t; int CPUs; - __PTW32_STRUCT_TIMEB sysTime; + PTW32_STRUCT_TIMEB sysTime; if ((CPUs = pthread_num_processors_np()) == 1) { @@ -84,7 +84,7 @@ main() do { sched_yield(); - __PTW32_FTIME(&sysTime); + PTW32_FTIME(&sysTime); } while (GetDurationMilliSecs(currSysTimeStart, sysTime) <= 1000); diff --git a/tests/test.h b/tests/test.h index db72214f..e5b6d653 100644 --- a/tests/test.h +++ b/tests/test.h @@ -41,7 +41,7 @@ * This is used inside ../implement.h to control * what these test apps see and don't see. */ -#define __PTW32_TEST_SNEAK_PEEK +#define PTW32_TEST_SNEAK_PEEK #include "pthread.h" #include "sched.h" @@ -55,7 +55,7 @@ */ #include -#define __PTW32_THREAD_NULL_ID {NULL,0} +#define PTW32_THREAD_NULL_ID {NULL,0} /* * Some non-thread POSIX API substitutes @@ -74,15 +74,15 @@ #endif #if defined(_MSC_VER) && _MSC_VER >= 1400 -# define __PTW32_FTIME(x) _ftime64_s(x) -# define __PTW32_STRUCT_TIMEB struct __timeb64 +# define PTW32_FTIME(x) _ftime64_s(x) +# define PTW32_STRUCT_TIMEB struct __timeb64 #elif ( defined(_MSC_VER) && _MSC_VER >= 1300 ) || \ ( defined(__MINGW32__) && __MSVCRT_VERSION__ >= 0x0601 ) -# define __PTW32_FTIME(x) _ftime64(x) -# define __PTW32_STRUCT_TIMEB struct __timeb64 +# define PTW32_FTIME(x) _ftime64(x) +# define PTW32_STRUCT_TIMEB struct __timeb64 #else -# define __PTW32_FTIME(x) _ftime(x) -# define __PTW32_STRUCT_TIMEB struct _timeb +# define PTW32_FTIME(x) _ftime(x) +# define PTW32_STRUCT_TIMEB struct _timeb #endif @@ -129,7 +129,7 @@ const char * error_string[] = { "ENOLCK", "ENOSYS", "ENOTEMPTY", -#if __PTW32_VERSION_MAJOR > 2 +#if PTW32_VERSION_MAJOR > 2 "EILSEQ", #else "EILSEQ_or_EOWNERDEAD", diff --git a/tests/valid1.c b/tests/valid1.c index 7bf8f65b..fcc9787a 100644 --- a/tests/valid1.c +++ b/tests/valid1.c @@ -80,7 +80,7 @@ static int washere = 0; void * func(void * arg) { washere = 1; - return (void *) 0; + return (void *) 0; } int diff --git a/tests/valid2.c b/tests/valid2.c index c389c0d8..ebfa340d 100644 --- a/tests/valid2.c +++ b/tests/valid2.c @@ -74,7 +74,7 @@ int main() { - pthread_t NullThread = __PTW32_THREAD_NULL_ID; + pthread_t NullThread = PTW32_THREAD_NULL_ID; assert(pthread_kill(NullThread, 0) == ESRCH); diff --git a/version.rc b/version.rc index 3c385b32..ec6aab06 100644 --- a/version.rc +++ b/version.rc @@ -32,97 +32,97 @@ #include "pthread.h" /* - * Note: the correct __PTW32_CLEANUP_* macro must be defined corresponding to + * Note: the correct PTW32_CLEANUP_* macro must be defined corresponding to * the definition used for the object file builds. This is done in the * relevent makefiles for the command line builds, but users should ensure * that their resource compiler knows what it is too. - * If using the default (no __PTW32_CLEANUP_* defined), pthread.h will define it - * as __PTW32_CLEANUP_C. + * If using the default (no PTW32_CLEANUP_* defined), pthread.h will define it + * as PTW32_CLEANUP_C. */ -#if defined (__PTW32_RC_MSC) -# if defined(__PTW32_CLEANUP_C) -# define __PTW32_VERSIONINFO_NAME "pthreadVC2.DLL\0" -# elif defined(__PTW32_CLEANUP_CXX) -# define __PTW32_VERSIONINFO_NAME "pthreadVCE2.DLL\0" -# elif defined(__PTW32_CLEANUP_SEH) -# define __PTW32_VERSIONINFO_NAME "pthreadVSE2.DLL\0" +#if defined (PTW32_RC_MSC) +# if defined(PTW32_CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadVC2.DLL\0" +# elif defined(PTW32_CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadVCE2.DLL\0" +# elif defined(PTW32_CLEANUP_SEH) +# define PTW32_VERSIONINFO_NAME "pthreadVSE2.DLL\0" # endif -# if defined (__PTW32_ARCHx64) || defined (__PTW32_ARCHX64) || defined (__PTW32_ARCHAMD64) -# if defined(__PTW32_CLEANUP_C) -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C x64\0" -# elif defined(__PTW32_CLEANUP_CXX) -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C++ x64\0" -# elif defined(__PTW32_CLEANUP_SEH) -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH x64\0" +# if defined (PTW32_ARCHx64) || defined (PTW32_ARCHX64) || defined (PTW32_ARCHAMD64) +# if defined(PTW32_CLEANUP_C) +# define PTW32_VERSIONINFO_DESCRIPTION "MS C x64\0" +# elif defined(PTW32_CLEANUP_CXX) +# define PTW32_VERSIONINFO_DESCRIPTION "MS C++ x64\0" +# elif defined(PTW32_CLEANUP_SEH) +# define PTW32_VERSIONINFO_DESCRIPTION "MS C SEH x64\0" # endif -# elif defined (__PTW32_ARCHx86) || defined (__PTW32_ARCHX86) -# if defined(__PTW32_CLEANUP_C) -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C x86\0" -# elif defined(__PTW32_CLEANUP_CXX) -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C++ x86\0" -# elif defined(__PTW32_CLEANUP_SEH) -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH x86\0" +# elif defined (PTW32_ARCHx86) || defined (PTW32_ARCHX86) +# if defined(PTW32_CLEANUP_C) +# define PTW32_VERSIONINFO_DESCRIPTION "MS C x86\0" +# elif defined(PTW32_CLEANUP_CXX) +# define PTW32_VERSIONINFO_DESCRIPTION "MS C++ x86\0" +# elif defined(PTW32_CLEANUP_SEH) +# define PTW32_VERSIONINFO_DESCRIPTION "MS C SEH x86\0" # endif -# elif defined (__PTW32_ARCHarm) || defined (__PTW32_ARCHARM) || defined (__PTW32_AARCH32) -# if defined(__PTW32_CLEANUP_C) -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C ARM\0" -# elif defined(__PTW32_CLEANUP_CXX) -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C++ ARM\0" -# elif defined(__PTW32_CLEANUP_SEH) -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH ARM\0" +# elif defined (PTW32_ARCHarm) || defined (PTW32_ARCHARM) || defined (PTW32_AARCH32) +# if defined(PTW32_CLEANUP_C) +# define PTW32_VERSIONINFO_DESCRIPTION "MS C ARM\0" +# elif defined(PTW32_CLEANUP_CXX) +# define PTW32_VERSIONINFO_DESCRIPTION "MS C++ ARM\0" +# elif defined(PTW32_CLEANUP_SEH) +# define PTW32_VERSIONINFO_DESCRIPTION "MS C SEH ARM\0" # endif -# elif defined (__PTW32_ARCHarm64) || defined (__PTW32_ARCHARM64) || defined (__PTW32_AARCH64) -# if defined(__PTW32_CLEANUP_C) -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C ARM64\0" -# elif defined(__PTW32_CLEANUP_CXX) -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C++ ARM64\0" -# elif defined(__PTW32_CLEANUP_SEH) -# define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH ARM64\0" +# elif defined (PTW32_ARCHarm64) || defined (PTW32_ARCHARM64) || defined (PTW32_AARCH64) +# if defined(PTW32_CLEANUP_C) +# define PTW32_VERSIONINFO_DESCRIPTION "MS C ARM64\0" +# elif defined(PTW32_CLEANUP_CXX) +# define PTW32_VERSIONINFO_DESCRIPTION "MS C++ ARM64\0" +# elif defined(PTW32_CLEANUP_SEH) +# define PTW32_VERSIONINFO_DESCRIPTION "MS C SEH ARM64\0" # endif # endif #elif defined(__GNUC__) # if defined(_M_X64) -# define __PTW32_ARCH "x64 (mingw64)" +# define PTW32_ARCH "x64 (mingw64)" # else -# define __PTW32_ARCH "x86 (mingw32)" +# define PTW32_ARCH "x86 (mingw32)" # endif -# if defined(__PTW32_CLEANUP_C) -# define __PTW32_VERSIONINFO_NAME "pthreadGC2.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "GNU C " __PTW32_ARCH "\0" -# elif defined(__PTW32_CLEANUP_CXX) -# define __PTW32_VERSIONINFO_NAME "pthreadGCE2.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "GNU C++ " __PTW32_ARCH "\0" +# if defined(PTW32_CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadGC2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "GNU C " PTW32_ARCH "\0" +# elif defined(PTW32_CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadGCE2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "GNU C++ " PTW32_ARCH "\0" # else # error Resource compiler doesn't know which cleanup style you're using - see version.rc # endif #elif defined(__BORLANDC__) # if defined(_M_X64) -# define __PTW32_ARCH "x64 (Borland)" +# define PTW32_ARCH "x64 (Borland)" # else -# define __PTW32_ARCH "x86 (Borland)" +# define PTW32_ARCH "x86 (Borland)" # endif -# if defined(__PTW32_CLEANUP_C) -# define __PTW32_VERSIONINFO_NAME "pthreadBC2.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "BORLAND C " __PTW32_ARCH "\0" -# elif defined(__PTW32_CLEANUP_CXX) -# define __PTW32_VERSIONINFO_NAME "pthreadBCE2.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "BORLAND C++ " __PTW32_ARCH "\0" +# if defined(PTW32_CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadBC2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "BORLAND C " PTW32_ARCH "\0" +# elif defined(PTW32_CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadBCE2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "BORLAND C++ " PTW32_ARCH "\0" # else # error Resource compiler doesn't know which cleanup style you're using - see version.rc # endif #elif defined(__WATCOMC__) # if defined(_M_X64) -# define __PTW32_ARCH "x64 (Watcom)" +# define PTW32_ARCH "x64 (Watcom)" # else -# define __PTW32_ARCH "x86 (Watcom)" +# define PTW32_ARCH "x86 (Watcom)" # endif -# if defined(__PTW32_CLEANUP_C) -# define __PTW32_VERSIONINFO_NAME "pthreadWC2.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "WATCOM C " __PTW32_ARCH "\0" -# elif defined(__PTW32_CLEANUP_CXX) -# define __PTW32_VERSIONINFO_NAME "pthreadWCE2.DLL\0" -# define __PTW32_VERSIONINFO_DESCRIPTION "WATCOM C++ " __PTW32_ARCH "\0" +# if defined(PTW32_CLEANUP_C) +# define PTW32_VERSIONINFO_NAME "pthreadWC2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "WATCOM C " PTW32_ARCH "\0" +# elif defined(PTW32_CLEANUP_CXX) +# define PTW32_VERSIONINFO_NAME "pthreadWCE2.DLL\0" +# define PTW32_VERSIONINFO_DESCRIPTION "WATCOM C++ " PTW32_ARCH "\0" # else # error Resource compiler doesn't know which cleanup style you're using - see version.rc # endif @@ -132,8 +132,8 @@ VS_VERSION_INFO VERSIONINFO - FILEVERSION __PTW32_VERSION - PRODUCTVERSION __PTW32_VERSION + FILEVERSION PTW32_VERSION + PRODUCTVERSION PTW32_VERSION FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS 0 FILEOS VOS__WINDOWS32 @@ -144,11 +144,11 @@ BEGIN BLOCK "040904b0" BEGIN 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 "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\0" VALUE "LegalCopyright", "Copyright - Project contributors 1999-2016\0" VALUE "Comments", "https://sourceforge.net/p/pthreads4w/wiki/Contributors/\0" diff --git a/w32_CancelableWait.c b/w32_CancelableWait.c index 72a0f183..cc3c92ea 100644 --- a/w32_CancelableWait.c +++ b/w32_CancelableWait.c @@ -41,7 +41,7 @@ static INLINE int -__ptw32_cancelable_wait (HANDLE waitHandle, DWORD timeout) +ptw32_cancelable_wait (HANDLE waitHandle, DWORD timeout) /* * ------------------------------------------------------------------- * This provides an extra hook into the pthread_cancel @@ -58,7 +58,7 @@ __ptw32_cancelable_wait (HANDLE waitHandle, DWORD timeout) { int result; pthread_t self; - __ptw32_thread_t * sp; + ptw32_thread_t * sp; HANDLE handles[2]; DWORD nHandles = 1; DWORD status; @@ -66,7 +66,7 @@ __ptw32_cancelable_wait (HANDLE waitHandle, DWORD timeout) handles[0] = waitHandle; self = pthread_self(); - sp = (__ptw32_thread_t *) self.p; + sp = (ptw32_thread_t *) self.p; if (sp != NULL) { @@ -87,7 +87,7 @@ __ptw32_cancelable_wait (HANDLE waitHandle, DWORD timeout) handles[1] = NULL; } - status = WaitForMultipleObjects (nHandles, handles, __PTW32_FALSE, timeout); + status = WaitForMultipleObjects (nHandles, handles, PTW32_FALSE, timeout); switch (status - WAIT_OBJECT_0) { @@ -112,22 +112,22 @@ __ptw32_cancelable_wait (HANDLE waitHandle, DWORD timeout) if (sp != NULL) { - __ptw32_mcs_local_node_t stateLock; + ptw32_mcs_local_node_t stateLock; /* * Should handle POSIX and implicit POSIX threads. * Make sure we haven't been async-cancelled in the meantime. */ - __ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); + ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock); if (sp->state < PThreadStateCanceling) { sp->state = PThreadStateCanceling; sp->cancelState = PTHREAD_CANCEL_DISABLE; - __ptw32_mcs_lock_release (&stateLock); - __ptw32_throw (__PTW32_EPS_CANCEL); + ptw32_mcs_lock_release (&stateLock); + ptw32_throw (PTW32_EPS_CANCEL); /* Never reached */ } - __ptw32_mcs_lock_release (&stateLock); + ptw32_mcs_lock_release (&stateLock); } /* Should never get to here. */ @@ -153,11 +153,11 @@ __ptw32_cancelable_wait (HANDLE waitHandle, DWORD timeout) int pthreadCancelableWait (HANDLE waitHandle) { - return (__ptw32_cancelable_wait (waitHandle, INFINITE)); + return (ptw32_cancelable_wait (waitHandle, INFINITE)); } int pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout) { - return (__ptw32_cancelable_wait (waitHandle, timeout)); + return (ptw32_cancelable_wait (waitHandle, timeout)); } From 9033bcccf0f4ebf7697f348b7fe9070cabfa4090 Mon Sep 17 00:00:00 2001 From: Ger Hobbelt Date: Wed, 14 Apr 2021 11:07:51 +0200 Subject: [PATCH 204/207] roll back banner texts and pthreads-win32 rename as pre-merge prep: far fewer diffs to inspect that way! --- GNUmakefile.in | 2 +- README.md | 4 +-- _ptw32.h | 39 ++++++++++---------- aclocal.m4 | 2 +- cleanup.c | 39 ++++++++++---------- cmake/version.rc.in | 39 ++++++++++---------- configure.ac | 2 +- context.h | 39 ++++++++++---------- create.c | 39 ++++++++++---------- dll.c | 39 ++++++++++---------- docs/ANNOUNCE.md | 4 +-- docs/NEWS.md | 4 +-- docs/NOTICE.md | 2 +- docs/PROGRESS.md | 2 +- errno.c | 39 ++++++++++---------- global.c | 39 ++++++++++---------- implement.h | 39 ++++++++++---------- manual/ChangeLog | 4 +-- manual/PortabilityIssues.html | 10 +++--- manual/cpu_set.html | 2 +- manual/index.html | 8 ++--- manual/pthreadCancelableWait.html | 4 +-- manual/pthread_attr_init.html | 18 +++++----- manual/pthread_attr_setstackaddr.html | 6 ++-- manual/pthread_attr_setstacksize.html | 8 ++--- manual/pthread_barrier_init.html | 8 ++--- manual/pthread_barrier_wait.html | 6 ++-- manual/pthread_barrierattr_init.html | 6 ++-- manual/pthread_barrierattr_setpshared.html | 10 +++--- manual/pthread_cancel.html | 14 ++++---- manual/pthread_cleanup_push.html | 4 +-- manual/pthread_cond_init.html | 6 ++-- manual/pthread_condattr_init.html | 6 ++-- manual/pthread_condattr_setpshared.html | 10 +++--- manual/pthread_create.html | 6 ++-- manual/pthread_delay_np.html | 4 +-- manual/pthread_detach.html | 4 +-- manual/pthread_getunique_np.html | 6 ++-- manual/pthread_getw32threadhandle_np.html | 4 +-- manual/pthread_join.html | 4 +-- manual/pthread_key_create.html | 6 ++-- manual/pthread_kill.html | 14 ++++---- manual/pthread_mutex_init.html | 8 ++--- manual/pthread_mutexattr_init.html | 19 +++++----- manual/pthread_mutexattr_setpshared.html | 6 ++-- manual/pthread_num_processors_np.html | 4 +-- manual/pthread_once.html | 4 +-- manual/pthread_rwlock_init.html | 8 ++--- manual/pthread_rwlock_rdlock.html | 10 +++--- manual/pthread_rwlock_timedrdlock.html | 6 ++-- manual/pthread_rwlock_timedwrlock.html | 6 ++-- manual/pthread_rwlock_unlock.html | 8 ++--- manual/pthread_rwlock_wrlock.html | 8 ++--- manual/pthread_rwlockattr_init.html | 6 ++-- manual/pthread_rwlockattr_setpshared.html | 8 ++--- manual/pthread_self.html | 8 ++--- manual/pthread_setaffinity_np.html | 6 ++-- manual/pthread_setcancelstate.html | 16 ++++----- manual/pthread_setcanceltype.html | 16 ++++----- manual/pthread_setconcurrency.html | 6 ++-- manual/pthread_setname_np.html | 2 +- manual/pthread_setschedparam.html | 6 ++-- manual/pthread_spin_init.html | 10 +++--- manual/pthread_spin_lock.html | 6 ++-- manual/pthread_spin_unlock.html | 8 ++--- manual/pthread_timechange_handler_np.html | 4 +-- manual/pthread_win32_attach_detach_np.html | 8 ++--- manual/pthread_win32_getabstime_np.html | 4 +-- manual/pthread_win32_test_features_np.html | 4 +-- manual/sched_get_priority_max.html | 4 +-- manual/sched_getscheduler.html | 6 ++-- manual/sched_setaffinity.html | 6 ++-- manual/sched_setscheduler.html | 6 ++-- manual/sched_yield.html | 2 +- manual/sem_init.html | 8 ++--- pthread.c | 39 ++++++++++---------- pthread.h | 41 ++++++++++++---------- pthread_attr_destroy.c | 39 ++++++++++---------- pthread_attr_getaffinity_np.c | 39 ++++++++++---------- pthread_attr_getdetachstate.c | 39 ++++++++++---------- pthread_attr_getinheritsched.c | 39 ++++++++++---------- pthread_attr_getname_np.c | 39 ++++++++++---------- pthread_attr_getschedparam.c | 39 ++++++++++---------- pthread_attr_getschedpolicy.c | 39 ++++++++++---------- pthread_attr_getscope.c | 39 ++++++++++---------- pthread_attr_getstackaddr.c | 39 ++++++++++---------- pthread_attr_getstacksize.c | 39 ++++++++++---------- pthread_attr_init.c | 39 ++++++++++---------- pthread_attr_setaffinity_np.c | 39 ++++++++++---------- pthread_attr_setdetachstate.c | 39 ++++++++++---------- pthread_attr_setinheritsched.c | 39 ++++++++++---------- pthread_attr_setname_np.c | 39 ++++++++++---------- pthread_attr_setschedparam.c | 39 ++++++++++---------- pthread_attr_setschedpolicy.c | 39 ++++++++++---------- pthread_attr_setscope.c | 39 ++++++++++---------- pthread_attr_setstackaddr.c | 39 ++++++++++---------- pthread_attr_setstacksize.c | 39 ++++++++++---------- pthread_barrier_destroy.c | 39 ++++++++++---------- pthread_barrier_init.c | 39 ++++++++++---------- pthread_barrier_wait.c | 39 ++++++++++---------- pthread_barrierattr_destroy.c | 39 ++++++++++---------- pthread_barrierattr_getpshared.c | 39 ++++++++++---------- pthread_barrierattr_init.c | 39 ++++++++++---------- pthread_barrierattr_setpshared.c | 39 ++++++++++---------- pthread_cancel.c | 39 ++++++++++---------- pthread_cond_destroy.c | 39 ++++++++++---------- pthread_cond_init.c | 39 ++++++++++---------- pthread_cond_signal.c | 39 ++++++++++---------- pthread_cond_wait.c | 39 ++++++++++---------- pthread_condattr_destroy.c | 39 ++++++++++---------- pthread_condattr_getpshared.c | 39 ++++++++++---------- pthread_condattr_init.c | 39 ++++++++++---------- pthread_condattr_setpshared.c | 39 ++++++++++---------- pthread_delay_np.c | 39 ++++++++++---------- pthread_detach.c | 39 ++++++++++---------- pthread_equal.c | 39 ++++++++++---------- pthread_exit.c | 39 ++++++++++---------- pthread_getconcurrency.c | 39 ++++++++++---------- pthread_getname_np.c | 39 ++++++++++---------- pthread_getschedparam.c | 39 ++++++++++---------- pthread_getspecific.c | 39 ++++++++++---------- pthread_getunique_np.c | 39 ++++++++++---------- pthread_getw32threadhandle_np.c | 39 ++++++++++---------- pthread_join.c | 39 ++++++++++---------- pthread_key_create.c | 39 ++++++++++---------- pthread_key_delete.c | 39 ++++++++++---------- pthread_kill.c | 39 ++++++++++---------- pthread_mutex_consistent.c | 39 ++++++++++---------- pthread_mutex_destroy.c | 39 ++++++++++---------- pthread_mutex_init.c | 39 ++++++++++---------- pthread_mutex_lock.c | 39 ++++++++++---------- pthread_mutex_timedlock.c | 39 ++++++++++---------- pthread_mutex_trylock.c | 39 ++++++++++---------- pthread_mutex_unlock.c | 39 ++++++++++---------- pthread_mutexattr_destroy.c | 39 ++++++++++---------- pthread_mutexattr_getkind_np.c | 39 ++++++++++---------- pthread_mutexattr_getpshared.c | 39 ++++++++++---------- pthread_mutexattr_getrobust.c | 39 ++++++++++---------- pthread_mutexattr_gettype.c | 39 ++++++++++---------- pthread_mutexattr_init.c | 39 ++++++++++---------- pthread_mutexattr_setkind_np.c | 39 ++++++++++---------- pthread_mutexattr_setpshared.c | 39 ++++++++++---------- pthread_mutexattr_setrobust.c | 39 ++++++++++---------- pthread_mutexattr_settype.c | 39 ++++++++++---------- pthread_num_processors_np.c | 39 ++++++++++---------- pthread_once.c | 39 ++++++++++---------- pthread_rwlock_destroy.c | 39 ++++++++++---------- pthread_rwlock_init.c | 39 ++++++++++---------- pthread_rwlock_rdlock.c | 39 ++++++++++---------- pthread_rwlock_timedrdlock.c | 39 ++++++++++---------- pthread_rwlock_timedwrlock.c | 39 ++++++++++---------- pthread_rwlock_tryrdlock.c | 39 ++++++++++---------- pthread_rwlock_trywrlock.c | 39 ++++++++++---------- pthread_rwlock_unlock.c | 39 ++++++++++---------- pthread_rwlock_wrlock.c | 39 ++++++++++---------- pthread_rwlockattr_destroy.c | 39 ++++++++++---------- pthread_rwlockattr_getpshared.c | 39 ++++++++++---------- pthread_rwlockattr_init.c | 39 ++++++++++---------- pthread_rwlockattr_setpshared.c | 39 ++++++++++---------- pthread_self.c | 39 ++++++++++---------- pthread_setaffinity.c | 39 ++++++++++---------- pthread_setcancelstate.c | 39 ++++++++++---------- pthread_setcanceltype.c | 39 ++++++++++---------- pthread_setconcurrency.c | 39 ++++++++++---------- pthread_setname_np.c | 39 ++++++++++---------- pthread_setschedparam.c | 39 ++++++++++---------- pthread_setspecific.c | 39 ++++++++++---------- pthread_spin_destroy.c | 39 ++++++++++---------- pthread_spin_init.c | 39 ++++++++++---------- pthread_spin_lock.c | 39 ++++++++++---------- pthread_spin_trylock.c | 39 ++++++++++---------- pthread_spin_unlock.c | 39 ++++++++++---------- pthread_testcancel.c | 39 ++++++++++---------- pthread_timechange_handler_np.c | 39 ++++++++++---------- pthread_timedjoin_np.c | 39 ++++++++++---------- pthread_tryjoin_np.c | 39 ++++++++++---------- pthread_win32_attach_detach_np.c | 39 ++++++++++---------- ptw32_MCS_lock.c | 39 ++++++++++---------- ptw32_callUserDestroyRoutines.c | 39 ++++++++++---------- ptw32_calloc.c | 39 ++++++++++---------- ptw32_cond_check_need_init.c | 39 ++++++++++---------- ptw32_getprocessors.c | 39 ++++++++++---------- ptw32_is_attr.c | 39 ++++++++++---------- ptw32_mutex_check_need_init.c | 39 ++++++++++---------- ptw32_new.c | 39 ++++++++++---------- ptw32_processInitialize.c | 39 ++++++++++---------- ptw32_processTerminate.c | 39 ++++++++++---------- ptw32_relmillisecs.c | 39 ++++++++++---------- ptw32_reuse.c | 39 ++++++++++---------- ptw32_rwlock_cancelwrwait.c | 39 ++++++++++---------- ptw32_rwlock_check_need_init.c | 39 ++++++++++---------- ptw32_semwait.c | 39 ++++++++++---------- ptw32_spinlock_check_need_init.c | 39 ++++++++++---------- ptw32_threadDestroy.c | 39 ++++++++++---------- ptw32_threadStart.c | 39 ++++++++++---------- ptw32_throw.c | 39 ++++++++++---------- ptw32_timespec.c | 39 ++++++++++---------- ptw32_tkAssocCreate.c | 39 ++++++++++---------- ptw32_tkAssocDestroy.c | 39 ++++++++++---------- sched.h | 39 ++++++++++---------- sched_get_priority_max.c | 39 ++++++++++---------- sched_get_priority_min.c | 39 ++++++++++---------- sched_getscheduler.c | 39 ++++++++++---------- sched_setaffinity.c | 39 ++++++++++---------- sched_setscheduler.c | 39 ++++++++++---------- sched_yield.c | 39 ++++++++++---------- sem_close.c | 39 ++++++++++---------- sem_destroy.c | 39 ++++++++++---------- sem_getvalue.c | 39 ++++++++++---------- sem_init.c | 39 ++++++++++---------- sem_open.c | 39 ++++++++++---------- sem_post.c | 39 ++++++++++---------- sem_post_multiple.c | 39 ++++++++++---------- sem_timedwait.c | 39 ++++++++++---------- sem_trywait.c | 39 ++++++++++---------- sem_unlink.c | 39 ++++++++++---------- sem_wait.c | 39 ++++++++++---------- semaphore.h | 39 ++++++++++---------- signal.c | 39 ++++++++++---------- tests/Bmakefile | 2 +- tests/GNUmakefile.in | 2 +- tests/Wmakefile | 2 +- tests/affinity1.c | 39 ++++++++++---------- tests/affinity2.c | 39 ++++++++++---------- tests/affinity3.c | 39 ++++++++++---------- tests/affinity4.c | 39 ++++++++++---------- tests/affinity5.c | 39 ++++++++++---------- tests/affinity6.c | 39 ++++++++++---------- tests/barrier1.c | 39 ++++++++++---------- tests/barrier2.c | 39 ++++++++++---------- tests/barrier3.c | 39 ++++++++++---------- tests/barrier4.c | 39 ++++++++++---------- tests/barrier5.c | 39 ++++++++++---------- tests/barrier6.c | 39 ++++++++++---------- tests/benchlib.c | 39 ++++++++++---------- tests/benchtest.h | 39 ++++++++++---------- tests/benchtest1.c | 39 ++++++++++---------- tests/benchtest2.c | 39 ++++++++++---------- tests/benchtest3.c | 39 ++++++++++---------- tests/benchtest4.c | 39 ++++++++++---------- tests/benchtest5.c | 39 ++++++++++---------- tests/cancel1.c | 39 ++++++++++---------- tests/cancel2.c | 39 ++++++++++---------- tests/cancel3.c | 39 ++++++++++---------- tests/cancel4.c | 39 ++++++++++---------- tests/cancel5.c | 39 ++++++++++---------- tests/cancel6a.c | 39 ++++++++++---------- tests/cancel6d.c | 39 ++++++++++---------- tests/cancel7.c | 39 ++++++++++---------- tests/cancel8.c | 39 ++++++++++---------- tests/cancel9.c | 39 ++++++++++---------- tests/cleanup0.c | 39 ++++++++++---------- tests/cleanup1.c | 39 ++++++++++---------- tests/cleanup2.c | 39 ++++++++++---------- tests/cleanup3.c | 39 ++++++++++---------- tests/condvar1.c | 39 ++++++++++---------- tests/condvar1_1.c | 39 ++++++++++---------- tests/condvar1_2.c | 39 ++++++++++---------- tests/condvar2.c | 39 ++++++++++---------- tests/condvar2_1.c | 39 ++++++++++---------- tests/condvar3.c | 39 ++++++++++---------- tests/condvar3_1.c | 39 ++++++++++---------- tests/condvar3_2.c | 39 ++++++++++---------- tests/condvar3_3.c | 39 ++++++++++---------- tests/condvar4.c | 39 ++++++++++---------- tests/condvar5.c | 39 ++++++++++---------- tests/condvar6.c | 39 ++++++++++---------- tests/condvar7.c | 39 ++++++++++---------- tests/condvar8.c | 39 ++++++++++---------- tests/condvar9.c | 39 ++++++++++---------- tests/context1.c | 39 ++++++++++---------- tests/context2.c | 39 ++++++++++---------- tests/count1.c | 39 ++++++++++---------- tests/create1.c | 39 ++++++++++---------- tests/create2.c | 39 ++++++++++---------- tests/create3.c | 39 ++++++++++---------- tests/delay1.c | 39 ++++++++++---------- tests/delay2.c | 39 ++++++++++---------- tests/detach1.c | 39 ++++++++++---------- tests/equal0.c | 39 ++++++++++---------- tests/equal1.c | 39 ++++++++++---------- tests/errno0.c | 2 +- tests/errno1.c | 39 ++++++++++---------- tests/exception1.c | 39 ++++++++++---------- tests/exception2.c | 39 ++++++++++---------- tests/exception3.c | 39 ++++++++++---------- tests/exception3_0.c | 39 ++++++++++---------- tests/exit1.c | 39 ++++++++++---------- tests/exit2.c | 39 ++++++++++---------- tests/exit3.c | 39 ++++++++++---------- tests/exit4.c | 39 ++++++++++---------- tests/exit5.c | 39 ++++++++++---------- tests/eyal1.c | 39 ++++++++++---------- tests/inherit1.c | 39 ++++++++++---------- tests/join0.c | 39 ++++++++++---------- tests/join1.c | 39 ++++++++++---------- tests/join2.c | 39 ++++++++++---------- tests/join3.c | 39 ++++++++++---------- tests/join4.c | 39 ++++++++++---------- tests/kill1.c | 39 ++++++++++---------- tests/mutex1.c | 39 ++++++++++---------- tests/mutex1e.c | 39 ++++++++++---------- tests/mutex1n.c | 39 ++++++++++---------- tests/mutex1r.c | 39 ++++++++++---------- tests/mutex2.c | 39 ++++++++++---------- tests/mutex2e.c | 39 ++++++++++---------- tests/mutex2r.c | 39 ++++++++++---------- tests/mutex3.c | 39 ++++++++++---------- tests/mutex3e.c | 39 ++++++++++---------- tests/mutex3r.c | 39 ++++++++++---------- tests/mutex4.c | 39 ++++++++++---------- tests/mutex5.c | 39 ++++++++++---------- tests/mutex6.c | 39 ++++++++++---------- tests/mutex6e.c | 39 ++++++++++---------- tests/mutex6es.c | 39 ++++++++++---------- tests/mutex6n.c | 39 ++++++++++---------- tests/mutex6r.c | 39 ++++++++++---------- tests/mutex6rs.c | 39 ++++++++++---------- tests/mutex6s.c | 39 ++++++++++---------- tests/mutex7.c | 39 ++++++++++---------- tests/mutex7e.c | 39 ++++++++++---------- tests/mutex7n.c | 39 ++++++++++---------- tests/mutex7r.c | 39 ++++++++++---------- tests/mutex8.c | 39 ++++++++++---------- tests/mutex8e.c | 39 ++++++++++---------- tests/mutex8n.c | 39 ++++++++++---------- tests/mutex8r.c | 39 ++++++++++---------- tests/name_np1.c | 39 ++++++++++---------- tests/name_np2.c | 39 ++++++++++---------- tests/once1.c | 39 ++++++++++---------- tests/once2.c | 39 ++++++++++---------- tests/once3.c | 39 ++++++++++---------- tests/once4.c | 39 ++++++++++---------- tests/priority1.c | 39 ++++++++++---------- tests/priority2.c | 39 ++++++++++---------- tests/reuse1.c | 39 ++++++++++---------- tests/reuse2.c | 39 ++++++++++---------- tests/robust1.c | 39 ++++++++++---------- tests/robust2.c | 39 ++++++++++---------- tests/robust3.c | 39 ++++++++++---------- tests/robust4.c | 39 ++++++++++---------- tests/robust5.c | 39 ++++++++++---------- tests/rwlock1.c | 39 ++++++++++---------- tests/rwlock2.c | 39 ++++++++++---------- tests/rwlock2_t.c | 39 ++++++++++---------- tests/rwlock3.c | 39 ++++++++++---------- tests/rwlock3_t.c | 39 ++++++++++---------- tests/rwlock4.c | 39 ++++++++++---------- tests/rwlock4_t.c | 39 ++++++++++---------- tests/rwlock5.c | 39 ++++++++++---------- tests/rwlock5_t.c | 39 ++++++++++---------- tests/rwlock6.c | 39 ++++++++++---------- tests/rwlock6_t.c | 39 ++++++++++---------- tests/rwlock6_t2.c | 39 ++++++++++---------- tests/self1.c | 39 ++++++++++---------- tests/self2.c | 39 ++++++++++---------- tests/semaphore1.c | 39 ++++++++++---------- tests/semaphore2.c | 39 ++++++++++---------- tests/semaphore3.c | 39 ++++++++++---------- tests/semaphore4.c | 39 ++++++++++---------- tests/semaphore4t.c | 39 ++++++++++---------- tests/semaphore5.c | 39 ++++++++++---------- tests/sequence1.c | 39 ++++++++++---------- tests/spin1.c | 39 ++++++++++---------- tests/spin2.c | 39 ++++++++++---------- tests/spin3.c | 39 ++++++++++---------- tests/spin4.c | 39 ++++++++++---------- tests/stress1.c | 39 ++++++++++---------- tests/test.h | 39 ++++++++++---------- tests/timeouts.c | 39 ++++++++++---------- tests/tryentercs.c | 39 ++++++++++---------- tests/tryentercs2.c | 39 ++++++++++---------- tests/tsd1.c | 39 ++++++++++---------- tests/tsd2.c | 39 ++++++++++---------- tests/tsd3.c | 39 ++++++++++---------- tests/valid1.c | 39 ++++++++++---------- tests/valid2.c | 39 ++++++++++---------- version.rc | 39 ++++++++++---------- w32_CancelableWait.c | 39 ++++++++++---------- 379 files changed, 6714 insertions(+), 5784 deletions(-) diff --git a/GNUmakefile.in b/GNUmakefile.in index b64980c3..5f2e7ad7 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -5,7 +5,7 @@ # Copyright 1998 John E. Bossom # Copyright 1999-2018, Pthreads4w contributors # -# Homepage: https://sourceforge.net/projects/pthreads4w/ +# Homepage: http://sources.redhat.com/pthreads-win32 # # The current list of contributors is contained # in the file CONTRIBUTORS included with the source diff --git a/README.md b/README.md index 290d7be8..042c980f 100644 --- a/README.md +++ b/README.md @@ -577,8 +577,8 @@ General The package now includes a reference documentation set consisting of HTML formatted Unix-style manual pages that have been edited for -consistency with Pthreads-w32. The set can also be read online at: -https://sourceforge.net/projects/pthreads4w/manual/index.html +consistency with pthreads-w32. The set can also be read online at: +http://sources.redhat.com/pthreads-win32manual/index.html Thanks again to Tim Theisen for running the test suite pre-release on an MP system. diff --git a/_ptw32.h b/_ptw32.h index f484c299..b16b4c0b 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- */ diff --git a/aclocal.m4 b/aclocal.m4 index 02c1ba19..8d551847 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -5,7 +5,7 @@ ## Copyright 1998 John E. Bossom ## Copyright 1999-2018, Pthreads4w contributors ## -## Homepage: https://sourceforge.net/projects/pthreads4w/ +## Homepage: http://sources.redhat.com/pthreads-win32 ## ## The current list of contributors is contained ## in the file CONTRIBUTORS included with the source diff --git a/cleanup.c b/cleanup.c index 8ecfe9ce..df39e4ba 100644 --- a/cleanup.c +++ b/cleanup.c @@ -8,30 +8,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- */ diff --git a/cmake/version.rc.in b/cmake/version.rc.in index 4df76c7c..8fac1808 100644 --- a/cmake/version.rc.in +++ b/cmake/version.rc.in @@ -2,30 +2,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #include diff --git a/configure.ac b/configure.ac index f8ecd790..f0983386 100644 --- a/configure.ac +++ b/configure.ac @@ -5,7 +5,7 @@ # Copyright 1998 John E. Bossom # Copyright 1999-2018, Pthreads4w contributors # -# Homepage: https://sourceforge.net/projects/pthreads4w/ +# Homepage: http://sources.redhat.com/pthreads-win32 # # The current list of contributors is contained # in the file CONTRIBUTORS included with the source diff --git a/context.h b/context.h index e9b6b657..a4c196a4 100644 --- a/context.h +++ b/context.h @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifndef PTW32_CONTEXT_H diff --git a/create.c b/create.c index d387dfdc..bc1fca63 100644 --- a/create.c +++ b/create.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/dll.c b/dll.c index 66be7b4d..66a716ad 100644 --- a/dll.c +++ b/dll.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/docs/ANNOUNCE.md b/docs/ANNOUNCE.md index 0fbc5c1c..0af2c639 100644 --- a/docs/ANNOUNCE.md +++ b/docs/ANNOUNCE.md @@ -1,8 +1,8 @@ PTHREADS4W RELEASE 3.0.0 (2017-01-01) -------------------------------------- -Web Site: https://sourceforge.net/projects/pthreads4w/ +Web Site: http://sources.redhat.com/pthreads-win32 Repository: https://sourceforge.net/p/pthreads4w/code -Releases: https://sourceforge.net/projects/pthreads4w/files +Releases: http://sources.redhat.com/pthreads-win32files Maintainer: Ross Johnson diff --git a/docs/NEWS.md b/docs/NEWS.md index 290d7be8..042c980f 100644 --- a/docs/NEWS.md +++ b/docs/NEWS.md @@ -577,8 +577,8 @@ General The package now includes a reference documentation set consisting of HTML formatted Unix-style manual pages that have been edited for -consistency with Pthreads-w32. The set can also be read online at: -https://sourceforge.net/projects/pthreads4w/manual/index.html +consistency with pthreads-w32. The set can also be read online at: +http://sources.redhat.com/pthreads-win32manual/index.html Thanks again to Tim Theisen for running the test suite pre-release on an MP system. diff --git a/docs/NOTICE.md b/docs/NOTICE.md index 3b99d7bd..38eb34b0 100644 --- a/docs/NOTICE.md +++ b/docs/NOTICE.md @@ -1,4 +1,4 @@ -PThreads4W - POSIX threads for Windows +pthreads-w32 - POSIX threads for Windows Copyright 1998 John E. Bossom Copyright 1999-2018, Pthreads4w contributors diff --git a/docs/PROGRESS.md b/docs/PROGRESS.md index 6a1b4e59..763183a4 100644 --- a/docs/PROGRESS.md +++ b/docs/PROGRESS.md @@ -1,4 +1,4 @@ Please see the ANNOUNCE file "Level of Standards Conformance" or the web page: -https://sourceforge.net/projects/pthreads4w/conformance.html +http://sources.redhat.com/pthreads-win32conformance.html diff --git a/errno.c b/errno.c index e5e3ee9f..6e864354 100644 --- a/errno.c +++ b/errno.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/global.c b/global.c index b55a6098..a78e8bad 100644 --- a/global.c +++ b/global.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/implement.h b/implement.h index 5520552f..e51f8766 100644 --- a/implement.h +++ b/implement.h @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(_IMPLEMENT_H) diff --git a/manual/ChangeLog b/manual/ChangeLog index bcf8930e..4f936e54 100644 --- a/manual/ChangeLog +++ b/manual/ChangeLog @@ -1,6 +1,6 @@ 2016-12-25 Ross Johnson - * Change all references to "pthreads-w32" etc. to "PThreads4W" + * Change all references to "pthreads-w32" etc. to "pthreads-w32" * Change all references to the sourceware projects web page to the SourceForge project web page. @@ -44,7 +44,7 @@ * PortabilityIssues.html: Was nonPortableIssues.html. * index.html: Updated; add table of contents at top. - * *.html: Add PThreads4W header info; add link back to the + * *.html: Add pthreads-w32 header info; add link back to the index page 'index.html'. 2005-05-06 Ross Johnson diff --git a/manual/PortabilityIssues.html b/manual/PortabilityIssues.html index 0fce9e00..fb4f69eb 100644 --- a/manual/PortabilityIssues.html +++ b/manual/PortabilityIssues.html @@ -18,7 +18,7 @@

POSIX Threads for Windows – REFERENCE – -Pthreads4W

+pthreads-w32

Reference Index

Table of Contents

Name

@@ -685,7 +685,7 @@

Thread priority

4, 5, and 6 are not supported.

As you can see, the real priority levels available to any individual Win32 thread are non-contiguous.

-

An application using PThreads4W should +

An application using pthreads-w32 should not make assumptions about the numbers used to represent thread priority levels, except that they are monotonic between the values returned by sched_get_priority_min() and sched_get_priority_max(). @@ -693,7 +693,7 @@

Thread priority

range of numbers between -15 and 15, while at least one version of WinCE (3.0) defines the minimum priority (THREAD_PRIORITY_LOWEST) as 5, and the maximum priority (THREAD_PRIORITY_HIGHEST) as 1.

-

Internally, PThreads4W maps any +

Internally, pthreads-w32 maps any priority levels between THREAD_PRIORITY_IDLE and THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, or between THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to @@ -701,10 +701,10 @@

Thread priority

REALTIME_PRIORITY_CLASS even if levels -7, -6, -5, -4, -3, 3, 4, 5, and 6 are supported.

If it wishes, a Win32 application using -PThreads4W can use the Win32 defined priority macros +pthreads-w32 can use the Win32 defined priority macros THREAD_PRIORITY_IDLE through THREAD_PRIORITY_TIME_CRITICAL.

Author

-

Ross Johnson for use with Pthreads4W.

+

Ross Johnson for use with pthreads-w32.

See also



diff --git a/manual/cpu_set.html b/manual/cpu_set.html index 15d36605..83429a4d 100644 --- a/manual/cpu_set.html +++ b/manual/cpu_set.html @@ -13,7 +13,7 @@

POSIX -Threads for Windows – REFERENCE - Pthreads4W

+Threads for Windows – REFERENCE - pthreads-w32

Reference Index

Table of Contents

Name

diff --git a/manual/index.html b/manual/index.html index 36828a56..497f993d 100644 --- a/manual/index.html +++ b/manual/index.html @@ -20,12 +20,12 @@

POSIX Threads for Windows – REFERENCE - -Pthreads4W

+pthreads-w32

Table of Contents

POSIX threads API reference
Miscellaneous POSIX -thread safe routines provided by PThreads4W
Non-portable -PThreads4W routines
Other

+thread safe routines provided by pthreads-w32
Non-portable +pthreads-w32 routines
Other

POSIX threads API reference

cpu_set

@@ -148,7 +148,7 @@

POSIX threads API

sem_wait

sigwait

Non-portable -PThreads4W routines

+pthreads-w32 routines

pthreadCancelableTimedWait

pthreadCancelableWait

pthread_attr_getaffinity_np

diff --git a/manual/pthreadCancelableWait.html b/manual/pthreadCancelableWait.html index bd3108b4..a50ea4f0 100644 --- a/manual/pthreadCancelableWait.html +++ b/manual/pthreadCancelableWait.html @@ -18,7 +18,7 @@

POSIX Threads for Windows – REFERENCE – -Pthreads4W

+pthreads-w32

Reference Index

Table of Contents

Name

@@ -64,7 +64,7 @@

Errors

The interval timeout milliseconds elapsed before waitHandle was signalled.

Author

-

Ross Johnson for use with Pthreads4W.

+

Ross Johnson for use with pthreads-w32.

See also

pthread_cancel(), pthread_self()

diff --git a/manual/pthread_attr_init.html b/manual/pthread_attr_init.html index 79b2b0ba..bcef948d 100644 --- a/manual/pthread_attr_init.html +++ b/manual/pthread_attr_init.html @@ -20,7 +20,7 @@

POSIX Threads for Windows – REFERENCE – -Pthreads4W

+pthreads-w32

Reference Index

Table of Contents

Name

@@ -151,11 +151,11 @@

schedpolicy

(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 +

pthreads-w32 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 +

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) @@ -164,7 +164,7 @@

schedpolicy

schedparam

Contain the scheduling parameters (essentially, the scheduling priority) for the thread.

-

PThreads4W supports the priority levels defined by the +

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.

@@ -185,13 +185,13 @@

inheritsched

scope

Define the scheduling contention scope for the created thread. The -only value supported in the PThreads4W implementation is +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.

-

PThreads4W only supports PTHREAD_SCOPE_SYSTEM.

+

pthreads-w32 only supports PTHREAD_SCOPE_SYSTEM.

Default value: PTHREAD_SCOPE_SYSTEM.

Return Value

@@ -246,7 +246,7 @@

Errors

ENOTSUP
policy is not SCHED_OTHER, the only value supported - by PThreads4W.
+ by pthreads-w32.

The pthread_attr_setinheritsched function returns the @@ -272,14 +272,14 @@

Errors

ENOTSUP
the specified scope is PTHREAD_SCOPE_PROCESS (not - supported by PThreads4W). + supported by pthreads-w32).

Author

Xavier Leroy <Xavier.Leroy@inria.fr>

-

Modified by Ross Johnson for use with Pthreads4W.

+

Modified by Ross Johnson for use with pthreads-w32.

See Also

pthread_create(3) , pthread_join(3) , diff --git a/manual/pthread_attr_setstackaddr.html b/manual/pthread_attr_setstackaddr.html index 44c9ea12..b26bbceb 100644 --- a/manual/pthread_attr_setstackaddr.html +++ b/manual/pthread_attr_setstackaddr.html @@ -18,7 +18,7 @@

POSIX Threads for Windows – REFERENCE – -PThreads4W

+pthreads-w32

Reference Index

Table of Contents

Name

@@ -42,7 +42,7 @@

Description

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 +

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.

@@ -129,7 +129,7 @@

Copyright

can be obtained online at http://www.opengroup.org/unix/online.html .

-

Modified by Ross Johnson for use with PThreads4W.

+

Modified by Ross Johnson for use with pthreads-w32.


Table of Contents

    diff --git a/manual/pthread_attr_setstacksize.html b/manual/pthread_attr_setstacksize.html index ebce8399..8c853a6e 100644 --- a/manual/pthread_attr_setstacksize.html +++ b/manual/pthread_attr_setstacksize.html @@ -5,7 +5,7 @@ PTHREAD_ATTR_SETSTACKSIZE(3) manual page -

    POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

    +

    POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

    Reference Index

    Table of Contents

    Name

    @@ -28,10 +28,10 @@

    Description

    The stacksize attribute shall define the minimum stack size (in bytes) allocated for the created threads stack.

    -

    PThreads4W defines _POSIX_THREAD_ATTR_STACKSIZE in +

    pthreads-w32 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 PThreads4W a value of 0 means the stack +

    Default value: 0 (in pthreads-w32 a value of 0 means the stack will grow as required)

    Return Value

    Upon successful completion, pthread_attr_getstacksize and @@ -87,7 +87,7 @@

    Copyright

    can be obtained online at http://www.opengroup.org/unix/online.html .

    -

    Modified by Ross Johnson for use with Pthreads4W.

    +

    Modified by Ross Johnson for use with pthreads-w32.


    Table of Contents

      diff --git a/manual/pthread_barrier_init.html b/manual/pthread_barrier_init.html index 82116a27..8af6868d 100644 --- a/manual/pthread_barrier_init.html +++ b/manual/pthread_barrier_init.html @@ -5,7 +5,7 @@ PTHREAD_BARRIER_INIT(3) manual page -

      POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

      +

      POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

      Reference Index

      Table of Contents

      Name

      @@ -120,7 +120,7 @@

      Application Usage

      functions are part of the Barriers option and need not be provided on all implementations.

      -

      PThreads4W defines _POSIX_BARRIERS to indicate +

      pthreads-w32 defines _POSIX_BARRIERS to indicate that these routines are implemented and may be used.

      Rationale

      None. @@ -131,7 +131,7 @@

      Future Directions

      Known Bugs

      In - PThreads4W, + pthreads-w32, the behaviour of threads which enter pthread_barrier_wait(3) while the barrier is being destroyed is undefined.
      @@ -153,7 +153,7 @@

      Copyright

      can be obtained online at http://www.opengroup.org/unix/online.html .

      -

      Modified by Ross Johnson for use with Pthreads4W.

      +

      Modified by Ross Johnson for use with pthreads-w32.


      Table of Contents

        diff --git a/manual/pthread_barrier_wait.html b/manual/pthread_barrier_wait.html index 82c82432..c62c57d0 100644 --- a/manual/pthread_barrier_wait.html +++ b/manual/pthread_barrier_wait.html @@ -5,7 +5,7 @@ PTHREAD_BARRIER_WAIT(3) manual page -

        POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

        +

        POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

        Reference Index

        Table of Contents

        Name

        @@ -87,7 +87,7 @@

        Application Usage

        The pthread_barrier_wait function is part of the Barriers option and need not be provided on all implementations.

        -

        PThreads4W defines _POSIX_BARRIERS to indicate +

        pthreads-w32 defines _POSIX_BARRIERS to indicate that this routine is implemented and may be used.

        Rationale

        None. @@ -117,7 +117,7 @@

        Copyright

        can be obtained online at http://www.opengroup.org/unix/online.html .

        -

        Modified by Ross Johnson for use with Pthreads4W.

        +

        Modified by Ross Johnson for use with pthreads-w32.


        Table of Contents

          diff --git a/manual/pthread_barrierattr_init.html b/manual/pthread_barrierattr_init.html index b26c402a..a81032e2 100644 --- a/manual/pthread_barrierattr_init.html +++ b/manual/pthread_barrierattr_init.html @@ -5,7 +5,7 @@ PTHREAD_BARRIERATTR_INIT(3) manual page -

          POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

          +

          POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

          Reference Index

          Table of Contents

          Name

          @@ -76,7 +76,7 @@

          Application Usage

          pthread_barrierattr_init functions are part of the Barriers option and need not be provided on all implementations.

          -

          PThreads4W defines _POSIX_BARRIERS to indicate +

          pthreads-w32 defines _POSIX_BARRIERS to indicate that these routines are implemented and may be used.

          Rationale

          None. @@ -102,7 +102,7 @@

          Copyright

          can be obtained online at http://www.opengroup.org/unix/online.html .

          -

          Modified by Ross Johnson for use with Pthreads4W.

          +

          Modified by Ross Johnson for use with pthreads-w32.


          Table of Contents

            diff --git a/manual/pthread_barrierattr_setpshared.html b/manual/pthread_barrierattr_setpshared.html index afeab8e8..f1a323ca 100644 --- a/manual/pthread_barrierattr_setpshared.html +++ b/manual/pthread_barrierattr_setpshared.html @@ -5,7 +5,7 @@ PTHREAD_BARRIERATTR_SETPSHARED(3) manual page -

            POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

            +

            POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

            Reference Index

            Table of Contents

            Name

            @@ -39,7 +39,7 @@

            Description

            PTHREAD_PROCESS_PRIVATE. Both constants PTHREAD_PROCESS_SHARED and PTHREAD_PROCESS_PRIVATE are defined in <pthread.h>.

            -

            PThreads4W defines _POSIX_THREAD_PROCESS_SHARED in +

            pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in pthread.h as -1 to indicate that these routines are implemented but that the process shared attribute is not supported.

            Additional attributes, their default values, and the names of the @@ -76,7 +76,7 @@

            Errors

            ENOSYS
            The value specified by attr was PTHREAD_PROCESS_SHARED - (PThreads4W).
            + (pthreads-w32).

            These functions shall not return an error code of [EINTR].

            @@ -90,7 +90,7 @@

            Application Usage

            pthread_barrierattr_setpshared functions are part of the Barriers option and need not be provided on all implementations.

            -

            PThreads4W defines _POSIX_BARRIERS and +

            pthreads-w32 defines _POSIX_BARRIERS and _POSIX_THREAD_PROCESS_SHARED in pthread.h as -1 to indicate that these routines are implemented and may be used, but do not support the process shared option.

            @@ -119,7 +119,7 @@

            Copyright

            can be obtained online at http://www.opengroup.org/unix/online.html .

            -

            Modified by Ross Johnson for use with Pthreads4W.

            +

            Modified by Ross Johnson for use with pthreads-w32.


            Table of Contents

              diff --git a/manual/pthread_cancel.html b/manual/pthread_cancel.html index b6ce0a0a..26987bfd 100644 --- a/manual/pthread_cancel.html +++ b/manual/pthread_cancel.html @@ -5,7 +5,7 @@ PTHREAD_CANCEL(3) manual page -

              POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

              +

              POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

              Reference Index

              Table of Contents

              Name

              @@ -64,14 +64,14 @@

              Description

              location pointed to by oldtype, and can thus be restored later by another call to pthread_setcanceltype.

              -

              PThreads4W provides two levels of support for +

              pthreads-w32 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 PThreads4W library at run-time.

              +automatically detected by the pthreads-w32 library at run-time.

              Threads are always created by pthread_create(3) with cancellation enabled and deferred. That is, the initial cancellation state is PTHREAD_CANCEL_ENABLE and the initial @@ -87,7 +87,7 @@

              Description


              pthread_cond_timedwait(3)
              pthread_testcancel(3)
              sem_wait(3)
              sem_timedwait(3)
              sigwait(3)

              -

              PThreads4W provides two functions to enable additional +

              pthreads-w32 provides two functions to enable additional cancellation points to be created in user functions that block on Win32 HANDLEs:

              pthreadCancelableWait() @@ -144,12 +144,12 @@

              Errors

              Author

              Xavier Leroy <Xavier.Leroy@inria.fr>

              -

              Modified by Ross Johnson for use with Pthreads4W.

              +

              Modified by Ross Johnson for use with pthreads-w32.

              See Also

              pthread_exit(3) , pthread_cleanup_push(3) , pthread_cleanup_pop(3) -, PThreads4W package README file 'Prerequisites' section. +, pthreads-w32 package README file 'Prerequisites' section.

              Bugs

              POSIX specifies that a number of system calls (basically, all @@ -157,7 +157,7 @@

              Bugs

              , write(2) , wait(2) , etc.) and library functions that may call these system calls (e.g. fprintf(3) ) are cancellation -points. PThreads4W is not integrated enough with the C +points. pthreads-w32 is not integrated enough with the C library to implement this, and thus none of the C library functions is a cancellation point.

              diff --git a/manual/pthread_cleanup_push.html b/manual/pthread_cleanup_push.html index 2eda0a5b..2ca9e564 100644 --- a/manual/pthread_cleanup_push.html +++ b/manual/pthread_cleanup_push.html @@ -5,7 +5,7 @@ PTHREAD_CLEANUP_PUSH(3) manual page -

              POSIX Threads for Windows ā€“ REFERENCE - Pthreads4W

              +

              POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

              Reference Index

              Table of Contents

              Name

              @@ -70,7 +70,7 @@

              Author

              <Xavier.Leroy@inria.fr>
              Modified by -Ross Johnson for use with PThreads4W.
              +Ross Johnson for use with pthreads-w32.

              See Also

              pthread_exit(3) , pthread_cancel(3) , diff --git a/manual/pthread_cond_init.html b/manual/pthread_cond_init.html index 9c886846..dc9dbf80 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 - Pthreads4W

              +

              POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

              Reference Index

              Table of Contents

              Name

              @@ -54,7 +54,7 @@

              Description

              Variables of type pthread_cond_t can also be initialized statically, using the constant PTHREAD_COND_INITIALIZER. In -the PThreads4W implementation, an application should still +the pthreads-w32 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 Pthreads4W.

              +

              Modified by Ross Johnson for use with pthreads-w32.

              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 3c6f7cf4..8d1d7792 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 - Pthreads4W

              +

              POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

              Reference Index

              Table of Contents

              Name

              @@ -32,7 +32,7 @@

              Description

              object attr and fills it with default values for the attributes. pthread_condattr_destroy destroys a condition attribute object, which must not be reused until it is reinitialized.

              -

              PThreads4W defines _POSIX_THREAD_PROCESS_SHARED in +

              pthreads-w32 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 Pthreads4W.

              +

              Modified by Ross Johnson for use with pthreads-w32.

              See Also

              pthread_cond_init(3) .

              diff --git a/manual/pthread_condattr_setpshared.html b/manual/pthread_condattr_setpshared.html index 6f3b2f9d..ab609d2e 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 - Pthreads4W

              +

              POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

              Reference Index

              Table of Contents

              Name

              @@ -39,7 +39,7 @@

              Description

              such a condition variable, the behavior is undefined. The default value of the attribute is PTHREAD_PROCESS_PRIVATE.

              -

              PThreads4W defines _POSIX_THREAD_PROCESS_SHARED in +

              pthreads-w32 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 - (PThreads4W).
              + (pthreads-w32).

              These functions shall not return an error code of [EINTR].

              @@ -84,7 +84,7 @@

              Examples

              None.

              Application Usage

              -

              PThreads4W defines _POSIX_THREAD_PROCESS_SHARED in +

              pthreads-w32 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 Pthreads4W.

              +

              Modified by Ross Johnson for use with pthreads-w32.


              Table of Contents

                diff --git a/manual/pthread_create.html b/manual/pthread_create.html index 9d58eaf8..2da6d4fa 100644 --- a/manual/pthread_create.html +++ b/manual/pthread_create.html @@ -18,7 +18,7 @@

                POSIX Threads for Windows – REFERENCE - -Pthreads4W

                +pthreads-w32

                Reference Index

                Table of Contents

                Name

                @@ -42,7 +42,7 @@

                Description

                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 +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 @@ -80,7 +80,7 @@

                Author

                Xavier Leroy <Xavier.Leroy@inria.fr>

                -

                Modified by Ross Johnson for use with Pthreads4W.

                +

                Modified by Ross Johnson for use with pthreads-w32.

                See Also

                pthread_exit(3) , pthread_join(3) , diff --git a/manual/pthread_delay_np.html b/manual/pthread_delay_np.html index 6570444d..88d02e09 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 - Pthreads4W

                +

                POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                Reference Index

                Table of Contents

                Name

                @@ -42,7 +42,7 @@

                Errors

                The value specified by interval is invalid.

                Author

                -

                Ross Johnson for use with Pthreads4W.

                +

                Ross Johnson for use with pthreads-w32.


                Table of Contents

                  diff --git a/manual/pthread_detach.html b/manual/pthread_detach.html index 779b0320..c7b2b547 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 - Pthreads4W

                  +

                  POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                  Reference Index

                  Table of Contents

                  Name

                  @@ -55,7 +55,7 @@

                  Author

                  Xavier Leroy <Xavier.Leroy@inria.fr>

                  -

                  Modified by Ross Johnson for use with PThreads4W.

                  +

                  Modified by Ross Johnson for use with pthreads-w32.

                  See Also

                  pthread_create(3) , pthread_join(3) , diff --git a/manual/pthread_getunique_np.html b/manual/pthread_getunique_np.html index 191d43eb..677d5e47 100755 --- a/manual/pthread_getunique_np.html +++ b/manual/pthread_getunique_np.html @@ -14,7 +14,7 @@

                  POSIX Threads for Windows ā€“ REFERENCE - -Pthreads4W

                  +pthreads-w32

                  Reference Index

                  Table of Contents

                  Name

                  @@ -27,7 +27,7 @@

                  Synopsis

                  Description

                  Returns the unique 64 bit sequence number assigned to thread.

                  -

                  In PThreads4W:

                  +

                  In pthreads-w32:

                  • 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 Pthreads4W.

                    +

                    Ross Johnson for use with pthreads-w32.


                    Table of Contents

                      diff --git a/manual/pthread_getw32threadhandle_np.html b/manual/pthread_getw32threadhandle_np.html index d4899c36..fe07dd63 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 - Pthreads4W

                      +

                      POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                      Reference Index

                      Table of Contents

                      Name

                      @@ -28,7 +28,7 @@

                      Return Value

                      Errors

                      None.

                      Author

                      -

                      Ross Johnson for use with Pthreads4W.

                      +

                      Ross Johnson for use with pthreads-w32.


                      Table of Contents

                        diff --git a/manual/pthread_join.html b/manual/pthread_join.html index f470cdd4..87007f76 100644 --- a/manual/pthread_join.html +++ b/manual/pthread_join.html @@ -14,7 +14,7 @@

                        POSIX Threads for Windows – REFERENCE - -Pthreads4W

                        +pthreads-w32

                        Reference Index

                        Table of Contents

                        Name

                        @@ -114,7 +114,7 @@

                        Author

                        Xavier Leroy <Xavier.Leroy@inria.fr>

                        -

                        Modified by Ross Johnson for use with Pthreads4W. +

                        Modified by Ross Johnson for use with pthreads-w32.

                        See Also

                        pthread_exit(3) , diff --git a/manual/pthread_key_create.html b/manual/pthread_key_create.html index 3f1d566e..fdb6c23c 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 - Pthreads4W

                        +

                        POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                        Reference Index

                        Table of Contents

                        Name

                        @@ -89,7 +89,7 @@

                        Description

                        either memory leakage or infinite loops if destr_function has already been called at least PTHREAD_DESTRUCTOR_ITERATIONS times.

                        -

                        PThreads4W stops running key +

                        pthreads-w32 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 Pthreads4W.

                        +

                        Modified by Ross Johnson for use with pthreads-w32.

                        See Also

                        pthread_create(3) , pthread_exit(3) , diff --git a/manual/pthread_kill.html b/manual/pthread_kill.html index 005e937b..0f1c4418 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 - Pthreads4W

                        +

                        POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                        Reference Index

                        Table of Contents

                        Name

                        @@ -25,7 +25,7 @@

                        Description

                        pthread_sigmask changes the signal mask for the calling thread as described by the how and newmask arguments. If oldmask is not NULL, the previous signal mask is -stored in the location pointed to by oldmask. PThreads4W +stored in the location pointed to by oldmask. pthreads-w32 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. PThreads4W only supports signal number 0, +thread. pthreads-w32 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. PThreads4W implements this function as a +called. pthreads-w32 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 Pthreads4W.

                        +

                        Modified by Ross Johnson for use with pthreads-w32.

                        See Also

                        @@ -108,13 +108,13 @@

                        Notes

                        because all threads inherit their initial sigmask from their creating thread.

                        Bugs

                        -

                        PThreads4W does not implement signals yet and so these +

                        pthreads-w32 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. PThreads4W from version 1.0.0 +portable, and very risky. pthreads-w32 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 8eae6cc5..6536f07f 100644 --- a/manual/pthread_mutex_init.html +++ b/manual/pthread_mutex_init.html @@ -16,7 +16,7 @@

                        POSIX Threads for Windows Ć¢ā‚¬ā€œ REFERENCE - -Pthreads4W

                        +pthreads-w32

                        Reference Index

                        Table of Contents

                        Name

                        @@ -86,7 +86,7 @@

                        Description

                        normal Ć¢ā‚¬Å“fastĆ¢ā‚¬ļæ½ mutexes), PTHREAD_RECURSIVE_MUTEX_INITIALIZER (for recursive mutexes), and PTHREAD_ERRORCHECK_MUTEX_INITIALIZER (for error checking mutexes). In -the PThreads4W implementation, +the pthreads-w32 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 PThreads4W, +count reaches zero is the mutex actually unlocked. In pthreads-w32, 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 Pthreads4W.

                        +

                        Modified by Ross Johnson for use with pthreads-w32.

                        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 1b3f1191..7e5c06a8 100644 --- a/manual/pthread_mutexattr_init.html +++ b/manual/pthread_mutexattr_init.html @@ -14,7 +14,7 @@

                        POSIX Threads for Windows Ć¢ā‚¬ā€œ REFERENCE - -Pthreads4W

                        +pthreads-w32

                        Reference Index

                        Table of Contents

                        Name

                        @@ -67,7 +67,7 @@

                        Description

                        the mutex kind attribute in attr and stores it in the location pointed to by type.

                        -

                        PThreads4W also recognises the following equivalent +

                        pthreads-w32 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

                        -

                        PThreads4W also recognises the following equivalent types +

                        pthreads-w32 also recognises the following equivalent types that are used by Linux:

                        PTHREAD_MUTEX_FAST_NP Ć¢ā‚¬ā€œ equivalent to PTHREAD_MUTEX_NORMAL

                        @@ -113,12 +113,15 @@

                        Description

                        are:

                        PTHREAD_MUTEX_STALLED - when the owner of the mutex terminates without unlocking the mutex, -all subsequent calls to pthread_mutex_*lock() are blocked from +all subsequent calls + to pthread_mutex_*lock() are blocked from progress in an unspecified manner.

                        PTHREAD_MUTEX_ROBUST - when the owner of the mutex terminates without unlocking the mutex, -the mutex is unlocked. The next owner of this mutex acquires the -mutex with an error return of EOWNERDEAD.

                        +the mutex is + unlocked. The next owner of this mutex acquires the +mutex with an error return of +EOWNERDEAD.

                        Return Value

                        On success all functions return 0, otherwise they return an error code as follows:

                        @@ -163,7 +166,7 @@

                        Return Value

                        Author

                        Xavier Leroy <Xavier.Leroy@inria.fr>

                        -

                        Modified by Ross Johnson for use with Pthreads4W.

                        +

                        Modified by Ross Johnson for use with pthreads-w32.

                        See Also

                        pthread_mutex_init(3) , pthread_mutex_lock(3) @@ -171,7 +174,7 @@

                        See Also

                        .

                        Notes

                        -

                        For speed, PThreads4W never checks the thread ownership +

                        For speed, pthreads-w32 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 c3100b81..0cd38a80 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 - Pthreads4W

                        +

                        POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                        Reference Index

                        Table of Contents

                        Name

                        @@ -38,7 +38,7 @@

                        Description

                        operate on such a mutex, the behavior is undefined. The default value of the attribute shall be PTHREAD_PROCESS_PRIVATE.

                        -

                        PThreads4W defines _POSIX_THREAD_PROCESS_SHARED in +

                        pthreads-w32 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 Pthreads4W.

                        +

                        Modified by Ross Johnson for use with pthreads-w32.


                        Table of Contents

                          diff --git a/manual/pthread_num_processors_np.html b/manual/pthread_num_processors_np.html index ab148c36..9c53258a 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 - Pthreads4W

                          +

                          POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                          Reference Index

                          Table of Contents

                          Name

                          @@ -28,7 +28,7 @@

                          Return ValueErrors

                          None.

                          Author

                          -

                          Ross Johnson for use with Pthreads4W.

                          +

                          Ross Johnson for use with pthreads-w32.


                          Table of Contents

                            diff --git a/manual/pthread_once.html b/manual/pthread_once.html index 69903faf..8be2acfb 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 - Pthreads4W

                            +

                            POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                            Reference Index

                            Table of Contents

                            Name

                            @@ -54,7 +54,7 @@

                            Errors

                            Author

                            Xavier Leroy <Xavier.Leroy@inria.fr>

                            -

                            Modified by Ross Johnson for use with Pthreads4W.

                            +

                            Modified by Ross Johnson for use with pthreads-w32.


                            Table of Contents

                              diff --git a/manual/pthread_rwlock_init.html b/manual/pthread_rwlock_init.html index 5ab9aa68..ea28ef6e 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 - Pthreads4W

                              +

                              POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                              Reference Index

                              Table of Contents

                              Name

                              @@ -48,7 +48,7 @@

                              Description

                              shall not be initialized and the contents of rwlock are undefined.

                              -

                              PThreads4W supports statically initialized rwlock +

                              pthreads-w32 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.

                              -

                              PThreads4W defines _POSIX_READER_WRITER_LOCKS in +

                              pthreads-w32 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 Pthreads4W.

                              +

                              Modified by Ross Johnson for use with pthreads-w32.


                              Table of Contents

                                diff --git a/manual/pthread_rwlock_rdlock.html b/manual/pthread_rwlock_rdlock.html index a9a13df6..9da53c3c 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 - Pthreads4W

                                +

                                POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                Reference Index

                                Table of Contents

                                Name

                                @@ -25,7 +25,7 @@

                                Description

                                thread acquires the read lock if a writer does not hold the lock and there are no writers blocked on the lock.

                                -

                                PThreads4W does not prefer either writers or readers in +

                                pthreads-w32 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.

                                -

                                PThreads4W does not detect deadlock if the thread already +

                                pthreads-w32 does not detect deadlock if the thread already owns the lock for writing.

                                -

                                PThreads4W defines _POSIX_READER_WRITER_LOCKS in +

                                pthreads-w32 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 Pthreads4W.

                                +

                                Modified by Ross Johnson for use with pthreads-w32.


                                Table of Contents

                                  diff --git a/manual/pthread_rwlock_timedrdlock.html b/manual/pthread_rwlock_timedrdlock.html index e135f8df..ba3c8513 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 - Pthreads4W

                                  +

                                  POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                  Reference Index

                                  Table of Contents

                                  Name

                                  @@ -41,7 +41,7 @@

                                  Description

                                  holds a write lock on rwlock. The results are undefined if this function is called with an uninitialized read-write lock.

                                  -

                                  PThreads4W defines _POSIX_READER_WRITER_LOCKS in +

                                  pthreads-w32 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 Pthreads4W.

                                  +

                                  Modified by Ross Johnson for use with pthreads-w32.


                                  Table of Contents

                                    diff --git a/manual/pthread_rwlock_timedwrlock.html b/manual/pthread_rwlock_timedwrlock.html index f2f853dd..d569404a 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 - Pthreads4W

                                    +

                                    POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                    Reference Index

                                    Table of Contents

                                    Name

                                    @@ -41,7 +41,7 @@

                                    Description

                                    holds the read-write lock. The results are undefined if this function is called with an uninitialized read-write lock.

                                    -

                                    PThreads4W defines _POSIX_READER_WRITER_LOCKS in +

                                    pthreads-w32 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 Pthreads4W.

                                    +

                                    Modified by Ross Johnson for use with pthreads-w32.


                                    Table of Contents

                                      diff --git a/manual/pthread_rwlock_unlock.html b/manual/pthread_rwlock_unlock.html index 583faa0d..220192a1 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 - Pthreads4W

                                      +

                                      POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                      Reference Index

                                      Table of Contents

                                      Name

                                      @@ -34,14 +34,14 @@

                                      Description

                                      read-write lock object, the read-write lock object shall be put in the unlocked state.

                                      -

                                      PThreads4W does not prefer either writers or readers in +

                                      pthreads-w32 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.

                                      -

                                      PThreads4W defines _POSIX_READER_WRITER_LOCKS in +

                                      pthreads-w32 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 Pthreads4W.

                                      +

                                      Modified by Ross Johnson for use with pthreads-w32.


                                      Table of Contents

                                        diff --git a/manual/pthread_rwlock_wrlock.html b/manual/pthread_rwlock_wrlock.html index 7e165b34..4a1d65e0 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 - Pthreads4W

                                        +

                                        POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                        Reference Index

                                        Table of Contents

                                        Name

                                        @@ -33,14 +33,14 @@

                                        Description

                                        if at the time the call is made it holds the read-write lock (whether a read or write lock).

                                        -

                                        PThreads4W does not prefer either writers or readers in +

                                        pthreads-w32 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.

                                        -

                                        PThreads4W defines _POSIX_READER_WRITER_LOCKS in +

                                        pthreads-w32 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 Pthreads4W.

                                        +

                                        Modified by Ross Johnson for use with pthreads-w32.


                                        Table of Contents

                                          diff --git a/manual/pthread_rwlockattr_init.html b/manual/pthread_rwlockattr_init.html index c9d04eaa..0dcf31b7 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 - Pthreads4W

                                          +

                                          POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                          Reference Index

                                          Table of Contents

                                          Name

                                          @@ -40,7 +40,7 @@

                                          Description

                                          attributes object (including destruction) shall not affect any previously initialized read-write locks.

                                          -

                                          PThreads4W defines _POSIX_READER_WRITER_LOCKS in +

                                          pthreads-w32 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 Pthreads4W.

                                          +

                                          Modified by Ross Johnson for use with pthreads-w32.


                                          Table of Contents

                                            diff --git a/manual/pthread_rwlockattr_setpshared.html b/manual/pthread_rwlockattr_setpshared.html index dfe033e1..1d82eddf 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 - Pthreads4W

                                            +

                                            POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                            Reference Index

                                            Table of Contents

                                            Name

                                            @@ -41,14 +41,14 @@

                                            Description

                                            read-write lock, the behavior is undefined. The default value of the process-shared attribute shall be PTHREAD_PROCESS_PRIVATE.

                                            -

                                            PThreads4W defines _POSIX_THREAD_PROCESS_SHARED in +

                                            pthreads-w32 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.

                                            -

                                            PThreads4W defines _POSIX_READER_WRITER_LOCKS in +

                                            pthreads-w32 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 Pthreads4W.

                                            +

                                            Modified by Ross Johnson for use with pthreads-w32.


                                            Table of Contents

                                              diff --git a/manual/pthread_self.html b/manual/pthread_self.html index f0080eaa..ec70063a 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 - Pthreads4W

                                              +

                                              POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                              Reference Index

                                              Table of Contents

                                              Name

                                              @@ -20,7 +20,7 @@

                                              Description

                                              pthread_self return the thread identifier for the calling thread.

                                              -

                                              PThreads4W also provides support for Win32 native +

                                              pthreads-w32 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 PThreads4W routines +need to call pthread_self before calling pthreads-w32 routines unless that routine requires a pthread_t parameter.

                                              Author

                                              Xavier Leroy <Xavier.Leroy@inria.fr>

                                              -

                                              Modified by Ross Johnson for use with Pthreads4W.

                                              +

                                              Modified by Ross Johnson for use with pthreads-w32.

                                              See Also

                                              pthread_equal(3) , pthread_join(3) , diff --git a/manual/pthread_setaffinity_np.html b/manual/pthread_setaffinity_np.html index 39831711..53106af5 100644 --- a/manual/pthread_setaffinity_np.html +++ b/manual/pthread_setaffinity_np.html @@ -13,7 +13,7 @@

                                              POSIX -Threads for Windows – REFERENCE - Pthreads4W

                                              +Threads for Windows – REFERENCE - pthreads-w32

                                              Reference Index

                                              Table of Contents

                                              Name

                                              @@ -44,7 +44,7 @@

                                              Description

                                              whose ID is tid into the cpu_set_t structure pointed to by mask. The cpusetsize argument specifies the size (in bytes) of mask. -

                                              PThreads4W currently ignores the cpusetsize +

                                              pthreads-w32 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 PThreads4W.

                                              +

                                              Modified by Ross Johnson for use with pthreads-w32.


                                              Table of Contents

                                                diff --git a/manual/pthread_setcancelstate.html b/manual/pthread_setcancelstate.html index 231625cc..26956cbd 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 - Pthreads4W

                                                +

                                                POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                Reference Index

                                                Table of Contents

                                                Name

                                                @@ -64,14 +64,14 @@

                                                Description

                                                location pointed to by oldtype, and can thus be restored later by another call to pthread_setcanceltype.

                                                -

                                                PThreads4W provides two levels of support for +

                                                pthreads-w32 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 PThreads4W library at run-time.

                                                +automatically detected by the pthreads-w32 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 -PThreads4W)

                                                -

                                                PThreads4W provides two functions to enable additional +pthreads-w32)

                                                +

                                                pthreads-w32 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 Pthreads4W.

                                                +

                                                Modified by Ross Johnson for use with pthreads-w32.

                                                See Also

                                                pthread_exit(3) , pthread_cleanup_push(3) , pthread_cleanup_pop(3) -, PThreads4W package README file 'Prerequisites' section. +, pthreads-w32 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. PThreads4W is not integrated enough with the C +points. pthreads-w32 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 231625cc..26956cbd 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 - Pthreads4W

                                                +

                                                POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                Reference Index

                                                Table of Contents

                                                Name

                                                @@ -64,14 +64,14 @@

                                                Description

                                                location pointed to by oldtype, and can thus be restored later by another call to pthread_setcanceltype.

                                                -

                                                PThreads4W provides two levels of support for +

                                                pthreads-w32 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 PThreads4W library at run-time.

                                                +automatically detected by the pthreads-w32 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 -PThreads4W)

                                                -

                                                PThreads4W provides two functions to enable additional +pthreads-w32)

                                                +

                                                pthreads-w32 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 Pthreads4W.

                                                +

                                                Modified by Ross Johnson for use with pthreads-w32.

                                                See Also

                                                pthread_exit(3) , pthread_cleanup_push(3) , pthread_cleanup_pop(3) -, PThreads4W package README file 'Prerequisites' section. +, pthreads-w32 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. PThreads4W is not integrated enough with the C +points. pthreads-w32 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 cb18405e..2bf1d55c 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 - Pthreads4W

                                                +

                                                POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                Reference Index

                                                Table of Contents

                                                Name

                                                @@ -53,7 +53,7 @@

                                                Description

                                                is called so that a subsequent call to pthread_getconcurrency shall return the same value.

                                                -

                                                PThreads4W provides these routines for source code +

                                                pthreads-w32 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 Pthreads4W.

                                                +

                                                Modified by Ross Johnson for use with pthreads-w32.


                                                Table of Contents

                                                  diff --git a/manual/pthread_setname_np.html b/manual/pthread_setname_np.html index d3dc1e37..3e3cfa66 100644 --- a/manual/pthread_setname_np.html +++ b/manual/pthread_setname_np.html @@ -23,7 +23,7 @@

                                                  POSIX -Threads for Windows – REFERENCE - PThreads4W

                                                  +Threads for Windows – REFERENCE - pthreads-w32

                                                  Reference Index

                                                  Table of Contents

                                                  Name

                                                  diff --git a/manual/pthread_setschedparam.html b/manual/pthread_setschedparam.html index 6fe6d608..4efcfc98 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 - Pthreads4W

                                                  +

                                                  POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                  Reference Index

                                                  Table of Contents

                                                  Name

                                                  @@ -31,7 +31,7 @@

                                                  Description

                                                  round-robin) or SCHED_FIFO (real-time, first-in first-out). param specifies the scheduling priority for the two real-time policies.

                                                  -

                                                  PThreads4W only supports SCHED_OTHER and does not support +

                                                  pthreads-w32 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 Pthreads4W.

                                                  +

                                                  Modified by Ross Johnson for use with pthreads-w32.

                                                  See Also

                                                  sched_setscheduler(2) , sched_getscheduler(2) diff --git a/manual/pthread_spin_init.html b/manual/pthread_spin_init.html index 2287ec17..3420a857 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 - Pthreads4W

                                                  +

                                                  POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                  Reference Index

                                                  Table of Contents

                                                  Name

                                                  @@ -34,7 +34,7 @@

                                                  Description

                                                  required to use the spin lock referenced by lock and initialize the lock to an unlocked state.

                                                  -

                                                  PThreads4W supports single and multiple processor systems +

                                                  pthreads-w32 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.

                                                  -

                                                  PThreads4W defines _POSIX_THREAD_PROCESS_SHARED in +

                                                  pthreads-w32 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.

                                                  -

                                                  PThreads4W supports statically initialized spin locks +

                                                  pthreads-w32 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 Pthreads4W.

                                                  +

                                                  Modified by Ross Johnson for use with pthreads-w32.


                                                  Table of Contents

                                                    diff --git a/manual/pthread_spin_lock.html b/manual/pthread_spin_lock.html index e33b6bf2..ccd1f60e 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 - Pthreads4W

                                                    +

                                                    POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                    Reference Index

                                                    Table of Contents

                                                    Name

                                                    @@ -26,7 +26,7 @@

                                                    Description

                                                    (that is, shall not return from the pthread_spin_lock call) until the lock becomes available. The results are undefined if the calling thread holds the lock at the time the call is made.

                                                    -

                                                    PThreads4W supports single and multiple processor systems +

                                                    pthreads-w32 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 Pthreads4W.

                                                    +

                                                    Modified by Ross Johnson for use with pthreads-w32.


                                                    Table of Contents

                                                      diff --git a/manual/pthread_spin_unlock.html b/manual/pthread_spin_unlock.html index 19d66bf5..735d6672 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 - Pthreads4W

                                                      +

                                                      POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                      Reference Index

                                                      Table of Contents

                                                      Name

                                                      @@ -27,7 +27,7 @@

                                                      Description

                                                      pthread_spin_unlock is called, the lock becomes available and an unspecified spinning thread shall acquire the lock.

                                                      -

                                                      PThreads4W does not check ownership of the lock and it is +

                                                      pthreads-w32 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

                                                      -

                                                      PThreads4W does not check ownership of the lock and it is +

                                                      pthreads-w32 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 Pthreads4W.

                                                      +

                                                      Modified by Ross Johnson for use with pthreads-w32.


                                                      Table of Contents

                                                        diff --git a/manual/pthread_timechange_handler_np.html b/manual/pthread_timechange_handler_np.html index 15098266..8562af0a 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 - Pthreads4W

                                                        +

                                                        POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                        Reference Index

                                                        Table of Contents

                                                        Name

                                                        @@ -47,7 +47,7 @@

                                                        Errors

                                                        To indicate that not all condition variables were signalled for some reason.

                                                        Author

                                                        -

                                                        Ross Johnson for use with Pthreads4W.

                                                        +

                                                        Ross Johnson for use with pthreads-w32.


                                                        Table of Contents

                                                          diff --git a/manual/pthread_win32_attach_detach_np.html b/manual/pthread_win32_attach_detach_np.html index b0429680..9c8d803c 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 - Pthreads4W

                                                          +

                                                          POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                          Reference Index

                                                          Table of Contents

                                                          Name

                                                          pthread_win32_process_attach_np, pthread_win32_process_detach_np, pthread_win32_thread_attach_np, pthread_win32_thread_detach_np ā€“ exposed versions of the -PThreads4W DLL dllMain() switch functionality for use when +pthreads-w32 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 -PThreads4W initialisation fails.

                                                          +pthreads-w32 initialisation fails.

                                                          Cancellation

                                                          None.

                                                          Return Value

                                                          @@ -45,7 +45,7 @@

                                                          Return ValueErrors

                                                          None.

                                                          Author

                                                          -

                                                          Ross Johnson for use with Pthreads4W.

                                                          +

                                                          Ross Johnson for use with pthreads-w32.


                                                          Table of Contents

                                                            diff --git a/manual/pthread_win32_getabstime_np.html b/manual/pthread_win32_getabstime_np.html index 7e4e060f..f5a68cda 100644 --- a/manual/pthread_win32_getabstime_np.html +++ b/manual/pthread_win32_getabstime_np.html @@ -18,7 +18,7 @@

                                                            POSIX Threads for Windows – REFERENCE - -Pthreads4W

                                                            +pthreads-w32

                                                            Reference Index

                                                            Table of Contents

                                                            Name

                                                            @@ -47,7 +47,7 @@

                                                            Return

                                                            Errors

                                                            None.

                                                            Author

                                                            -

                                                            Ross Johnson for use with Pthreads4W.

                                                            +

                                                            Ross Johnson for use with pthreads-w32.


                                                            Table of Contents

                                                              diff --git a/manual/pthread_win32_test_features_np.html b/manual/pthread_win32_test_features_np.html index 927942c5..473f5da1 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 - Pthreads4W

                                                              +

                                                              POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                              Reference Index

                                                              Table of Contents

                                                              Name

                                                              @@ -39,7 +39,7 @@

                                                              Return ValueErrors

                                                              None.

                                                              Author

                                                              -

                                                              Ross Johnson for use with Pthreads4W.

                                                              +

                                                              Ross Johnson for use with pthreads-w32.


                                                              Table of Contents

                                                                diff --git a/manual/sched_get_priority_max.html b/manual/sched_get_priority_max.html index 72311d9e..2b604924 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 - Pthreads4W

                                                                +

                                                                POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                                Reference Index

                                                                Table of Contents

                                                                Name

                                                                @@ -75,7 +75,7 @@

                                                                Copyright

                                                                can be obtained online at http://www.opengroup.org/unix/online.html .

                                                                -

                                                                Modified by Ross Johnson for use with Pthreads4W.

                                                                +

                                                                Modified by Ross Johnson for use with pthreads-w32.


                                                                Table of Contents

                                                                  diff --git a/manual/sched_getscheduler.html b/manual/sched_getscheduler.html index 9acd5e76..b471d82f 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 - Pthreads4W

                                                                  +

                                                                  POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                                  Reference Index

                                                                  Table of Contents

                                                                  Name

                                                                  @@ -25,7 +25,7 @@

                                                                  Description

                                                                  The values that can be returned by sched_getscheduler are defined in the <sched.h> header.

                                                                  -

                                                                  PThreads4W only supports the SCHED_OTHER policy, +

                                                                  pthreads-w32 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 Pthreads4W.

                                                                  +

                                                                  Modified by Ross Johnson for use with pthreads-w32.


                                                                  Table of Contents

                                                                    diff --git a/manual/sched_setaffinity.html b/manual/sched_setaffinity.html index 279e4b01..fa9198da 100644 --- a/manual/sched_setaffinity.html +++ b/manual/sched_setaffinity.html @@ -13,7 +13,7 @@

                                                                    POSIX -Threads for Windows – REFERENCE - Pthreads4W

                                                                    +Threads for Windows – REFERENCE - pthreads-w32

                                                            Reference Index

                                                            Table of Contents

                                                            Name

                                                            @@ -46,7 +46,7 @@

                                                            Description

                                                            mask. The cpusetsize argument specifies the size (in bytes) of mask. If pid is zero, then the mask of the calling process is returned.

                                                            -

                                                            PThreads4W currently ignores the cpusetsize +

                                                            pthreads-w32 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 PThreads4W.

                                                            +

                                                            Modified by Ross Johnson for use with pthreads-w32.


                                                            Table of Contents

                                                              diff --git a/manual/sched_setscheduler.html b/manual/sched_setscheduler.html index 988287f2..672168ef 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 - Pthreads4W

                                                              +

                                                              POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                              Reference Index

                                                              Table of Contents

                                                              Name

                                                              @@ -32,7 +32,7 @@

                                                              Description

                                                              The possible values for the policy parameter are defined in the <sched.h> header.

                                                              -

                                                              PThreads4W only supports the SCHED_OTHER policy. +

                                                              pthreads-w32 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 Pthreads4W.

                                                              +

                                                              Modified by Ross Johnson for use with pthreads-w32.


                                                              Table of Contents

                                                                diff --git a/manual/sched_yield.html b/manual/sched_yield.html index 1eed9151..1b42eec4 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 - Pthreads4W

                                                                +

                                                                POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                                Reference Index

                                                                Table of Contents

                                                                Name

                                                                diff --git a/manual/sem_init.html b/manual/sem_init.html index a856b45d..186a8ff8 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 - Pthreads4W

                                                                +

                                                                POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                                Reference Index

                                                                Table of Contents

                                                                Name

                                                                @@ -45,7 +45,7 @@

                                                                Description

                                                                semaphore is local to the current process ( pshared is zero) or is to be shared between several processes ( pshared is not zero).

                                                                -

                                                                PThreads4W currently does not support process-shared +

                                                                pthreads-w32 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 PThreads4W +the current count of the semaphore sem. In the pthreads-w32 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 Pthreads4W.

                                                                +

                                                                Modified by Ross Johnson for use with pthreads-w32.

                                                                See Also

                                                                pthread_mutex_init(3) , pthread_cond_init(3) , diff --git a/pthread.c b/pthread.c index 61828f37..896ecd1d 100644 --- a/pthread.c +++ b/pthread.c @@ -8,30 +8,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread.h b/pthread.h index 901208e7..3b50beb5 100644 --- a/pthread.h +++ b/pthread.h @@ -2,30 +2,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined( PTHREAD_H ) @@ -164,7 +167,7 @@ * The source code and other information about this library * are available from * - * https://sourceforge.net/projects/pthreads4w/ + * http://sources.redhat.com/pthreads-win32 * * ------------------------------------------------------------- */ diff --git a/pthread_attr_destroy.c b/pthread_attr_destroy.c index 21b44777..7bb0e320 100644 --- a/pthread_attr_destroy.c +++ b/pthread_attr_destroy.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_attr_getaffinity_np.c b/pthread_attr_getaffinity_np.c index cabaad50..cddbb69d 100644 --- a/pthread_attr_getaffinity_np.c +++ b/pthread_attr_getaffinity_np.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_attr_getdetachstate.c b/pthread_attr_getdetachstate.c index 72aaba29..93d61335 100644 --- a/pthread_attr_getdetachstate.c +++ b/pthread_attr_getdetachstate.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_attr_getinheritsched.c b/pthread_attr_getinheritsched.c index 1d54bfb4..657624cc 100644 --- a/pthread_attr_getinheritsched.c +++ b/pthread_attr_getinheritsched.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_attr_getname_np.c b/pthread_attr_getname_np.c index cec14d42..110c02a4 100644 --- a/pthread_attr_getname_np.c +++ b/pthread_attr_getname_np.c @@ -3,30 +3,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_attr_getschedparam.c b/pthread_attr_getschedparam.c index 3ac1392e..b7be1cba 100644 --- a/pthread_attr_getschedparam.c +++ b/pthread_attr_getschedparam.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_attr_getschedpolicy.c b/pthread_attr_getschedpolicy.c index d50cdb88..f27f5ee3 100644 --- a/pthread_attr_getschedpolicy.c +++ b/pthread_attr_getschedpolicy.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_attr_getscope.c b/pthread_attr_getscope.c index 9f6c13fe..c5c5f064 100644 --- a/pthread_attr_getscope.c +++ b/pthread_attr_getscope.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_attr_getstackaddr.c b/pthread_attr_getstackaddr.c index c2d68477..238a4495 100644 --- a/pthread_attr_getstackaddr.c +++ b/pthread_attr_getstackaddr.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_attr_getstacksize.c b/pthread_attr_getstacksize.c index abbc2250..18ed57ef 100644 --- a/pthread_attr_getstacksize.c +++ b/pthread_attr_getstacksize.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_attr_init.c b/pthread_attr_init.c index 7ed5facf..dbb7ffc1 100644 --- a/pthread_attr_init.c +++ b/pthread_attr_init.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_attr_setaffinity_np.c b/pthread_attr_setaffinity_np.c index 035c7a1b..e2b939ef 100644 --- a/pthread_attr_setaffinity_np.c +++ b/pthread_attr_setaffinity_np.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_attr_setdetachstate.c b/pthread_attr_setdetachstate.c index 2b33a5dc..02dd88bf 100644 --- a/pthread_attr_setdetachstate.c +++ b/pthread_attr_setdetachstate.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_attr_setinheritsched.c b/pthread_attr_setinheritsched.c index f38ba4e5..d551190c 100644 --- a/pthread_attr_setinheritsched.c +++ b/pthread_attr_setinheritsched.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_attr_setname_np.c b/pthread_attr_setname_np.c index d82f8db6..f20fefde 100644 --- a/pthread_attr_setname_np.c +++ b/pthread_attr_setname_np.c @@ -3,30 +3,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_attr_setschedparam.c b/pthread_attr_setschedparam.c index fefc32ef..3505c9a5 100644 --- a/pthread_attr_setschedparam.c +++ b/pthread_attr_setschedparam.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_attr_setschedpolicy.c b/pthread_attr_setschedpolicy.c index fc0252f3..5fe0c0c7 100644 --- a/pthread_attr_setschedpolicy.c +++ b/pthread_attr_setschedpolicy.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_attr_setscope.c b/pthread_attr_setscope.c index 81765b87..96bc4941 100644 --- a/pthread_attr_setscope.c +++ b/pthread_attr_setscope.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_attr_setstackaddr.c b/pthread_attr_setstackaddr.c index 157bfe95..834382c7 100644 --- a/pthread_attr_setstackaddr.c +++ b/pthread_attr_setstackaddr.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_attr_setstacksize.c b/pthread_attr_setstacksize.c index be58f214..527d9a65 100644 --- a/pthread_attr_setstacksize.c +++ b/pthread_attr_setstacksize.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_barrier_destroy.c b/pthread_barrier_destroy.c index ad560872..61cd0cda 100644 --- a/pthread_barrier_destroy.c +++ b/pthread_barrier_destroy.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_barrier_init.c b/pthread_barrier_init.c index ac5c07b3..bc76fcd7 100644 --- a/pthread_barrier_init.c +++ b/pthread_barrier_init.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_barrier_wait.c b/pthread_barrier_wait.c index d1681ffb..9d573afe 100644 --- a/pthread_barrier_wait.c +++ b/pthread_barrier_wait.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_barrierattr_destroy.c b/pthread_barrierattr_destroy.c index b4bf719a..d8953a9b 100644 --- a/pthread_barrierattr_destroy.c +++ b/pthread_barrierattr_destroy.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_barrierattr_getpshared.c b/pthread_barrierattr_getpshared.c index dd26705f..7d9736c0 100644 --- a/pthread_barrierattr_getpshared.c +++ b/pthread_barrierattr_getpshared.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_barrierattr_init.c b/pthread_barrierattr_init.c index 6aac0eb8..aef72b4f 100644 --- a/pthread_barrierattr_init.c +++ b/pthread_barrierattr_init.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_barrierattr_setpshared.c b/pthread_barrierattr_setpshared.c index 6aa9314a..7f5dc549 100644 --- a/pthread_barrierattr_setpshared.c +++ b/pthread_barrierattr_setpshared.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_cancel.c b/pthread_cancel.c index f6906539..422ca037 100644 --- a/pthread_cancel.c +++ b/pthread_cancel.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_cond_destroy.c b/pthread_cond_destroy.c index ceb33319..12e76330 100644 --- a/pthread_cond_destroy.c +++ b/pthread_cond_destroy.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_cond_init.c b/pthread_cond_init.c index 7f2d4df4..b9379a37 100644 --- a/pthread_cond_init.c +++ b/pthread_cond_init.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_cond_signal.c b/pthread_cond_signal.c index 31ff0532..6c9a1c1c 100644 --- a/pthread_cond_signal.c +++ b/pthread_cond_signal.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * ------------------------------------------------------------- * Algorithm: diff --git a/pthread_cond_wait.c b/pthread_cond_wait.c index 57957b3c..0dd695cb 100644 --- a/pthread_cond_wait.c +++ b/pthread_cond_wait.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * ------------------------------------------------------------- * Algorithm: diff --git a/pthread_condattr_destroy.c b/pthread_condattr_destroy.c index faaa97b7..696065ef 100644 --- a/pthread_condattr_destroy.c +++ b/pthread_condattr_destroy.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_condattr_getpshared.c b/pthread_condattr_getpshared.c index 8c3fea34..dc161a9d 100644 --- a/pthread_condattr_getpshared.c +++ b/pthread_condattr_getpshared.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_condattr_init.c b/pthread_condattr_init.c index 56b89fed..aa32cc6d 100644 --- a/pthread_condattr_init.c +++ b/pthread_condattr_init.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_condattr_setpshared.c b/pthread_condattr_setpshared.c index a9b5b9d6..977b5a5c 100644 --- a/pthread_condattr_setpshared.c +++ b/pthread_condattr_setpshared.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_delay_np.c b/pthread_delay_np.c index ce3e7d51..76a54b65 100644 --- a/pthread_delay_np.c +++ b/pthread_delay_np.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_detach.c b/pthread_detach.c index 597c579f..7aa4fe35 100644 --- a/pthread_detach.c +++ b/pthread_detach.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_equal.c b/pthread_equal.c index b94ec03c..48da7e20 100644 --- a/pthread_equal.c +++ b/pthread_equal.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_exit.c b/pthread_exit.c index a567c3d3..9eb107bf 100644 --- a/pthread_exit.c +++ b/pthread_exit.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_getconcurrency.c b/pthread_getconcurrency.c index 135b1e9f..de46fe7c 100644 --- a/pthread_getconcurrency.c +++ b/pthread_getconcurrency.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_getname_np.c b/pthread_getname_np.c index a52b9aab..35bb1bd2 100644 --- a/pthread_getname_np.c +++ b/pthread_getname_np.c @@ -3,30 +3,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_getschedparam.c b/pthread_getschedparam.c index bd0aa885..9e61d649 100644 --- a/pthread_getschedparam.c +++ b/pthread_getschedparam.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_getspecific.c b/pthread_getspecific.c index ea6bef41..77caa6b1 100644 --- a/pthread_getspecific.c +++ b/pthread_getspecific.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_getunique_np.c b/pthread_getunique_np.c index 7e7ef6f7..55031f04 100755 --- a/pthread_getunique_np.c +++ b/pthread_getunique_np.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_getw32threadhandle_np.c b/pthread_getw32threadhandle_np.c index f91160be..b6ab544d 100644 --- a/pthread_getw32threadhandle_np.c +++ b/pthread_getw32threadhandle_np.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_join.c b/pthread_join.c index 4984756f..96372551 100644 --- a/pthread_join.c +++ b/pthread_join.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_key_create.c b/pthread_key_create.c index e98504ee..91892e5d 100644 --- a/pthread_key_create.c +++ b/pthread_key_create.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_key_delete.c b/pthread_key_delete.c index 1b825e9f..7f2998ec 100644 --- a/pthread_key_delete.c +++ b/pthread_key_delete.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_kill.c b/pthread_kill.c index ffaf3dec..8ddfcd63 100644 --- a/pthread_kill.c +++ b/pthread_kill.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_mutex_consistent.c b/pthread_mutex_consistent.c index 3f33fc94..053a5a6c 100755 --- a/pthread_mutex_consistent.c +++ b/pthread_mutex_consistent.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_mutex_destroy.c b/pthread_mutex_destroy.c index 4fe1ba9e..545d0839 100644 --- a/pthread_mutex_destroy.c +++ b/pthread_mutex_destroy.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_mutex_init.c b/pthread_mutex_init.c index beb06d1f..279d4f86 100644 --- a/pthread_mutex_init.c +++ b/pthread_mutex_init.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_mutex_lock.c b/pthread_mutex_lock.c index a9028425..cc19234a 100644 --- a/pthread_mutex_lock.c +++ b/pthread_mutex_lock.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_mutex_timedlock.c b/pthread_mutex_timedlock.c index c09a540a..851c60aa 100644 --- a/pthread_mutex_timedlock.c +++ b/pthread_mutex_timedlock.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_mutex_trylock.c b/pthread_mutex_trylock.c index 2022a340..1f03419c 100644 --- a/pthread_mutex_trylock.c +++ b/pthread_mutex_trylock.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_mutex_unlock.c b/pthread_mutex_unlock.c index 3bf6246c..080f7f80 100644 --- a/pthread_mutex_unlock.c +++ b/pthread_mutex_unlock.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_mutexattr_destroy.c b/pthread_mutexattr_destroy.c index 09b6bcbd..ae8428cc 100644 --- a/pthread_mutexattr_destroy.c +++ b/pthread_mutexattr_destroy.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_mutexattr_getkind_np.c b/pthread_mutexattr_getkind_np.c index 2f0799f6..13903b87 100644 --- a/pthread_mutexattr_getkind_np.c +++ b/pthread_mutexattr_getkind_np.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_mutexattr_getpshared.c b/pthread_mutexattr_getpshared.c index dd43a09e..b285d2d2 100644 --- a/pthread_mutexattr_getpshared.c +++ b/pthread_mutexattr_getpshared.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_mutexattr_getrobust.c b/pthread_mutexattr_getrobust.c index 7ddd648b..28c28657 100755 --- a/pthread_mutexattr_getrobust.c +++ b/pthread_mutexattr_getrobust.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_mutexattr_gettype.c b/pthread_mutexattr_gettype.c index aaff4148..a6e4cdb8 100644 --- a/pthread_mutexattr_gettype.c +++ b/pthread_mutexattr_gettype.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_mutexattr_init.c b/pthread_mutexattr_init.c index 88ac26ab..037b88b3 100644 --- a/pthread_mutexattr_init.c +++ b/pthread_mutexattr_init.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_mutexattr_setkind_np.c b/pthread_mutexattr_setkind_np.c index fda1a91b..3d55d821 100644 --- a/pthread_mutexattr_setkind_np.c +++ b/pthread_mutexattr_setkind_np.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_mutexattr_setpshared.c b/pthread_mutexattr_setpshared.c index 6a5770ed..997f469a 100644 --- a/pthread_mutexattr_setpshared.c +++ b/pthread_mutexattr_setpshared.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_mutexattr_setrobust.c b/pthread_mutexattr_setrobust.c index b5424a2c..4f18b489 100755 --- a/pthread_mutexattr_setrobust.c +++ b/pthread_mutexattr_setrobust.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_mutexattr_settype.c b/pthread_mutexattr_settype.c index 698c566e..bb650eb4 100644 --- a/pthread_mutexattr_settype.c +++ b/pthread_mutexattr_settype.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_num_processors_np.c b/pthread_num_processors_np.c index 2c197799..f94b074d 100644 --- a/pthread_num_processors_np.c +++ b/pthread_num_processors_np.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_once.c b/pthread_once.c index 7c0e3698..84ce0269 100644 --- a/pthread_once.c +++ b/pthread_once.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_rwlock_destroy.c b/pthread_rwlock_destroy.c index 4003b9cc..edb6338b 100644 --- a/pthread_rwlock_destroy.c +++ b/pthread_rwlock_destroy.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_rwlock_init.c b/pthread_rwlock_init.c index 6ae412e0..90a66946 100644 --- a/pthread_rwlock_init.c +++ b/pthread_rwlock_init.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_rwlock_rdlock.c b/pthread_rwlock_rdlock.c index 9a503c51..4d0d393c 100644 --- a/pthread_rwlock_rdlock.c +++ b/pthread_rwlock_rdlock.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_rwlock_timedrdlock.c b/pthread_rwlock_timedrdlock.c index e75bf5bf..ed281f3d 100644 --- a/pthread_rwlock_timedrdlock.c +++ b/pthread_rwlock_timedrdlock.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_rwlock_timedwrlock.c b/pthread_rwlock_timedwrlock.c index f74fecb4..7622d97f 100644 --- a/pthread_rwlock_timedwrlock.c +++ b/pthread_rwlock_timedwrlock.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_rwlock_tryrdlock.c b/pthread_rwlock_tryrdlock.c index 1d019f2e..5660b5ad 100644 --- a/pthread_rwlock_tryrdlock.c +++ b/pthread_rwlock_tryrdlock.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_rwlock_trywrlock.c b/pthread_rwlock_trywrlock.c index 7efc9038..f12df055 100644 --- a/pthread_rwlock_trywrlock.c +++ b/pthread_rwlock_trywrlock.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_rwlock_unlock.c b/pthread_rwlock_unlock.c index b975fbb0..63feac3e 100644 --- a/pthread_rwlock_unlock.c +++ b/pthread_rwlock_unlock.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_rwlock_wrlock.c b/pthread_rwlock_wrlock.c index 31c80563..722a673f 100644 --- a/pthread_rwlock_wrlock.c +++ b/pthread_rwlock_wrlock.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_rwlockattr_destroy.c b/pthread_rwlockattr_destroy.c index 18a7ea05..e9e3407b 100644 --- a/pthread_rwlockattr_destroy.c +++ b/pthread_rwlockattr_destroy.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_rwlockattr_getpshared.c b/pthread_rwlockattr_getpshared.c index d7bb1421..4de7d30e 100644 --- a/pthread_rwlockattr_getpshared.c +++ b/pthread_rwlockattr_getpshared.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_rwlockattr_init.c b/pthread_rwlockattr_init.c index c1ab554a..994b7ec0 100644 --- a/pthread_rwlockattr_init.c +++ b/pthread_rwlockattr_init.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_rwlockattr_setpshared.c b/pthread_rwlockattr_setpshared.c index f5099587..0263c11f 100644 --- a/pthread_rwlockattr_setpshared.c +++ b/pthread_rwlockattr_setpshared.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_self.c b/pthread_self.c index 22392518..585ea810 100644 --- a/pthread_self.c +++ b/pthread_self.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_setaffinity.c b/pthread_setaffinity.c index 97bddf21..b72f490e 100644 --- a/pthread_setaffinity.c +++ b/pthread_setaffinity.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_setcancelstate.c b/pthread_setcancelstate.c index f1ffb65f..15268257 100644 --- a/pthread_setcancelstate.c +++ b/pthread_setcancelstate.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_setcanceltype.c b/pthread_setcanceltype.c index a03c51ac..41ecfe0d 100644 --- a/pthread_setcanceltype.c +++ b/pthread_setcanceltype.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_setconcurrency.c b/pthread_setconcurrency.c index cb63a0b2..1861f96e 100644 --- a/pthread_setconcurrency.c +++ b/pthread_setconcurrency.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_setname_np.c b/pthread_setname_np.c index d42b3706..98003e97 100644 --- a/pthread_setname_np.c +++ b/pthread_setname_np.c @@ -3,30 +3,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_setschedparam.c b/pthread_setschedparam.c index c3a645e3..2222a491 100644 --- a/pthread_setschedparam.c +++ b/pthread_setschedparam.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_setspecific.c b/pthread_setspecific.c index 00161871..044308b8 100644 --- a/pthread_setspecific.c +++ b/pthread_setspecific.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_spin_destroy.c b/pthread_spin_destroy.c index bce8ac53..8309a090 100644 --- a/pthread_spin_destroy.c +++ b/pthread_spin_destroy.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_spin_init.c b/pthread_spin_init.c index ce2b27ae..ae3406f6 100644 --- a/pthread_spin_init.c +++ b/pthread_spin_init.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_spin_lock.c b/pthread_spin_lock.c index 2bc59e26..300ce97c 100644 --- a/pthread_spin_lock.c +++ b/pthread_spin_lock.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_spin_trylock.c b/pthread_spin_trylock.c index 67f65677..51fc879e 100644 --- a/pthread_spin_trylock.c +++ b/pthread_spin_trylock.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_spin_unlock.c b/pthread_spin_unlock.c index 3cb44965..762584ce 100644 --- a/pthread_spin_unlock.c +++ b/pthread_spin_unlock.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_testcancel.c b/pthread_testcancel.c index b475a98e..f6958563 100644 --- a/pthread_testcancel.c +++ b/pthread_testcancel.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_timechange_handler_np.c b/pthread_timechange_handler_np.c index d34d0a3a..98934e3c 100644 --- a/pthread_timechange_handler_np.c +++ b/pthread_timechange_handler_np.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_timedjoin_np.c b/pthread_timedjoin_np.c index de341d89..229662b2 100644 --- a/pthread_timedjoin_np.c +++ b/pthread_timedjoin_np.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_tryjoin_np.c b/pthread_tryjoin_np.c index 56a148c4..102d05bf 100644 --- a/pthread_tryjoin_np.c +++ b/pthread_tryjoin_np.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/pthread_win32_attach_detach_np.c b/pthread_win32_attach_detach_np.c index 3b33816f..9d00d304 100644 --- a/pthread_win32_attach_detach_np.c +++ b/pthread_win32_attach_detach_np.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_MCS_lock.c b/ptw32_MCS_lock.c index 1f7fe89f..25701048 100644 --- a/ptw32_MCS_lock.c +++ b/ptw32_MCS_lock.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ /* diff --git a/ptw32_callUserDestroyRoutines.c b/ptw32_callUserDestroyRoutines.c index b82e5860..bf82a60e 100644 --- a/ptw32_callUserDestroyRoutines.c +++ b/ptw32_callUserDestroyRoutines.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_calloc.c b/ptw32_calloc.c index 5874793a..b01c335e 100644 --- a/ptw32_calloc.c +++ b/ptw32_calloc.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_cond_check_need_init.c b/ptw32_cond_check_need_init.c index 85032b87..251678cc 100644 --- a/ptw32_cond_check_need_init.c +++ b/ptw32_cond_check_need_init.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_getprocessors.c b/ptw32_getprocessors.c index 453fa87c..4ac3cce9 100644 --- a/ptw32_getprocessors.c +++ b/ptw32_getprocessors.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_is_attr.c b/ptw32_is_attr.c index 858d25f4..80917cfb 100644 --- a/ptw32_is_attr.c +++ b/ptw32_is_attr.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_mutex_check_need_init.c b/ptw32_mutex_check_need_init.c index 4e9e7b8d..846a4b7c 100644 --- a/ptw32_mutex_check_need_init.c +++ b/ptw32_mutex_check_need_init.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_new.c b/ptw32_new.c index 33d03365..3f89b351 100644 --- a/ptw32_new.c +++ b/ptw32_new.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_processInitialize.c b/ptw32_processInitialize.c index 10679821..f0c91221 100644 --- a/ptw32_processInitialize.c +++ b/ptw32_processInitialize.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_processTerminate.c b/ptw32_processTerminate.c index 7696aac3..035bac6d 100644 --- a/ptw32_processTerminate.c +++ b/ptw32_processTerminate.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_relmillisecs.c b/ptw32_relmillisecs.c index 0e75ef6b..221019c6 100644 --- a/ptw32_relmillisecs.c +++ b/ptw32_relmillisecs.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_reuse.c b/ptw32_reuse.c index ac2d9e24..6495636d 100644 --- a/ptw32_reuse.c +++ b/ptw32_reuse.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_rwlock_cancelwrwait.c b/ptw32_rwlock_cancelwrwait.c index a5c33a9c..9d5630c3 100644 --- a/ptw32_rwlock_cancelwrwait.c +++ b/ptw32_rwlock_cancelwrwait.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_rwlock_check_need_init.c b/ptw32_rwlock_check_need_init.c index 54d870fe..8e24da88 100644 --- a/ptw32_rwlock_check_need_init.c +++ b/ptw32_rwlock_check_need_init.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_semwait.c b/ptw32_semwait.c index 85896c9b..607050eb 100644 --- a/ptw32_semwait.c +++ b/ptw32_semwait.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_spinlock_check_need_init.c b/ptw32_spinlock_check_need_init.c index f932f46b..1cd0ff3f 100644 --- a/ptw32_spinlock_check_need_init.c +++ b/ptw32_spinlock_check_need_init.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_threadDestroy.c b/ptw32_threadDestroy.c index 6e94ac60..13c91807 100644 --- a/ptw32_threadDestroy.c +++ b/ptw32_threadDestroy.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_threadStart.c b/ptw32_threadStart.c index b87846d0..617e7816 100644 --- a/ptw32_threadStart.c +++ b/ptw32_threadStart.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_throw.c b/ptw32_throw.c index 565a1d8e..f34cfadb 100644 --- a/ptw32_throw.c +++ b/ptw32_throw.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_timespec.c b/ptw32_timespec.c index c42a33e6..3de71e09 100644 --- a/ptw32_timespec.c +++ b/ptw32_timespec.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_tkAssocCreate.c b/ptw32_tkAssocCreate.c index 9e637c17..85569be3 100644 --- a/ptw32_tkAssocCreate.c +++ b/ptw32_tkAssocCreate.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/ptw32_tkAssocDestroy.c b/ptw32_tkAssocDestroy.c index 7ccb3924..87f78abe 100644 --- a/ptw32_tkAssocDestroy.c +++ b/ptw32_tkAssocDestroy.c @@ -7,30 +7,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/sched.h b/sched.h index c5246e27..6c0c104f 100644 --- a/sched.h +++ b/sched.h @@ -9,30 +9,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(_SCHED_H) #define _SCHED_H diff --git a/sched_get_priority_max.c b/sched_get_priority_max.c index 6b28b029..e05867b7 100644 --- a/sched_get_priority_max.c +++ b/sched_get_priority_max.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/sched_get_priority_min.c b/sched_get_priority_min.c index 84c8362d..2c8a6560 100644 --- a/sched_get_priority_min.c +++ b/sched_get_priority_min.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/sched_getscheduler.c b/sched_getscheduler.c index bff9c779..b9bf93f6 100644 --- a/sched_getscheduler.c +++ b/sched_getscheduler.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/sched_setaffinity.c b/sched_setaffinity.c index 3ab77207..01258fda 100644 --- a/sched_setaffinity.c +++ b/sched_setaffinity.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/sched_setscheduler.c b/sched_setscheduler.c index 6473599c..576213f7 100644 --- a/sched_setscheduler.c +++ b/sched_setscheduler.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/sched_yield.c b/sched_yield.c index dd422725..30de449b 100644 --- a/sched_yield.c +++ b/sched_yield.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/sem_close.c b/sem_close.c index 3071d813..5e86ae82 100644 --- a/sem_close.c +++ b/sem_close.c @@ -13,30 +13,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/sem_destroy.c b/sem_destroy.c index 563aa182..aeb01e42 100644 --- a/sem_destroy.c +++ b/sem_destroy.c @@ -13,30 +13,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/sem_getvalue.c b/sem_getvalue.c index 64745c81..144d85c6 100644 --- a/sem_getvalue.c +++ b/sem_getvalue.c @@ -13,30 +13,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/sem_init.c b/sem_init.c index 105fef7a..0108ed4e 100644 --- a/sem_init.c +++ b/sem_init.c @@ -11,30 +11,33 @@ * * ------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/sem_open.c b/sem_open.c index d89b46c4..54c34eb1 100644 --- a/sem_open.c +++ b/sem_open.c @@ -13,30 +13,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/sem_post.c b/sem_post.c index 1e7c8d47..d89d26f6 100644 --- a/sem_post.c +++ b/sem_post.c @@ -13,30 +13,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/sem_post_multiple.c b/sem_post_multiple.c index 4f60e0d7..00b12bb2 100644 --- a/sem_post_multiple.c +++ b/sem_post_multiple.c @@ -13,30 +13,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/sem_timedwait.c b/sem_timedwait.c index a03058fc..4b09b74b 100644 --- a/sem_timedwait.c +++ b/sem_timedwait.c @@ -13,30 +13,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/sem_trywait.c b/sem_trywait.c index 6af58ba3..15fb1f03 100644 --- a/sem_trywait.c +++ b/sem_trywait.c @@ -13,30 +13,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/sem_unlink.c b/sem_unlink.c index 1cb3b7b7..26bc442c 100644 --- a/sem_unlink.c +++ b/sem_unlink.c @@ -13,30 +13,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/sem_wait.c b/sem_wait.c index 4d896fe7..fb392981 100644 --- a/sem_wait.c +++ b/sem_wait.c @@ -13,30 +13,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 diff --git a/semaphore.h b/semaphore.h index b2da2125..85b9544b 100644 --- a/semaphore.h +++ b/semaphore.h @@ -9,30 +9,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined( SEMAPHORE_H ) #define SEMAPHORE_H diff --git a/signal.c b/signal.c index a0fe48f8..845019d3 100644 --- a/signal.c +++ b/signal.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ /* diff --git a/tests/Bmakefile b/tests/Bmakefile index 6feb900d..25f8fe17 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: -# https://sourceforge.net/projects/pthreads4w/contributors.html +# http://sources.redhat.com/pthreads-win32contributors.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/GNUmakefile.in b/tests/GNUmakefile.in index e6317288..1cd1417c 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -7,7 +7,7 @@ # Copyright 1998 John E. Bossom # Copyright 1999-2018, Pthreads4w contributors # -# Homepage: https://sourceforge.net/projects/pthreads4w/ +# Homepage: http://sources.redhat.com/pthreads-win32 # # The current list of contributors is contained # in the file CONTRIBUTORS included with the source diff --git a/tests/Wmakefile b/tests/Wmakefile index 7f919dca..bf4020e2 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: -# https://sourceforge.net/projects/pthreads4w/contributors.html +# http://sources.redhat.com/pthreads-win32contributors.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 4c4577e7..81f24e29 100644 --- a/tests/affinity1.c +++ b/tests/affinity1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/affinity2.c b/tests/affinity2.c index b2849c5d..2194f39f 100644 --- a/tests/affinity2.c +++ b/tests/affinity2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/affinity3.c b/tests/affinity3.c index be3d61c4..86597c9a 100644 --- a/tests/affinity3.c +++ b/tests/affinity3.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/affinity4.c b/tests/affinity4.c index eabf92a9..e62ade58 100644 --- a/tests/affinity4.c +++ b/tests/affinity4.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/affinity5.c b/tests/affinity5.c index 538ad9dd..03e6c0c2 100644 --- a/tests/affinity5.c +++ b/tests/affinity5.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/affinity6.c b/tests/affinity6.c index 4b9190c5..7713c304 100644 --- a/tests/affinity6.c +++ b/tests/affinity6.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/barrier1.c b/tests/barrier1.c index 677be2bb..cff727b9 100644 --- a/tests/barrier1.c +++ b/tests/barrier1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/barrier2.c b/tests/barrier2.c index 6d40c056..1afd8d07 100644 --- a/tests/barrier2.c +++ b/tests/barrier2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/barrier3.c b/tests/barrier3.c index 1775c79c..a3145519 100644 --- a/tests/barrier3.c +++ b/tests/barrier3.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/barrier4.c b/tests/barrier4.c index 04756c11..7c427e58 100644 --- a/tests/barrier4.c +++ b/tests/barrier4.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/barrier5.c b/tests/barrier5.c index ed41cd8d..86e69838 100644 --- a/tests/barrier5.c +++ b/tests/barrier5.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/barrier6.c b/tests/barrier6.c index d7a700e8..d4d82145 100755 --- a/tests/barrier6.c +++ b/tests/barrier6.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/benchlib.c b/tests/benchlib.c index 6b724b9d..be28f0d1 100644 --- a/tests/benchlib.c +++ b/tests/benchlib.c @@ -3,30 +3,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * */ diff --git a/tests/benchtest.h b/tests/benchtest.h index f95a61bf..ea3a6251 100644 --- a/tests/benchtest.h +++ b/tests/benchtest.h @@ -3,30 +3,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * */ diff --git a/tests/benchtest1.c b/tests/benchtest1.c index 57d689b9..62268172 100644 --- a/tests/benchtest1.c +++ b/tests/benchtest1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/benchtest2.c b/tests/benchtest2.c index 2e8771c3..1ace338b 100644 --- a/tests/benchtest2.c +++ b/tests/benchtest2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/benchtest3.c b/tests/benchtest3.c index 5cf1ed06..c49b424d 100644 --- a/tests/benchtest3.c +++ b/tests/benchtest3.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/benchtest4.c b/tests/benchtest4.c index 21f03595..cdd7aa0a 100644 --- a/tests/benchtest4.c +++ b/tests/benchtest4.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/benchtest5.c b/tests/benchtest5.c index 8717a0d7..22c2388c 100644 --- a/tests/benchtest5.c +++ b/tests/benchtest5.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/cancel1.c b/tests/cancel1.c index b6722303..344d2e95 100644 --- a/tests/cancel1.c +++ b/tests/cancel1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/cancel2.c b/tests/cancel2.c index a67fbd21..1e80e668 100644 --- a/tests/cancel2.c +++ b/tests/cancel2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/cancel3.c b/tests/cancel3.c index 88e203dd..9ccd490a 100644 --- a/tests/cancel3.c +++ b/tests/cancel3.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/cancel4.c b/tests/cancel4.c index 7f31d6b6..4267f172 100644 --- a/tests/cancel4.c +++ b/tests/cancel4.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/cancel5.c b/tests/cancel5.c index 9bc770b7..033ecf10 100644 --- a/tests/cancel5.c +++ b/tests/cancel5.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/cancel6a.c b/tests/cancel6a.c index 7646458d..de106a0b 100644 --- a/tests/cancel6a.c +++ b/tests/cancel6a.c @@ -2,30 +2,33 @@ * File: cancel6a.c * * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/cancel6d.c b/tests/cancel6d.c index 2ead7dc1..d428ee4d 100644 --- a/tests/cancel6d.c +++ b/tests/cancel6d.c @@ -2,30 +2,33 @@ * File: cancel6d.c * * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/cancel7.c b/tests/cancel7.c index cd3a5776..cdd8b156 100644 --- a/tests/cancel7.c +++ b/tests/cancel7.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/cancel8.c b/tests/cancel8.c index f2c20a25..697593f6 100644 --- a/tests/cancel8.c +++ b/tests/cancel8.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/cancel9.c b/tests/cancel9.c index 14e223ba..1f022558 100644 --- a/tests/cancel9.c +++ b/tests/cancel9.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/cleanup0.c b/tests/cleanup0.c index 742eaa72..888640b7 100644 --- a/tests/cleanup0.c +++ b/tests/cleanup0.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/cleanup1.c b/tests/cleanup1.c index ac308c18..6f0be72c 100644 --- a/tests/cleanup1.c +++ b/tests/cleanup1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/cleanup2.c b/tests/cleanup2.c index 95e893d5..52a804e6 100644 --- a/tests/cleanup2.c +++ b/tests/cleanup2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/cleanup3.c b/tests/cleanup3.c index 9f4f7716..7d6a4b96 100644 --- a/tests/cleanup3.c +++ b/tests/cleanup3.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/condvar1.c b/tests/condvar1.c index 12e1502f..303a87b8 100644 --- a/tests/condvar1.c +++ b/tests/condvar1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/condvar1_1.c b/tests/condvar1_1.c index 3eb61ed2..565697e5 100644 --- a/tests/condvar1_1.c +++ b/tests/condvar1_1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/condvar1_2.c b/tests/condvar1_2.c index adb5b08d..61185518 100644 --- a/tests/condvar1_2.c +++ b/tests/condvar1_2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/condvar2.c b/tests/condvar2.c index 453573a4..2ca309f1 100644 --- a/tests/condvar2.c +++ b/tests/condvar2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/condvar2_1.c b/tests/condvar2_1.c index 75e6a12f..bf8170ca 100644 --- a/tests/condvar2_1.c +++ b/tests/condvar2_1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/condvar3.c b/tests/condvar3.c index bd097e24..c9943ff8 100644 --- a/tests/condvar3.c +++ b/tests/condvar3.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/condvar3_1.c b/tests/condvar3_1.c index 2e5e81ef..16f0a64a 100644 --- a/tests/condvar3_1.c +++ b/tests/condvar3_1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/condvar3_2.c b/tests/condvar3_2.c index 43a01f1e..909f6a19 100644 --- a/tests/condvar3_2.c +++ b/tests/condvar3_2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/condvar3_3.c b/tests/condvar3_3.c index 51222dd2..54702847 100644 --- a/tests/condvar3_3.c +++ b/tests/condvar3_3.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/condvar4.c b/tests/condvar4.c index bf6516fa..a63104fd 100644 --- a/tests/condvar4.c +++ b/tests/condvar4.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/condvar5.c b/tests/condvar5.c index 551ffa20..feeefbcd 100644 --- a/tests/condvar5.c +++ b/tests/condvar5.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/condvar6.c b/tests/condvar6.c index dc495485..1e4baf2c 100644 --- a/tests/condvar6.c +++ b/tests/condvar6.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/condvar7.c b/tests/condvar7.c index 00eca82c..f1fc30ee 100644 --- a/tests/condvar7.c +++ b/tests/condvar7.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/condvar8.c b/tests/condvar8.c index 22f23a1a..a2e0931a 100644 --- a/tests/condvar8.c +++ b/tests/condvar8.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/condvar9.c b/tests/condvar9.c index 233f16f7..d928fc1e 100644 --- a/tests/condvar9.c +++ b/tests/condvar9.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/context1.c b/tests/context1.c index 133d1a7d..b84b2b20 100644 --- a/tests/context1.c +++ b/tests/context1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/context2.c b/tests/context2.c index 9b750fdc..1c5b4aed 100644 --- a/tests/context2.c +++ b/tests/context2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/count1.c b/tests/count1.c index e8e4ed3c..c639fd27 100644 --- a/tests/count1.c +++ b/tests/count1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/create1.c b/tests/create1.c index 3ae0d7f6..63b1bf6e 100644 --- a/tests/create1.c +++ b/tests/create1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/create2.c b/tests/create2.c index 1c2bb8d0..9e56d9d4 100644 --- a/tests/create2.c +++ b/tests/create2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/create3.c b/tests/create3.c index 3422bc20..5063d0ba 100644 --- a/tests/create3.c +++ b/tests/create3.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/delay1.c b/tests/delay1.c index a607fe6a..9c5293e8 100644 --- a/tests/delay1.c +++ b/tests/delay1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/delay2.c b/tests/delay2.c index 7dc68ce1..5ff6c1de 100644 --- a/tests/delay2.c +++ b/tests/delay2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/detach1.c b/tests/detach1.c index d9ebe527..4eb8cb73 100644 --- a/tests/detach1.c +++ b/tests/detach1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/equal0.c b/tests/equal0.c index 733bc342..7282af64 100644 --- a/tests/equal0.c +++ b/tests/equal0.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/equal1.c b/tests/equal1.c index 1b1e6dd0..2dfa7942 100644 --- a/tests/equal1.c +++ b/tests/equal1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/errno0.c b/tests/errno0.c index 83790e21..75aa6a0d 100644 --- a/tests/errno0.c +++ b/tests/errno0.c @@ -8,7 +8,7 @@ * Copyright(C) 1998 John E. Bossom * Copyright(C) 1999-2018, Pthreads4w contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * Homepage: http://sources.redhat.com/pthreads-win32 * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source diff --git a/tests/errno1.c b/tests/errno1.c index 29fabf20..14e8150a 100644 --- a/tests/errno1.c +++ b/tests/errno1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/exception1.c b/tests/exception1.c index 7ee37bdd..d629622d 100644 --- a/tests/exception1.c +++ b/tests/exception1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/exception2.c b/tests/exception2.c index ce61b059..7842b842 100644 --- a/tests/exception2.c +++ b/tests/exception2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/exception3.c b/tests/exception3.c index f134846b..77b933b3 100644 --- a/tests/exception3.c +++ b/tests/exception3.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/exception3_0.c b/tests/exception3_0.c index b331de79..9d8b681b 100644 --- a/tests/exception3_0.c +++ b/tests/exception3_0.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/exit1.c b/tests/exit1.c index 73d917cc..35294245 100644 --- a/tests/exit1.c +++ b/tests/exit1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/exit2.c b/tests/exit2.c index af25ec07..a534d477 100644 --- a/tests/exit2.c +++ b/tests/exit2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/exit3.c b/tests/exit3.c index a4cb122b..13397200 100644 --- a/tests/exit3.c +++ b/tests/exit3.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/exit4.c b/tests/exit4.c index 746bfc84..e4138389 100644 --- a/tests/exit4.c +++ b/tests/exit4.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/exit5.c b/tests/exit5.c index c33e8a9d..4d5d2517 100644 --- a/tests/exit5.c +++ b/tests/exit5.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/eyal1.c b/tests/eyal1.c index e66fc57b..5da95ff5 100644 --- a/tests/eyal1.c +++ b/tests/eyal1.c @@ -3,30 +3,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/inherit1.c b/tests/inherit1.c index 8fc07764..d09cfc77 100644 --- a/tests/inherit1.c +++ b/tests/inherit1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/join0.c b/tests/join0.c index d7ec9d86..f5c040eb 100644 --- a/tests/join0.c +++ b/tests/join0.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/join1.c b/tests/join1.c index a797417b..a0412791 100644 --- a/tests/join1.c +++ b/tests/join1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/join2.c b/tests/join2.c index fe0b8ea2..8864f221 100644 --- a/tests/join2.c +++ b/tests/join2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/join3.c b/tests/join3.c index 80dac319..35368667 100644 --- a/tests/join3.c +++ b/tests/join3.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/join4.c b/tests/join4.c index 62ed56ec..d1621bf1 100644 --- a/tests/join4.c +++ b/tests/join4.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/kill1.c b/tests/kill1.c index 2cb3266c..84ca3c00 100644 --- a/tests/kill1.c +++ b/tests/kill1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex1.c b/tests/mutex1.c index 4b28d6d0..6d9beaf8 100644 --- a/tests/mutex1.c +++ b/tests/mutex1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex1e.c b/tests/mutex1e.c index 4e7c30f6..9d0a32ec 100644 --- a/tests/mutex1e.c +++ b/tests/mutex1e.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex1n.c b/tests/mutex1n.c index 03caf1eb..7e306cfa 100644 --- a/tests/mutex1n.c +++ b/tests/mutex1n.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex1r.c b/tests/mutex1r.c index 22416085..fb2de7ea 100644 --- a/tests/mutex1r.c +++ b/tests/mutex1r.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex2.c b/tests/mutex2.c index 4a332437..8bd490f3 100644 --- a/tests/mutex2.c +++ b/tests/mutex2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex2e.c b/tests/mutex2e.c index 8748f494..dd17ccd8 100644 --- a/tests/mutex2e.c +++ b/tests/mutex2e.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex2r.c b/tests/mutex2r.c index 63630450..740d6073 100644 --- a/tests/mutex2r.c +++ b/tests/mutex2r.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex3.c b/tests/mutex3.c index 40ee2666..94ca2dae 100644 --- a/tests/mutex3.c +++ b/tests/mutex3.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex3e.c b/tests/mutex3e.c index 27e9ab74..40911fc8 100644 --- a/tests/mutex3e.c +++ b/tests/mutex3e.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex3r.c b/tests/mutex3r.c index c2946f22..891692b4 100644 --- a/tests/mutex3r.c +++ b/tests/mutex3r.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex4.c b/tests/mutex4.c index b09969e7..220c2601 100644 --- a/tests/mutex4.c +++ b/tests/mutex4.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex5.c b/tests/mutex5.c index 636adbf4..6d123793 100644 --- a/tests/mutex5.c +++ b/tests/mutex5.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6.c b/tests/mutex6.c index b42ed7d8..08081010 100644 --- a/tests/mutex6.c +++ b/tests/mutex6.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6e.c b/tests/mutex6e.c index 7c2f5a73..d6f69546 100644 --- a/tests/mutex6e.c +++ b/tests/mutex6e.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6es.c b/tests/mutex6es.c index e4059385..6fa2424f 100644 --- a/tests/mutex6es.c +++ b/tests/mutex6es.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6n.c b/tests/mutex6n.c index 6d599896..e4681a5c 100644 --- a/tests/mutex6n.c +++ b/tests/mutex6n.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6r.c b/tests/mutex6r.c index 65827ff6..41fc6914 100644 --- a/tests/mutex6r.c +++ b/tests/mutex6r.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6rs.c b/tests/mutex6rs.c index c38b0091..d17566d7 100644 --- a/tests/mutex6rs.c +++ b/tests/mutex6rs.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6s.c b/tests/mutex6s.c index 44638f28..26dc0215 100644 --- a/tests/mutex6s.c +++ b/tests/mutex6s.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex7.c b/tests/mutex7.c index 2385e01f..ee3fe5c1 100644 --- a/tests/mutex7.c +++ b/tests/mutex7.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex7e.c b/tests/mutex7e.c index ea6279cf..1fc1a15f 100644 --- a/tests/mutex7e.c +++ b/tests/mutex7e.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex7n.c b/tests/mutex7n.c index d8f339f7..feca8ee2 100644 --- a/tests/mutex7n.c +++ b/tests/mutex7n.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex7r.c b/tests/mutex7r.c index 3f667ad4..3e0ae135 100644 --- a/tests/mutex7r.c +++ b/tests/mutex7r.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex8.c b/tests/mutex8.c index 055196ee..b2a297e7 100644 --- a/tests/mutex8.c +++ b/tests/mutex8.c @@ -2,30 +2,33 @@ * mutex8.c * * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex8e.c b/tests/mutex8e.c index 8f59d5ae..b661e0de 100644 --- a/tests/mutex8e.c +++ b/tests/mutex8e.c @@ -2,30 +2,33 @@ * mutex8e.c * * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex8n.c b/tests/mutex8n.c index 96ea2e94..ee1ae16f 100644 --- a/tests/mutex8n.c +++ b/tests/mutex8n.c @@ -2,30 +2,33 @@ * mutex8n.c * * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/mutex8r.c b/tests/mutex8r.c index e811cd85..b0ff19f5 100644 --- a/tests/mutex8r.c +++ b/tests/mutex8r.c @@ -2,30 +2,33 @@ * mutex8r.c * * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/name_np1.c b/tests/name_np1.c index 1aebd424..6bf2c56c 100644 --- a/tests/name_np1.c +++ b/tests/name_np1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/name_np2.c b/tests/name_np2.c index d9f08f98..2de7d516 100644 --- a/tests/name_np2.c +++ b/tests/name_np2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/once1.c b/tests/once1.c index 8a9ab552..3a7f2e8c 100644 --- a/tests/once1.c +++ b/tests/once1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/once2.c b/tests/once2.c index f8243aff..ffd6bfe1 100644 --- a/tests/once2.c +++ b/tests/once2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/once3.c b/tests/once3.c index 461b3a41..75dcdcf5 100644 --- a/tests/once3.c +++ b/tests/once3.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/once4.c b/tests/once4.c index df470e39..678cf6b5 100644 --- a/tests/once4.c +++ b/tests/once4.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/priority1.c b/tests/priority1.c index 7f29a463..d77420f8 100644 --- a/tests/priority1.c +++ b/tests/priority1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/priority2.c b/tests/priority2.c index 03963141..c4552e62 100644 --- a/tests/priority2.c +++ b/tests/priority2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/reuse1.c b/tests/reuse1.c index ac6158d0..bcf8571c 100644 --- a/tests/reuse1.c +++ b/tests/reuse1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/reuse2.c b/tests/reuse2.c index 33a8fcbc..93643b90 100644 --- a/tests/reuse2.c +++ b/tests/reuse2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/robust1.c b/tests/robust1.c index db597c84..4bb479ac 100755 --- a/tests/robust1.c +++ b/tests/robust1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/robust2.c b/tests/robust2.c index afdd9b9b..795a17ff 100755 --- a/tests/robust2.c +++ b/tests/robust2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/robust3.c b/tests/robust3.c index ee96eef3..e9d05c7d 100755 --- a/tests/robust3.c +++ b/tests/robust3.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/robust4.c b/tests/robust4.c index 9e38b012..35d5b84f 100755 --- a/tests/robust4.c +++ b/tests/robust4.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/robust5.c b/tests/robust5.c index b12b343e..82e592e9 100755 --- a/tests/robust5.c +++ b/tests/robust5.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock1.c b/tests/rwlock1.c index 1ce05b9f..e76e920e 100644 --- a/tests/rwlock1.c +++ b/tests/rwlock1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock2.c b/tests/rwlock2.c index 4b2251ba..e9aff324 100644 --- a/tests/rwlock2.c +++ b/tests/rwlock2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock2_t.c b/tests/rwlock2_t.c index e8797930..d6a96713 100644 --- a/tests/rwlock2_t.c +++ b/tests/rwlock2_t.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock3.c b/tests/rwlock3.c index dd46ea4d..08bda6e2 100644 --- a/tests/rwlock3.c +++ b/tests/rwlock3.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock3_t.c b/tests/rwlock3_t.c index 318e5152..9076496e 100644 --- a/tests/rwlock3_t.c +++ b/tests/rwlock3_t.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock4.c b/tests/rwlock4.c index 3b71b17e..b1ff7e0e 100644 --- a/tests/rwlock4.c +++ b/tests/rwlock4.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock4_t.c b/tests/rwlock4_t.c index 5dd206d7..bc871b83 100644 --- a/tests/rwlock4_t.c +++ b/tests/rwlock4_t.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock5.c b/tests/rwlock5.c index 988e690f..2d6e80cc 100644 --- a/tests/rwlock5.c +++ b/tests/rwlock5.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock5_t.c b/tests/rwlock5_t.c index 8cf55c41..03e6c295 100644 --- a/tests/rwlock5_t.c +++ b/tests/rwlock5_t.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock6.c b/tests/rwlock6.c index 50b96ec1..af523b44 100644 --- a/tests/rwlock6.c +++ b/tests/rwlock6.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock6_t.c b/tests/rwlock6_t.c index a590922e..b33cd480 100644 --- a/tests/rwlock6_t.c +++ b/tests/rwlock6_t.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock6_t2.c b/tests/rwlock6_t2.c index 71e957f2..279ca770 100644 --- a/tests/rwlock6_t2.c +++ b/tests/rwlock6_t2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/self1.c b/tests/self1.c index 36ad7764..a02678cc 100644 --- a/tests/self1.c +++ b/tests/self1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/self2.c b/tests/self2.c index ee067ba9..3fff003d 100644 --- a/tests/self2.c +++ b/tests/self2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore1.c b/tests/semaphore1.c index 8ea39120..31968683 100644 --- a/tests/semaphore1.c +++ b/tests/semaphore1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore2.c b/tests/semaphore2.c index 2ad3207a..de56cb31 100644 --- a/tests/semaphore2.c +++ b/tests/semaphore2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore3.c b/tests/semaphore3.c index 881131f8..245b6614 100644 --- a/tests/semaphore3.c +++ b/tests/semaphore3.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore4.c b/tests/semaphore4.c index 06bd1d49..eab1d890 100644 --- a/tests/semaphore4.c +++ b/tests/semaphore4.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore4t.c b/tests/semaphore4t.c index 9ab75a88..28df6f56 100644 --- a/tests/semaphore4t.c +++ b/tests/semaphore4t.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore5.c b/tests/semaphore5.c index 15ee340c..5ebcb35c 100644 --- a/tests/semaphore5.c +++ b/tests/semaphore5.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/sequence1.c b/tests/sequence1.c index 48e10060..11fc68ce 100755 --- a/tests/sequence1.c +++ b/tests/sequence1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/spin1.c b/tests/spin1.c index 8aa48203..82af2ca7 100644 --- a/tests/spin1.c +++ b/tests/spin1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/spin2.c b/tests/spin2.c index 50e1775a..267cd5c3 100644 --- a/tests/spin2.c +++ b/tests/spin2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/spin3.c b/tests/spin3.c index a666226a..e5a89cf5 100644 --- a/tests/spin3.c +++ b/tests/spin3.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/spin4.c b/tests/spin4.c index 5734560f..eac5cb63 100644 --- a/tests/spin4.c +++ b/tests/spin4.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/stress1.c b/tests/stress1.c index d6321079..333b5d7f 100644 --- a/tests/stress1.c +++ b/tests/stress1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/test.h b/tests/test.h index e5b6d653..db497678 100644 --- a/tests/test.h +++ b/tests/test.h @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * */ diff --git a/tests/timeouts.c b/tests/timeouts.c index 99d8a0cc..bf18e2ae 100644 --- a/tests/timeouts.c +++ b/tests/timeouts.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/tryentercs.c b/tests/tryentercs.c index 15d14204..dec8f2f8 100644 --- a/tests/tryentercs.c +++ b/tests/tryentercs.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/tryentercs2.c b/tests/tryentercs2.c index 50c540ae..2dc6192d 100644 --- a/tests/tryentercs2.c +++ b/tests/tryentercs2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/tsd1.c b/tests/tsd1.c index ecae5a55..fe336ed7 100644 --- a/tests/tsd1.c +++ b/tests/tsd1.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * * -------------------------------------------------------------------------- diff --git a/tests/tsd2.c b/tests/tsd2.c index 38c8db60..579fbe9f 100644 --- a/tests/tsd2.c +++ b/tests/tsd2.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * * -------------------------------------------------------------------------- diff --git a/tests/tsd3.c b/tests/tsd3.c index 63ecf55c..35f39bcf 100644 --- a/tests/tsd3.c +++ b/tests/tsd3.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * * -------------------------------------------------------------------------- diff --git a/tests/valid1.c b/tests/valid1.c index fcc9787a..cc04c128 100644 --- a/tests/valid1.c +++ b/tests/valid1.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/tests/valid2.c b/tests/valid2.c index ebfa340d..5b04fa6b 100644 --- a/tests/valid2.c +++ b/tests/valid2.c @@ -4,30 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * diff --git a/version.rc b/version.rc index ec6aab06..88c643b6 100644 --- a/version.rc +++ b/version.rc @@ -2,30 +2,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #include diff --git a/w32_CancelableWait.c b/w32_CancelableWait.c index cc3c92ea..511e6c12 100644 --- a/w32_CancelableWait.c +++ b/w32_CancelableWait.c @@ -6,30 +6,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads for Windows - * Copyright 1998 John E. Bossom - * Copyright 1999-2018, Pthreads4w contributors + * Pthreads-win32 - POSIX Threads Library for Win32 + * Copyright(C) 1998 John E. Bossom + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: https://sourceforge.net/projects/pthreads4w/ + * 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: - * - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library 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 From a91320482d956621632c28ed4b4ef9f92e198caa Mon Sep 17 00:00:00 2001 From: Ger Hobbelt Date: Wed, 14 Apr 2021 11:27:55 +0200 Subject: [PATCH 205/207] further pre-merge prep:Pthreads4w vs. pthreads-win32 --- GNUmakefile.in | 4 ++-- README.md | 22 +++++++++++----------- _ptw32.h | 2 +- aclocal.m4 | 4 ++-- configure.ac | 4 ++-- docs/ANNOUNCE.md | 4 ++-- docs/ChangeLog.md | 2 +- docs/NEWS.md | 22 +++++++++++----------- docs/NOTICE.md | 4 ++-- docs/README.md | 6 +++--- tests/GNUmakefile.in | 4 ++-- tests/errno0.c | 39 ++++++++++++++++++++------------------- 12 files changed, 59 insertions(+), 58 deletions(-) diff --git a/GNUmakefile.in b/GNUmakefile.in index 5f2e7ad7..5d0ca16d 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -1,9 +1,9 @@ # @configure_input@ # -------------------------------------------------------------------------- # -# Pthreads4w - POSIX Threads for Windows +# pthreads-w32 / Pthreads4w - POSIX Threads for Windows # Copyright 1998 John E. Bossom -# Copyright 1999-2018, Pthreads4w contributors +# Copyright 1999-2018, pthreads-w32 / Pthreads4w contributors # # Homepage: http://sources.redhat.com/pthreads-win32 # diff --git a/README.md b/README.md index 042c980f..3f9ed0b2 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ files, e.g. PTW32_* changes to PTW32_*, ptw32_* to ptw32_*, etc. License Change -------------- -With the agreement of all substantial relevant contributors Pthreads4w +With the agreement of all substantial relevant contributors pthreads-w32 / Pthreads4w version 3, with the exception of four files, is being released under the terms of the Apache License v2.0. The APLv2 is compatible with the GPLv3 and LGPLv3 licenses and therefore this code may continue to be legally @@ -43,7 +43,7 @@ Alexander Terekhov Vladimir Kliatchko Ross Johnson -Pthreads4w version 2 releases will remain LGPL but version 2.11 and later +pthreads-w32 / Pthreads4w version 2 releases will remain LGPL but version 2.11 and later will be released under v3 of that license so that any additions to pthreads4w version 3 code that is backported to v2 will not pollute that code. @@ -110,7 +110,7 @@ pre Windows 2000 systems. License Change to LGPL v3 ------------------------- -Pthreads4w version 2.11 and all future 2.x versions will be released +pthreads-w32 / Pthreads4w version 2.11 and all future 2.x versions will be released under the Lesser GNU Public License version 3 (LGPLv3). Planned Release Under the Apache License v2 @@ -675,7 +675,7 @@ semaphores, such as WinCE prior to version 3.0. An alternate implementation of POSIX semaphores is built using W32 events for these systems when NEED_SEM is defined. This code has been completely rewritten in this release to reuse most of the default POSIX semaphore code, and particularly, -to implement all of the sem_* routines supported by Pthreads4w. Tim +to implement all of the sem_* routines supported by pthreads-w32. Tim Theisen also run the test suite over the NEED_SEM code on his MP system. All tests passed. @@ -685,7 +685,7 @@ New features ------------ * pthread_mutex_timedlock() and all sem_* routines provided by -Pthreads4w are now implemented for WinCE versions prior to 3.0. Those +pthreads-w32 are now implemented for WinCE versions prior to 3.0. Those versions did not implement W32 semaphores. Define NEED_SEM in config.h when building the library for these systems. @@ -878,7 +878,7 @@ New features * A Microsoft-style version resource has been added to the DLL for applications that wish to check DLL compatibility at runtime. -* Pthreads4w DLL naming has been extended to allow incompatible DLL +* pthreads-w32 DLL naming has been extended to allow incompatible DLL versions to co-exist in the same filesystem. See the README file for details, but briefly: while the version information inside the DLL will change with each release from now on, the DLL version names will only change if the new @@ -888,7 +888,7 @@ The versioning scheme has been borrowed from GNU Libtool, and the DLL naming scheme is from Cygwin. Provided the Libtool-style numbering rules are honoured, the Cygwin DLL naming scheme automatcally ensures that DLL name changes are minimal and that applications will not load an incompatible -Pthreads4w DLL. +pthreads-w32 DLL. Those who use the pre-built DLLs will find that the DLL/LIB names have a new suffix (1) in this snapshot. E.g. pthreadVC1.dll etc. @@ -906,7 +906,7 @@ Certain POSIX macros have changed. These changes are intended to conform to the Single Unix Specification version 3, which states that, if set to 0 (zero) or not defined, then applications may use -sysconf() to determine their values at runtime. Pthreads4w does not +sysconf() to determine their values at runtime. pthreads-w32 does not implement sysconf(). The following macros are no longer undefined, but defined and set to -1 @@ -1101,7 +1101,7 @@ for implicit POSIX threads. New feature - cancellation of/by Win32 (non-POSIX) threads --------------------------------------------------------- Since John Bossom's original implementation, the library has allowed non-POSIX -initialised threads (Win32 threads) to call Pthreads4w routines and +initialised threads (Win32 threads) to call pthreads-w32 routines and therefore interact with POSIX threads. This is done by creating an on-the-fly POSIX thread ID for the Win32 thread that, once created, allows fully reciprical interaction. This did not extend to thread cancellation (async or @@ -1311,7 +1311,7 @@ There are a few reasons: do the expected thing in that context. (There are equally respected people who believe it should not be easily accessible, if it's there at all, for unconditional conformity to other implementations.) -- because Pthreads4w is one of the few implementations that has +- because pthreads-w32 is one of the few implementations that has the choice, perhaps the only freely available one, and so offers a laboratory to people who may want to explore the effects; - although the code will always be around somewhere for anyone who @@ -1450,7 +1450,7 @@ return an error (ESRCH). * errno: An incorrect compiler directive caused a local version of errno to be used instead of the Win32 errno. Both instances are -thread-safe but applications checking errno after a Pthreads4w +thread-safe but applications checking errno after a pthreads-w32 call would be wrong. Fixing this also fixed a bad compiler option in the testsuite (/MT should have been /MD) which is needed to link with the correct library MSVCRT.LIB. diff --git a/_ptw32.h b/_ptw32.h index b16b4c0b..4e0c53c7 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -2,7 +2,7 @@ * Module: _ptw32.h * * Purpose: - * Pthreads4w internal macros, to be shared by other headers + * pthreads-w32 internal macros, to be shared by other headers * comprising the pthreads4w package. * * -------------------------------------------------------------------------- diff --git a/aclocal.m4 b/aclocal.m4 index 8d551847..2f3b6651 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,9 +1,9 @@ ## aclocal.m4 ## -------------------------------------------------------------------------- ## -## Pthreads4w - POSIX Threads for Windows +## pthreads-w32 / Pthreads4w - POSIX Threads for Windows ## Copyright 1998 John E. Bossom -## Copyright 1999-2018, Pthreads4w contributors +## Copyright 1999-2018, pthreads-w32 / Pthreads4w contributors ## ## Homepage: http://sources.redhat.com/pthreads-win32 ## diff --git a/configure.ac b/configure.ac index f0983386..21d450a6 100644 --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,9 @@ # configure.ac # -------------------------------------------------------------------------- # -# Pthreads4w - POSIX Threads for Windows +# pthreads-w32 / Pthreads4w - POSIX Threads for Windows # Copyright 1998 John E. Bossom -# Copyright 1999-2018, Pthreads4w contributors +# Copyright 1999-2018, pthreads-w32 / Pthreads4w contributors # # Homepage: http://sources.redhat.com/pthreads-win32 # diff --git a/docs/ANNOUNCE.md b/docs/ANNOUNCE.md index 0af2c639..367e4101 100644 --- a/docs/ANNOUNCE.md +++ b/docs/ANNOUNCE.md @@ -6,7 +6,7 @@ Releases: http://sources.redhat.com/pthreads-win32files Maintainer: Ross Johnson -We are pleased to announce the availability of a new release of Pthreads4w +We are pleased to announce the availability of a new release of pthreads-w32 (a.k.a. Pthreads-win32), an Open Source Software implementation of the Threads component of the SUSV3 Standard for Microsoft's Windows (x86 and x64). Some relevant functions from other sections of SUSV3 are @@ -17,7 +17,7 @@ Some common non-portable functions are also implemented for additional compatibility, as are a few functions specific to pthreads4w for easier integration with Windows applications. -Pthreads4w is free software. With the exception of four files noted later, +pthreads-w32 is free software. With the exception of four files noted later, Version 3.0.0 is distributed under the Apache License version 2.0 (APLv2). The APLv2 is compatible with the GPLv3 and LGPLv3 licenses and therefore this code may continue to be legally included within GPLv3 and LGPLv3 diff --git a/docs/ChangeLog.md b/docs/ChangeLog.md index 4affa4db..3c19d975 100644 --- a/docs/ChangeLog.md +++ b/docs/ChangeLog.md @@ -183,7 +183,7 @@ 2015-11-01 Mark Smith - * ptw32_relnillisecs.c: Fix erroneous 0-time waits, symptomizing as + * ptw32_relmillisecs.c: Fix erroneous 0-time waits, symptomizing as busy-spinning eating CPU. When the time to wait is specified to be less than 1 millisecond were erroneously rounded down to 0; Modify WinCE dependency. diff --git a/docs/NEWS.md b/docs/NEWS.md index 042c980f..db987c8a 100644 --- a/docs/NEWS.md +++ b/docs/NEWS.md @@ -12,7 +12,7 @@ files, e.g. PTW32_* changes to PTW32_*, ptw32_* to ptw32_*, etc. License Change -------------- -With the agreement of all substantial relevant contributors Pthreads4w +With the agreement of all substantial relevant contributors pthreads-w32 version 3, with the exception of four files, is being released under the terms of the Apache License v2.0. The APLv2 is compatible with the GPLv3 and LGPLv3 licenses and therefore this code may continue to be legally @@ -43,7 +43,7 @@ Alexander Terekhov Vladimir Kliatchko Ross Johnson -Pthreads4w version 2 releases will remain LGPL but version 2.11 and later +pthreads-w32 version 2 releases will remain LGPL but version 2.11 and later will be released under v3 of that license so that any additions to pthreads4w version 3 code that is backported to v2 will not pollute that code. @@ -110,7 +110,7 @@ pre Windows 2000 systems. License Change to LGPL v3 ------------------------- -Pthreads4w version 2.11 and all future 2.x versions will be released +pthreads-w32 version 2.11 and all future 2.x versions will be released under the Lesser GNU Public License version 3 (LGPLv3). Planned Release Under the Apache License v2 @@ -675,7 +675,7 @@ semaphores, such as WinCE prior to version 3.0. An alternate implementation of POSIX semaphores is built using W32 events for these systems when NEED_SEM is defined. This code has been completely rewritten in this release to reuse most of the default POSIX semaphore code, and particularly, -to implement all of the sem_* routines supported by Pthreads4w. Tim +to implement all of the sem_* routines supported by pthreads-w32. Tim Theisen also run the test suite over the NEED_SEM code on his MP system. All tests passed. @@ -685,7 +685,7 @@ New features ------------ * pthread_mutex_timedlock() and all sem_* routines provided by -Pthreads4w are now implemented for WinCE versions prior to 3.0. Those +pthreads-w32 are now implemented for WinCE versions prior to 3.0. Those versions did not implement W32 semaphores. Define NEED_SEM in config.h when building the library for these systems. @@ -878,7 +878,7 @@ New features * A Microsoft-style version resource has been added to the DLL for applications that wish to check DLL compatibility at runtime. -* Pthreads4w DLL naming has been extended to allow incompatible DLL +* pthreads-w32 DLL naming has been extended to allow incompatible DLL versions to co-exist in the same filesystem. See the README file for details, but briefly: while the version information inside the DLL will change with each release from now on, the DLL version names will only change if the new @@ -888,7 +888,7 @@ The versioning scheme has been borrowed from GNU Libtool, and the DLL naming scheme is from Cygwin. Provided the Libtool-style numbering rules are honoured, the Cygwin DLL naming scheme automatcally ensures that DLL name changes are minimal and that applications will not load an incompatible -Pthreads4w DLL. +pthreads-w32 DLL. Those who use the pre-built DLLs will find that the DLL/LIB names have a new suffix (1) in this snapshot. E.g. pthreadVC1.dll etc. @@ -906,7 +906,7 @@ Certain POSIX macros have changed. These changes are intended to conform to the Single Unix Specification version 3, which states that, if set to 0 (zero) or not defined, then applications may use -sysconf() to determine their values at runtime. Pthreads4w does not +sysconf() to determine their values at runtime. pthreads-w32 does not implement sysconf(). The following macros are no longer undefined, but defined and set to -1 @@ -1101,7 +1101,7 @@ for implicit POSIX threads. New feature - cancellation of/by Win32 (non-POSIX) threads --------------------------------------------------------- Since John Bossom's original implementation, the library has allowed non-POSIX -initialised threads (Win32 threads) to call Pthreads4w routines and +initialised threads (Win32 threads) to call pthreads-w32 routines and therefore interact with POSIX threads. This is done by creating an on-the-fly POSIX thread ID for the Win32 thread that, once created, allows fully reciprical interaction. This did not extend to thread cancellation (async or @@ -1311,7 +1311,7 @@ There are a few reasons: do the expected thing in that context. (There are equally respected people who believe it should not be easily accessible, if it's there at all, for unconditional conformity to other implementations.) -- because Pthreads4w is one of the few implementations that has +- because pthreads-w32 is one of the few implementations that has the choice, perhaps the only freely available one, and so offers a laboratory to people who may want to explore the effects; - although the code will always be around somewhere for anyone who @@ -1450,7 +1450,7 @@ return an error (ESRCH). * errno: An incorrect compiler directive caused a local version of errno to be used instead of the Win32 errno. Both instances are -thread-safe but applications checking errno after a Pthreads4w +thread-safe but applications checking errno after a pthreads-w32 call would be wrong. Fixing this also fixed a bad compiler option in the testsuite (/MT should have been /MD) which is needed to link with the correct library MSVCRT.LIB. diff --git a/docs/NOTICE.md b/docs/NOTICE.md index 38eb34b0..ef47cafe 100644 --- a/docs/NOTICE.md +++ b/docs/NOTICE.md @@ -1,6 +1,6 @@ -pthreads-w32 - POSIX threads for Windows +pthreads-w32 / Pthreads4w - POSIX threads for Windows Copyright 1998 John E. Bossom -Copyright 1999-2018, Pthreads4w contributors +Copyright 1999-2018, pthreads-w32 / Pthreads4w contributors This product includes software developed through the colaborative effort of several individuals, each of whom is listed in the file diff --git a/docs/README.md b/docs/README.md index eee68999..16ea39f0 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,7 +4,7 @@ PTHREADS4W (a.k.a. PTHREADS-WIN32) What is it? ----------- -Pthreads4w is an Open Source Software implementation of the Threads +pthreads-w32 / Pthreads4w is an Open Source Software implementation of the Threads component of the POSIX 1003.1c 1995 Standard (or later) for Microsoft's Windows environment. Some functions from POSIX 1003.1b are also supported, including semaphores. Other related functions include the set of read-write @@ -132,7 +132,7 @@ Microsoft version numbers use 4 integers: 0.0.0.0 -Pthreads4w uses the first 3 following the standard major.minor.micro +pthreads-w32 uses the first 3 following the standard major.minor.micro system. We had claimed to follow the Libtool convention but this has not been the case with recent releases. Binary compatibility and consequently library file naming has not changed over this time either @@ -171,7 +171,7 @@ applications can continue to be used. For pre .NET Windows systems, this inevitably requires incompatible versions of the same DLLs to have different names. -Pthreads4w has adopted the Cygwin convention of appending a single +pthreads-w32 has adopted the Cygwin convention of appending a single integer number to the DLL name. The number used is simply the library's major version number. diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index 1cd1417c..5e5e7ade 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -3,9 +3,9 @@ # # -------------------------------------------------------------------------- # -# Pthreads4w - POSIX Threads for Windows +# pthreads-w32 / Pthreads4w - POSIX Threads for Windows # Copyright 1998 John E. Bossom -# Copyright 1999-2018, Pthreads4w contributors +# Copyright 1999-2018, pthreads-w32 / Pthreads4w contributors # # Homepage: http://sources.redhat.com/pthreads-win32 # diff --git a/tests/errno0.c b/tests/errno0.c index 75aa6a0d..d37430c9 100644 --- a/tests/errno0.c +++ b/tests/errno0.c @@ -4,32 +4,33 @@ * * -------------------------------------------------------------------------- * - * Pthreads4w - POSIX Threads Library for Win32 + * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2018, Pthreads4w contributors + * Copyright(C) 1999,2012 Pthreads-win32 contributors * - * Homepage: http://sources.redhat.com/pthreads-win32 + * 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: - * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ - * - * This file is part of Pthreads4w. - * - * Pthreads4w is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Pthreads4w is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Pthreads4w. If not, see . * + * http://sources.redhat.com/pthreads-win32/contributors.html + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library in the file COPYING.LIB; + * if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- * From f8647a6917debcf35948dec016ff8344cede580c Mon Sep 17 00:00:00 2001 From: Ger Hobbelt Date: Wed, 14 Apr 2021 11:35:41 +0200 Subject: [PATCH 206/207] more banner work for pre-merge --- GNUmakefile.in | 4 ++-- README.md | 26 +++++++++++----------- _ptw32.h | 2 +- aclocal.m4 | 4 ++-- cmake/version.rc.in | 2 ++ configure.ac | 4 ++-- context.h | 2 ++ create.c | 2 ++ dll.c | 3 +++ docs/ANNOUNCE.md | 4 ++-- docs/NEWS.md | 26 +++++++++++----------- docs/NOTICE.md | 4 ++-- docs/README.md | 6 ++--- errno.c | 2 ++ global.c | 2 ++ implement.h | 2 ++ manual/ChangeLog | 4 ++-- manual/PortabilityIssues.html | 10 ++++----- manual/cpu_set.html | 2 +- manual/index.html | 8 +++---- manual/pthreadCancelableWait.html | 4 ++-- manual/pthread_attr_init.html | 18 +++++++-------- manual/pthread_attr_setstackaddr.html | 6 ++--- manual/pthread_attr_setstacksize.html | 8 +++---- manual/pthread_barrier_init.html | 8 +++---- manual/pthread_barrier_wait.html | 6 ++--- manual/pthread_barrierattr_init.html | 6 ++--- manual/pthread_barrierattr_setpshared.html | 10 ++++----- manual/pthread_cancel.html | 14 ++++++------ manual/pthread_cleanup_push.html | 4 ++-- manual/pthread_cond_init.html | 6 ++--- manual/pthread_condattr_init.html | 6 ++--- manual/pthread_condattr_setpshared.html | 10 ++++----- manual/pthread_create.html | 6 ++--- manual/pthread_delay_np.html | 4 ++-- manual/pthread_detach.html | 4 ++-- manual/pthread_getunique_np.html | 6 ++--- manual/pthread_getw32threadhandle_np.html | 4 ++-- manual/pthread_join.html | 4 ++-- manual/pthread_key_create.html | 6 ++--- manual/pthread_kill.html | 14 ++++++------ manual/pthread_mutex_init.html | 8 +++---- manual/pthread_mutexattr_init.html | 10 ++++----- manual/pthread_mutexattr_setpshared.html | 6 ++--- manual/pthread_num_processors_np.html | 4 ++-- manual/pthread_once.html | 4 ++-- manual/pthread_rwlock_init.html | 8 +++---- manual/pthread_rwlock_rdlock.html | 10 ++++----- manual/pthread_rwlock_timedrdlock.html | 6 ++--- manual/pthread_rwlock_timedwrlock.html | 6 ++--- manual/pthread_rwlock_unlock.html | 8 +++---- manual/pthread_rwlock_wrlock.html | 8 +++---- manual/pthread_rwlockattr_init.html | 6 ++--- manual/pthread_rwlockattr_setpshared.html | 8 +++---- manual/pthread_self.html | 8 +++---- manual/pthread_setaffinity_np.html | 6 ++--- manual/pthread_setcancelstate.html | 16 ++++++------- manual/pthread_setcanceltype.html | 16 ++++++------- manual/pthread_setconcurrency.html | 6 ++--- manual/pthread_setname_np.html | 2 +- manual/pthread_setschedparam.html | 6 ++--- manual/pthread_spin_init.html | 10 ++++----- manual/pthread_spin_lock.html | 6 ++--- manual/pthread_spin_unlock.html | 8 +++---- manual/pthread_timechange_handler_np.html | 4 ++-- manual/pthread_win32_attach_detach_np.html | 8 +++---- manual/pthread_win32_getabstime_np.html | 4 ++-- manual/pthread_win32_test_features_np.html | 4 ++-- manual/sched_get_priority_max.html | 4 ++-- manual/sched_getscheduler.html | 6 ++--- manual/sched_setaffinity.html | 6 ++--- manual/sched_setscheduler.html | 6 ++--- manual/sched_yield.html | 2 +- manual/sem_init.html | 8 +++---- pthread.c | 2 ++ pthread.h | 2 ++ pthread_attr_destroy.c | 2 ++ pthread_attr_getaffinity_np.c | 2 ++ pthread_attr_getdetachstate.c | 2 ++ pthread_attr_getinheritsched.c | 2 ++ pthread_attr_getname_np.c | 2 ++ pthread_attr_getschedparam.c | 2 ++ pthread_attr_getschedpolicy.c | 2 ++ pthread_attr_getscope.c | 2 ++ pthread_attr_getstackaddr.c | 2 ++ pthread_attr_getstacksize.c | 2 ++ pthread_attr_init.c | 2 ++ pthread_attr_setaffinity_np.c | 2 ++ pthread_attr_setdetachstate.c | 2 ++ pthread_attr_setinheritsched.c | 2 ++ pthread_attr_setname_np.c | 2 ++ pthread_attr_setschedparam.c | 2 ++ pthread_attr_setschedpolicy.c | 2 ++ pthread_attr_setscope.c | 2 ++ pthread_attr_setstackaddr.c | 2 ++ pthread_attr_setstacksize.c | 2 ++ pthread_barrier_destroy.c | 2 ++ pthread_barrier_init.c | 2 ++ pthread_barrier_wait.c | 2 ++ pthread_barrierattr_destroy.c | 2 ++ pthread_barrierattr_getpshared.c | 2 ++ pthread_barrierattr_init.c | 2 ++ pthread_barrierattr_setpshared.c | 2 ++ pthread_cancel.c | 2 ++ pthread_cond_destroy.c | 2 ++ pthread_cond_init.c | 2 ++ pthread_condattr_destroy.c | 2 ++ pthread_condattr_getpshared.c | 2 ++ pthread_condattr_init.c | 2 ++ pthread_condattr_setpshared.c | 2 ++ pthread_delay_np.c | 2 ++ pthread_detach.c | 2 ++ pthread_equal.c | 2 ++ pthread_exit.c | 2 ++ pthread_getconcurrency.c | 2 ++ pthread_getname_np.c | 2 ++ pthread_getschedparam.c | 2 ++ pthread_getspecific.c | 2 ++ pthread_getunique_np.c | 2 ++ pthread_getw32threadhandle_np.c | 2 ++ pthread_join.c | 2 ++ pthread_key_create.c | 2 ++ pthread_key_delete.c | 2 ++ pthread_kill.c | 2 ++ pthread_mutex_consistent.c | 2 ++ pthread_mutex_destroy.c | 2 ++ pthread_mutex_init.c | 2 ++ pthread_mutex_lock.c | 2 ++ pthread_mutex_timedlock.c | 2 ++ pthread_mutex_trylock.c | 2 ++ pthread_mutex_unlock.c | 2 ++ pthread_mutexattr_destroy.c | 2 ++ pthread_mutexattr_getkind_np.c | 2 ++ pthread_mutexattr_getpshared.c | 2 ++ pthread_mutexattr_getrobust.c | 2 ++ pthread_mutexattr_gettype.c | 2 ++ pthread_mutexattr_init.c | 2 ++ pthread_mutexattr_setkind_np.c | 2 ++ pthread_mutexattr_setpshared.c | 2 ++ pthread_mutexattr_setrobust.c | 2 ++ pthread_mutexattr_settype.c | 2 ++ pthread_num_processors_np.c | 2 ++ pthread_once.c | 2 ++ pthread_rwlock_destroy.c | 2 ++ pthread_rwlock_init.c | 2 ++ pthread_rwlock_rdlock.c | 2 ++ pthread_rwlock_timedrdlock.c | 2 ++ pthread_rwlock_timedwrlock.c | 2 ++ pthread_rwlock_tryrdlock.c | 2 ++ pthread_rwlock_trywrlock.c | 2 ++ pthread_rwlock_unlock.c | 2 ++ pthread_rwlock_wrlock.c | 2 ++ pthread_rwlockattr_destroy.c | 2 ++ pthread_rwlockattr_getpshared.c | 2 ++ pthread_rwlockattr_init.c | 2 ++ pthread_rwlockattr_setpshared.c | 2 ++ pthread_self.c | 2 ++ pthread_setaffinity.c | 2 ++ pthread_setcancelstate.c | 2 ++ pthread_setcanceltype.c | 2 ++ pthread_setconcurrency.c | 2 ++ pthread_setname_np.c | 2 ++ pthread_setschedparam.c | 2 ++ pthread_setspecific.c | 2 ++ pthread_spin_destroy.c | 2 ++ pthread_spin_init.c | 2 ++ pthread_spin_lock.c | 2 ++ pthread_spin_trylock.c | 2 ++ pthread_spin_unlock.c | 2 ++ pthread_testcancel.c | 2 ++ pthread_timechange_handler_np.c | 2 ++ pthread_timedjoin_np.c | 2 ++ pthread_tryjoin_np.c | 2 ++ pthread_win32_attach_detach_np.c | 2 ++ ptw32_MCS_lock.c | 2 ++ ptw32_callUserDestroyRoutines.c | 2 ++ ptw32_calloc.c | 2 ++ ptw32_cond_check_need_init.c | 2 ++ ptw32_getprocessors.c | 2 ++ ptw32_is_attr.c | 2 ++ ptw32_mutex_check_need_init.c | 2 ++ ptw32_new.c | 2 ++ ptw32_processInitialize.c | 2 ++ ptw32_processTerminate.c | 2 ++ ptw32_relmillisecs.c | 2 ++ ptw32_reuse.c | 2 ++ ptw32_rwlock_cancelwrwait.c | 2 ++ ptw32_rwlock_check_need_init.c | 2 ++ ptw32_semwait.c | 2 ++ ptw32_spinlock_check_need_init.c | 2 ++ ptw32_threadDestroy.c | 2 ++ ptw32_threadStart.c | 2 ++ ptw32_throw.c | 2 ++ ptw32_timespec.c | 2 ++ ptw32_tkAssocCreate.c | 2 ++ ptw32_tkAssocDestroy.c | 2 ++ sched.h | 2 ++ sched_get_priority_max.c | 2 ++ sched_get_priority_min.c | 2 ++ sched_getscheduler.c | 2 ++ sched_setaffinity.c | 2 ++ sched_setscheduler.c | 2 ++ sched_yield.c | 2 ++ sem_close.c | 2 ++ sem_destroy.c | 2 ++ sem_getvalue.c | 2 ++ sem_init.c | 2 ++ sem_open.c | 2 ++ sem_post.c | 2 ++ sem_post_multiple.c | 2 ++ sem_timedwait.c | 2 ++ sem_trywait.c | 2 ++ sem_unlink.c | 2 ++ sem_wait.c | 2 ++ semaphore.h | 2 ++ signal.c | 2 ++ tests/GNUmakefile.in | 6 +++-- tests/detach1.c | 2 +- version.rc | 2 ++ w32_CancelableWait.c | 2 ++ 220 files changed, 551 insertions(+), 246 deletions(-) diff --git a/GNUmakefile.in b/GNUmakefile.in index 5d0ca16d..18c721f8 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -1,9 +1,9 @@ # @configure_input@ # -------------------------------------------------------------------------- # -# pthreads-w32 / Pthreads4w - POSIX Threads for Windows +# pthreads-win32 / Pthreads4w - POSIX Threads for Windows # Copyright 1998 John E. Bossom -# Copyright 1999-2018, pthreads-w32 / Pthreads4w contributors +# Copyright 1999-2018, pthreads-win32 / Pthreads4w contributors # # Homepage: http://sources.redhat.com/pthreads-win32 # diff --git a/README.md b/README.md index 3f9ed0b2..3b806081 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ files, e.g. PTW32_* changes to PTW32_*, ptw32_* to ptw32_*, etc. License Change -------------- -With the agreement of all substantial relevant contributors pthreads-w32 / Pthreads4w +With the agreement of all substantial relevant contributors pthreads-win32 / Pthreads4w version 3, with the exception of four files, is being released under the terms of the Apache License v2.0. The APLv2 is compatible with the GPLv3 and LGPLv3 licenses and therefore this code may continue to be legally @@ -43,7 +43,7 @@ Alexander Terekhov Vladimir Kliatchko Ross Johnson -pthreads-w32 / Pthreads4w version 2 releases will remain LGPL but version 2.11 and later +pthreads-win32 / Pthreads4w version 2 releases will remain LGPL but version 2.11 and later will be released under v3 of that license so that any additions to pthreads4w version 3 code that is backported to v2 will not pollute that code. @@ -110,7 +110,7 @@ pre Windows 2000 systems. License Change to LGPL v3 ------------------------- -pthreads-w32 / Pthreads4w version 2.11 and all future 2.x versions will be released +pthreads-win32 / Pthreads4w version 2.11 and all future 2.x versions will be released under the Lesser GNU Public License version 3 (LGPLv3). Planned Release Under the Apache License v2 @@ -577,7 +577,7 @@ General The package now includes a reference documentation set consisting of HTML formatted Unix-style manual pages that have been edited for -consistency with pthreads-w32. The set can also be read online at: +consistency with pthreads-win32. The set can also be read online at: http://sources.redhat.com/pthreads-win32manual/index.html Thanks again to Tim Theisen for running the test suite pre-release @@ -675,7 +675,7 @@ semaphores, such as WinCE prior to version 3.0. An alternate implementation of POSIX semaphores is built using W32 events for these systems when NEED_SEM is defined. This code has been completely rewritten in this release to reuse most of the default POSIX semaphore code, and particularly, -to implement all of the sem_* routines supported by pthreads-w32. Tim +to implement all of the sem_* routines supported by pthreads-win32. Tim Theisen also run the test suite over the NEED_SEM code on his MP system. All tests passed. @@ -685,7 +685,7 @@ New features ------------ * pthread_mutex_timedlock() and all sem_* routines provided by -pthreads-w32 are now implemented for WinCE versions prior to 3.0. Those +pthreads-win32 are now implemented for WinCE versions prior to 3.0. Those versions did not implement W32 semaphores. Define NEED_SEM in config.h when building the library for these systems. @@ -784,7 +784,7 @@ to applications built on pthreads-win32 version 1.x.x. The package naming has changed, replacing the snapshot date with the version number + descriptive information. E.g. this -release is "pthreads-w32-2-0-0-release". +release is "pthreads-win32-2-0-0-release". Bugs fixed ---------- @@ -878,7 +878,7 @@ New features * A Microsoft-style version resource has been added to the DLL for applications that wish to check DLL compatibility at runtime. -* pthreads-w32 DLL naming has been extended to allow incompatible DLL +* pthreads-win32 DLL naming has been extended to allow incompatible DLL versions to co-exist in the same filesystem. See the README file for details, but briefly: while the version information inside the DLL will change with each release from now on, the DLL version names will only change if the new @@ -888,7 +888,7 @@ The versioning scheme has been borrowed from GNU Libtool, and the DLL naming scheme is from Cygwin. Provided the Libtool-style numbering rules are honoured, the Cygwin DLL naming scheme automatcally ensures that DLL name changes are minimal and that applications will not load an incompatible -pthreads-w32 DLL. +pthreads-win32 DLL. Those who use the pre-built DLLs will find that the DLL/LIB names have a new suffix (1) in this snapshot. E.g. pthreadVC1.dll etc. @@ -906,7 +906,7 @@ Certain POSIX macros have changed. These changes are intended to conform to the Single Unix Specification version 3, which states that, if set to 0 (zero) or not defined, then applications may use -sysconf() to determine their values at runtime. pthreads-w32 does not +sysconf() to determine their values at runtime. pthreads-win32 does not implement sysconf(). The following macros are no longer undefined, but defined and set to -1 @@ -1101,7 +1101,7 @@ for implicit POSIX threads. New feature - cancellation of/by Win32 (non-POSIX) threads --------------------------------------------------------- Since John Bossom's original implementation, the library has allowed non-POSIX -initialised threads (Win32 threads) to call pthreads-w32 routines and +initialised threads (Win32 threads) to call pthreads-win32 routines and therefore interact with POSIX threads. This is done by creating an on-the-fly POSIX thread ID for the Win32 thread that, once created, allows fully reciprical interaction. This did not extend to thread cancellation (async or @@ -1311,7 +1311,7 @@ There are a few reasons: do the expected thing in that context. (There are equally respected people who believe it should not be easily accessible, if it's there at all, for unconditional conformity to other implementations.) -- because pthreads-w32 is one of the few implementations that has +- because pthreads-win32 is one of the few implementations that has the choice, perhaps the only freely available one, and so offers a laboratory to people who may want to explore the effects; - although the code will always be around somewhere for anyone who @@ -1450,7 +1450,7 @@ return an error (ESRCH). * errno: An incorrect compiler directive caused a local version of errno to be used instead of the Win32 errno. Both instances are -thread-safe but applications checking errno after a pthreads-w32 +thread-safe but applications checking errno after a pthreads-win32 call would be wrong. Fixing this also fixed a bad compiler option in the testsuite (/MT should have been /MD) which is needed to link with the correct library MSVCRT.LIB. diff --git a/_ptw32.h b/_ptw32.h index 4e0c53c7..c3f48f22 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -2,7 +2,7 @@ * Module: _ptw32.h * * Purpose: - * pthreads-w32 internal macros, to be shared by other headers + * pthreads-win32 internal macros, to be shared by other headers * comprising the pthreads4w package. * * -------------------------------------------------------------------------- diff --git a/aclocal.m4 b/aclocal.m4 index 2f3b6651..bd65c489 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,9 +1,9 @@ ## aclocal.m4 ## -------------------------------------------------------------------------- ## -## pthreads-w32 / Pthreads4w - POSIX Threads for Windows +## pthreads-win32 / Pthreads4w - POSIX Threads for Windows ## Copyright 1998 John E. Bossom -## Copyright 1999-2018, pthreads-w32 / Pthreads4w contributors +## Copyright 1999-2018, pthreads-win32 / Pthreads4w contributors ## ## Homepage: http://sources.redhat.com/pthreads-win32 ## diff --git a/cmake/version.rc.in b/cmake/version.rc.in index 8fac1808..657804cc 100644 --- a/cmake/version.rc.in +++ b/cmake/version.rc.in @@ -29,6 +29,8 @@ * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * -------------------------------------------------------------------------- */ #include diff --git a/configure.ac b/configure.ac index 21d450a6..0f52f783 100644 --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,9 @@ # configure.ac # -------------------------------------------------------------------------- # -# pthreads-w32 / Pthreads4w - POSIX Threads for Windows +# pthreads-win32 / Pthreads4w - POSIX Threads for Windows # Copyright 1998 John E. Bossom -# Copyright 1999-2018, pthreads-w32 / Pthreads4w contributors +# Copyright 1999-2018, pthreads-win32 / Pthreads4w contributors # # Homepage: http://sources.redhat.com/pthreads-win32 # diff --git a/context.h b/context.h index a4c196a4..a8d0057f 100644 --- a/context.h +++ b/context.h @@ -33,6 +33,8 @@ * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * -------------------------------------------------------------------------- */ #ifndef PTW32_CONTEXT_H diff --git a/create.c b/create.c index bc1fca63..edb975e8 100644 --- a/create.c +++ b/create.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/dll.c b/dll.c index 66a716ad..0ddca5ed 100644 --- a/dll.c +++ b/dll.c @@ -3,6 +3,7 @@ * * Description: * This translation unit implements DLL initialisation. + * This translation unit implements static auto-init and auto-exit logic. * * -------------------------------------------------------------------------- * @@ -33,6 +34,8 @@ * License along with this library 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 diff --git a/docs/ANNOUNCE.md b/docs/ANNOUNCE.md index 367e4101..9cd6a3da 100644 --- a/docs/ANNOUNCE.md +++ b/docs/ANNOUNCE.md @@ -6,7 +6,7 @@ Releases: http://sources.redhat.com/pthreads-win32files Maintainer: Ross Johnson -We are pleased to announce the availability of a new release of pthreads-w32 +We are pleased to announce the availability of a new release of pthreads-win32 (a.k.a. Pthreads-win32), an Open Source Software implementation of the Threads component of the SUSV3 Standard for Microsoft's Windows (x86 and x64). Some relevant functions from other sections of SUSV3 are @@ -17,7 +17,7 @@ Some common non-portable functions are also implemented for additional compatibility, as are a few functions specific to pthreads4w for easier integration with Windows applications. -pthreads-w32 is free software. With the exception of four files noted later, +pthreads-win32 is free software. With the exception of four files noted later, Version 3.0.0 is distributed under the Apache License version 2.0 (APLv2). The APLv2 is compatible with the GPLv3 and LGPLv3 licenses and therefore this code may continue to be legally included within GPLv3 and LGPLv3 diff --git a/docs/NEWS.md b/docs/NEWS.md index db987c8a..8639208b 100644 --- a/docs/NEWS.md +++ b/docs/NEWS.md @@ -12,7 +12,7 @@ files, e.g. PTW32_* changes to PTW32_*, ptw32_* to ptw32_*, etc. License Change -------------- -With the agreement of all substantial relevant contributors pthreads-w32 +With the agreement of all substantial relevant contributors pthreads-win32 version 3, with the exception of four files, is being released under the terms of the Apache License v2.0. The APLv2 is compatible with the GPLv3 and LGPLv3 licenses and therefore this code may continue to be legally @@ -43,7 +43,7 @@ Alexander Terekhov Vladimir Kliatchko Ross Johnson -pthreads-w32 version 2 releases will remain LGPL but version 2.11 and later +pthreads-win32 version 2 releases will remain LGPL but version 2.11 and later will be released under v3 of that license so that any additions to pthreads4w version 3 code that is backported to v2 will not pollute that code. @@ -110,7 +110,7 @@ pre Windows 2000 systems. License Change to LGPL v3 ------------------------- -pthreads-w32 version 2.11 and all future 2.x versions will be released +pthreads-win32 version 2.11 and all future 2.x versions will be released under the Lesser GNU Public License version 3 (LGPLv3). Planned Release Under the Apache License v2 @@ -577,7 +577,7 @@ General The package now includes a reference documentation set consisting of HTML formatted Unix-style manual pages that have been edited for -consistency with pthreads-w32. The set can also be read online at: +consistency with pthreads-win32. The set can also be read online at: http://sources.redhat.com/pthreads-win32manual/index.html Thanks again to Tim Theisen for running the test suite pre-release @@ -675,7 +675,7 @@ semaphores, such as WinCE prior to version 3.0. An alternate implementation of POSIX semaphores is built using W32 events for these systems when NEED_SEM is defined. This code has been completely rewritten in this release to reuse most of the default POSIX semaphore code, and particularly, -to implement all of the sem_* routines supported by pthreads-w32. Tim +to implement all of the sem_* routines supported by pthreads-win32. Tim Theisen also run the test suite over the NEED_SEM code on his MP system. All tests passed. @@ -685,7 +685,7 @@ New features ------------ * pthread_mutex_timedlock() and all sem_* routines provided by -pthreads-w32 are now implemented for WinCE versions prior to 3.0. Those +pthreads-win32 are now implemented for WinCE versions prior to 3.0. Those versions did not implement W32 semaphores. Define NEED_SEM in config.h when building the library for these systems. @@ -784,7 +784,7 @@ to applications built on pthreads-win32 version 1.x.x. The package naming has changed, replacing the snapshot date with the version number + descriptive information. E.g. this -release is "pthreads-w32-2-0-0-release". +release is "pthreads-win32-2-0-0-release". Bugs fixed ---------- @@ -878,7 +878,7 @@ New features * A Microsoft-style version resource has been added to the DLL for applications that wish to check DLL compatibility at runtime. -* pthreads-w32 DLL naming has been extended to allow incompatible DLL +* pthreads-win32 DLL naming has been extended to allow incompatible DLL versions to co-exist in the same filesystem. See the README file for details, but briefly: while the version information inside the DLL will change with each release from now on, the DLL version names will only change if the new @@ -888,7 +888,7 @@ The versioning scheme has been borrowed from GNU Libtool, and the DLL naming scheme is from Cygwin. Provided the Libtool-style numbering rules are honoured, the Cygwin DLL naming scheme automatcally ensures that DLL name changes are minimal and that applications will not load an incompatible -pthreads-w32 DLL. +pthreads-win32 DLL. Those who use the pre-built DLLs will find that the DLL/LIB names have a new suffix (1) in this snapshot. E.g. pthreadVC1.dll etc. @@ -906,7 +906,7 @@ Certain POSIX macros have changed. These changes are intended to conform to the Single Unix Specification version 3, which states that, if set to 0 (zero) or not defined, then applications may use -sysconf() to determine their values at runtime. pthreads-w32 does not +sysconf() to determine their values at runtime. pthreads-win32 does not implement sysconf(). The following macros are no longer undefined, but defined and set to -1 @@ -1101,7 +1101,7 @@ for implicit POSIX threads. New feature - cancellation of/by Win32 (non-POSIX) threads --------------------------------------------------------- Since John Bossom's original implementation, the library has allowed non-POSIX -initialised threads (Win32 threads) to call pthreads-w32 routines and +initialised threads (Win32 threads) to call pthreads-win32 routines and therefore interact with POSIX threads. This is done by creating an on-the-fly POSIX thread ID for the Win32 thread that, once created, allows fully reciprical interaction. This did not extend to thread cancellation (async or @@ -1311,7 +1311,7 @@ There are a few reasons: do the expected thing in that context. (There are equally respected people who believe it should not be easily accessible, if it's there at all, for unconditional conformity to other implementations.) -- because pthreads-w32 is one of the few implementations that has +- because pthreads-win32 is one of the few implementations that has the choice, perhaps the only freely available one, and so offers a laboratory to people who may want to explore the effects; - although the code will always be around somewhere for anyone who @@ -1450,7 +1450,7 @@ return an error (ESRCH). * errno: An incorrect compiler directive caused a local version of errno to be used instead of the Win32 errno. Both instances are -thread-safe but applications checking errno after a pthreads-w32 +thread-safe but applications checking errno after a pthreads-win32 call would be wrong. Fixing this also fixed a bad compiler option in the testsuite (/MT should have been /MD) which is needed to link with the correct library MSVCRT.LIB. diff --git a/docs/NOTICE.md b/docs/NOTICE.md index ef47cafe..1f85de66 100644 --- a/docs/NOTICE.md +++ b/docs/NOTICE.md @@ -1,6 +1,6 @@ -pthreads-w32 / Pthreads4w - POSIX threads for Windows +pthreads-win32 / Pthreads4w - POSIX threads for Windows Copyright 1998 John E. Bossom -Copyright 1999-2018, pthreads-w32 / Pthreads4w contributors +Copyright 1999-2018, pthreads-win32 / Pthreads4w contributors This product includes software developed through the colaborative effort of several individuals, each of whom is listed in the file diff --git a/docs/README.md b/docs/README.md index 16ea39f0..0128e46e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,7 +4,7 @@ PTHREADS4W (a.k.a. PTHREADS-WIN32) What is it? ----------- -pthreads-w32 / Pthreads4w is an Open Source Software implementation of the Threads +pthreads-win32 / Pthreads4w is an Open Source Software implementation of the Threads component of the POSIX 1003.1c 1995 Standard (or later) for Microsoft's Windows environment. Some functions from POSIX 1003.1b are also supported, including semaphores. Other related functions include the set of read-write @@ -132,7 +132,7 @@ Microsoft version numbers use 4 integers: 0.0.0.0 -pthreads-w32 uses the first 3 following the standard major.minor.micro +pthreads-win32 uses the first 3 following the standard major.minor.micro system. We had claimed to follow the Libtool convention but this has not been the case with recent releases. Binary compatibility and consequently library file naming has not changed over this time either @@ -171,7 +171,7 @@ applications can continue to be used. For pre .NET Windows systems, this inevitably requires incompatible versions of the same DLLs to have different names. -pthreads-w32 has adopted the Cygwin convention of appending a single +pthreads-win32 has adopted the Cygwin convention of appending a single integer number to the DLL name. The number used is simply the library's major version number. diff --git a/errno.c b/errno.c index 6e864354..42d36744 100644 --- a/errno.c +++ b/errno.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/global.c b/global.c index a78e8bad..00db862c 100644 --- a/global.c +++ b/global.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/implement.h b/implement.h index e51f8766..73fbf6f6 100644 --- a/implement.h +++ b/implement.h @@ -34,6 +34,8 @@ * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * -------------------------------------------------------------------------- */ #if !defined(_IMPLEMENT_H) diff --git a/manual/ChangeLog b/manual/ChangeLog index 4f936e54..f9864494 100644 --- a/manual/ChangeLog +++ b/manual/ChangeLog @@ -1,6 +1,6 @@ 2016-12-25 Ross Johnson - * Change all references to "pthreads-w32" etc. to "pthreads-w32" + * Change all references to "pthreads-win32" etc. to "pthreads-win32" * Change all references to the sourceware projects web page to the SourceForge project web page. @@ -44,7 +44,7 @@ * PortabilityIssues.html: Was nonPortableIssues.html. * index.html: Updated; add table of contents at top. - * *.html: Add pthreads-w32 header info; add link back to the + * *.html: Add pthreads-win32 header info; add link back to the index page 'index.html'. 2005-05-06 Ross Johnson diff --git a/manual/PortabilityIssues.html b/manual/PortabilityIssues.html index fb4f69eb..1072087c 100644 --- a/manual/PortabilityIssues.html +++ b/manual/PortabilityIssues.html @@ -18,7 +18,7 @@

                                                                POSIX Threads for Windows – REFERENCE – -pthreads-w32

                                                                +pthreads-win32

                                                                Reference Index

                                                                Table of Contents

                                                                Name

                                                                @@ -685,7 +685,7 @@

                                                                Thread priority

                                                                4, 5, and 6 are not supported.

                                                                As you can see, the real priority levels available to any individual Win32 thread are non-contiguous.

                                                                -

                                                                An application using pthreads-w32 should +

                                                                An application using pthreads-win32 should not make assumptions about the numbers used to represent thread priority levels, except that they are monotonic between the values returned by sched_get_priority_min() and sched_get_priority_max(). @@ -693,7 +693,7 @@

                                                                Thread priority

                                                                range of numbers between -15 and 15, while at least one version of WinCE (3.0) defines the minimum priority (THREAD_PRIORITY_LOWEST) as 5, and the maximum priority (THREAD_PRIORITY_HIGHEST) as 1.

                                                                -

                                                                Internally, pthreads-w32 maps any +

                                                                Internally, pthreads-win32 maps any priority levels between THREAD_PRIORITY_IDLE and THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, or between THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to @@ -701,10 +701,10 @@

                                                                Thread priority

                                                                REALTIME_PRIORITY_CLASS even if levels -7, -6, -5, -4, -3, 3, 4, 5, and 6 are supported.

                                                                If it wishes, a Win32 application using -pthreads-w32 can use the Win32 defined priority macros +pthreads-win32 can use the Win32 defined priority macros THREAD_PRIORITY_IDLE through THREAD_PRIORITY_TIME_CRITICAL.

                                                                Author

                                                                -

                                                                Ross Johnson for use with pthreads-w32.

                                                                +

                                                                Ross Johnson for use with pthreads-win32.

                                                                See also



                                                                diff --git a/manual/cpu_set.html b/manual/cpu_set.html index 83429a4d..2f4354b6 100644 --- a/manual/cpu_set.html +++ b/manual/cpu_set.html @@ -13,7 +13,7 @@

                                                                POSIX -Threads for Windows – REFERENCE - pthreads-w32

                                                                +Threads for Windows – REFERENCE - pthreads-win32

                                                                Reference Index

                                                                Table of Contents

                                                                Name

                                                                diff --git a/manual/index.html b/manual/index.html index 497f993d..2be20621 100644 --- a/manual/index.html +++ b/manual/index.html @@ -20,12 +20,12 @@

                                                                POSIX Threads for Windows – REFERENCE - -pthreads-w32

                                                                +pthreads-win32

                                                                Table of Contents

                                                                POSIX threads API reference
                                                                Miscellaneous POSIX -thread safe routines provided by pthreads-w32
                                                                Non-portable -pthreads-w32 routines
                                                                Other

                                                                +thread safe routines provided by pthreads-win32
                                                                Non-portable +pthreads-win32 routines
                                                                Other

                                                                POSIX threads API reference

                                                                cpu_set

                                                                @@ -148,7 +148,7 @@

                                                                POSIX threads API

                                                                sem_wait

                                                                sigwait

                                                                Non-portable -pthreads-w32 routines

                                                                +pthreads-win32 routines

                                                                pthreadCancelableTimedWait

                                                                pthreadCancelableWait

                                                                pthread_attr_getaffinity_np

                                                                diff --git a/manual/pthreadCancelableWait.html b/manual/pthreadCancelableWait.html index a50ea4f0..d569bee8 100644 --- a/manual/pthreadCancelableWait.html +++ b/manual/pthreadCancelableWait.html @@ -18,7 +18,7 @@

                                                                POSIX Threads for Windows – REFERENCE – -pthreads-w32

                                                                +pthreads-win32

                                                                Reference Index

                                                                Table of Contents

                                                                Name

                                                                @@ -64,7 +64,7 @@

                                                                Errors

                                                                The interval timeout milliseconds elapsed before waitHandle was signalled.

                                                                Author

                                                                -

                                                                Ross Johnson for use with pthreads-w32.

                                                                +

                                                                Ross Johnson for use with pthreads-win32.

                                                                See also

                                                                pthread_cancel(), pthread_self()

                                                                diff --git a/manual/pthread_attr_init.html b/manual/pthread_attr_init.html index bcef948d..c3a3ed65 100644 --- a/manual/pthread_attr_init.html +++ b/manual/pthread_attr_init.html @@ -20,7 +20,7 @@

                                                                POSIX Threads for Windows – REFERENCE – -pthreads-w32

                                                                +pthreads-win32

                                                                Reference Index

                                                                Table of Contents

                                                                Name

                                                                @@ -151,11 +151,11 @@

                                                                schedpolicy

                                                                (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 +

                                                                pthreads-win32 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 +

                                                                pthreads-win32 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) @@ -164,7 +164,7 @@

                                                                schedpolicy

                                                                schedparam

                                                                Contain the scheduling parameters (essentially, the scheduling priority) for the thread.

                                                                -

                                                                pthreads-w32 supports the priority levels defined by the +

                                                                pthreads-win32 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.

                                                                @@ -185,13 +185,13 @@

                                                                inheritsched

                                                                scope

                                                                Define the scheduling contention scope for the created thread. The -only value supported in the pthreads-w32 implementation is +only value supported in the pthreads-win32 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.

                                                                +

                                                                pthreads-win32 only supports PTHREAD_SCOPE_SYSTEM.

                                                                Default value: PTHREAD_SCOPE_SYSTEM.

                                                                Return Value

                                                                @@ -246,7 +246,7 @@

                                                                Errors

                                                                ENOTSUP
                                                                policy is not SCHED_OTHER, the only value supported - by pthreads-w32.
                                                                + by pthreads-win32.

                                                                The pthread_attr_setinheritsched function returns the @@ -272,14 +272,14 @@

                                                                Errors

                                                                ENOTSUP
                                                                the specified scope is PTHREAD_SCOPE_PROCESS (not - supported by pthreads-w32). + supported by pthreads-win32).

                                                                Author

                                                                Xavier Leroy <Xavier.Leroy@inria.fr>

                                                                -

                                                                Modified by Ross Johnson for use with pthreads-w32.

                                                                +

                                                                Modified by Ross Johnson for use with pthreads-win32.

                                                                See Also

                                                                pthread_create(3) , pthread_join(3) , diff --git a/manual/pthread_attr_setstackaddr.html b/manual/pthread_attr_setstackaddr.html index b26bbceb..5bbaed6a 100644 --- a/manual/pthread_attr_setstackaddr.html +++ b/manual/pthread_attr_setstackaddr.html @@ -18,7 +18,7 @@

                                                                POSIX Threads for Windows – REFERENCE – -pthreads-w32

                                                                +pthreads-win32

                                                                Reference Index

                                                                Table of Contents

                                                                Name

                                                                @@ -42,7 +42,7 @@

                                                                Description

                                                                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 +

                                                                pthreads-win32 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.

                                                                @@ -129,7 +129,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 pthreads-win32.


                                                                Table of Contents

                                                                  diff --git a/manual/pthread_attr_setstacksize.html b/manual/pthread_attr_setstacksize.html index 8c853a6e..2f6922c7 100644 --- a/manual/pthread_attr_setstacksize.html +++ b/manual/pthread_attr_setstacksize.html @@ -5,7 +5,7 @@ PTHREAD_ATTR_SETSTACKSIZE(3) manual page -

                                                                  POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                                  +

                                                                  POSIX Threads for Windows ā€“ REFERENCE - pthreads-win32

                                                                  Reference Index

                                                                  Table of Contents

                                                                  Name

                                                                  @@ -28,10 +28,10 @@

                                                                  Description

                                                                  The stacksize attribute shall define the minimum stack size (in bytes) allocated for the created threads stack.

                                                                  -

                                                                  pthreads-w32 defines _POSIX_THREAD_ATTR_STACKSIZE in +

                                                                  pthreads-win32 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 pthreads-win32 a value of 0 means the stack will grow as required)

                                                                  Return Value

                                                                  Upon successful completion, pthread_attr_getstacksize and @@ -87,7 +87,7 @@

                                                                  Copyright

                                                                  can be obtained online at http://www.opengroup.org/unix/online.html .

                                                                  -

                                                                  Modified by Ross Johnson for use with pthreads-w32.

                                                                  +

                                                                  Modified by Ross Johnson for use with pthreads-win32.


                                                                  Table of Contents

                                                                    diff --git a/manual/pthread_barrier_init.html b/manual/pthread_barrier_init.html index 8af6868d..c583ad3e 100644 --- a/manual/pthread_barrier_init.html +++ b/manual/pthread_barrier_init.html @@ -5,7 +5,7 @@ PTHREAD_BARRIER_INIT(3) manual page -

                                                                    POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                                    +

                                                                    POSIX Threads for Windows ā€“ REFERENCE - pthreads-win32

                                                                    Reference Index

                                                                    Table of Contents

                                                                    Name

                                                                    @@ -120,7 +120,7 @@

                                                                    Application Usage

                                                                    functions are part of the Barriers option and need not be provided on all implementations.

                                                                    -

                                                                    pthreads-w32 defines _POSIX_BARRIERS to indicate +

                                                                    pthreads-win32 defines _POSIX_BARRIERS to indicate that these routines are implemented and may be used.

                                                                    Rationale

                                                                    None. @@ -131,7 +131,7 @@

                                                                    Future Directions

                                                                    Known Bugs

                                                                    In - pthreads-w32, + pthreads-win32, the behaviour of threads which enter pthread_barrier_wait(3) while the barrier is being destroyed is undefined.
                                                                    @@ -153,7 +153,7 @@

                                                                    Copyright

                                                                    can be obtained online at http://www.opengroup.org/unix/online.html .

                                                                    -

                                                                    Modified by Ross Johnson for use with pthreads-w32.

                                                                    +

                                                                    Modified by Ross Johnson for use with pthreads-win32.


                                                                    Table of Contents

                                                                      diff --git a/manual/pthread_barrier_wait.html b/manual/pthread_barrier_wait.html index c62c57d0..b3449c41 100644 --- a/manual/pthread_barrier_wait.html +++ b/manual/pthread_barrier_wait.html @@ -5,7 +5,7 @@ PTHREAD_BARRIER_WAIT(3) manual page -

                                                                      POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                                      +

                                                                      POSIX Threads for Windows ā€“ REFERENCE - pthreads-win32

                                                                      Reference Index

                                                                      Table of Contents

                                                                      Name

                                                                      @@ -87,7 +87,7 @@

                                                                      Application Usage

                                                                      The pthread_barrier_wait function is part of the Barriers option and need not be provided on all implementations.

                                                                      -

                                                                      pthreads-w32 defines _POSIX_BARRIERS to indicate +

                                                                      pthreads-win32 defines _POSIX_BARRIERS to indicate that this routine is implemented and may be used.

                                                                      Rationale

                                                                      None. @@ -117,7 +117,7 @@

                                                                      Copyright

                                                                      can be obtained online at http://www.opengroup.org/unix/online.html .

                                                                      -

                                                                      Modified by Ross Johnson for use with pthreads-w32.

                                                                      +

                                                                      Modified by Ross Johnson for use with pthreads-win32.


                                                                      Table of Contents

                                                                        diff --git a/manual/pthread_barrierattr_init.html b/manual/pthread_barrierattr_init.html index a81032e2..6305d9f0 100644 --- a/manual/pthread_barrierattr_init.html +++ b/manual/pthread_barrierattr_init.html @@ -5,7 +5,7 @@ PTHREAD_BARRIERATTR_INIT(3) manual page -

                                                                        POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                                        +

                                                                        POSIX Threads for Windows ā€“ REFERENCE - pthreads-win32

                                                                        Reference Index

                                                                        Table of Contents

                                                                        Name

                                                                        @@ -76,7 +76,7 @@

                                                                        Application Usage

                                                                        pthread_barrierattr_init functions are part of the Barriers option and need not be provided on all implementations.

                                                                        -

                                                                        pthreads-w32 defines _POSIX_BARRIERS to indicate +

                                                                        pthreads-win32 defines _POSIX_BARRIERS to indicate that these routines are implemented and may be used.

                                                                        Rationale

                                                                        None. @@ -102,7 +102,7 @@

                                                                        Copyright

                                                                        can be obtained online at http://www.opengroup.org/unix/online.html .

                                                                        -

                                                                        Modified by Ross Johnson for use with pthreads-w32.

                                                                        +

                                                                        Modified by Ross Johnson for use with pthreads-win32.


                                                                        Table of Contents

                                                                          diff --git a/manual/pthread_barrierattr_setpshared.html b/manual/pthread_barrierattr_setpshared.html index f1a323ca..4400ce0d 100644 --- a/manual/pthread_barrierattr_setpshared.html +++ b/manual/pthread_barrierattr_setpshared.html @@ -5,7 +5,7 @@ PTHREAD_BARRIERATTR_SETPSHARED(3) manual page -

                                                                          POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                                          +

                                                                          POSIX Threads for Windows ā€“ REFERENCE - pthreads-win32

                                                                          Reference Index

                                                                          Table of Contents

                                                                          Name

                                                                          @@ -39,7 +39,7 @@

                                                                          Description

                                                                          PTHREAD_PROCESS_PRIVATE. Both constants PTHREAD_PROCESS_SHARED and PTHREAD_PROCESS_PRIVATE are defined in <pthread.h>.

                                                                          -

                                                                          pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

                                                                          pthreads-win32 defines _POSIX_THREAD_PROCESS_SHARED in pthread.h as -1 to indicate that these routines are implemented but that the process shared attribute is not supported.

                                                                          Additional attributes, their default values, and the names of the @@ -76,7 +76,7 @@

                                                                          Errors

                                                                          ENOSYS
                                                                          The value specified by attr was PTHREAD_PROCESS_SHARED - (pthreads-w32).
                                                                          + (pthreads-win32).

                                                                          These functions shall not return an error code of [EINTR].

                                                                          @@ -90,7 +90,7 @@

                                                                          Application Usage

                                                                          pthread_barrierattr_setpshared functions are part of the Barriers option and need not be provided on all implementations.

                                                                          -

                                                                          pthreads-w32 defines _POSIX_BARRIERS and +

                                                                          pthreads-win32 defines _POSIX_BARRIERS and _POSIX_THREAD_PROCESS_SHARED in pthread.h as -1 to indicate that these routines are implemented and may be used, but do not support the process shared option.

                                                                          @@ -119,7 +119,7 @@

                                                                          Copyright

                                                                          can be obtained online at http://www.opengroup.org/unix/online.html .

                                                                          -

                                                                          Modified by Ross Johnson for use with pthreads-w32.

                                                                          +

                                                                          Modified by Ross Johnson for use with pthreads-win32.


                                                                          Table of Contents

                                                                            diff --git a/manual/pthread_cancel.html b/manual/pthread_cancel.html index 26987bfd..ace8d222 100644 --- a/manual/pthread_cancel.html +++ b/manual/pthread_cancel.html @@ -5,7 +5,7 @@ PTHREAD_CANCEL(3) manual page -

                                                                            POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                                            +

                                                                            POSIX Threads for Windows ā€“ REFERENCE - pthreads-win32

                                                                            Reference Index

                                                                            Table of Contents

                                                                            Name

                                                                            @@ -64,14 +64,14 @@

                                                                            Description

                                                                            location pointed to by oldtype, and can thus be restored later by another call to pthread_setcanceltype.

                                                                            -

                                                                            pthreads-w32 provides two levels of support for +

                                                                            pthreads-win32 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 pthreads-win32 library at run-time.

                                                                            Threads are always created by pthread_create(3) with cancellation enabled and deferred. That is, the initial cancellation state is PTHREAD_CANCEL_ENABLE and the initial @@ -87,7 +87,7 @@

                                                                            Description


                                                                            pthread_cond_timedwait(3)
                                                                            pthread_testcancel(3)
                                                                            sem_wait(3)
                                                                            sem_timedwait(3)
                                                                            sigwait(3)

                                                                            -

                                                                            pthreads-w32 provides two functions to enable additional +

                                                                            pthreads-win32 provides two functions to enable additional cancellation points to be created in user functions that block on Win32 HANDLEs:

                                                                            pthreadCancelableWait() @@ -144,12 +144,12 @@

                                                                            Errors

                                                                            Author

                                                                            Xavier Leroy <Xavier.Leroy@inria.fr>

                                                                            -

                                                                            Modified by Ross Johnson for use with pthreads-w32.

                                                                            +

                                                                            Modified by Ross Johnson for use with pthreads-win32.

                                                                            See Also

                                                                            pthread_exit(3) , pthread_cleanup_push(3) , pthread_cleanup_pop(3) -, pthreads-w32 package README file 'Prerequisites' section. +, pthreads-win32 package README file 'Prerequisites' section.

                                                                            Bugs

                                                                            POSIX specifies that a number of system calls (basically, all @@ -157,7 +157,7 @@

                                                                            Bugs

                                                                            , write(2) , wait(2) , etc.) and library functions that may call these system calls (e.g. fprintf(3) ) are cancellation -points. pthreads-w32 is not integrated enough with the C +points. pthreads-win32 is not integrated enough with the C library to implement this, and thus none of the C library functions is a cancellation point.

                                                                            diff --git a/manual/pthread_cleanup_push.html b/manual/pthread_cleanup_push.html index 2ca9e564..b0905772 100644 --- a/manual/pthread_cleanup_push.html +++ b/manual/pthread_cleanup_push.html @@ -5,7 +5,7 @@ PTHREAD_CLEANUP_PUSH(3) manual page -

                                                                            POSIX Threads for Windows ā€“ REFERENCE - pthreads-w32

                                                                            +

                                                                            POSIX Threads for Windows ā€“ REFERENCE - pthreads-win32

                                                                            Reference Index

                                                                            Table of Contents

                                                                            Name

                                                                            @@ -70,7 +70,7 @@

                                                                            Author

                                                                            <Xavier.Leroy@inria.fr>
              Modified by -Ross Johnson for use with pthreads-w32.
              +Ross Johnson for use with pthreads-win32.

              See Also

              pthread_exit(3) , pthread_cancel(3) , diff --git a/manual/pthread_cond_init.html b/manual/pthread_cond_init.html index dc9dbf80..4c2f8f0d 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 - pthreads-win32

              Reference Index

              Table of Contents

              Name

              @@ -54,7 +54,7 @@

              Description

              Variables of type pthread_cond_t can also be initialized statically, using the constant PTHREAD_COND_INITIALIZER. In -the pthreads-w32 implementation, an application should still +the pthreads-win32 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 pthreads-win32.

              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 8d1d7792..ceac9f46 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 - pthreads-win32

              Reference Index

              Table of Contents

              Name

              @@ -32,7 +32,7 @@

              Description

              object attr and fills it with default values for the attributes. pthread_condattr_destroy destroys a condition attribute object, which must not be reused until it is reinitialized.

              -

              pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

              pthreads-win32 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 pthreads-win32.

              See Also

              pthread_cond_init(3) .

              diff --git a/manual/pthread_condattr_setpshared.html b/manual/pthread_condattr_setpshared.html index ab609d2e..0a2fe95f 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 - pthreads-win32

              Reference Index

              Table of Contents

              Name

              @@ -39,7 +39,7 @@

              Description

              such a condition variable, the behavior is undefined. The default value of the attribute is PTHREAD_PROCESS_PRIVATE.

              -

              pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

              pthreads-win32 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).
              + (pthreads-win32).

              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 +

              pthreads-win32 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 pthreads-win32.


              Table of Contents

                diff --git a/manual/pthread_create.html b/manual/pthread_create.html index 2da6d4fa..48e254b0 100644 --- a/manual/pthread_create.html +++ b/manual/pthread_create.html @@ -18,7 +18,7 @@

                POSIX Threads for Windows – REFERENCE - -pthreads-w32

                +pthreads-win32

                Reference Index

                Table of Contents

                Name

                @@ -42,7 +42,7 @@

                Description

                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 +creating thread and there are no pending signals. pthreads-win32 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 @@ -80,7 +80,7 @@

                Author

                Xavier Leroy <Xavier.Leroy@inria.fr>

                -

                Modified by Ross Johnson for use with pthreads-w32.

                +

                Modified by Ross Johnson for use with pthreads-win32.

                See Also

                pthread_exit(3) , pthread_join(3) , diff --git a/manual/pthread_delay_np.html b/manual/pthread_delay_np.html index 88d02e09..b2978111 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 - pthreads-win32

                Reference Index

                Table of Contents

                Name

                @@ -42,7 +42,7 @@

                Errors

                The value specified by interval is invalid.

                Author

                -

                Ross Johnson for use with pthreads-w32.

                +

                Ross Johnson for use with pthreads-win32.


                Table of Contents

                  diff --git a/manual/pthread_detach.html b/manual/pthread_detach.html index c7b2b547..70ccb90d 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 - pthreads-win32

                  Reference Index

                  Table of Contents

                  Name

                  @@ -55,7 +55,7 @@

                  Author

                  Xavier Leroy <Xavier.Leroy@inria.fr>

                  -

                  Modified by Ross Johnson for use with pthreads-w32.

                  +

                  Modified by Ross Johnson for use with pthreads-win32.

                  See Also

                  pthread_create(3) , pthread_join(3) , diff --git a/manual/pthread_getunique_np.html b/manual/pthread_getunique_np.html index 677d5e47..384cb3c9 100755 --- a/manual/pthread_getunique_np.html +++ b/manual/pthread_getunique_np.html @@ -14,7 +14,7 @@

                  POSIX Threads for Windows ā€“ REFERENCE - -pthreads-w32

                  +pthreads-win32

                  Reference Index

                  Table of Contents

                  Name

                  @@ -27,7 +27,7 @@

                  Synopsis

                  Description

                  Returns the unique 64 bit sequence number assigned to thread.

                  -

                  In pthreads-w32:

                  +

                  In pthreads-win32:

                  • 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 pthreads-win32.


                    Table of Contents

                      diff --git a/manual/pthread_getw32threadhandle_np.html b/manual/pthread_getw32threadhandle_np.html index fe07dd63..1bd3f0b6 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 - pthreads-win32

                      Reference Index

                      Table of Contents

                      Name

                      @@ -28,7 +28,7 @@

                      Return Value

                      Errors

                      None.

                      Author

                      -

                      Ross Johnson for use with pthreads-w32.

                      +

                      Ross Johnson for use with pthreads-win32.


                      Table of Contents

                        diff --git a/manual/pthread_join.html b/manual/pthread_join.html index 87007f76..5404a4d6 100644 --- a/manual/pthread_join.html +++ b/manual/pthread_join.html @@ -14,7 +14,7 @@

                        POSIX Threads for Windows – REFERENCE - -pthreads-w32

                        +pthreads-win32

                        Reference Index

                        Table of Contents

                        Name

                        @@ -114,7 +114,7 @@

                        Author

                        Xavier Leroy <Xavier.Leroy@inria.fr>

                        -

                        Modified by Ross Johnson for use with pthreads-w32. +

                        Modified by Ross Johnson for use with pthreads-win32.

                        See Also

                        pthread_exit(3) , diff --git a/manual/pthread_key_create.html b/manual/pthread_key_create.html index fdb6c23c..b7e8c04f 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 - pthreads-win32

                        Reference Index

                        Table of Contents

                        Name

                        @@ -89,7 +89,7 @@

                        Description

                        either memory leakage or infinite loops if destr_function has already been called at least PTHREAD_DESTRUCTOR_ITERATIONS times.

                        -

                        pthreads-w32 stops running key +

                        pthreads-win32 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 pthreads-win32.

                        See Also

                        pthread_create(3) , pthread_exit(3) , diff --git a/manual/pthread_kill.html b/manual/pthread_kill.html index 0f1c4418..fdf21784 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 - pthreads-win32

                        Reference Index

                        Table of Contents

                        Name

                        @@ -25,7 +25,7 @@

                        Description

                        pthread_sigmask changes the signal mask for the calling thread as described by the how and newmask arguments. If oldmask is not NULL, the previous signal mask is -stored in the location pointed to by oldmask. pthreads-w32 +stored in the location pointed to by oldmask. pthreads-win32 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. pthreads-win32 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. pthreads-win32 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 pthreads-win32.

                        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 +

                        pthreads-win32 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. pthreads-win32 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 6536f07f..ae7505df 100644 --- a/manual/pthread_mutex_init.html +++ b/manual/pthread_mutex_init.html @@ -16,7 +16,7 @@

                        POSIX Threads for Windows Ć¢ā‚¬ā€œ REFERENCE - -pthreads-w32

                        +pthreads-win32

                        Reference Index

                        Table of Contents

                        Name

                        @@ -86,7 +86,7 @@

                        Description

                        normal Ć¢ā‚¬Å“fastĆ¢ā‚¬ļæ½ mutexes), PTHREAD_RECURSIVE_MUTEX_INITIALIZER (for recursive mutexes), and PTHREAD_ERRORCHECK_MUTEX_INITIALIZER (for error checking mutexes). In -the pthreads-w32 implementation, +the pthreads-win32 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-w32, +count reaches zero is the mutex actually unlocked. In pthreads-win32, 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 pthreads-win32.

                        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 7e5c06a8..4502e029 100644 --- a/manual/pthread_mutexattr_init.html +++ b/manual/pthread_mutexattr_init.html @@ -14,7 +14,7 @@

                        POSIX Threads for Windows Ć¢ā‚¬ā€œ REFERENCE - -pthreads-w32

                        +pthreads-win32

                        Reference Index

                        Table of Contents

                        Name

                        @@ -67,7 +67,7 @@

                        Description

                        the mutex kind attribute in attr and stores it in the location pointed to by type.

                        -

                        pthreads-w32 also recognises the following equivalent +

                        pthreads-win32 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 +

                        pthreads-win32 also recognises the following equivalent types that are used by Linux:

                        PTHREAD_MUTEX_FAST_NP Ć¢ā‚¬ā€œ equivalent to PTHREAD_MUTEX_NORMAL

                        @@ -166,7 +166,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 pthreads-win32.

                        See Also

                        pthread_mutex_init(3) , pthread_mutex_lock(3) @@ -174,7 +174,7 @@

                        See Also

                        .

                        Notes

                        -

                        For speed, pthreads-w32 never checks the thread ownership +

                        For speed, pthreads-win32 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 0cd38a80..573b9bdd 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 - pthreads-win32

                        Reference Index

                        Table of Contents

                        Name

                        @@ -38,7 +38,7 @@

                        Description

                        operate on such a mutex, the behavior is undefined. The default value of the attribute shall be PTHREAD_PROCESS_PRIVATE.

                        -

                        pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

                        pthreads-win32 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 pthreads-win32.


                        Table of Contents

                          diff --git a/manual/pthread_num_processors_np.html b/manual/pthread_num_processors_np.html index 9c53258a..41ad6f62 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 - pthreads-win32

                          Reference Index

                          Table of Contents

                          Name

                          @@ -28,7 +28,7 @@

                          Return ValueErrors

                          None.

                          Author

                          -

                          Ross Johnson for use with pthreads-w32.

                          +

                          Ross Johnson for use with pthreads-win32.


                          Table of Contents

                            diff --git a/manual/pthread_once.html b/manual/pthread_once.html index 8be2acfb..122dc219 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 - pthreads-win32

                            Reference Index

                            Table of Contents

                            Name

                            @@ -54,7 +54,7 @@

                            Errors

                            Author

                            Xavier Leroy <Xavier.Leroy@inria.fr>

                            -

                            Modified by Ross Johnson for use with pthreads-w32.

                            +

                            Modified by Ross Johnson for use with pthreads-win32.


                            Table of Contents

                              diff --git a/manual/pthread_rwlock_init.html b/manual/pthread_rwlock_init.html index ea28ef6e..3a9a94ea 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 - pthreads-win32

                              Reference Index

                              Table of Contents

                              Name

                              @@ -48,7 +48,7 @@

                              Description

                              shall not be initialized and the contents of rwlock are undefined.

                              -

                              pthreads-w32 supports statically initialized rwlock +

                              pthreads-win32 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 +

                              pthreads-win32 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 pthreads-win32.


                              Table of Contents

                                diff --git a/manual/pthread_rwlock_rdlock.html b/manual/pthread_rwlock_rdlock.html index 9da53c3c..6d8f2d8e 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 - pthreads-win32

                                Reference Index

                                Table of Contents

                                Name

                                @@ -25,7 +25,7 @@

                                Description

                                thread acquires the read lock if a writer does not hold the lock and there are no writers blocked on the lock.

                                -

                                pthreads-w32 does not prefer either writers or readers in +

                                pthreads-win32 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 +

                                pthreads-win32 does not detect deadlock if the thread already owns the lock for writing.

                                -

                                pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

                                pthreads-win32 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 pthreads-win32.


                                Table of Contents

                                  diff --git a/manual/pthread_rwlock_timedrdlock.html b/manual/pthread_rwlock_timedrdlock.html index ba3c8513..cee40b5b 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 - pthreads-win32

                                  Reference Index

                                  Table of Contents

                                  Name

                                  @@ -41,7 +41,7 @@

                                  Description

                                  holds a write lock on rwlock. The results are undefined if this function is called with an uninitialized read-write lock.

                                  -

                                  pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

                                  pthreads-win32 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 pthreads-win32.


                                  Table of Contents

                                    diff --git a/manual/pthread_rwlock_timedwrlock.html b/manual/pthread_rwlock_timedwrlock.html index d569404a..32897d39 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 - pthreads-win32

                                    Reference Index

                                    Table of Contents

                                    Name

                                    @@ -41,7 +41,7 @@

                                    Description

                                    holds the read-write lock. The results are undefined if this function is called with an uninitialized read-write lock.

                                    -

                                    pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

                                    pthreads-win32 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 pthreads-win32.


                                    Table of Contents

                                      diff --git a/manual/pthread_rwlock_unlock.html b/manual/pthread_rwlock_unlock.html index 220192a1..aeec9b28 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 - pthreads-win32

                                      Reference Index

                                      Table of Contents

                                      Name

                                      @@ -34,14 +34,14 @@

                                      Description

                                      read-write lock object, the read-write lock object shall be put in the unlocked state.

                                      -

                                      pthreads-w32 does not prefer either writers or readers in +

                                      pthreads-win32 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 +

                                      pthreads-win32 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 pthreads-win32.


                                      Table of Contents

                                        diff --git a/manual/pthread_rwlock_wrlock.html b/manual/pthread_rwlock_wrlock.html index 4a1d65e0..998018f5 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 - pthreads-win32

                                        Reference Index

                                        Table of Contents

                                        Name

                                        @@ -33,14 +33,14 @@

                                        Description

                                        if at the time the call is made it holds the read-write lock (whether a read or write lock).

                                        -

                                        pthreads-w32 does not prefer either writers or readers in +

                                        pthreads-win32 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 +

                                        pthreads-win32 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 pthreads-win32.


                                        Table of Contents

                                          diff --git a/manual/pthread_rwlockattr_init.html b/manual/pthread_rwlockattr_init.html index 0dcf31b7..70efa743 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 - pthreads-win32

                                          Reference Index

                                          Table of Contents

                                          Name

                                          @@ -40,7 +40,7 @@

                                          Description

                                          attributes object (including destruction) shall not affect any previously initialized read-write locks.

                                          -

                                          pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

                                          pthreads-win32 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 pthreads-win32.


                                          Table of Contents

                                            diff --git a/manual/pthread_rwlockattr_setpshared.html b/manual/pthread_rwlockattr_setpshared.html index 1d82eddf..a2936ea0 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 - pthreads-win32

                                            Reference Index

                                            Table of Contents

                                            Name

                                            @@ -41,14 +41,14 @@

                                            Description

                                            read-write lock, the behavior is undefined. The default value of the process-shared attribute shall be PTHREAD_PROCESS_PRIVATE.

                                            -

                                            pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

                                            pthreads-win32 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 +

                                            pthreads-win32 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 pthreads-win32.


                                            Table of Contents

                                              diff --git a/manual/pthread_self.html b/manual/pthread_self.html index ec70063a..c94f7846 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 - pthreads-win32

                                              Reference Index

                                              Table of Contents

                                              Name

                                              @@ -20,7 +20,7 @@

                                              Description

                                              pthread_self return the thread identifier for the calling thread.

                                              -

                                              pthreads-w32 also provides support for Win32 native +

                                              pthreads-win32 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 pthreads-win32 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 pthreads-win32.

                                              See Also

                                              pthread_equal(3) , pthread_join(3) , diff --git a/manual/pthread_setaffinity_np.html b/manual/pthread_setaffinity_np.html index 53106af5..d67d0d05 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 - pthreads-win32

                                              Reference Index

                                              Table of Contents

                                              Name

                                              @@ -44,7 +44,7 @@

                                              Description

                                              whose ID is tid into the cpu_set_t structure pointed to by mask. The cpusetsize argument specifies the size (in bytes) of mask. -

                                              pthreads-w32 currently ignores the cpusetsize +

                                              pthreads-win32 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 pthreads-win32.


                                              Table of Contents

                                                diff --git a/manual/pthread_setcancelstate.html b/manual/pthread_setcancelstate.html index 26956cbd..090cb870 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 - pthreads-win32

                                                Reference Index

                                                Table of Contents

                                                Name

                                                @@ -64,14 +64,14 @@

                                                Description

                                                location pointed to by oldtype, and can thus be restored later by another call to pthread_setcanceltype.

                                                -

                                                pthreads-w32 provides two levels of support for +

                                                pthreads-win32 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 pthreads-win32 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 +pthreads-win32)

                                                +

                                                pthreads-win32 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 pthreads-win32.

                                                See Also

                                                pthread_exit(3) , pthread_cleanup_push(3) , pthread_cleanup_pop(3) -, pthreads-w32 package README file 'Prerequisites' section. +, pthreads-win32 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-w32 is not integrated enough with the C +points. pthreads-win32 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 26956cbd..090cb870 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 - pthreads-win32

                                                Reference Index

                                                Table of Contents

                                                Name

                                                @@ -64,14 +64,14 @@

                                                Description

                                                location pointed to by oldtype, and can thus be restored later by another call to pthread_setcanceltype.

                                                -

                                                pthreads-w32 provides two levels of support for +

                                                pthreads-win32 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 pthreads-win32 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 +pthreads-win32)

                                                +

                                                pthreads-win32 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 pthreads-win32.

                                                See Also

                                                pthread_exit(3) , pthread_cleanup_push(3) , pthread_cleanup_pop(3) -, pthreads-w32 package README file 'Prerequisites' section. +, pthreads-win32 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-w32 is not integrated enough with the C +points. pthreads-win32 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 2bf1d55c..2a77a484 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 - pthreads-win32

                                                Reference Index

                                                Table of Contents

                                                Name

                                                @@ -53,7 +53,7 @@

                                                Description

                                                is called so that a subsequent call to pthread_getconcurrency shall return the same value.

                                                -

                                                pthreads-w32 provides these routines for source code +

                                                pthreads-win32 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 pthreads-win32.


                                                Table of Contents

                                                  diff --git a/manual/pthread_setname_np.html b/manual/pthread_setname_np.html index 3e3cfa66..e3fce25d 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 - pthreads-win32

                                                  Reference Index

                                                  Table of Contents

                                                  Name

                                                  diff --git a/manual/pthread_setschedparam.html b/manual/pthread_setschedparam.html index 4efcfc98..67424101 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 - pthreads-win32

                                                  Reference Index

                                                  Table of Contents

                                                  Name

                                                  @@ -31,7 +31,7 @@

                                                  Description

                                                  round-robin) or SCHED_FIFO (real-time, first-in first-out). param specifies the scheduling priority for the two real-time policies.

                                                  -

                                                  pthreads-w32 only supports SCHED_OTHER and does not support +

                                                  pthreads-win32 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 pthreads-win32.

                                                  See Also

                                                  sched_setscheduler(2) , sched_getscheduler(2) diff --git a/manual/pthread_spin_init.html b/manual/pthread_spin_init.html index 3420a857..2a4cf5d0 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 - pthreads-win32

                                                  Reference Index

                                                  Table of Contents

                                                  Name

                                                  @@ -34,7 +34,7 @@

                                                  Description

                                                  required to use the spin lock referenced by lock and initialize the lock to an unlocked state.

                                                  -

                                                  pthreads-w32 supports single and multiple processor systems +

                                                  pthreads-win32 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 +

                                                  pthreads-win32 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 +

                                                  pthreads-win32 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 pthreads-win32.


                                                  Table of Contents

                                                    diff --git a/manual/pthread_spin_lock.html b/manual/pthread_spin_lock.html index ccd1f60e..c05ce7d4 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 - pthreads-win32

                                                    Reference Index

                                                    Table of Contents

                                                    Name

                                                    @@ -26,7 +26,7 @@

                                                    Description

                                                    (that is, shall not return from the pthread_spin_lock call) until the lock becomes available. The results are undefined if the calling thread holds the lock at the time the call is made.

                                                    -

                                                    pthreads-w32 supports single and multiple processor systems +

                                                    pthreads-win32 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 pthreads-win32.


                                                    Table of Contents

                                                      diff --git a/manual/pthread_spin_unlock.html b/manual/pthread_spin_unlock.html index 735d6672..cb84b81d 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 - pthreads-win32

                                                      Reference Index

                                                      Table of Contents

                                                      Name

                                                      @@ -27,7 +27,7 @@

                                                      Description

                                                      pthread_spin_unlock is called, the lock becomes available and an unspecified spinning thread shall acquire the lock.

                                                      -

                                                      pthreads-w32 does not check ownership of the lock and it is +

                                                      pthreads-win32 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 +

                                                      pthreads-win32 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 pthreads-win32.


                                                      Table of Contents

                                                        diff --git a/manual/pthread_timechange_handler_np.html b/manual/pthread_timechange_handler_np.html index 8562af0a..112ead8b 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 - pthreads-win32

                                                        Reference Index

                                                        Table of Contents

                                                        Name

                                                        @@ -47,7 +47,7 @@

                                                        Errors

                                                        To indicate that not all condition variables were signalled for some reason.

                                                        Author

                                                        -

                                                        Ross Johnson for use with pthreads-w32.

                                                        +

                                                        Ross Johnson for use with pthreads-win32.


                                                        Table of Contents

                                                          diff --git a/manual/pthread_win32_attach_detach_np.html b/manual/pthread_win32_attach_detach_np.html index 9c8d803c..8aa9244f 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 - pthreads-win32

                                                          Reference Index

                                                          Table of Contents

                                                          Name

                                                          pthread_win32_process_attach_np, pthread_win32_process_detach_np, pthread_win32_thread_attach_np, pthread_win32_thread_detach_np ā€“ exposed versions of the -pthreads-w32 DLL dllMain() switch functionality for use when +pthreads-win32 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.

                                                          +pthreads-win32 initialisation fails.

                                                          Cancellation

                                                          None.

                                                          Return Value

                                                          @@ -45,7 +45,7 @@

                                                          Return ValueErrors

                                                          None.

                                                          Author

                                                          -

                                                          Ross Johnson for use with pthreads-w32.

                                                          +

                                                          Ross Johnson for use with pthreads-win32.


                                                          Table of Contents

                                                            diff --git a/manual/pthread_win32_getabstime_np.html b/manual/pthread_win32_getabstime_np.html index f5a68cda..498184a8 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

                                                            +pthreads-win32

                                                            Reference Index

                                                            Table of Contents

                                                            Name

                                                            @@ -47,7 +47,7 @@

                                                            Return

                                                            Errors

                                                            None.

                                                            Author

                                                            -

                                                            Ross Johnson for use with pthreads-w32.

                                                            +

                                                            Ross Johnson for use with pthreads-win32.


                                                            Table of Contents

                                                              diff --git a/manual/pthread_win32_test_features_np.html b/manual/pthread_win32_test_features_np.html index 473f5da1..3e38c7a2 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 - pthreads-win32

                                                              Reference Index

                                                              Table of Contents

                                                              Name

                                                              @@ -39,7 +39,7 @@

                                                              Return ValueErrors

                                                              None.

                                                              Author

                                                              -

                                                              Ross Johnson for use with pthreads-w32.

                                                              +

                                                              Ross Johnson for use with pthreads-win32.


                                                              Table of Contents

                                                                diff --git a/manual/sched_get_priority_max.html b/manual/sched_get_priority_max.html index 2b604924..dc4675bb 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 - pthreads-win32

                                                                Reference Index

                                                                Table of Contents

                                                                Name

                                                                @@ -75,7 +75,7 @@

                                                                Copyright

                                                                can be obtained online at http://www.opengroup.org/unix/online.html .

                                                                -

                                                                Modified by Ross Johnson for use with pthreads-w32.

                                                                +

                                                                Modified by Ross Johnson for use with pthreads-win32.


                                                                Table of Contents

                                                                  diff --git a/manual/sched_getscheduler.html b/manual/sched_getscheduler.html index b471d82f..1cda302d 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 - pthreads-win32

                                                                  Reference Index

                                                                  Table of Contents

                                                                  Name

                                                                  @@ -25,7 +25,7 @@

                                                                  Description

                                                                  The values that can be returned by sched_getscheduler are defined in the <sched.h> header.

                                                                  -

                                                                  pthreads-w32 only supports the SCHED_OTHER policy, +

                                                                  pthreads-win32 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 pthreads-win32.


                                                                  Table of Contents

                                                                    diff --git a/manual/sched_setaffinity.html b/manual/sched_setaffinity.html index fa9198da..0b0c0c4a 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 - pthreads-win32

                                                            Reference Index

                                                            Table of Contents

                                                            Name

                                                            @@ -46,7 +46,7 @@

                                                            Description

                                                            mask. The cpusetsize argument specifies the size (in bytes) of mask. If pid is zero, then the mask of the calling process is returned.

                                                            -

                                                            pthreads-w32 currently ignores the cpusetsize +

                                                            pthreads-win32 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 pthreads-win32.


                                                            Table of Contents

                                                              diff --git a/manual/sched_setscheduler.html b/manual/sched_setscheduler.html index 672168ef..19b47ffe 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 - pthreads-win32

                                                              Reference Index

                                                              Table of Contents

                                                              Name

                                                              @@ -32,7 +32,7 @@

                                                              Description

                                                              The possible values for the policy parameter are defined in the <sched.h> header.

                                                              -

                                                              pthreads-w32 only supports the SCHED_OTHER policy. +

                                                              pthreads-win32 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 pthreads-win32.


                                                              Table of Contents

                                                                diff --git a/manual/sched_yield.html b/manual/sched_yield.html index 1b42eec4..579e4ddd 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 - pthreads-win32

                                                                Reference Index

                                                                Table of Contents

                                                                Name

                                                                diff --git a/manual/sem_init.html b/manual/sem_init.html index 186a8ff8..643ac2ad 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 - pthreads-win32

                                                                Reference Index

                                                                Table of Contents

                                                                Name

                                                                @@ -45,7 +45,7 @@

                                                                Description

                                                                semaphore is local to the current process ( pshared is zero) or is to be shared between several processes ( pshared is not zero).

                                                                -

                                                                pthreads-w32 currently does not support process-shared +

                                                                pthreads-win32 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 pthreads-win32 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 pthreads-win32.

                                                                See Also

                                                                pthread_mutex_init(3) , pthread_cond_init(3) , diff --git a/pthread.c b/pthread.c index 896ecd1d..e0994244 100644 --- a/pthread.c +++ b/pthread.c @@ -35,6 +35,8 @@ * License along with this library 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 diff --git a/pthread.h b/pthread.h index 3b50beb5..ef991d5b 100644 --- a/pthread.h +++ b/pthread.h @@ -29,6 +29,8 @@ * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * -------------------------------------------------------------------------- */ #if !defined( PTHREAD_H ) diff --git a/pthread_attr_destroy.c b/pthread_attr_destroy.c index 7bb0e320..496aab47 100644 --- a/pthread_attr_destroy.c +++ b/pthread_attr_destroy.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_attr_getaffinity_np.c b/pthread_attr_getaffinity_np.c index cddbb69d..a66518b7 100644 --- a/pthread_attr_getaffinity_np.c +++ b/pthread_attr_getaffinity_np.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_attr_getdetachstate.c b/pthread_attr_getdetachstate.c index 93d61335..9689718a 100644 --- a/pthread_attr_getdetachstate.c +++ b/pthread_attr_getdetachstate.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_attr_getinheritsched.c b/pthread_attr_getinheritsched.c index 657624cc..ce8bad01 100644 --- a/pthread_attr_getinheritsched.c +++ b/pthread_attr_getinheritsched.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_attr_getname_np.c b/pthread_attr_getname_np.c index 110c02a4..8245ec7a 100644 --- a/pthread_attr_getname_np.c +++ b/pthread_attr_getname_np.c @@ -30,6 +30,8 @@ * License along with this library 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 diff --git a/pthread_attr_getschedparam.c b/pthread_attr_getschedparam.c index b7be1cba..95c7f4e5 100644 --- a/pthread_attr_getschedparam.c +++ b/pthread_attr_getschedparam.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_attr_getschedpolicy.c b/pthread_attr_getschedpolicy.c index f27f5ee3..7a6dd5be 100644 --- a/pthread_attr_getschedpolicy.c +++ b/pthread_attr_getschedpolicy.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_attr_getscope.c b/pthread_attr_getscope.c index c5c5f064..ce231f1e 100644 --- a/pthread_attr_getscope.c +++ b/pthread_attr_getscope.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_attr_getstackaddr.c b/pthread_attr_getstackaddr.c index 238a4495..a30f8455 100644 --- a/pthread_attr_getstackaddr.c +++ b/pthread_attr_getstackaddr.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_attr_getstacksize.c b/pthread_attr_getstacksize.c index 18ed57ef..7ac4963c 100644 --- a/pthread_attr_getstacksize.c +++ b/pthread_attr_getstacksize.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_attr_init.c b/pthread_attr_init.c index dbb7ffc1..1aaa9e24 100644 --- a/pthread_attr_init.c +++ b/pthread_attr_init.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_attr_setaffinity_np.c b/pthread_attr_setaffinity_np.c index e2b939ef..47a253d3 100644 --- a/pthread_attr_setaffinity_np.c +++ b/pthread_attr_setaffinity_np.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_attr_setdetachstate.c b/pthread_attr_setdetachstate.c index 02dd88bf..ddddf8d9 100644 --- a/pthread_attr_setdetachstate.c +++ b/pthread_attr_setdetachstate.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_attr_setinheritsched.c b/pthread_attr_setinheritsched.c index d551190c..a3777ab2 100644 --- a/pthread_attr_setinheritsched.c +++ b/pthread_attr_setinheritsched.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_attr_setname_np.c b/pthread_attr_setname_np.c index f20fefde..c05d7b70 100644 --- a/pthread_attr_setname_np.c +++ b/pthread_attr_setname_np.c @@ -30,6 +30,8 @@ * License along with this library 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 diff --git a/pthread_attr_setschedparam.c b/pthread_attr_setschedparam.c index 3505c9a5..7f5a7700 100644 --- a/pthread_attr_setschedparam.c +++ b/pthread_attr_setschedparam.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_attr_setschedpolicy.c b/pthread_attr_setschedpolicy.c index 5fe0c0c7..b38e3b8f 100644 --- a/pthread_attr_setschedpolicy.c +++ b/pthread_attr_setschedpolicy.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_attr_setscope.c b/pthread_attr_setscope.c index 96bc4941..7d282584 100644 --- a/pthread_attr_setscope.c +++ b/pthread_attr_setscope.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_attr_setstackaddr.c b/pthread_attr_setstackaddr.c index 834382c7..48e0c28a 100644 --- a/pthread_attr_setstackaddr.c +++ b/pthread_attr_setstackaddr.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_attr_setstacksize.c b/pthread_attr_setstacksize.c index 527d9a65..e11b790d 100644 --- a/pthread_attr_setstacksize.c +++ b/pthread_attr_setstacksize.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_barrier_destroy.c b/pthread_barrier_destroy.c index 61cd0cda..eb90c141 100644 --- a/pthread_barrier_destroy.c +++ b/pthread_barrier_destroy.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_barrier_init.c b/pthread_barrier_init.c index bc76fcd7..782dc366 100644 --- a/pthread_barrier_init.c +++ b/pthread_barrier_init.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_barrier_wait.c b/pthread_barrier_wait.c index 9d573afe..5259b5ad 100644 --- a/pthread_barrier_wait.c +++ b/pthread_barrier_wait.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_barrierattr_destroy.c b/pthread_barrierattr_destroy.c index d8953a9b..349f58de 100644 --- a/pthread_barrierattr_destroy.c +++ b/pthread_barrierattr_destroy.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_barrierattr_getpshared.c b/pthread_barrierattr_getpshared.c index 7d9736c0..5593649b 100644 --- a/pthread_barrierattr_getpshared.c +++ b/pthread_barrierattr_getpshared.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_barrierattr_init.c b/pthread_barrierattr_init.c index aef72b4f..2de93e36 100644 --- a/pthread_barrierattr_init.c +++ b/pthread_barrierattr_init.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_barrierattr_setpshared.c b/pthread_barrierattr_setpshared.c index 7f5dc549..b22b89fb 100644 --- a/pthread_barrierattr_setpshared.c +++ b/pthread_barrierattr_setpshared.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_cancel.c b/pthread_cancel.c index 422ca037..e435f00d 100644 --- a/pthread_cancel.c +++ b/pthread_cancel.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_cond_destroy.c b/pthread_cond_destroy.c index 12e76330..70abd48c 100644 --- a/pthread_cond_destroy.c +++ b/pthread_cond_destroy.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/pthread_cond_init.c b/pthread_cond_init.c index b9379a37..2a5a7a50 100644 --- a/pthread_cond_init.c +++ b/pthread_cond_init.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/pthread_condattr_destroy.c b/pthread_condattr_destroy.c index 696065ef..fac08dbb 100644 --- a/pthread_condattr_destroy.c +++ b/pthread_condattr_destroy.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/pthread_condattr_getpshared.c b/pthread_condattr_getpshared.c index dc161a9d..5b9d23d4 100644 --- a/pthread_condattr_getpshared.c +++ b/pthread_condattr_getpshared.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/pthread_condattr_init.c b/pthread_condattr_init.c index aa32cc6d..f369bd44 100644 --- a/pthread_condattr_init.c +++ b/pthread_condattr_init.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/pthread_condattr_setpshared.c b/pthread_condattr_setpshared.c index 977b5a5c..2b6cde59 100644 --- a/pthread_condattr_setpshared.c +++ b/pthread_condattr_setpshared.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/pthread_delay_np.c b/pthread_delay_np.c index 76a54b65..87dda299 100644 --- a/pthread_delay_np.c +++ b/pthread_delay_np.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_detach.c b/pthread_detach.c index 7aa4fe35..e93f5054 100644 --- a/pthread_detach.c +++ b/pthread_detach.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/pthread_equal.c b/pthread_equal.c index 48da7e20..3c9e0c0a 100644 --- a/pthread_equal.c +++ b/pthread_equal.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_exit.c b/pthread_exit.c index 9eb107bf..1c3387dc 100644 --- a/pthread_exit.c +++ b/pthread_exit.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/pthread_getconcurrency.c b/pthread_getconcurrency.c index de46fe7c..c91d4adb 100644 --- a/pthread_getconcurrency.c +++ b/pthread_getconcurrency.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_getname_np.c b/pthread_getname_np.c index 35bb1bd2..f7a40679 100644 --- a/pthread_getname_np.c +++ b/pthread_getname_np.c @@ -30,6 +30,8 @@ * License along with this library 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 diff --git a/pthread_getschedparam.c b/pthread_getschedparam.c index 9e61d649..01b39b25 100644 --- a/pthread_getschedparam.c +++ b/pthread_getschedparam.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_getspecific.c b/pthread_getspecific.c index 77caa6b1..89fc357c 100644 --- a/pthread_getspecific.c +++ b/pthread_getspecific.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_getunique_np.c b/pthread_getunique_np.c index 55031f04..d46beabb 100755 --- a/pthread_getunique_np.c +++ b/pthread_getunique_np.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_getw32threadhandle_np.c b/pthread_getw32threadhandle_np.c index b6ab544d..24ef41e3 100644 --- a/pthread_getw32threadhandle_np.c +++ b/pthread_getw32threadhandle_np.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_join.c b/pthread_join.c index 96372551..674e7396 100644 --- a/pthread_join.c +++ b/pthread_join.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/pthread_key_create.c b/pthread_key_create.c index 91892e5d..0737320b 100644 --- a/pthread_key_create.c +++ b/pthread_key_create.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_key_delete.c b/pthread_key_delete.c index 7f2998ec..7da76608 100644 --- a/pthread_key_delete.c +++ b/pthread_key_delete.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_kill.c b/pthread_kill.c index 8ddfcd63..d07fb324 100644 --- a/pthread_kill.c +++ b/pthread_kill.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_mutex_consistent.c b/pthread_mutex_consistent.c index 053a5a6c..156f6634 100755 --- a/pthread_mutex_consistent.c +++ b/pthread_mutex_consistent.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_mutex_destroy.c b/pthread_mutex_destroy.c index 545d0839..7f9fb5b9 100644 --- a/pthread_mutex_destroy.c +++ b/pthread_mutex_destroy.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_mutex_init.c b/pthread_mutex_init.c index 279d4f86..fa237aa6 100644 --- a/pthread_mutex_init.c +++ b/pthread_mutex_init.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_mutex_lock.c b/pthread_mutex_lock.c index cc19234a..b033b437 100644 --- a/pthread_mutex_lock.c +++ b/pthread_mutex_lock.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_mutex_timedlock.c b/pthread_mutex_timedlock.c index 851c60aa..03ebda95 100644 --- a/pthread_mutex_timedlock.c +++ b/pthread_mutex_timedlock.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_mutex_trylock.c b/pthread_mutex_trylock.c index 1f03419c..58040d29 100644 --- a/pthread_mutex_trylock.c +++ b/pthread_mutex_trylock.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_mutex_unlock.c b/pthread_mutex_unlock.c index 080f7f80..32810e39 100644 --- a/pthread_mutex_unlock.c +++ b/pthread_mutex_unlock.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_mutexattr_destroy.c b/pthread_mutexattr_destroy.c index ae8428cc..0e301dea 100644 --- a/pthread_mutexattr_destroy.c +++ b/pthread_mutexattr_destroy.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_mutexattr_getkind_np.c b/pthread_mutexattr_getkind_np.c index 13903b87..f1b2fd89 100644 --- a/pthread_mutexattr_getkind_np.c +++ b/pthread_mutexattr_getkind_np.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_mutexattr_getpshared.c b/pthread_mutexattr_getpshared.c index b285d2d2..78bfe118 100644 --- a/pthread_mutexattr_getpshared.c +++ b/pthread_mutexattr_getpshared.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_mutexattr_getrobust.c b/pthread_mutexattr_getrobust.c index 28c28657..5810dade 100755 --- a/pthread_mutexattr_getrobust.c +++ b/pthread_mutexattr_getrobust.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_mutexattr_gettype.c b/pthread_mutexattr_gettype.c index a6e4cdb8..5a886328 100644 --- a/pthread_mutexattr_gettype.c +++ b/pthread_mutexattr_gettype.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_mutexattr_init.c b/pthread_mutexattr_init.c index 037b88b3..a8ed9972 100644 --- a/pthread_mutexattr_init.c +++ b/pthread_mutexattr_init.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_mutexattr_setkind_np.c b/pthread_mutexattr_setkind_np.c index 3d55d821..4fd79b43 100644 --- a/pthread_mutexattr_setkind_np.c +++ b/pthread_mutexattr_setkind_np.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_mutexattr_setpshared.c b/pthread_mutexattr_setpshared.c index 997f469a..a2623e52 100644 --- a/pthread_mutexattr_setpshared.c +++ b/pthread_mutexattr_setpshared.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_mutexattr_setrobust.c b/pthread_mutexattr_setrobust.c index 4f18b489..16c8659c 100755 --- a/pthread_mutexattr_setrobust.c +++ b/pthread_mutexattr_setrobust.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_mutexattr_settype.c b/pthread_mutexattr_settype.c index bb650eb4..6b8436bd 100644 --- a/pthread_mutexattr_settype.c +++ b/pthread_mutexattr_settype.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_num_processors_np.c b/pthread_num_processors_np.c index f94b074d..856bb905 100644 --- a/pthread_num_processors_np.c +++ b/pthread_num_processors_np.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_once.c b/pthread_once.c index 84ce0269..ac518247 100644 --- a/pthread_once.c +++ b/pthread_once.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_rwlock_destroy.c b/pthread_rwlock_destroy.c index edb6338b..d83f6fc5 100644 --- a/pthread_rwlock_destroy.c +++ b/pthread_rwlock_destroy.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_rwlock_init.c b/pthread_rwlock_init.c index 90a66946..7ca93f6a 100644 --- a/pthread_rwlock_init.c +++ b/pthread_rwlock_init.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_rwlock_rdlock.c b/pthread_rwlock_rdlock.c index 4d0d393c..b4388a52 100644 --- a/pthread_rwlock_rdlock.c +++ b/pthread_rwlock_rdlock.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_rwlock_timedrdlock.c b/pthread_rwlock_timedrdlock.c index ed281f3d..856be6ee 100644 --- a/pthread_rwlock_timedrdlock.c +++ b/pthread_rwlock_timedrdlock.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_rwlock_timedwrlock.c b/pthread_rwlock_timedwrlock.c index 7622d97f..2b245cb3 100644 --- a/pthread_rwlock_timedwrlock.c +++ b/pthread_rwlock_timedwrlock.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_rwlock_tryrdlock.c b/pthread_rwlock_tryrdlock.c index 5660b5ad..103b5f57 100644 --- a/pthread_rwlock_tryrdlock.c +++ b/pthread_rwlock_tryrdlock.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_rwlock_trywrlock.c b/pthread_rwlock_trywrlock.c index f12df055..c9702781 100644 --- a/pthread_rwlock_trywrlock.c +++ b/pthread_rwlock_trywrlock.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_rwlock_unlock.c b/pthread_rwlock_unlock.c index 63feac3e..6b509052 100644 --- a/pthread_rwlock_unlock.c +++ b/pthread_rwlock_unlock.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_rwlock_wrlock.c b/pthread_rwlock_wrlock.c index 722a673f..21402d87 100644 --- a/pthread_rwlock_wrlock.c +++ b/pthread_rwlock_wrlock.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_rwlockattr_destroy.c b/pthread_rwlockattr_destroy.c index e9e3407b..bd98331e 100644 --- a/pthread_rwlockattr_destroy.c +++ b/pthread_rwlockattr_destroy.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_rwlockattr_getpshared.c b/pthread_rwlockattr_getpshared.c index 4de7d30e..dc8a41bd 100644 --- a/pthread_rwlockattr_getpshared.c +++ b/pthread_rwlockattr_getpshared.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_rwlockattr_init.c b/pthread_rwlockattr_init.c index 994b7ec0..e6a5a1e7 100644 --- a/pthread_rwlockattr_init.c +++ b/pthread_rwlockattr_init.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_rwlockattr_setpshared.c b/pthread_rwlockattr_setpshared.c index 0263c11f..0094675c 100644 --- a/pthread_rwlockattr_setpshared.c +++ b/pthread_rwlockattr_setpshared.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_self.c b/pthread_self.c index 585ea810..51b6dbf6 100644 --- a/pthread_self.c +++ b/pthread_self.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_setaffinity.c b/pthread_setaffinity.c index b72f490e..abc9c034 100644 --- a/pthread_setaffinity.c +++ b/pthread_setaffinity.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_setcancelstate.c b/pthread_setcancelstate.c index 15268257..1bf7d212 100644 --- a/pthread_setcancelstate.c +++ b/pthread_setcancelstate.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_setcanceltype.c b/pthread_setcanceltype.c index 41ecfe0d..2eb8a1e1 100644 --- a/pthread_setcanceltype.c +++ b/pthread_setcanceltype.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_setconcurrency.c b/pthread_setconcurrency.c index 1861f96e..8b669a13 100644 --- a/pthread_setconcurrency.c +++ b/pthread_setconcurrency.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_setname_np.c b/pthread_setname_np.c index 98003e97..d9c4f3aa 100644 --- a/pthread_setname_np.c +++ b/pthread_setname_np.c @@ -30,6 +30,8 @@ * License along with this library 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 diff --git a/pthread_setschedparam.c b/pthread_setschedparam.c index 2222a491..fc9deca2 100644 --- a/pthread_setschedparam.c +++ b/pthread_setschedparam.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_setspecific.c b/pthread_setspecific.c index 044308b8..be6a813b 100644 --- a/pthread_setspecific.c +++ b/pthread_setspecific.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_spin_destroy.c b/pthread_spin_destroy.c index 8309a090..a4d48115 100644 --- a/pthread_spin_destroy.c +++ b/pthread_spin_destroy.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_spin_init.c b/pthread_spin_init.c index ae3406f6..51b533b5 100644 --- a/pthread_spin_init.c +++ b/pthread_spin_init.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_spin_lock.c b/pthread_spin_lock.c index 300ce97c..c8a70d0b 100644 --- a/pthread_spin_lock.c +++ b/pthread_spin_lock.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_spin_trylock.c b/pthread_spin_trylock.c index 51fc879e..ee16ef7d 100644 --- a/pthread_spin_trylock.c +++ b/pthread_spin_trylock.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_spin_unlock.c b/pthread_spin_unlock.c index 762584ce..4be1e051 100644 --- a/pthread_spin_unlock.c +++ b/pthread_spin_unlock.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_testcancel.c b/pthread_testcancel.c index f6958563..6d1a12f5 100644 --- a/pthread_testcancel.c +++ b/pthread_testcancel.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_timechange_handler_np.c b/pthread_timechange_handler_np.c index 98934e3c..c959ea7e 100644 --- a/pthread_timechange_handler_np.c +++ b/pthread_timechange_handler_np.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/pthread_timedjoin_np.c b/pthread_timedjoin_np.c index 229662b2..3cf12442 100644 --- a/pthread_timedjoin_np.c +++ b/pthread_timedjoin_np.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/pthread_tryjoin_np.c b/pthread_tryjoin_np.c index 102d05bf..7e131cc3 100644 --- a/pthread_tryjoin_np.c +++ b/pthread_tryjoin_np.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/pthread_win32_attach_detach_np.c b/pthread_win32_attach_detach_np.c index 9d00d304..4a85e5fb 100644 --- a/pthread_win32_attach_detach_np.c +++ b/pthread_win32_attach_detach_np.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/ptw32_MCS_lock.c b/ptw32_MCS_lock.c index 25701048..3e574f57 100644 --- a/ptw32_MCS_lock.c +++ b/ptw32_MCS_lock.c @@ -33,6 +33,8 @@ * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * -------------------------------------------------------------------------- */ /* diff --git a/ptw32_callUserDestroyRoutines.c b/ptw32_callUserDestroyRoutines.c index bf82a60e..75506983 100644 --- a/ptw32_callUserDestroyRoutines.c +++ b/ptw32_callUserDestroyRoutines.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/ptw32_calloc.c b/ptw32_calloc.c index b01c335e..8999efb6 100644 --- a/ptw32_calloc.c +++ b/ptw32_calloc.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/ptw32_cond_check_need_init.c b/ptw32_cond_check_need_init.c index 251678cc..302602b2 100644 --- a/ptw32_cond_check_need_init.c +++ b/ptw32_cond_check_need_init.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/ptw32_getprocessors.c b/ptw32_getprocessors.c index 4ac3cce9..f61f7f50 100644 --- a/ptw32_getprocessors.c +++ b/ptw32_getprocessors.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/ptw32_is_attr.c b/ptw32_is_attr.c index 80917cfb..31aeeec5 100644 --- a/ptw32_is_attr.c +++ b/ptw32_is_attr.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/ptw32_mutex_check_need_init.c b/ptw32_mutex_check_need_init.c index 846a4b7c..d87aaea3 100644 --- a/ptw32_mutex_check_need_init.c +++ b/ptw32_mutex_check_need_init.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/ptw32_new.c b/ptw32_new.c index 3f89b351..36673873 100644 --- a/ptw32_new.c +++ b/ptw32_new.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/ptw32_processInitialize.c b/ptw32_processInitialize.c index f0c91221..061d7d99 100644 --- a/ptw32_processInitialize.c +++ b/ptw32_processInitialize.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/ptw32_processTerminate.c b/ptw32_processTerminate.c index 035bac6d..53d6a5c8 100644 --- a/ptw32_processTerminate.c +++ b/ptw32_processTerminate.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/ptw32_relmillisecs.c b/ptw32_relmillisecs.c index 221019c6..07ec10e9 100644 --- a/ptw32_relmillisecs.c +++ b/ptw32_relmillisecs.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/ptw32_reuse.c b/ptw32_reuse.c index 6495636d..61c544bb 100644 --- a/ptw32_reuse.c +++ b/ptw32_reuse.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/ptw32_rwlock_cancelwrwait.c b/ptw32_rwlock_cancelwrwait.c index 9d5630c3..d85e1186 100644 --- a/ptw32_rwlock_cancelwrwait.c +++ b/ptw32_rwlock_cancelwrwait.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/ptw32_rwlock_check_need_init.c b/ptw32_rwlock_check_need_init.c index 8e24da88..e7b9c00e 100644 --- a/ptw32_rwlock_check_need_init.c +++ b/ptw32_rwlock_check_need_init.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/ptw32_semwait.c b/ptw32_semwait.c index 607050eb..9018c76c 100644 --- a/ptw32_semwait.c +++ b/ptw32_semwait.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/ptw32_spinlock_check_need_init.c b/ptw32_spinlock_check_need_init.c index 1cd0ff3f..11265a84 100644 --- a/ptw32_spinlock_check_need_init.c +++ b/ptw32_spinlock_check_need_init.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/ptw32_threadDestroy.c b/ptw32_threadDestroy.c index 13c91807..70815e48 100644 --- a/ptw32_threadDestroy.c +++ b/ptw32_threadDestroy.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/ptw32_threadStart.c b/ptw32_threadStart.c index 617e7816..a1227d37 100644 --- a/ptw32_threadStart.c +++ b/ptw32_threadStart.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/ptw32_throw.c b/ptw32_throw.c index f34cfadb..2de4143d 100644 --- a/ptw32_throw.c +++ b/ptw32_throw.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/ptw32_timespec.c b/ptw32_timespec.c index 3de71e09..2263cf9c 100644 --- a/ptw32_timespec.c +++ b/ptw32_timespec.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/ptw32_tkAssocCreate.c b/ptw32_tkAssocCreate.c index 85569be3..2dadb778 100644 --- a/ptw32_tkAssocCreate.c +++ b/ptw32_tkAssocCreate.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/ptw32_tkAssocDestroy.c b/ptw32_tkAssocDestroy.c index 87f78abe..bd0d58cc 100644 --- a/ptw32_tkAssocDestroy.c +++ b/ptw32_tkAssocDestroy.c @@ -34,6 +34,8 @@ * License along with this library 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 diff --git a/sched.h b/sched.h index 6c0c104f..e7705d14 100644 --- a/sched.h +++ b/sched.h @@ -36,6 +36,8 @@ * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * -------------------------------------------------------------------------- */ #if !defined(_SCHED_H) #define _SCHED_H diff --git a/sched_get_priority_max.c b/sched_get_priority_max.c index e05867b7..908d22bb 100644 --- a/sched_get_priority_max.c +++ b/sched_get_priority_max.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/sched_get_priority_min.c b/sched_get_priority_min.c index 2c8a6560..ff2eda1d 100644 --- a/sched_get_priority_min.c +++ b/sched_get_priority_min.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/sched_getscheduler.c b/sched_getscheduler.c index b9bf93f6..4aa495b6 100644 --- a/sched_getscheduler.c +++ b/sched_getscheduler.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/sched_setaffinity.c b/sched_setaffinity.c index 01258fda..13a0c82a 100644 --- a/sched_setaffinity.c +++ b/sched_setaffinity.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/sched_setscheduler.c b/sched_setscheduler.c index 576213f7..d738a71d 100644 --- a/sched_setscheduler.c +++ b/sched_setscheduler.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/sched_yield.c b/sched_yield.c index 30de449b..a4f83bb0 100644 --- a/sched_yield.c +++ b/sched_yield.c @@ -33,6 +33,8 @@ * License along with this library 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 diff --git a/sem_close.c b/sem_close.c index 5e86ae82..f08c9794 100644 --- a/sem_close.c +++ b/sem_close.c @@ -40,6 +40,8 @@ * License along with this library 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 diff --git a/sem_destroy.c b/sem_destroy.c index aeb01e42..e2d0fa12 100644 --- a/sem_destroy.c +++ b/sem_destroy.c @@ -40,6 +40,8 @@ * License along with this library 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 diff --git a/sem_getvalue.c b/sem_getvalue.c index 144d85c6..9734a45c 100644 --- a/sem_getvalue.c +++ b/sem_getvalue.c @@ -40,6 +40,8 @@ * License along with this library 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 diff --git a/sem_init.c b/sem_init.c index 0108ed4e..f6fde560 100644 --- a/sem_init.c +++ b/sem_init.c @@ -38,6 +38,8 @@ * License along with this library 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 diff --git a/sem_open.c b/sem_open.c index 54c34eb1..27216eab 100644 --- a/sem_open.c +++ b/sem_open.c @@ -40,6 +40,8 @@ * License along with this library 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 diff --git a/sem_post.c b/sem_post.c index d89d26f6..fea4df5b 100644 --- a/sem_post.c +++ b/sem_post.c @@ -40,6 +40,8 @@ * License along with this library 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 diff --git a/sem_post_multiple.c b/sem_post_multiple.c index 00b12bb2..80ef485f 100644 --- a/sem_post_multiple.c +++ b/sem_post_multiple.c @@ -40,6 +40,8 @@ * License along with this library 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 diff --git a/sem_timedwait.c b/sem_timedwait.c index 4b09b74b..6f9e26df 100644 --- a/sem_timedwait.c +++ b/sem_timedwait.c @@ -40,6 +40,8 @@ * License along with this library 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 diff --git a/sem_trywait.c b/sem_trywait.c index 15fb1f03..4e47406b 100644 --- a/sem_trywait.c +++ b/sem_trywait.c @@ -40,6 +40,8 @@ * License along with this library 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 diff --git a/sem_unlink.c b/sem_unlink.c index 26bc442c..c782a96b 100644 --- a/sem_unlink.c +++ b/sem_unlink.c @@ -40,6 +40,8 @@ * License along with this library 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 diff --git a/sem_wait.c b/sem_wait.c index fb392981..ec577440 100644 --- a/sem_wait.c +++ b/sem_wait.c @@ -40,6 +40,8 @@ * License along with this library 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 diff --git a/semaphore.h b/semaphore.h index 85b9544b..56623cfa 100644 --- a/semaphore.h +++ b/semaphore.h @@ -36,6 +36,8 @@ * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * -------------------------------------------------------------------------- */ #if !defined( SEMAPHORE_H ) #define SEMAPHORE_H diff --git a/signal.c b/signal.c index 845019d3..4d3e93f4 100644 --- a/signal.c +++ b/signal.c @@ -33,6 +33,8 @@ * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * -------------------------------------------------------------------------- */ /* diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index 5e5e7ade..623ee201 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -3,9 +3,9 @@ # # -------------------------------------------------------------------------- # -# pthreads-w32 / Pthreads4w - POSIX Threads for Windows +# pthreads-win32 / Pthreads4w - POSIX Threads for Windows # Copyright 1998 John E. Bossom -# Copyright 1999-2018, pthreads-w32 / Pthreads4w contributors +# Copyright 1999-2018, pthreads-win32 / Pthreads4w contributors # # Homepage: http://sources.redhat.com/pthreads-win32 # @@ -31,6 +31,8 @@ # if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # +# -------------------------------------------------------------------------- +# srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ diff --git a/tests/detach1.c b/tests/detach1.c index 4eb8cb73..273ccf25 100644 --- a/tests/detach1.c +++ b/tests/detach1.c @@ -82,7 +82,7 @@ main(int argc, char * argv[]) /* * Check that all threads are now invalid. * This relies on unique thread IDs - e.g. works with - * pthreads-w32 or Solaris, but may not work for Linux, BSD etc. + * pthreads-win32 or Solaris, but may not work for Linux, BSD etc. */ for (i = 0; i < NUMTHREADS; i++) { diff --git a/version.rc b/version.rc index 88c643b6..353ed595 100644 --- a/version.rc +++ b/version.rc @@ -29,6 +29,8 @@ * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * -------------------------------------------------------------------------- */ #include diff --git a/w32_CancelableWait.c b/w32_CancelableWait.c index 511e6c12..c342354c 100644 --- a/w32_CancelableWait.c +++ b/w32_CancelableWait.c @@ -33,6 +33,8 @@ * License along with this library 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 From 8d1cec3cd8e113754c83846fcf074e43cb5cfc6f Mon Sep 17 00:00:00 2001 From: Ger Hobbelt Date: Wed, 14 Apr 2021 12:00:39 +0200 Subject: [PATCH 207/207] copyright linee and name fix for pre-merge --- GNUmakefile.in | 6 +++--- README.md | 6 +++--- _ptw32.h | 4 ++-- aclocal.m4 | 4 ++-- cleanup.c | 6 +++--- cmake/version.rc.in | 6 +++--- configure.ac | 4 ++-- context.h | 4 ++-- create.c | 6 +++--- dll.c | 6 +++--- docs/ANNOUNCE.md | 2 +- docs/ChangeLog.md | 2 +- docs/FAQ.md | 4 ++-- docs/NOTICE.md | 4 ++-- docs/README.md | 2 +- errno.c | 6 +++--- global.c | 6 +++--- implement.h | 4 ++-- pthread.c | 6 +++--- pthread.h | 4 ++-- pthread_attr_destroy.c | 6 +++--- pthread_attr_getaffinity_np.c | 6 +++--- pthread_attr_getdetachstate.c | 6 +++--- pthread_attr_getinheritsched.c | 6 +++--- pthread_attr_getname_np.c | 6 +++--- pthread_attr_getschedparam.c | 6 +++--- pthread_attr_getschedpolicy.c | 6 +++--- pthread_attr_getscope.c | 6 +++--- pthread_attr_getstackaddr.c | 6 +++--- pthread_attr_getstacksize.c | 6 +++--- pthread_attr_init.c | 6 +++--- pthread_attr_setaffinity_np.c | 6 +++--- pthread_attr_setdetachstate.c | 6 +++--- pthread_attr_setinheritsched.c | 6 +++--- pthread_attr_setname_np.c | 6 +++--- pthread_attr_setschedparam.c | 6 +++--- pthread_attr_setschedpolicy.c | 6 +++--- pthread_attr_setscope.c | 6 +++--- pthread_attr_setstackaddr.c | 6 +++--- pthread_attr_setstacksize.c | 6 +++--- pthread_barrier_destroy.c | 6 +++--- pthread_barrier_init.c | 6 +++--- pthread_barrier_wait.c | 6 +++--- pthread_barrierattr_destroy.c | 6 +++--- pthread_barrierattr_getpshared.c | 6 +++--- pthread_barrierattr_init.c | 6 +++--- pthread_barrierattr_setpshared.c | 6 +++--- pthread_cancel.c | 6 +++--- pthread_cond_destroy.c | 6 +++--- pthread_cond_init.c | 6 +++--- pthread_cond_signal.c | 6 +++--- pthread_cond_wait.c | 6 +++--- pthread_condattr_destroy.c | 6 +++--- pthread_condattr_getpshared.c | 6 +++--- pthread_condattr_init.c | 6 +++--- pthread_condattr_setpshared.c | 6 +++--- pthread_delay_np.c | 6 +++--- pthread_detach.c | 6 +++--- pthread_equal.c | 6 +++--- pthread_exit.c | 6 +++--- pthread_getconcurrency.c | 6 +++--- pthread_getname_np.c | 6 +++--- pthread_getschedparam.c | 6 +++--- pthread_getspecific.c | 6 +++--- pthread_getunique_np.c | 6 +++--- pthread_getw32threadhandle_np.c | 6 +++--- pthread_join.c | 6 +++--- pthread_key_create.c | 6 +++--- pthread_key_delete.c | 6 +++--- pthread_kill.c | 6 +++--- pthread_mutex_consistent.c | 6 +++--- pthread_mutex_destroy.c | 6 +++--- pthread_mutex_init.c | 6 +++--- pthread_mutex_lock.c | 6 +++--- pthread_mutex_timedlock.c | 6 +++--- pthread_mutex_trylock.c | 6 +++--- pthread_mutex_unlock.c | 6 +++--- pthread_mutexattr_destroy.c | 6 +++--- pthread_mutexattr_getkind_np.c | 6 +++--- pthread_mutexattr_getpshared.c | 6 +++--- pthread_mutexattr_getrobust.c | 6 +++--- pthread_mutexattr_gettype.c | 6 +++--- pthread_mutexattr_init.c | 6 +++--- pthread_mutexattr_setkind_np.c | 6 +++--- pthread_mutexattr_setpshared.c | 6 +++--- pthread_mutexattr_setrobust.c | 6 +++--- pthread_mutexattr_settype.c | 6 +++--- pthread_num_processors_np.c | 6 +++--- pthread_once.c | 6 +++--- pthread_rwlock_destroy.c | 6 +++--- pthread_rwlock_init.c | 6 +++--- pthread_rwlock_rdlock.c | 6 +++--- pthread_rwlock_timedrdlock.c | 6 +++--- pthread_rwlock_timedwrlock.c | 6 +++--- pthread_rwlock_tryrdlock.c | 6 +++--- pthread_rwlock_trywrlock.c | 6 +++--- pthread_rwlock_unlock.c | 6 +++--- pthread_rwlock_wrlock.c | 6 +++--- pthread_rwlockattr_destroy.c | 6 +++--- pthread_rwlockattr_getpshared.c | 6 +++--- pthread_rwlockattr_init.c | 6 +++--- pthread_rwlockattr_setpshared.c | 6 +++--- pthread_self.c | 6 +++--- pthread_setaffinity.c | 6 +++--- pthread_setcancelstate.c | 6 +++--- pthread_setcanceltype.c | 6 +++--- pthread_setconcurrency.c | 6 +++--- pthread_setname_np.c | 6 +++--- pthread_setschedparam.c | 6 +++--- pthread_setspecific.c | 6 +++--- pthread_spin_destroy.c | 6 +++--- pthread_spin_init.c | 6 +++--- pthread_spin_lock.c | 6 +++--- pthread_spin_trylock.c | 6 +++--- pthread_spin_unlock.c | 6 +++--- pthread_testcancel.c | 6 +++--- pthread_timechange_handler_np.c | 6 +++--- pthread_timedjoin_np.c | 6 +++--- pthread_tryjoin_np.c | 6 +++--- pthread_win32_attach_detach_np.c | 6 +++--- ptw32_MCS_lock.c | 6 +++--- ptw32_callUserDestroyRoutines.c | 6 +++--- ptw32_calloc.c | 6 +++--- ptw32_cond_check_need_init.c | 6 +++--- ptw32_getprocessors.c | 6 +++--- ptw32_is_attr.c | 6 +++--- ptw32_mutex_check_need_init.c | 6 +++--- ptw32_new.c | 6 +++--- ptw32_processInitialize.c | 6 +++--- ptw32_processTerminate.c | 6 +++--- ptw32_relmillisecs.c | 6 +++--- ptw32_reuse.c | 6 +++--- ptw32_rwlock_cancelwrwait.c | 6 +++--- ptw32_rwlock_check_need_init.c | 6 +++--- ptw32_semwait.c | 6 +++--- ptw32_spinlock_check_need_init.c | 6 +++--- ptw32_threadDestroy.c | 6 +++--- ptw32_threadStart.c | 6 +++--- ptw32_throw.c | 6 +++--- ptw32_timespec.c | 6 +++--- ptw32_tkAssocCreate.c | 6 +++--- ptw32_tkAssocDestroy.c | 6 +++--- sched.h | 4 ++-- sched_get_priority_max.c | 6 +++--- sched_get_priority_min.c | 6 +++--- sched_getscheduler.c | 6 +++--- sched_setaffinity.c | 6 +++--- sched_setscheduler.c | 6 +++--- sched_yield.c | 6 +++--- sem_close.c | 6 +++--- sem_destroy.c | 6 +++--- sem_getvalue.c | 6 +++--- sem_init.c | 6 +++--- sem_open.c | 6 +++--- sem_post.c | 6 +++--- sem_post_multiple.c | 6 +++--- sem_timedwait.c | 6 +++--- sem_trywait.c | 6 +++--- sem_unlink.c | 6 +++--- sem_wait.c | 6 +++--- semaphore.h | 4 ++-- signal.c | 6 +++--- tests/Bmakefile | 4 ++-- tests/GNUmakefile.in | 4 ++-- tests/Wmakefile | 4 ++-- tests/affinity1.c | 4 ++-- tests/affinity2.c | 4 ++-- tests/affinity3.c | 4 ++-- tests/affinity4.c | 4 ++-- tests/affinity5.c | 4 ++-- tests/affinity6.c | 4 ++-- tests/barrier1.c | 4 ++-- tests/barrier2.c | 4 ++-- tests/barrier3.c | 4 ++-- tests/barrier4.c | 4 ++-- tests/barrier5.c | 4 ++-- tests/barrier6.c | 4 ++-- tests/benchlib.c | 4 ++-- tests/benchtest.h | 4 ++-- tests/benchtest1.c | 4 ++-- tests/benchtest2.c | 4 ++-- tests/benchtest3.c | 4 ++-- tests/benchtest4.c | 4 ++-- tests/benchtest5.c | 4 ++-- tests/cancel1.c | 4 ++-- tests/cancel2.c | 4 ++-- tests/cancel3.c | 4 ++-- tests/cancel4.c | 4 ++-- tests/cancel5.c | 4 ++-- tests/cancel6a.c | 4 ++-- tests/cancel6d.c | 4 ++-- tests/cancel7.c | 4 ++-- tests/cancel8.c | 4 ++-- tests/cancel9.c | 4 ++-- tests/cleanup0.c | 4 ++-- tests/cleanup1.c | 4 ++-- tests/cleanup2.c | 4 ++-- tests/cleanup3.c | 4 ++-- tests/condvar1.c | 4 ++-- tests/condvar1_1.c | 4 ++-- tests/condvar1_2.c | 4 ++-- tests/condvar2.c | 4 ++-- tests/condvar2_1.c | 4 ++-- tests/condvar3.c | 4 ++-- tests/condvar3_1.c | 4 ++-- tests/condvar3_2.c | 4 ++-- tests/condvar3_3.c | 4 ++-- tests/condvar4.c | 4 ++-- tests/condvar5.c | 4 ++-- tests/condvar6.c | 4 ++-- tests/condvar7.c | 4 ++-- tests/condvar8.c | 4 ++-- tests/condvar9.c | 4 ++-- tests/context1.c | 4 ++-- tests/context2.c | 4 ++-- tests/count1.c | 4 ++-- tests/create1.c | 4 ++-- tests/create2.c | 4 ++-- tests/create3.c | 4 ++-- tests/delay1.c | 4 ++-- tests/delay2.c | 4 ++-- tests/detach1.c | 4 ++-- tests/equal0.c | 4 ++-- tests/equal1.c | 4 ++-- tests/errno0.c | 4 ++-- tests/errno1.c | 4 ++-- tests/exception1.c | 4 ++-- tests/exception2.c | 4 ++-- tests/exception3.c | 4 ++-- tests/exception3_0.c | 4 ++-- tests/exit1.c | 4 ++-- tests/exit2.c | 4 ++-- tests/exit3.c | 4 ++-- tests/exit4.c | 4 ++-- tests/exit5.c | 4 ++-- tests/eyal1.c | 4 ++-- tests/inherit1.c | 4 ++-- tests/join0.c | 4 ++-- tests/join1.c | 4 ++-- tests/join2.c | 4 ++-- tests/join3.c | 4 ++-- tests/join4.c | 4 ++-- tests/kill1.c | 4 ++-- tests/mutex1.c | 4 ++-- tests/mutex1e.c | 4 ++-- tests/mutex1n.c | 4 ++-- tests/mutex1r.c | 4 ++-- tests/mutex2.c | 4 ++-- tests/mutex2e.c | 4 ++-- tests/mutex2r.c | 4 ++-- tests/mutex3.c | 4 ++-- tests/mutex3e.c | 4 ++-- tests/mutex3r.c | 4 ++-- tests/mutex4.c | 4 ++-- tests/mutex5.c | 4 ++-- tests/mutex6.c | 4 ++-- tests/mutex6e.c | 4 ++-- tests/mutex6es.c | 4 ++-- tests/mutex6n.c | 4 ++-- tests/mutex6r.c | 4 ++-- tests/mutex6rs.c | 4 ++-- tests/mutex6s.c | 4 ++-- tests/mutex7.c | 4 ++-- tests/mutex7e.c | 4 ++-- tests/mutex7n.c | 4 ++-- tests/mutex7r.c | 4 ++-- tests/mutex8.c | 4 ++-- tests/mutex8e.c | 4 ++-- tests/mutex8n.c | 4 ++-- tests/mutex8r.c | 4 ++-- tests/name_np1.c | 4 ++-- tests/name_np2.c | 4 ++-- tests/once1.c | 4 ++-- tests/once2.c | 4 ++-- tests/once3.c | 4 ++-- tests/once4.c | 4 ++-- tests/priority1.c | 4 ++-- tests/priority2.c | 4 ++-- tests/reuse1.c | 4 ++-- tests/reuse2.c | 4 ++-- tests/robust1.c | 4 ++-- tests/robust2.c | 4 ++-- tests/robust3.c | 4 ++-- tests/robust4.c | 4 ++-- tests/robust5.c | 4 ++-- tests/rwlock1.c | 4 ++-- tests/rwlock2.c | 4 ++-- tests/rwlock2_t.c | 4 ++-- tests/rwlock3.c | 4 ++-- tests/rwlock3_t.c | 4 ++-- tests/rwlock4.c | 4 ++-- tests/rwlock4_t.c | 4 ++-- tests/rwlock5.c | 4 ++-- tests/rwlock5_t.c | 4 ++-- tests/rwlock6.c | 4 ++-- tests/rwlock6_t.c | 4 ++-- tests/rwlock6_t2.c | 4 ++-- tests/self1.c | 4 ++-- tests/self2.c | 4 ++-- tests/semaphore1.c | 4 ++-- tests/semaphore2.c | 4 ++-- tests/semaphore3.c | 4 ++-- tests/semaphore4.c | 4 ++-- tests/semaphore4t.c | 4 ++-- tests/semaphore5.c | 4 ++-- tests/sequence1.c | 4 ++-- tests/spin1.c | 4 ++-- tests/spin2.c | 4 ++-- tests/spin3.c | 4 ++-- tests/spin4.c | 4 ++-- tests/stress1.c | 4 ++-- tests/test.h | 4 ++-- tests/timeouts.c | 4 ++-- tests/tryentercs.c | 4 ++-- tests/tryentercs2.c | 4 ++-- tests/tsd1.c | 4 ++-- tests/tsd2.c | 4 ++-- tests/tsd3.c | 4 ++-- tests/valid1.c | 4 ++-- tests/valid2.c | 4 ++-- version.rc | 6 +++--- w32_CancelableWait.c | 6 +++--- 322 files changed, 792 insertions(+), 792 deletions(-) diff --git a/GNUmakefile.in b/GNUmakefile.in index 18c721f8..d61a75a8 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -1,9 +1,9 @@ # @configure_input@ # -------------------------------------------------------------------------- # -# pthreads-win32 / Pthreads4w - POSIX Threads for Windows +# pthreads-win32 / pthreads4w - POSIX Threads for Windows # Copyright 1998 John E. Bossom -# Copyright 1999-2018, pthreads-win32 / Pthreads4w contributors +# Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors # # Homepage: http://sources.redhat.com/pthreads-win32 # @@ -149,7 +149,7 @@ LFLAGS = $(ARCH) # POSIX says that applications should assume that thread IDs can be # recycled. However, Solaris and some other systems use a [very large] # sequence number as the thread ID, which provides virtual uniqueness. -# Pthreads-win32 provides pseudo-unique IDs when the default increment +# pthreads-win32 provides pseudo-unique IDs when the default increment # (1) is used, but pthread_t is not a scalar type like Solaris's. # # Usage: diff --git a/README.md b/README.md index 3b806081..256e35ce 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ files, e.g. PTW32_* changes to PTW32_*, ptw32_* to ptw32_*, etc. License Change -------------- -With the agreement of all substantial relevant contributors pthreads-win32 / Pthreads4w +With the agreement of all substantial relevant contributors pthreads-win32 / pthreads4w version 3, with the exception of four files, is being released under the terms of the Apache License v2.0. The APLv2 is compatible with the GPLv3 and LGPLv3 licenses and therefore this code may continue to be legally @@ -43,7 +43,7 @@ Alexander Terekhov Vladimir Kliatchko Ross Johnson -pthreads-win32 / Pthreads4w version 2 releases will remain LGPL but version 2.11 and later +pthreads-win32 / pthreads4w version 2 releases will remain LGPL but version 2.11 and later will be released under v3 of that license so that any additions to pthreads4w version 3 code that is backported to v2 will not pollute that code. @@ -110,7 +110,7 @@ pre Windows 2000 systems. License Change to LGPL v3 ------------------------- -pthreads-win32 / Pthreads4w version 2.11 and all future 2.x versions will be released +pthreads-win32 / pthreads4w version 2.11 and all future 2.x versions will be released under the Lesser GNU Public License version 3 (LGPLv3). Planned Release Under the Apache License v2 diff --git a/_ptw32.h b/_ptw32.h index c3f48f22..3e8d114d 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/aclocal.m4 b/aclocal.m4 index bd65c489..79c1a781 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,9 +1,9 @@ ## aclocal.m4 ## -------------------------------------------------------------------------- ## -## pthreads-win32 / Pthreads4w - POSIX Threads for Windows +## pthreads-win32 / pthreads4w - POSIX Threads for Windows ## Copyright 1998 John E. Bossom -## Copyright 1999-2018, pthreads-win32 / Pthreads4w contributors +## Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors ## ## Homepage: http://sources.redhat.com/pthreads-win32 ## diff --git a/cleanup.c b/cleanup.c index df39e4ba..80a0b176 100644 --- a/cleanup.c +++ b/cleanup.c @@ -8,9 +8,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -40,7 +40,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/cmake/version.rc.in b/cmake/version.rc.in index 657804cc..f348125e 100644 --- a/cmake/version.rc.in +++ b/cmake/version.rc.in @@ -2,9 +2,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -160,7 +160,7 @@ BEGIN VALUE "InternalName", PTW32_VERSIONINFO_NAME VALUE "OriginalFilename", PTW32_VERSIONINFO_NAME VALUE "CompanyName", "Open Source Software community\0" - VALUE "LegalCopyright", "Copyright - Project contributors 1999-2018\0" + VALUE "LegalCopyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors 1999-2018\0" VALUE "Comments", "https://sourceforge.net/p/pthreads4w/wiki/Contributors/\0" END END diff --git a/configure.ac b/configure.ac index 0f52f783..d63207b2 100644 --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,9 @@ # configure.ac # -------------------------------------------------------------------------- # -# pthreads-win32 / Pthreads4w - POSIX Threads for Windows +# pthreads-win32 / pthreads4w - POSIX Threads for Windows # Copyright 1998 John E. Bossom -# Copyright 1999-2018, pthreads-win32 / Pthreads4w contributors +# Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors # # Homepage: http://sources.redhat.com/pthreads-win32 # diff --git a/context.h b/context.h index a8d0057f..bf573170 100644 --- a/context.h +++ b/context.h @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/create.c b/create.c index edb975e8..48845d18 100644 --- a/create.c +++ b/create.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/dll.c b/dll.c index 0ddca5ed..b6a3a420 100644 --- a/dll.c +++ b/dll.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/docs/ANNOUNCE.md b/docs/ANNOUNCE.md index 9cd6a3da..85b531aa 100644 --- a/docs/ANNOUNCE.md +++ b/docs/ANNOUNCE.md @@ -7,7 +7,7 @@ Maintainer: Ross Johnson We are pleased to announce the availability of a new release of pthreads-win32 -(a.k.a. Pthreads-win32), an Open Source Software implementation of +(a.k.a. pthreads-win32), an Open Source Software implementation of the Threads component of the SUSV3 Standard for Microsoft's Windows (x86 and x64). Some relevant functions from other sections of SUSV3 are also supported including semaphores and scheduling functions. See the diff --git a/docs/ChangeLog.md b/docs/ChangeLog.md index 3c19d975..96ca9885 100644 --- a/docs/ChangeLog.md +++ b/docs/ChangeLog.md @@ -375,7 +375,7 @@ 2012-09-28 Daniel Richard. G - * all: #include; renamed HAVE_PTW32_CONFIG_H define in + * all: #include"config.h"; renamed HAVE_PTW32_CONFIG_H define in build files to HAVE_CONFIG_H since we no longer need a uniquely-named symbol for this. * Bmakefile: Removed _WIN32_WINNT assignment from build files since diff --git a/docs/FAQ.md b/docs/FAQ.md index f1945aaf..eb165feb 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -38,7 +38,7 @@ Q 11 Why isn't pthread_t defined as a scalar (e.g. pointer or int) Q 1 What is it? --- -Pthreads-win32 is an Open Source Software implementation of the +pthreads-win32 is an Open Source Software implementation of the Threads component of the POSIX 1003.1c 1995 Standard for Microsoft's Win32 environment. Some functions from POSIX 1003.1b are also supported including semaphores. Other related functions include @@ -384,7 +384,7 @@ cancellation points in pthreads-win32: pthread_rwlock_rdlock pthread_rwlock_timedrdlock -Pthreads-win32 also provides two functions that allow you to create +pthreads-win32 also provides two functions that allow you to create cancellation points within your application, but only for cases where a thread is going to block on a Win32 handle. These are: diff --git a/docs/NOTICE.md b/docs/NOTICE.md index 1f85de66..60dff2b6 100644 --- a/docs/NOTICE.md +++ b/docs/NOTICE.md @@ -1,6 +1,6 @@ -pthreads-win32 / Pthreads4w - POSIX threads for Windows +pthreads-win32 / pthreads4w - POSIX threads for Windows Copyright 1998 John E. Bossom -Copyright 1999-2018, pthreads-win32 / Pthreads4w contributors +Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors This product includes software developed through the colaborative effort of several individuals, each of whom is listed in the file diff --git a/docs/README.md b/docs/README.md index 0128e46e..5cdfce05 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,7 +4,7 @@ PTHREADS4W (a.k.a. PTHREADS-WIN32) What is it? ----------- -pthreads-win32 / Pthreads4w is an Open Source Software implementation of the Threads +pthreads-win32 / pthreads4w is an Open Source Software implementation of the Threads component of the POSIX 1003.1c 1995 Standard (or later) for Microsoft's Windows environment. Some functions from POSIX 1003.1b are also supported, including semaphores. Other related functions include the set of read-write diff --git a/errno.c b/errno.c index 42d36744..38658c9b 100644 --- a/errno.c +++ b/errno.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #if defined(NEED_ERRNO) diff --git a/global.c b/global.c index 00db862c..19ed3088 100644 --- a/global.c +++ b/global.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/implement.h b/implement.h index 73fbf6f6..f65beaae 100644 --- a/implement.h +++ b/implement.h @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/pthread.c b/pthread.c index e0994244..f5763380 100644 --- a/pthread.c +++ b/pthread.c @@ -8,9 +8,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -40,7 +40,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread.h b/pthread.h index ef991d5b..3d930279 100644 --- a/pthread.h +++ b/pthread.h @@ -2,9 +2,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/pthread_attr_destroy.c b/pthread_attr_destroy.c index 496aab47..e1a8b48a 100644 --- a/pthread_attr_destroy.c +++ b/pthread_attr_destroy.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_attr_getaffinity_np.c b/pthread_attr_getaffinity_np.c index a66518b7..3caaa8ae 100644 --- a/pthread_attr_getaffinity_np.c +++ b/pthread_attr_getaffinity_np.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_attr_getdetachstate.c b/pthread_attr_getdetachstate.c index 9689718a..5a8cae81 100644 --- a/pthread_attr_getdetachstate.c +++ b/pthread_attr_getdetachstate.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_attr_getinheritsched.c b/pthread_attr_getinheritsched.c index ce8bad01..6029c477 100644 --- a/pthread_attr_getinheritsched.c +++ b/pthread_attr_getinheritsched.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_attr_getname_np.c b/pthread_attr_getname_np.c index 8245ec7a..9c8e8b2b 100644 --- a/pthread_attr_getname_np.c +++ b/pthread_attr_getname_np.c @@ -3,9 +3,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -35,7 +35,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include diff --git a/pthread_attr_getschedparam.c b/pthread_attr_getschedparam.c index 95c7f4e5..9549259d 100644 --- a/pthread_attr_getschedparam.c +++ b/pthread_attr_getschedparam.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_attr_getschedpolicy.c b/pthread_attr_getschedpolicy.c index 7a6dd5be..5e161c89 100644 --- a/pthread_attr_getschedpolicy.c +++ b/pthread_attr_getschedpolicy.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_attr_getscope.c b/pthread_attr_getscope.c index ce231f1e..0136c4bf 100644 --- a/pthread_attr_getscope.c +++ b/pthread_attr_getscope.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_attr_getstackaddr.c b/pthread_attr_getstackaddr.c index a30f8455..38249114 100644 --- a/pthread_attr_getstackaddr.c +++ b/pthread_attr_getstackaddr.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_attr_getstacksize.c b/pthread_attr_getstacksize.c index 7ac4963c..0918de89 100644 --- a/pthread_attr_getstacksize.c +++ b/pthread_attr_getstacksize.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_attr_init.c b/pthread_attr_init.c index 1aaa9e24..ea582c37 100644 --- a/pthread_attr_init.c +++ b/pthread_attr_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_attr_setaffinity_np.c b/pthread_attr_setaffinity_np.c index 47a253d3..f7166e68 100644 --- a/pthread_attr_setaffinity_np.c +++ b/pthread_attr_setaffinity_np.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_attr_setdetachstate.c b/pthread_attr_setdetachstate.c index ddddf8d9..224b65bf 100644 --- a/pthread_attr_setdetachstate.c +++ b/pthread_attr_setdetachstate.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_attr_setinheritsched.c b/pthread_attr_setinheritsched.c index a3777ab2..518d83d8 100644 --- a/pthread_attr_setinheritsched.c +++ b/pthread_attr_setinheritsched.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_attr_setname_np.c b/pthread_attr_setname_np.c index c05d7b70..a6a16bfa 100644 --- a/pthread_attr_setname_np.c +++ b/pthread_attr_setname_np.c @@ -3,9 +3,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -35,7 +35,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include diff --git a/pthread_attr_setschedparam.c b/pthread_attr_setschedparam.c index 7f5a7700..a2492584 100644 --- a/pthread_attr_setschedparam.c +++ b/pthread_attr_setschedparam.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_attr_setschedpolicy.c b/pthread_attr_setschedpolicy.c index b38e3b8f..77bcdc5f 100644 --- a/pthread_attr_setschedpolicy.c +++ b/pthread_attr_setschedpolicy.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_attr_setscope.c b/pthread_attr_setscope.c index 7d282584..ddf8b117 100644 --- a/pthread_attr_setscope.c +++ b/pthread_attr_setscope.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_attr_setstackaddr.c b/pthread_attr_setstackaddr.c index 48e0c28a..4a682818 100644 --- a/pthread_attr_setstackaddr.c +++ b/pthread_attr_setstackaddr.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_attr_setstacksize.c b/pthread_attr_setstacksize.c index e11b790d..f10658e5 100644 --- a/pthread_attr_setstacksize.c +++ b/pthread_attr_setstacksize.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_barrier_destroy.c b/pthread_barrier_destroy.c index eb90c141..cec85d92 100644 --- a/pthread_barrier_destroy.c +++ b/pthread_barrier_destroy.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_barrier_init.c b/pthread_barrier_init.c index 782dc366..3bdd8ad8 100644 --- a/pthread_barrier_init.c +++ b/pthread_barrier_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_barrier_wait.c b/pthread_barrier_wait.c index 5259b5ad..e2b313f8 100644 --- a/pthread_barrier_wait.c +++ b/pthread_barrier_wait.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_barrierattr_destroy.c b/pthread_barrierattr_destroy.c index 349f58de..128bd944 100644 --- a/pthread_barrierattr_destroy.c +++ b/pthread_barrierattr_destroy.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_barrierattr_getpshared.c b/pthread_barrierattr_getpshared.c index 5593649b..ef44bcde 100644 --- a/pthread_barrierattr_getpshared.c +++ b/pthread_barrierattr_getpshared.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_barrierattr_init.c b/pthread_barrierattr_init.c index 2de93e36..e80f14fd 100644 --- a/pthread_barrierattr_init.c +++ b/pthread_barrierattr_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_barrierattr_setpshared.c b/pthread_barrierattr_setpshared.c index b22b89fb..f94b7820 100644 --- a/pthread_barrierattr_setpshared.c +++ b/pthread_barrierattr_setpshared.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_cancel.c b/pthread_cancel.c index e435f00d..f465cd66 100644 --- a/pthread_cancel.c +++ b/pthread_cancel.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_cond_destroy.c b/pthread_cond_destroy.c index 70abd48c..c1906f9c 100644 --- a/pthread_cond_destroy.c +++ b/pthread_cond_destroy.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_cond_init.c b/pthread_cond_init.c index 2a5a7a50..1f20cb89 100644 --- a/pthread_cond_init.c +++ b/pthread_cond_init.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_cond_signal.c b/pthread_cond_signal.c index 6c9a1c1c..8cdc0bef 100644 --- a/pthread_cond_signal.c +++ b/pthread_cond_signal.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -41,7 +41,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_cond_wait.c b/pthread_cond_wait.c index 0dd695cb..733b788c 100644 --- a/pthread_cond_wait.c +++ b/pthread_cond_wait.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -259,7 +259,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_condattr_destroy.c b/pthread_condattr_destroy.c index fac08dbb..bfcabdad 100644 --- a/pthread_condattr_destroy.c +++ b/pthread_condattr_destroy.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_condattr_getpshared.c b/pthread_condattr_getpshared.c index 5b9d23d4..d5ec08d4 100644 --- a/pthread_condattr_getpshared.c +++ b/pthread_condattr_getpshared.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_condattr_init.c b/pthread_condattr_init.c index f369bd44..e6fba5f2 100644 --- a/pthread_condattr_init.c +++ b/pthread_condattr_init.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_condattr_setpshared.c b/pthread_condattr_setpshared.c index 2b6cde59..8e2aa7a9 100644 --- a/pthread_condattr_setpshared.c +++ b/pthread_condattr_setpshared.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_delay_np.c b/pthread_delay_np.c index 87dda299..4baf387d 100644 --- a/pthread_delay_np.c +++ b/pthread_delay_np.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_detach.c b/pthread_detach.c index e93f5054..df19c64e 100644 --- a/pthread_detach.c +++ b/pthread_detach.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_equal.c b/pthread_equal.c index 3c9e0c0a..91e56b74 100644 --- a/pthread_equal.c +++ b/pthread_equal.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_exit.c b/pthread_exit.c index 1c3387dc..cb193553 100644 --- a/pthread_exit.c +++ b/pthread_exit.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_getconcurrency.c b/pthread_getconcurrency.c index c91d4adb..0901b241 100644 --- a/pthread_getconcurrency.c +++ b/pthread_getconcurrency.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_getname_np.c b/pthread_getname_np.c index f7a40679..d5efeb69 100644 --- a/pthread_getname_np.c +++ b/pthread_getname_np.c @@ -3,9 +3,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -35,7 +35,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_getschedparam.c b/pthread_getschedparam.c index 01b39b25..24d97f28 100644 --- a/pthread_getschedparam.c +++ b/pthread_getschedparam.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_getspecific.c b/pthread_getspecific.c index 89fc357c..ab0df756 100644 --- a/pthread_getspecific.c +++ b/pthread_getspecific.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_getunique_np.c b/pthread_getunique_np.c index d46beabb..d0775fcd 100755 --- a/pthread_getunique_np.c +++ b/pthread_getunique_np.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_getw32threadhandle_np.c b/pthread_getw32threadhandle_np.c index 24ef41e3..d0dd3f58 100644 --- a/pthread_getw32threadhandle_np.c +++ b/pthread_getw32threadhandle_np.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_join.c b/pthread_join.c index 674e7396..7a2fdfae 100644 --- a/pthread_join.c +++ b/pthread_join.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_key_create.c b/pthread_key_create.c index 0737320b..31332203 100644 --- a/pthread_key_create.c +++ b/pthread_key_create.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_key_delete.c b/pthread_key_delete.c index 7da76608..f36f7f23 100644 --- a/pthread_key_delete.c +++ b/pthread_key_delete.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_kill.c b/pthread_kill.c index d07fb324..cf39a03f 100644 --- a/pthread_kill.c +++ b/pthread_kill.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_mutex_consistent.c b/pthread_mutex_consistent.c index 156f6634..b9c8221c 100755 --- a/pthread_mutex_consistent.c +++ b/pthread_mutex_consistent.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif /* diff --git a/pthread_mutex_destroy.c b/pthread_mutex_destroy.c index 7f9fb5b9..82cc0886 100644 --- a/pthread_mutex_destroy.c +++ b/pthread_mutex_destroy.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_mutex_init.c b/pthread_mutex_init.c index fa237aa6..4fac214c 100644 --- a/pthread_mutex_init.c +++ b/pthread_mutex_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_mutex_lock.c b/pthread_mutex_lock.c index b033b437..847477c1 100644 --- a/pthread_mutex_lock.c +++ b/pthread_mutex_lock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #if !defined(_UWIN) diff --git a/pthread_mutex_timedlock.c b/pthread_mutex_timedlock.c index 03ebda95..7f24999d 100644 --- a/pthread_mutex_timedlock.c +++ b/pthread_mutex_timedlock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_mutex_trylock.c b/pthread_mutex_trylock.c index 58040d29..f994faec 100644 --- a/pthread_mutex_trylock.c +++ b/pthread_mutex_trylock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_mutex_unlock.c b/pthread_mutex_unlock.c index 32810e39..89a73ddd 100644 --- a/pthread_mutex_unlock.c +++ b/pthread_mutex_unlock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_mutexattr_destroy.c b/pthread_mutexattr_destroy.c index 0e301dea..0d8c0995 100644 --- a/pthread_mutexattr_destroy.c +++ b/pthread_mutexattr_destroy.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_mutexattr_getkind_np.c b/pthread_mutexattr_getkind_np.c index f1b2fd89..3312b095 100644 --- a/pthread_mutexattr_getkind_np.c +++ b/pthread_mutexattr_getkind_np.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_mutexattr_getpshared.c b/pthread_mutexattr_getpshared.c index 78bfe118..fd91ce1b 100644 --- a/pthread_mutexattr_getpshared.c +++ b/pthread_mutexattr_getpshared.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_mutexattr_getrobust.c b/pthread_mutexattr_getrobust.c index 5810dade..d0174a7b 100755 --- a/pthread_mutexattr_getrobust.c +++ b/pthread_mutexattr_getrobust.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_mutexattr_gettype.c b/pthread_mutexattr_gettype.c index 5a886328..87b9fdcb 100644 --- a/pthread_mutexattr_gettype.c +++ b/pthread_mutexattr_gettype.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_mutexattr_init.c b/pthread_mutexattr_init.c index a8ed9972..5ae203e3 100644 --- a/pthread_mutexattr_init.c +++ b/pthread_mutexattr_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_mutexattr_setkind_np.c b/pthread_mutexattr_setkind_np.c index 4fd79b43..18dbdb40 100644 --- a/pthread_mutexattr_setkind_np.c +++ b/pthread_mutexattr_setkind_np.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_mutexattr_setpshared.c b/pthread_mutexattr_setpshared.c index a2623e52..1f1f48f6 100644 --- a/pthread_mutexattr_setpshared.c +++ b/pthread_mutexattr_setpshared.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_mutexattr_setrobust.c b/pthread_mutexattr_setrobust.c index 16c8659c..001cd437 100755 --- a/pthread_mutexattr_setrobust.c +++ b/pthread_mutexattr_setrobust.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_mutexattr_settype.c b/pthread_mutexattr_settype.c index 6b8436bd..5ee30eee 100644 --- a/pthread_mutexattr_settype.c +++ b/pthread_mutexattr_settype.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_num_processors_np.c b/pthread_num_processors_np.c index 856bb905..cbbdb3a2 100644 --- a/pthread_num_processors_np.c +++ b/pthread_num_processors_np.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_once.c b/pthread_once.c index ac518247..df5dd7c0 100644 --- a/pthread_once.c +++ b/pthread_once.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_rwlock_destroy.c b/pthread_rwlock_destroy.c index d83f6fc5..3288d20c 100644 --- a/pthread_rwlock_destroy.c +++ b/pthread_rwlock_destroy.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include diff --git a/pthread_rwlock_init.c b/pthread_rwlock_init.c index 7ca93f6a..6b12a34d 100644 --- a/pthread_rwlock_init.c +++ b/pthread_rwlock_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include diff --git a/pthread_rwlock_rdlock.c b/pthread_rwlock_rdlock.c index b4388a52..d5dc3406 100644 --- a/pthread_rwlock_rdlock.c +++ b/pthread_rwlock_rdlock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include diff --git a/pthread_rwlock_timedrdlock.c b/pthread_rwlock_timedrdlock.c index 856be6ee..65b37567 100644 --- a/pthread_rwlock_timedrdlock.c +++ b/pthread_rwlock_timedrdlock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include diff --git a/pthread_rwlock_timedwrlock.c b/pthread_rwlock_timedwrlock.c index 2b245cb3..5b5d43af 100644 --- a/pthread_rwlock_timedwrlock.c +++ b/pthread_rwlock_timedwrlock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include diff --git a/pthread_rwlock_tryrdlock.c b/pthread_rwlock_tryrdlock.c index 103b5f57..cf8209cb 100644 --- a/pthread_rwlock_tryrdlock.c +++ b/pthread_rwlock_tryrdlock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include diff --git a/pthread_rwlock_trywrlock.c b/pthread_rwlock_trywrlock.c index c9702781..125bdec6 100644 --- a/pthread_rwlock_trywrlock.c +++ b/pthread_rwlock_trywrlock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include diff --git a/pthread_rwlock_unlock.c b/pthread_rwlock_unlock.c index 6b509052..43113614 100644 --- a/pthread_rwlock_unlock.c +++ b/pthread_rwlock_unlock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include diff --git a/pthread_rwlock_wrlock.c b/pthread_rwlock_wrlock.c index 21402d87..6a3ea81b 100644 --- a/pthread_rwlock_wrlock.c +++ b/pthread_rwlock_wrlock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include diff --git a/pthread_rwlockattr_destroy.c b/pthread_rwlockattr_destroy.c index bd98331e..aa7be79f 100644 --- a/pthread_rwlockattr_destroy.c +++ b/pthread_rwlockattr_destroy.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include diff --git a/pthread_rwlockattr_getpshared.c b/pthread_rwlockattr_getpshared.c index dc8a41bd..6f5acbcf 100644 --- a/pthread_rwlockattr_getpshared.c +++ b/pthread_rwlockattr_getpshared.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include diff --git a/pthread_rwlockattr_init.c b/pthread_rwlockattr_init.c index e6a5a1e7..661c2a3e 100644 --- a/pthread_rwlockattr_init.c +++ b/pthread_rwlockattr_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include diff --git a/pthread_rwlockattr_setpshared.c b/pthread_rwlockattr_setpshared.c index 0094675c..e72db9e3 100644 --- a/pthread_rwlockattr_setpshared.c +++ b/pthread_rwlockattr_setpshared.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include diff --git a/pthread_self.c b/pthread_self.c index 51b6dbf6..b0a424a6 100644 --- a/pthread_self.c +++ b/pthread_self.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_setaffinity.c b/pthread_setaffinity.c index abc9c034..baa11db1 100644 --- a/pthread_setaffinity.c +++ b/pthread_setaffinity.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_setcancelstate.c b/pthread_setcancelstate.c index 1bf7d212..322026f6 100644 --- a/pthread_setcancelstate.c +++ b/pthread_setcancelstate.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_setcanceltype.c b/pthread_setcanceltype.c index 2eb8a1e1..bd15f7b4 100644 --- a/pthread_setcanceltype.c +++ b/pthread_setcanceltype.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_setconcurrency.c b/pthread_setconcurrency.c index 8b669a13..8b144361 100644 --- a/pthread_setconcurrency.c +++ b/pthread_setconcurrency.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_setname_np.c b/pthread_setname_np.c index d9c4f3aa..b6835336 100644 --- a/pthread_setname_np.c +++ b/pthread_setname_np.c @@ -3,9 +3,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -35,7 +35,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include diff --git a/pthread_setschedparam.c b/pthread_setschedparam.c index fc9deca2..808ef5fc 100644 --- a/pthread_setschedparam.c +++ b/pthread_setschedparam.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_setspecific.c b/pthread_setspecific.c index be6a813b..cc0f64a7 100644 --- a/pthread_setspecific.c +++ b/pthread_setspecific.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_spin_destroy.c b/pthread_spin_destroy.c index a4d48115..7fb60934 100644 --- a/pthread_spin_destroy.c +++ b/pthread_spin_destroy.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_spin_init.c b/pthread_spin_init.c index 51b533b5..46dfc32f 100644 --- a/pthread_spin_init.c +++ b/pthread_spin_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_spin_lock.c b/pthread_spin_lock.c index c8a70d0b..b6502ef5 100644 --- a/pthread_spin_lock.c +++ b/pthread_spin_lock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_spin_trylock.c b/pthread_spin_trylock.c index ee16ef7d..89fc5681 100644 --- a/pthread_spin_trylock.c +++ b/pthread_spin_trylock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_spin_unlock.c b/pthread_spin_unlock.c index 4be1e051..64586186 100644 --- a/pthread_spin_unlock.c +++ b/pthread_spin_unlock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_testcancel.c b/pthread_testcancel.c index 6d1a12f5..90a2cc5e 100644 --- a/pthread_testcancel.c +++ b/pthread_testcancel.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_timechange_handler_np.c b/pthread_timechange_handler_np.c index c959ea7e..92b2a65e 100644 --- a/pthread_timechange_handler_np.c +++ b/pthread_timechange_handler_np.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_timedjoin_np.c b/pthread_timedjoin_np.c index 3cf12442..8d6fb7ea 100644 --- a/pthread_timedjoin_np.c +++ b/pthread_timedjoin_np.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_tryjoin_np.c b/pthread_tryjoin_np.c index 7e131cc3..42097efb 100644 --- a/pthread_tryjoin_np.c +++ b/pthread_tryjoin_np.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/pthread_win32_attach_detach_np.c b/pthread_win32_attach_detach_np.c index 4a85e5fb..fc85cd06 100644 --- a/pthread_win32_attach_detach_np.c +++ b/pthread_win32_attach_detach_np.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_MCS_lock.c b/ptw32_MCS_lock.c index 3e574f57..ad76ffca 100644 --- a/ptw32_MCS_lock.c +++ b/ptw32_MCS_lock.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -95,7 +95,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_callUserDestroyRoutines.c b/ptw32_callUserDestroyRoutines.c index 75506983..57533e1d 100644 --- a/ptw32_callUserDestroyRoutines.c +++ b/ptw32_callUserDestroyRoutines.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_calloc.c b/ptw32_calloc.c index 8999efb6..b710c4f4 100644 --- a/ptw32_calloc.c +++ b/ptw32_calloc.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_cond_check_need_init.c b/ptw32_cond_check_need_init.c index 302602b2..616a891c 100644 --- a/ptw32_cond_check_need_init.c +++ b/ptw32_cond_check_need_init.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_getprocessors.c b/ptw32_getprocessors.c index f61f7f50..2e4ab0cf 100644 --- a/ptw32_getprocessors.c +++ b/ptw32_getprocessors.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_is_attr.c b/ptw32_is_attr.c index 31aeeec5..283e3eee 100644 --- a/ptw32_is_attr.c +++ b/ptw32_is_attr.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_mutex_check_need_init.c b/ptw32_mutex_check_need_init.c index d87aaea3..2cfacb15 100644 --- a/ptw32_mutex_check_need_init.c +++ b/ptw32_mutex_check_need_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_new.c b/ptw32_new.c index 36673873..1039c752 100644 --- a/ptw32_new.c +++ b/ptw32_new.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_processInitialize.c b/ptw32_processInitialize.c index 061d7d99..5e7bdca6 100644 --- a/ptw32_processInitialize.c +++ b/ptw32_processInitialize.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_processTerminate.c b/ptw32_processTerminate.c index 53d6a5c8..7474541e 100644 --- a/ptw32_processTerminate.c +++ b/ptw32_processTerminate.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_relmillisecs.c b/ptw32_relmillisecs.c index 07ec10e9..041e2863 100644 --- a/ptw32_relmillisecs.c +++ b/ptw32_relmillisecs.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_reuse.c b/ptw32_reuse.c index 61c544bb..f776bd64 100644 --- a/ptw32_reuse.c +++ b/ptw32_reuse.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_rwlock_cancelwrwait.c b/ptw32_rwlock_cancelwrwait.c index d85e1186..5705bf9e 100644 --- a/ptw32_rwlock_cancelwrwait.c +++ b/ptw32_rwlock_cancelwrwait.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_rwlock_check_need_init.c b/ptw32_rwlock_check_need_init.c index e7b9c00e..3d2c4477 100644 --- a/ptw32_rwlock_check_need_init.c +++ b/ptw32_rwlock_check_need_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_semwait.c b/ptw32_semwait.c index 9018c76c..b797c08c 100644 --- a/ptw32_semwait.c +++ b/ptw32_semwait.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #if !defined(_UWIN) diff --git a/ptw32_spinlock_check_need_init.c b/ptw32_spinlock_check_need_init.c index 11265a84..7a49b87d 100644 --- a/ptw32_spinlock_check_need_init.c +++ b/ptw32_spinlock_check_need_init.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_threadDestroy.c b/ptw32_threadDestroy.c index 70815e48..c0141f64 100644 --- a/ptw32_threadDestroy.c +++ b/ptw32_threadDestroy.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_threadStart.c b/ptw32_threadStart.c index a1227d37..e6da8b67 100644 --- a/ptw32_threadStart.c +++ b/ptw32_threadStart.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_throw.c b/ptw32_throw.c index 2de4143d..a57a0579 100644 --- a/ptw32_throw.c +++ b/ptw32_throw.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_timespec.c b/ptw32_timespec.c index 2263cf9c..3bd3b507 100644 --- a/ptw32_timespec.c +++ b/ptw32_timespec.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_tkAssocCreate.c b/ptw32_tkAssocCreate.c index 2dadb778..6ce709ff 100644 --- a/ptw32_tkAssocCreate.c +++ b/ptw32_tkAssocCreate.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/ptw32_tkAssocDestroy.c b/ptw32_tkAssocDestroy.c index bd0d58cc..37c836ec 100644 --- a/ptw32_tkAssocDestroy.c +++ b/ptw32_tkAssocDestroy.c @@ -7,9 +7,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -39,7 +39,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/sched.h b/sched.h index e7705d14..d77ea70f 100644 --- a/sched.h +++ b/sched.h @@ -9,9 +9,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/sched_get_priority_max.c b/sched_get_priority_max.c index 908d22bb..a22525da 100644 --- a/sched_get_priority_max.c +++ b/sched_get_priority_max.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/sched_get_priority_min.c b/sched_get_priority_min.c index ff2eda1d..abe417b9 100644 --- a/sched_get_priority_min.c +++ b/sched_get_priority_min.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/sched_getscheduler.c b/sched_getscheduler.c index 4aa495b6..382a1030 100644 --- a/sched_getscheduler.c +++ b/sched_getscheduler.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/sched_setaffinity.c b/sched_setaffinity.c index 13a0c82a..dd07b68c 100644 --- a/sched_setaffinity.c +++ b/sched_setaffinity.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/sched_setscheduler.c b/sched_setscheduler.c index d738a71d..ed39bffe 100644 --- a/sched_setscheduler.c +++ b/sched_setscheduler.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/sched_yield.c b/sched_yield.c index a4f83bb0..5a9778d2 100644 --- a/sched_yield.c +++ b/sched_yield.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/sem_close.c b/sem_close.c index f08c9794..3b082f80 100644 --- a/sem_close.c +++ b/sem_close.c @@ -13,9 +13,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -45,7 +45,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/sem_destroy.c b/sem_destroy.c index e2d0fa12..99d0b350 100644 --- a/sem_destroy.c +++ b/sem_destroy.c @@ -13,9 +13,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -45,7 +45,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/sem_getvalue.c b/sem_getvalue.c index 9734a45c..5778114c 100644 --- a/sem_getvalue.c +++ b/sem_getvalue.c @@ -13,9 +13,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -45,7 +45,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/sem_init.c b/sem_init.c index f6fde560..d80568df 100644 --- a/sem_init.c +++ b/sem_init.c @@ -11,9 +11,9 @@ * * ------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -43,7 +43,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/sem_open.c b/sem_open.c index 27216eab..b6c2f956 100644 --- a/sem_open.c +++ b/sem_open.c @@ -13,9 +13,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -45,7 +45,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/sem_post.c b/sem_post.c index fea4df5b..eed9568e 100644 --- a/sem_post.c +++ b/sem_post.c @@ -13,9 +13,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -45,7 +45,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/sem_post_multiple.c b/sem_post_multiple.c index 80ef485f..10959714 100644 --- a/sem_post_multiple.c +++ b/sem_post_multiple.c @@ -13,9 +13,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -45,7 +45,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/sem_timedwait.c b/sem_timedwait.c index 6f9e26df..9ddd4469 100644 --- a/sem_timedwait.c +++ b/sem_timedwait.c @@ -13,9 +13,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -45,7 +45,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/sem_trywait.c b/sem_trywait.c index 4e47406b..3f3ed625 100644 --- a/sem_trywait.c +++ b/sem_trywait.c @@ -13,9 +13,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -45,7 +45,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/sem_unlink.c b/sem_unlink.c index c782a96b..3529ac79 100644 --- a/sem_unlink.c +++ b/sem_unlink.c @@ -13,9 +13,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -45,7 +45,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/sem_wait.c b/sem_wait.c index ec577440..d4a587c0 100644 --- a/sem_wait.c +++ b/sem_wait.c @@ -13,9 +13,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -45,7 +45,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/semaphore.h b/semaphore.h index 56623cfa..6629d028 100644 --- a/semaphore.h +++ b/semaphore.h @@ -9,9 +9,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/signal.c b/signal.c index 4d3e93f4..e47ea676 100644 --- a/signal.c +++ b/signal.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -85,7 +85,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h" diff --git a/tests/Bmakefile b/tests/Bmakefile index 25f8fe17..913728b4 100644 --- a/tests/Bmakefile +++ b/tests/Bmakefile @@ -3,9 +3,9 @@ # # -------------------------------------------------------------------------- # -# Pthreads-win32 - POSIX Threads Library for Win32 +# pthreads-win32 - POSIX Threads Library for Win32 # Copyright(C) 1998 John E. Bossom -# Copyright(C) 1999,2012 Pthreads-win32 contributors +# Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors # # Contact Email: rpj@callisto.canberra.edu.au # diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index 623ee201..c6a63610 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -3,9 +3,9 @@ # # -------------------------------------------------------------------------- # -# pthreads-win32 / Pthreads4w - POSIX Threads for Windows +# pthreads-win32 / pthreads4w - POSIX Threads for Windows # Copyright 1998 John E. Bossom -# Copyright 1999-2018, pthreads-win32 / Pthreads4w contributors +# Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors # # Homepage: http://sources.redhat.com/pthreads-win32 # diff --git a/tests/Wmakefile b/tests/Wmakefile index bf4020e2..dde987b2 100644 --- a/tests/Wmakefile +++ b/tests/Wmakefile @@ -3,9 +3,9 @@ # # -------------------------------------------------------------------------- # -# Pthreads-win32 - POSIX Threads Library for Win32 +# pthreads-win32 - POSIX Threads Library for Win32 # Copyright(C) 1998 John E. Bossom -# Copyright(C) 1999,2012 Pthreads-win32 contributors +# Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors # # Contact Email: rpj@callisto.canberra.edu.au # diff --git a/tests/affinity1.c b/tests/affinity1.c index 81f24e29..aee74e7c 100644 --- a/tests/affinity1.c +++ b/tests/affinity1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/affinity2.c b/tests/affinity2.c index 2194f39f..d83d4873 100644 --- a/tests/affinity2.c +++ b/tests/affinity2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/affinity3.c b/tests/affinity3.c index 86597c9a..4fd7e72f 100644 --- a/tests/affinity3.c +++ b/tests/affinity3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/affinity4.c b/tests/affinity4.c index e62ade58..91cdb4cc 100644 --- a/tests/affinity4.c +++ b/tests/affinity4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/affinity5.c b/tests/affinity5.c index 03e6c0c2..b6156fb8 100644 --- a/tests/affinity5.c +++ b/tests/affinity5.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/affinity6.c b/tests/affinity6.c index 7713c304..a0189a3f 100644 --- a/tests/affinity6.c +++ b/tests/affinity6.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/barrier1.c b/tests/barrier1.c index cff727b9..d75c12cd 100644 --- a/tests/barrier1.c +++ b/tests/barrier1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/barrier2.c b/tests/barrier2.c index 1afd8d07..1c062561 100644 --- a/tests/barrier2.c +++ b/tests/barrier2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/barrier3.c b/tests/barrier3.c index a3145519..a462d2c3 100644 --- a/tests/barrier3.c +++ b/tests/barrier3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/barrier4.c b/tests/barrier4.c index 7c427e58..a104b592 100644 --- a/tests/barrier4.c +++ b/tests/barrier4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/barrier5.c b/tests/barrier5.c index 86e69838..d405bc46 100644 --- a/tests/barrier5.c +++ b/tests/barrier5.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/barrier6.c b/tests/barrier6.c index d4d82145..b4f04a4a 100755 --- a/tests/barrier6.c +++ b/tests/barrier6.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/benchlib.c b/tests/benchlib.c index be28f0d1..5e138d46 100644 --- a/tests/benchlib.c +++ b/tests/benchlib.c @@ -3,9 +3,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/benchtest.h b/tests/benchtest.h index ea3a6251..b0d5e4e1 100644 --- a/tests/benchtest.h +++ b/tests/benchtest.h @@ -3,9 +3,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/benchtest1.c b/tests/benchtest1.c index 62268172..9616add4 100644 --- a/tests/benchtest1.c +++ b/tests/benchtest1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/benchtest2.c b/tests/benchtest2.c index 1ace338b..55416dcf 100644 --- a/tests/benchtest2.c +++ b/tests/benchtest2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/benchtest3.c b/tests/benchtest3.c index c49b424d..20933e2a 100644 --- a/tests/benchtest3.c +++ b/tests/benchtest3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/benchtest4.c b/tests/benchtest4.c index cdd7aa0a..8397e15b 100644 --- a/tests/benchtest4.c +++ b/tests/benchtest4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/benchtest5.c b/tests/benchtest5.c index 22c2388c..cd89f6d2 100644 --- a/tests/benchtest5.c +++ b/tests/benchtest5.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/cancel1.c b/tests/cancel1.c index 344d2e95..2bb7d378 100644 --- a/tests/cancel1.c +++ b/tests/cancel1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/cancel2.c b/tests/cancel2.c index 1e80e668..0ffc9520 100644 --- a/tests/cancel2.c +++ b/tests/cancel2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/cancel3.c b/tests/cancel3.c index 9ccd490a..ce8fefea 100644 --- a/tests/cancel3.c +++ b/tests/cancel3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/cancel4.c b/tests/cancel4.c index 4267f172..06f6b286 100644 --- a/tests/cancel4.c +++ b/tests/cancel4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/cancel5.c b/tests/cancel5.c index 033ecf10..376987ff 100644 --- a/tests/cancel5.c +++ b/tests/cancel5.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/cancel6a.c b/tests/cancel6a.c index de106a0b..e3688317 100644 --- a/tests/cancel6a.c +++ b/tests/cancel6a.c @@ -2,9 +2,9 @@ * File: cancel6a.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/cancel6d.c b/tests/cancel6d.c index d428ee4d..139eb1f5 100644 --- a/tests/cancel6d.c +++ b/tests/cancel6d.c @@ -2,9 +2,9 @@ * File: cancel6d.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/cancel7.c b/tests/cancel7.c index cdd8b156..cb91e858 100644 --- a/tests/cancel7.c +++ b/tests/cancel7.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/cancel8.c b/tests/cancel8.c index 697593f6..40f79939 100644 --- a/tests/cancel8.c +++ b/tests/cancel8.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/cancel9.c b/tests/cancel9.c index 1f022558..e6ac3e4d 100644 --- a/tests/cancel9.c +++ b/tests/cancel9.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/cleanup0.c b/tests/cleanup0.c index 888640b7..5b96a4bd 100644 --- a/tests/cleanup0.c +++ b/tests/cleanup0.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/cleanup1.c b/tests/cleanup1.c index 6f0be72c..504aec65 100644 --- a/tests/cleanup1.c +++ b/tests/cleanup1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/cleanup2.c b/tests/cleanup2.c index 52a804e6..c4f8029b 100644 --- a/tests/cleanup2.c +++ b/tests/cleanup2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/cleanup3.c b/tests/cleanup3.c index 7d6a4b96..155a63be 100644 --- a/tests/cleanup3.c +++ b/tests/cleanup3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/condvar1.c b/tests/condvar1.c index 303a87b8..148edf5d 100644 --- a/tests/condvar1.c +++ b/tests/condvar1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/condvar1_1.c b/tests/condvar1_1.c index 565697e5..5547fc36 100644 --- a/tests/condvar1_1.c +++ b/tests/condvar1_1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/condvar1_2.c b/tests/condvar1_2.c index 61185518..06431528 100644 --- a/tests/condvar1_2.c +++ b/tests/condvar1_2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/condvar2.c b/tests/condvar2.c index 2ca309f1..495da154 100644 --- a/tests/condvar2.c +++ b/tests/condvar2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/condvar2_1.c b/tests/condvar2_1.c index bf8170ca..9540ca6c 100644 --- a/tests/condvar2_1.c +++ b/tests/condvar2_1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/condvar3.c b/tests/condvar3.c index c9943ff8..16254364 100644 --- a/tests/condvar3.c +++ b/tests/condvar3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/condvar3_1.c b/tests/condvar3_1.c index 16f0a64a..22233639 100644 --- a/tests/condvar3_1.c +++ b/tests/condvar3_1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/condvar3_2.c b/tests/condvar3_2.c index 909f6a19..da8ce0d7 100644 --- a/tests/condvar3_2.c +++ b/tests/condvar3_2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/condvar3_3.c b/tests/condvar3_3.c index 54702847..44234e2b 100644 --- a/tests/condvar3_3.c +++ b/tests/condvar3_3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/condvar4.c b/tests/condvar4.c index a63104fd..b5ac44a3 100644 --- a/tests/condvar4.c +++ b/tests/condvar4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/condvar5.c b/tests/condvar5.c index feeefbcd..ecdfae18 100644 --- a/tests/condvar5.c +++ b/tests/condvar5.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/condvar6.c b/tests/condvar6.c index 1e4baf2c..785c982f 100644 --- a/tests/condvar6.c +++ b/tests/condvar6.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/condvar7.c b/tests/condvar7.c index f1fc30ee..91fff3a8 100644 --- a/tests/condvar7.c +++ b/tests/condvar7.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/condvar8.c b/tests/condvar8.c index a2e0931a..bbddfe81 100644 --- a/tests/condvar8.c +++ b/tests/condvar8.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/condvar9.c b/tests/condvar9.c index d928fc1e..f799485e 100644 --- a/tests/condvar9.c +++ b/tests/condvar9.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/context1.c b/tests/context1.c index b84b2b20..a8103cba 100644 --- a/tests/context1.c +++ b/tests/context1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/context2.c b/tests/context2.c index 1c5b4aed..6373b320 100644 --- a/tests/context2.c +++ b/tests/context2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/count1.c b/tests/count1.c index c639fd27..86d93037 100644 --- a/tests/count1.c +++ b/tests/count1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/create1.c b/tests/create1.c index 63b1bf6e..2a98e3c8 100644 --- a/tests/create1.c +++ b/tests/create1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/create2.c b/tests/create2.c index 9e56d9d4..741aa116 100644 --- a/tests/create2.c +++ b/tests/create2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/create3.c b/tests/create3.c index 5063d0ba..88a2f279 100644 --- a/tests/create3.c +++ b/tests/create3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/delay1.c b/tests/delay1.c index 9c5293e8..ab1325fd 100644 --- a/tests/delay1.c +++ b/tests/delay1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/delay2.c b/tests/delay2.c index 5ff6c1de..5056b76a 100644 --- a/tests/delay2.c +++ b/tests/delay2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/detach1.c b/tests/detach1.c index 273ccf25..0436a4b0 100644 --- a/tests/detach1.c +++ b/tests/detach1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/equal0.c b/tests/equal0.c index 7282af64..71555b3d 100644 --- a/tests/equal0.c +++ b/tests/equal0.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/equal1.c b/tests/equal1.c index 2dfa7942..a3775d68 100644 --- a/tests/equal1.c +++ b/tests/equal1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/errno0.c b/tests/errno0.c index d37430c9..66d47665 100644 --- a/tests/errno0.c +++ b/tests/errno0.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/errno1.c b/tests/errno1.c index 14e8150a..d2bc30cc 100644 --- a/tests/errno1.c +++ b/tests/errno1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/exception1.c b/tests/exception1.c index d629622d..bbce08c8 100644 --- a/tests/exception1.c +++ b/tests/exception1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/exception2.c b/tests/exception2.c index 7842b842..08b74d5c 100644 --- a/tests/exception2.c +++ b/tests/exception2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/exception3.c b/tests/exception3.c index 77b933b3..d5e7282d 100644 --- a/tests/exception3.c +++ b/tests/exception3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/exception3_0.c b/tests/exception3_0.c index 9d8b681b..2afc86d8 100644 --- a/tests/exception3_0.c +++ b/tests/exception3_0.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/exit1.c b/tests/exit1.c index 35294245..f1bf9813 100644 --- a/tests/exit1.c +++ b/tests/exit1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/exit2.c b/tests/exit2.c index a534d477..9a717f24 100644 --- a/tests/exit2.c +++ b/tests/exit2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/exit3.c b/tests/exit3.c index 13397200..e973bc60 100644 --- a/tests/exit3.c +++ b/tests/exit3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/exit4.c b/tests/exit4.c index e4138389..85e027fc 100644 --- a/tests/exit4.c +++ b/tests/exit4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/exit5.c b/tests/exit5.c index 4d5d2517..7c8a1bbc 100644 --- a/tests/exit5.c +++ b/tests/exit5.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/eyal1.c b/tests/eyal1.c index 5da95ff5..58c5b7e4 100644 --- a/tests/eyal1.c +++ b/tests/eyal1.c @@ -3,9 +3,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/inherit1.c b/tests/inherit1.c index d09cfc77..527334fb 100644 --- a/tests/inherit1.c +++ b/tests/inherit1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/join0.c b/tests/join0.c index f5c040eb..a2dd1927 100644 --- a/tests/join0.c +++ b/tests/join0.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/join1.c b/tests/join1.c index a0412791..8ab2580e 100644 --- a/tests/join1.c +++ b/tests/join1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/join2.c b/tests/join2.c index 8864f221..ef666204 100644 --- a/tests/join2.c +++ b/tests/join2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/join3.c b/tests/join3.c index 35368667..c19d9a50 100644 --- a/tests/join3.c +++ b/tests/join3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/join4.c b/tests/join4.c index d1621bf1..d99764de 100644 --- a/tests/join4.c +++ b/tests/join4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/kill1.c b/tests/kill1.c index 84ca3c00..6a12ebee 100644 --- a/tests/kill1.c +++ b/tests/kill1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex1.c b/tests/mutex1.c index 6d9beaf8..a3c4bf93 100644 --- a/tests/mutex1.c +++ b/tests/mutex1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex1e.c b/tests/mutex1e.c index 9d0a32ec..8dea4ae4 100644 --- a/tests/mutex1e.c +++ b/tests/mutex1e.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex1n.c b/tests/mutex1n.c index 7e306cfa..cd8d4e70 100644 --- a/tests/mutex1n.c +++ b/tests/mutex1n.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex1r.c b/tests/mutex1r.c index fb2de7ea..474c4c1f 100644 --- a/tests/mutex1r.c +++ b/tests/mutex1r.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex2.c b/tests/mutex2.c index 8bd490f3..aa8d6274 100644 --- a/tests/mutex2.c +++ b/tests/mutex2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex2e.c b/tests/mutex2e.c index dd17ccd8..5c61a031 100644 --- a/tests/mutex2e.c +++ b/tests/mutex2e.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex2r.c b/tests/mutex2r.c index 740d6073..d6a0cde8 100644 --- a/tests/mutex2r.c +++ b/tests/mutex2r.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex3.c b/tests/mutex3.c index 94ca2dae..b47e31d0 100644 --- a/tests/mutex3.c +++ b/tests/mutex3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex3e.c b/tests/mutex3e.c index 40911fc8..0338858d 100644 --- a/tests/mutex3e.c +++ b/tests/mutex3e.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex3r.c b/tests/mutex3r.c index 891692b4..b655891e 100644 --- a/tests/mutex3r.c +++ b/tests/mutex3r.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex4.c b/tests/mutex4.c index 220c2601..37d98395 100644 --- a/tests/mutex4.c +++ b/tests/mutex4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex5.c b/tests/mutex5.c index 6d123793..141c46e4 100644 --- a/tests/mutex5.c +++ b/tests/mutex5.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex6.c b/tests/mutex6.c index 08081010..c8b93a73 100644 --- a/tests/mutex6.c +++ b/tests/mutex6.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex6e.c b/tests/mutex6e.c index d6f69546..33c5565a 100644 --- a/tests/mutex6e.c +++ b/tests/mutex6e.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex6es.c b/tests/mutex6es.c index 6fa2424f..0a1852c7 100644 --- a/tests/mutex6es.c +++ b/tests/mutex6es.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex6n.c b/tests/mutex6n.c index e4681a5c..6fa871fd 100644 --- a/tests/mutex6n.c +++ b/tests/mutex6n.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex6r.c b/tests/mutex6r.c index 41fc6914..16a4595e 100644 --- a/tests/mutex6r.c +++ b/tests/mutex6r.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex6rs.c b/tests/mutex6rs.c index d17566d7..0bc09f57 100644 --- a/tests/mutex6rs.c +++ b/tests/mutex6rs.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex6s.c b/tests/mutex6s.c index 26dc0215..2ab34d65 100644 --- a/tests/mutex6s.c +++ b/tests/mutex6s.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex7.c b/tests/mutex7.c index ee3fe5c1..b82f80d4 100644 --- a/tests/mutex7.c +++ b/tests/mutex7.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex7e.c b/tests/mutex7e.c index 1fc1a15f..b1561eaa 100644 --- a/tests/mutex7e.c +++ b/tests/mutex7e.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex7n.c b/tests/mutex7n.c index feca8ee2..d731a825 100644 --- a/tests/mutex7n.c +++ b/tests/mutex7n.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex7r.c b/tests/mutex7r.c index 3e0ae135..736af2ea 100644 --- a/tests/mutex7r.c +++ b/tests/mutex7r.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex8.c b/tests/mutex8.c index b2a297e7..3e29dfda 100644 --- a/tests/mutex8.c +++ b/tests/mutex8.c @@ -2,9 +2,9 @@ * mutex8.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex8e.c b/tests/mutex8e.c index b661e0de..64d53576 100644 --- a/tests/mutex8e.c +++ b/tests/mutex8e.c @@ -2,9 +2,9 @@ * mutex8e.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex8n.c b/tests/mutex8n.c index ee1ae16f..aae76050 100644 --- a/tests/mutex8n.c +++ b/tests/mutex8n.c @@ -2,9 +2,9 @@ * mutex8n.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/mutex8r.c b/tests/mutex8r.c index b0ff19f5..6ede7f4f 100644 --- a/tests/mutex8r.c +++ b/tests/mutex8r.c @@ -2,9 +2,9 @@ * mutex8r.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/name_np1.c b/tests/name_np1.c index 6bf2c56c..05a865bd 100644 --- a/tests/name_np1.c +++ b/tests/name_np1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/name_np2.c b/tests/name_np2.c index 2de7d516..abf44704 100644 --- a/tests/name_np2.c +++ b/tests/name_np2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/once1.c b/tests/once1.c index 3a7f2e8c..79c89491 100644 --- a/tests/once1.c +++ b/tests/once1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/once2.c b/tests/once2.c index ffd6bfe1..2e30540d 100644 --- a/tests/once2.c +++ b/tests/once2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/once3.c b/tests/once3.c index 75dcdcf5..9096e5ce 100644 --- a/tests/once3.c +++ b/tests/once3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/once4.c b/tests/once4.c index 678cf6b5..e219d3a0 100644 --- a/tests/once4.c +++ b/tests/once4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/priority1.c b/tests/priority1.c index d77420f8..88c94f01 100644 --- a/tests/priority1.c +++ b/tests/priority1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/priority2.c b/tests/priority2.c index c4552e62..10de253e 100644 --- a/tests/priority2.c +++ b/tests/priority2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/reuse1.c b/tests/reuse1.c index bcf8571c..f56fc7d3 100644 --- a/tests/reuse1.c +++ b/tests/reuse1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/reuse2.c b/tests/reuse2.c index 93643b90..0fea8db9 100644 --- a/tests/reuse2.c +++ b/tests/reuse2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/robust1.c b/tests/robust1.c index 4bb479ac..570b2856 100755 --- a/tests/robust1.c +++ b/tests/robust1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/robust2.c b/tests/robust2.c index 795a17ff..09a71fc6 100755 --- a/tests/robust2.c +++ b/tests/robust2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/robust3.c b/tests/robust3.c index e9d05c7d..10b9a41b 100755 --- a/tests/robust3.c +++ b/tests/robust3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/robust4.c b/tests/robust4.c index 35d5b84f..37ddb3a3 100755 --- a/tests/robust4.c +++ b/tests/robust4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/robust5.c b/tests/robust5.c index 82e592e9..729e23f9 100755 --- a/tests/robust5.c +++ b/tests/robust5.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/rwlock1.c b/tests/rwlock1.c index e76e920e..35aab6be 100644 --- a/tests/rwlock1.c +++ b/tests/rwlock1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/rwlock2.c b/tests/rwlock2.c index e9aff324..a0ac9d58 100644 --- a/tests/rwlock2.c +++ b/tests/rwlock2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/rwlock2_t.c b/tests/rwlock2_t.c index d6a96713..3f15da0d 100644 --- a/tests/rwlock2_t.c +++ b/tests/rwlock2_t.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/rwlock3.c b/tests/rwlock3.c index 08bda6e2..fe9f256c 100644 --- a/tests/rwlock3.c +++ b/tests/rwlock3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/rwlock3_t.c b/tests/rwlock3_t.c index 9076496e..3aa54ebb 100644 --- a/tests/rwlock3_t.c +++ b/tests/rwlock3_t.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/rwlock4.c b/tests/rwlock4.c index b1ff7e0e..c4120510 100644 --- a/tests/rwlock4.c +++ b/tests/rwlock4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/rwlock4_t.c b/tests/rwlock4_t.c index bc871b83..8ed5b849 100644 --- a/tests/rwlock4_t.c +++ b/tests/rwlock4_t.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/rwlock5.c b/tests/rwlock5.c index 2d6e80cc..501f001e 100644 --- a/tests/rwlock5.c +++ b/tests/rwlock5.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/rwlock5_t.c b/tests/rwlock5_t.c index 03e6c295..426eb8f2 100644 --- a/tests/rwlock5_t.c +++ b/tests/rwlock5_t.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/rwlock6.c b/tests/rwlock6.c index af523b44..ce7564dc 100644 --- a/tests/rwlock6.c +++ b/tests/rwlock6.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/rwlock6_t.c b/tests/rwlock6_t.c index b33cd480..59e9e4bf 100644 --- a/tests/rwlock6_t.c +++ b/tests/rwlock6_t.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/rwlock6_t2.c b/tests/rwlock6_t2.c index 279ca770..5ce31654 100644 --- a/tests/rwlock6_t2.c +++ b/tests/rwlock6_t2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/self1.c b/tests/self1.c index a02678cc..2913d1fc 100644 --- a/tests/self1.c +++ b/tests/self1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/self2.c b/tests/self2.c index 3fff003d..dbfdd1c1 100644 --- a/tests/self2.c +++ b/tests/self2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/semaphore1.c b/tests/semaphore1.c index 31968683..da12e709 100644 --- a/tests/semaphore1.c +++ b/tests/semaphore1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/semaphore2.c b/tests/semaphore2.c index de56cb31..6bbcceb5 100644 --- a/tests/semaphore2.c +++ b/tests/semaphore2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/semaphore3.c b/tests/semaphore3.c index 245b6614..6f00dde9 100644 --- a/tests/semaphore3.c +++ b/tests/semaphore3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/semaphore4.c b/tests/semaphore4.c index eab1d890..f3ea6d46 100644 --- a/tests/semaphore4.c +++ b/tests/semaphore4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/semaphore4t.c b/tests/semaphore4t.c index 28df6f56..883adbc7 100644 --- a/tests/semaphore4t.c +++ b/tests/semaphore4t.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/semaphore5.c b/tests/semaphore5.c index 5ebcb35c..72a56522 100644 --- a/tests/semaphore5.c +++ b/tests/semaphore5.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/sequence1.c b/tests/sequence1.c index 11fc68ce..2ea9bff8 100755 --- a/tests/sequence1.c +++ b/tests/sequence1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/spin1.c b/tests/spin1.c index 82af2ca7..2392f44f 100644 --- a/tests/spin1.c +++ b/tests/spin1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/spin2.c b/tests/spin2.c index 267cd5c3..35b9d5cd 100644 --- a/tests/spin2.c +++ b/tests/spin2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/spin3.c b/tests/spin3.c index e5a89cf5..f5dc5132 100644 --- a/tests/spin3.c +++ b/tests/spin3.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/spin4.c b/tests/spin4.c index eac5cb63..81fdb22f 100644 --- a/tests/spin4.c +++ b/tests/spin4.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/stress1.c b/tests/stress1.c index 333b5d7f..685b0b5e 100644 --- a/tests/stress1.c +++ b/tests/stress1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/test.h b/tests/test.h index db497678..d69c5312 100644 --- a/tests/test.h +++ b/tests/test.h @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/timeouts.c b/tests/timeouts.c index bf18e2ae..b080e4d6 100644 --- a/tests/timeouts.c +++ b/tests/timeouts.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/tryentercs.c b/tests/tryentercs.c index dec8f2f8..a676bf36 100644 --- a/tests/tryentercs.c +++ b/tests/tryentercs.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/tryentercs2.c b/tests/tryentercs2.c index 2dc6192d..7e28ca52 100644 --- a/tests/tryentercs2.c +++ b/tests/tryentercs2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/tsd1.c b/tests/tsd1.c index fe336ed7..b38bdd97 100644 --- a/tests/tsd1.c +++ b/tests/tsd1.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/tsd2.c b/tests/tsd2.c index 579fbe9f..5f82fd82 100644 --- a/tests/tsd2.c +++ b/tests/tsd2.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/tsd3.c b/tests/tsd3.c index 35f39bcf..19843ac4 100644 --- a/tests/tsd3.c +++ b/tests/tsd3.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/valid1.c b/tests/valid1.c index cc04c128..1a6c523e 100644 --- a/tests/valid1.c +++ b/tests/valid1.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/tests/valid2.c b/tests/valid2.c index 5b04fa6b..556beaef 100644 --- a/tests/valid2.c +++ b/tests/valid2.c @@ -4,9 +4,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ diff --git a/version.rc b/version.rc index 353ed595..70505c34 100644 --- a/version.rc +++ b/version.rc @@ -2,9 +2,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -155,7 +155,7 @@ BEGIN VALUE "InternalName", PTW32_VERSIONINFO_NAME VALUE "OriginalFilename", PTW32_VERSIONINFO_NAME VALUE "CompanyName", "Open Source Software community\0" - VALUE "LegalCopyright", "Copyright - Project contributors 1999-2016\0" + VALUE "LegalCopyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors 1999-2016\0" VALUE "Comments", "https://sourceforge.net/p/pthreads4w/wiki/Contributors/\0" END END diff --git a/w32_CancelableWait.c b/w32_CancelableWait.c index c342354c..d3c4c483 100644 --- a/w32_CancelableWait.c +++ b/w32_CancelableWait.c @@ -6,9 +6,9 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 + * pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Copyright(C) 1999-2021 pthreads-win32 / pthreads4w contributors * * Homepage1: http://sourceware.org/pthreads-win32/ * Homepage2: http://sourceforge.net/projects/pthreads4w/ @@ -38,7 +38,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "pthread.h"