Permalink
Browse files

updated to v2.9.1 release

  • Loading branch information...
GerHobbelt committed Jun 6, 2012
1 parent 0aa374a commit 3ef72b419aac885c439e787c3c5602f64a68621b
Showing with 350 additions and 188 deletions.
  1. +16 −15 ANNOUNCE
  2. +17 −0 ChangeLog
  3. +1 −1 GNUmakefile
  4. +3 −1 Makefile
  5. +15 −19 NEWS
  6. +9 −9 create.c
  7. +12 −4 implement.h
  8. +9 −9 pthread.h
  9. +6 −6 pthread_key_create.c
  10. +7 −7 pthread_once.c
  11. +1 −1 pthread_win32_attach_detach_np.c
  12. +8 −8 ptw32_threadStart.c
  13. +4 −4 ptw32_throw.c
  14. +1 −0 tests/Debug.2010.vcxproj
  15. +3 −0 tests/Debug.2010.vcxproj.filters
  16. +13 −8 tests/GNUmakefile
  17. +9 −7 tests/Makefile
  18. +13 −13 tests/SIZES.VC
  19. +29 −61 tests/create3.c
  20. +146 −0 tests/create3a.c
  21. +4 −2 tests/wrapper4tests_1.c
  22. +24 −13 version.rc
View
@@ -1,8 +1,8 @@
- PTHREADS-WIN32 RELEASE 2.9.0 (2007-??-??)
- -----------------------------------------
- Web Site: http://sources.redhat.com/pthreads-win32/
- FTP Site: ftp://sources.redhat.com/pub/pthreads-win32
- Maintainer: Ross Johnson <rpj@callisto.canberra.edu.au>
+PTHREADS-WIN32 RELEASE 2.9.0 (2012-05-25)
+-----------------------------------------
+Web Site: http://sourceware.org/pthreads-win32/
+FTP Site: ftp://sourceware.org/pub/pthreads-win32
+Maintainer: Ross Johnson <ross.johnson@loungebythelake.net>
We are pleased to announce the availability of a new release of
@@ -23,7 +23,7 @@ General Public License (LGPL).
Acknowledgements
----------------
This library is based originally on a Win32 pthreads
-implementation contributed by John Bossom <John.Bossom@cognos.com>.
+implementation contributed by John Bossom.
The implementation of Condition Variables uses algorithms developed
by Alexander Terekhov and Louis Thomas.
@@ -50,7 +50,7 @@ were extracted from it.
There is also a separate CONTRIBUTORS file. This file and others are
on the web site:
- http://sources.redhat.com/pthreads-win32
+ http://sourceware.org/pthreads-win32
As much as possible, the ChangeLog file acknowledges contributions to the
code base in more detail.
@@ -274,14 +274,15 @@ The following functions are implemented:
PTHREAD_MUTEX_ADAPTIVE_NP,
PTHREAD_MUTEX_TIMED_NP)
pthread_num_processors_np
- pthread_win32_process_attach_np (Required when statically linking
- the library)
- pthread_win32_process_detach_np (Required when statically linking
- the library)
- pthread_win32_thread_attach_np (Required when statically linking
- the library)
- pthread_win32_thread_detach_np (Required when statically linking
- the library)
+ (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
+ 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
---------------------------
Static Initializers
View
@@ -1,3 +1,20 @@
+2012-03-18 Ross Johnson <ross dot johnson at homemail dot com dot au>
+
+ * create.c (pthread_create): add __cdecl attribute to thread routine
+ arg
+ * implement.h (pthread_key_t): add __cdecl attribute to destructor
+ element
+ (ThreadParms): likewise for start element
+ * pthread.h (pthread_create): add __cdecl to prototype start arg
+ (pthread_once): likewise for init_routine arg
+ (pthread_key_create): likewise for destructor arg
+ (ptw32_cleanup_push): replace type of routine arg with previously
+ defined ptw32_cleanup_callback_t
+ * pthread_key_create.c: add __cdecl attribute to destructor arg
+ * pthread_once.c: add __cdecl attribute to init_routine arg
+ * ptw32_threadStart.c (start): add __cdecl to start variable type
+
+
2011-07-06 Ross Johnson <ross dot johnson at homemail dot com dot au>
* pthread_cond_wait.c (pragma inline_depth): this is almost redundant
View
@@ -515,7 +515,7 @@ tests:
$(CC) -c $(CFLAGS) -DPTW32_BUILD_INLINED -Wa,-ahl $^ > $@
%.o: %.rc
- $(RC) $(RCFLAGS) $(CLEANUP) -o $@ $<
+ $(RC) $(RCFLAGS) $(CLEANUP) -o $@ -i $<
.SUFFIXES: .dll .rc .c .o
View
@@ -488,8 +488,10 @@ $(STATIC_STAMPS): $(DLL_INLINED_OBJS)
.c.obj:
$(CC) $(EHFLAGS) /D$(CLEANUP) -c $<
+# TARGET_CPU is an environment variable set by Visual Studio Command Prompt
+# as provided by the SDK
.rc.res:
- rc /dPTW32_RC_MSC /d$(CLEANUP) $<
+ rc /dPTW32_ARCH$(TARGET_CPU) /dPTW32_RC_MSC /d$(CLEANUP) $<
.c.i:
$(CC) /P /O2 /Ob1 $(VCFLAGS) $<
View
34 NEWS
@@ -1,43 +1,39 @@
-CURRENT CVS HEAD Version
-RELEASE 2.9.0 pending
+RELEASE 2.9.0
-------------
-(2011-??-??)
+(2012-05-25)
General
-------
New bug fixes in this release since 2.8.0 have NOT been applied to the
1.x.x series.
-Version 2.8.0 may be the last release for some older Windows systems.
Some changes post 2011-02-26 in CVS may not be compatible with pre
Windows 2000 systems.
-Version 1 no longer maintained
-------------------------------
-The 1.x.x series is no longer maintained. However, if you really need a
-version 1, the differences between 1.11.0 and 2.7.0 are very small, mainly
-revolving around the pthread_once_t_ struct. Those differences applied
-as a patch to the current 2.x.x should work. Don't forget to change
-the version numbering in pthread.h before building. If you distribute
-such a version 1.x.x please bear in mind that your numbers may clash
-with those of others doing the same thing. Please consider also making
-identifying changes in version.rc to differentiate your build.
+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
------------------------
-The current CVS head version has been tested on an SMP architecture
-(AMD Phenom 9750 Quad Core) by running the MinGW32 (GCC) builds against
-the full test suite, stress tests and benchmarks.
+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 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.
View
@@ -10,25 +10,25 @@
* 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.,
@@ -44,7 +44,7 @@
int
pthread_create (pthread_t * tid,
const pthread_attr_t * attr,
- void *(*start) (void *), void *arg)
+ void *(PTW32_CDECL *start) (void *), void *arg)
/*
* ------------------------------------------------------
* DOCPUBLIC
@@ -200,7 +200,7 @@ pthread_create (pthread_t * tid,
* finished with it here.
*/
-#if ! (defined (__MINGW64__) || defined(__MINGW32__)) || defined (__MSVCRT__) || defined (__DMC__)
+#if ! (defined (__MINGW64__) || defined(__MINGW32__)) || defined (__MSVCRT__) || defined (__DMC__)
tp->threadH =
threadH =
@@ -252,14 +252,14 @@ pthread_create (pthread_t * tid,
{
if (!run)
{
- /*
+ /*
* beginthread does not allow for create flags, so we do it now.
* Note that beginthread itself creates the thread in SUSPENDED
* mode, and then calls ResumeThread to start it.
*/
SuspendThread (threadH);
}
-
+
if (a != NULL)
{
(void) ptw32_setthreadpriority (thread, SCHED_OTHER, priority);
View
@@ -97,11 +97,19 @@ typedef VOID (APIENTRY *PAPCFUNC)(DWORD dwParam);
#define PTW32_INTERLOCKED_VOLATILE volatile
#endif
#define PTW32_INTERLOCKED_LONG long
+#if defined(_M_IA64)
+#define PTW32_INTERLOCKED_SIZE LONG64
+#elif defined(_M_AMD64)
+#define PTW32_INTERLOCKED_SIZE LONG64
+#else
#define PTW32_INTERLOCKED_SIZE LONG
+#endif
#define PTW32_INTERLOCKED_PVOID PVOID
#define PTW32_INTERLOCKED_LONGPTR PTW32_INTERLOCKED_VOLATILE long*
-#if defined(_WIN64)
-#define PTW32_INTERLOCKED_SIZEPTR PTW32_INTERLOCKED_VOLATILE LONGLONG*
+#if defined(_M_IA64)
+#define PTW32_INTERLOCKED_SIZEPTR PTW32_INTERLOCKED_VOLATILE LONG64*
+#elif defined(_M_AMD64)
+#define PTW32_INTERLOCKED_SIZEPTR PTW32_INTERLOCKED_VOLATILE LONG64*
#else
#define PTW32_INTERLOCKED_SIZEPTR PTW32_INTERLOCKED_VOLATILE LONG*
#endif
@@ -336,7 +344,7 @@ struct pthread_barrierattr_t_
struct pthread_key_t_
{
DWORD key;
- void (*destructor) (void *);
+ void (PTW32_CDECL *destructor) (void *);
ptw32_mcs_lock_t keyLock;
void *threads;
};
@@ -347,7 +355,7 @@ typedef struct ThreadParms ThreadParms;
struct ThreadParms
{
pthread_t tid;
- void *(*start) (void *);
+ void *(PTW32_CDECL *start) (void *);
void *arg;
};
View
@@ -37,8 +37,8 @@
* See the README file for an explanation of the pthreads-win32 version
* numbering scheme and how the DLL is named etc.
*/
-#define PTW32_VERSION 2,9,0,0
-#define PTW32_VERSION_STRING "2, 9, 0, 0\0"
+#define PTW32_VERSION 2,9,1,0
+#define PTW32_VERSION_STRING "2, 9, 1, 0\0"
/* There are three implementations of cancel cleanup.
* Note that pthread.h is included in both application
@@ -773,7 +773,7 @@ struct ptw32_cleanup_t
{ \
ptw32_cleanup_t _cleanup; \
\
- _cleanup.routine = _rout; \
+ _cleanup.routine = (ptw32_cleanup_callback_t)(_rout); \
_cleanup.arg = (_arg); \
__try \
{ \
@@ -801,7 +801,7 @@ struct ptw32_cleanup_t
{ \
ptw32_cleanup_t _cleanup; \
\
- ptw32_push_cleanup( &_cleanup, _rout, (_arg) ); \
+ ptw32_push_cleanup( &_cleanup, (ptw32_cleanup_callback_t) (_rout), (_arg) ); \
#define pthread_cleanup_pop( _execute ) \
(void) ptw32_pop_cleanup( _execute ); \
@@ -878,7 +878,7 @@ struct ptw32_cleanup_t
*/
#define pthread_cleanup_push( _rout, _arg ) \
{ \
- PThreadCleanup cleanup(_rout, \
+ PThreadCleanup cleanup((ptw32_cleanup_callback_t)(_rout), \
(void *) (_arg) );
#define pthread_cleanup_pop( _execute ) \
@@ -957,7 +957,7 @@ PTW32_DLLPORT int PTW32_CDECL pthread_attr_getscope (const pthread_attr_t *,
*/
PTW32_DLLPORT int PTW32_CDECL pthread_create (pthread_t * tid,
const pthread_attr_t * attr,
- void *(*start) (void *),
+ void *(PTW32_CDECL *start) (void *),
void *arg);
PTW32_DLLPORT int PTW32_CDECL pthread_detach (pthread_t tid);
@@ -983,21 +983,21 @@ PTW32_DLLPORT int PTW32_CDECL pthread_setcanceltype (int type,
PTW32_DLLPORT void PTW32_CDECL pthread_testcancel (void);
PTW32_DLLPORT int PTW32_CDECL pthread_once (pthread_once_t * once_control,
- void (*init_routine) (void));
+ 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 void PTW32_CDECL ptw32_push_cleanup (ptw32_cleanup_t * cleanup,
- void (*routine) (void *),
+ 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 (*destructor) (void *));
+ void (PTW32_CDECL *destructor) (void *));
PTW32_DLLPORT int PTW32_CDECL pthread_key_delete (pthread_key_t key);
View
@@ -9,25 +9,25 @@
* 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.,
@@ -44,7 +44,7 @@
#endif
int
-pthread_key_create (pthread_key_t * key, void (*destructor) (void *))
+pthread_key_create (pthread_key_t * key, void (PTW32_CDECL *destructor) (void *))
/*
* ------------------------------------------------------
* DOCPUBLIC
Oops, something went wrong.

0 comments on commit 3ef72b4

Please sign in to comment.