~ubuntu-branches/ubuntu/raring/clamav/raring-updates

« back to all changes in this revision

Viewing changes to win32/3rdparty/pthreads/NEWS

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2011-06-18 11:56:34 UTC
  • mfrom: (0.35.21 sid)
  • Revision ID: james.westby@ubuntu.com-20110618115634-u2lovivet0qx34d0
Tags: 0.97.1+dfsg-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop build-dep on electric-fence (in Universe)
  - Add apparmor profiles for clamd and freshclam along with maintainer
    script changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
RELEASE 2.9.0
2
 
-------------
3
 
(2008-??-??)
4
 
 
5
 
General
6
 
-------
7
 
New bug fixes in this release since 2.8.0 have NOT been applied to the
8
 
1.x.x series.
9
 
 
10
 
Version 1 no longer maintained
11
 
------------------------------
12
 
The 1.x.x series is no longer maintained. However, if you really need a
13
 
version 1, the differences between 1.11.0 and 2.7.0 are very small, mainly
14
 
revolving around the pthread_once_t_ struct. Those differences applied
15
 
as a patch to the current 2.x.x should work. Don't forget to change
16
 
the version numbering in pthread.h before building. If you distribute
17
 
such a version 1.x.x please bear in mind that your numbers may clash
18
 
with those of others doing the same thing. Please consider also making
19
 
identifying changes in version.rc to differentiate your build.
20
 
 
21
 
Testing and verification
22
 
------------------------
23
 
This release has been tested on UP and SMP architectures. Thanks to Tim
24
 
Theisen for running the Win32 SMP tests.
25
 
 
26
 
Bug fixes
27
 
---------
28
 
Various modifications and fixes to build and test for WinCE.
29
 
- Marcel Ruff, Sinan Kaya
30
 
 
31
 
Fix pthread_cond_destroy() - should not be a cancellation point. Other
32
 
minor build problems fixed.
33
 
- Romano Paolo Tenca
34
 
 
35
 
Remove potential deadlock condition from pthread_cond_destroy().
36
 
- Eric Berge
37
 
 
38
 
Various modifications to build and test for Win64.
39
 
- Kip Streithorst
40
 
 
41
 
Various fixes to the QueueUserAPCEx async cancellation helper DLL
42
 
and pthreads code cleanups.
43
 
- Sebastian Gottschalk
44
 
 
45
 
Removed potential NULL pointer reference.
46
 
- Robert Kindred
47
 
 
48
 
 
49
 
RELEASE 2.8.0
50
 
-------------
51
 
(2006-12-22)
52
 
 
53
 
General
54
 
-------
55
 
New bug fixes in this release since 2.7.0 have not been applied to the
56
 
version 1.x.x series. It is probably time to drop version 1.
57
 
 
58
 
Testing and verification
59
 
------------------------
60
 
This release has not yet been tested on SMP architechtures. All tests pass
61
 
on a uni-processor system.
62
 
 
63
 
Bug fixes
64
 
---------
65
 
Sem_destroy could return EBUSY even though no threads were waiting on the 
66
 
semaphore. Other races around invalidating semaphore structs (internally)
67
 
have been removed as well.
68
 
 
69
 
New tests
70
 
---------
71
 
semaphore5.c - tests the bug fix referred to above.
72
 
 
73
 
 
74
 
RELEASE 2.7.0
75
 
-------------
76
 
(2005-06-04)
77
 
 
78
 
General
79
 
-------
80
 
All new features in this release have been back-ported in release 1.11.0,
81
 
including the incorporation of MCS locks in pthread_once, however, versions
82
 
1 and 2 remain incompatible even though they are now identical in
83
 
performance and functionality.
84
 
 
85
 
Testing and verification
86
 
------------------------
87
 
This release has been tested (passed the test suite) on both uni-processor
88
 
and multi-processor systems.
89
 
- Tim Theisen
90
 
 
91
 
Bug fixes
92
 
---------
93
 
Pthread_once has been re-implemented to remove priority boosting and other
94
 
complexity to improve robustness. Races for Win32 handles that are not
95
 
recycle-unique have been removed. The general form of pthread_once is now
96
 
the same as that suggested earlier by Alexander Terekhov, but instead of the
97
 
'named mutex', a queue-based lock has been implemented which has the required
98
 
properties of dynamic self initialisation and destruction. This lock is also
99
 
efficient. The ABI is unaffected in as much as the size of pthread_once_t has
100
 
not changed and PTHREAD_ONCE_INIT has not changed, however, applications that
101
 
peek inside pthread_once_t, which is supposed to be opaque, will break.
102
 
- Vladimir Kliatchko
103
 
 
104
 
New features
105
 
------------
106
 
* Support for Mingw cross development tools added to GNUmakefile.
107
 
Mingw cross tools allow building the libraries on Linux.
108
 
- Mikael Magnusson
109
 
 
110
 
 
111
 
RELEASE 2.6.0
112
 
-------------
113
 
(2005-05-19)
114
 
 
115
 
General
116
 
-------
117
 
All of the bug fixes and new features in this release have been
118
 
back-ported in release 1.10.0.
119
 
 
120
 
Testing and verification
121
 
------------------------
122
 
This release has been tested (passed the test suite) on both uni-processor
123
 
and multi-processor systems. Thanks to Tim Theisen at TomoTherapy for
124
 
exhaustively running the MP tests and for providing crutial observations
125
 
and data when faults are detected.
126
 
 
127
 
Bugs fixed
128
 
----------
129
 
 
130
 
* pthread_detach() now reclaims remaining thread resources if called after
131
 
the target thread has terminated. Previously, this routine did nothing in
132
 
this case.
133
 
 
134
 
New tests
135
 
---------
136
 
 
137
 
* detach1.c - tests that pthread_detach properly invalidates the target
138
 
thread, which indicates that the thread resources have been reclaimed.
139
 
 
140
 
 
141
 
RELEASE 2.5.0
142
 
-------------
143
 
(2005-05-09)
144
 
 
145
 
General
146
 
-------
147
 
 
148
 
The package now includes a reference documentation set consisting of
149
 
HTML formatted Unix-style manual pages that have been edited for
150
 
consistency with Pthreads-w32. The set can also be read online at:
151
 
http://sources.redhat.com/pthreads-win32/manual/index.html
152
 
 
153
 
Thanks again to Tim Theisen for running the test suite pre-release
154
 
on an MP system.
155
 
 
156
 
All of the bug fixes and new features in this release have been
157
 
back-ported in release 1.9.0.
158
 
 
159
 
Bugs fixed
160
 
----------
161
 
 
162
 
* Thread Specific Data (TSD) key management has been ammended to
163
 
eliminate a source of (what was effectively) resource leakage (a HANDLE
164
 
plus memory for each key destruct routine/thread association). This was
165
 
not a true leak because these resources were eventually reclaimed when
166
 
pthread_key_delete was run AND each thread referencing the key had exited.
167
 
The problem was that these two conditions are often not met until very
168
 
late, and often not until the process is about to exit.
169
 
 
170
 
The ammended implementation avoids the need for the problematic HANDLE
171
 
and reclaims the memory as soon as either the key is deleted OR the
172
 
thread exits, whichever is first.
173
 
 
174
 
Thanks to Richard Hughes at Aculab for identifying and locating the leak.
175
 
 
176
 
* TSD key destructors are now processed up to PTHREAD_DESTRUCTOR_ITERATIONS
177
 
times instead of just once. PTHREAD_DESTRUCTOR_ITERATIONS has been
178
 
defined in pthread.h for some time but not used.
179
 
 
180
 
* Fix a semaphore accounting race between sem_post/sem_post_multiple
181
 
and sem_wait cancellation. This is the same issue as with
182
 
sem_timedwait that was fixed in the last release.
183
 
 
184
 
* sem_init, sem_post, and sem_post_multiple now check that the
185
 
semaphore count never exceeds _POSIX_SEM_VALUE_MAX.
186
 
 
187
 
* Although sigwait() is nothing more than a no-op, it should at least
188
 
be a cancellation point to be consistent with the standard.
189
 
 
190
 
New tests
191
 
---------
192
 
 
193
 
* stress1.c - attempts to expose problems in condition variable
194
 
and semaphore timed wait logic. This test was inspired by Stephan
195
 
Mueller's sample test code used to identify the sem_timedwait bug
196
 
from the last release. It's not a part of the regular test suite
197
 
because it can take awhile to run. To run it:
198
 
nmake clean VC-stress
199
 
 
200
 
* tsd2.c - tests that key destructors are re-run if the tsd key value is
201
 
not NULL after the destructor routine has run. Also tests that
202
 
pthread_setspecific() and pthread_getspecific() are callable from
203
 
destructors.
204
 
 
205
 
 
206
 
RELEASE 2.4.0
207
 
-------------
208
 
(2005-04-26)
209
 
 
210
 
General
211
 
-------
212
 
 
213
 
There is now no plan to release a version 3.0.0 to fix problems in
214
 
pthread_once(). Other possible implementations of pthread_once
215
 
will still be investigated for a possible future release in an attempt
216
 
to reduce the current implementation's complexity.
217
 
 
218
 
All of the bug fixes and new features in this release have been
219
 
back-ported for release 1.8.0.
220
 
 
221
 
Bugs fixed
222
 
----------
223
 
 
224
 
* Fixed pthread_once race (failures on an MP system). Thanks to
225
 
Tim Theisen for running exhaustive pre-release testing on his MP system
226
 
using a range of compilers:
227
 
  VC++ 6
228
 
  VC++ 7.1
229
 
  Intel C++ version 8.0
230
 
All tests passed.
231
 
Some minor speed improvements were also done.
232
 
 
233
 
* Fix integer overrun error in pthread_mutex_timedlock() - missed when
234
 
sem_timedwait() was fixed in release 2.2.0. This routine no longer returns
235
 
ENOTSUP when NEED_SEM is defined - it is supported (NEED_SEM is only
236
 
required for WinCE versions prior to 3.0).
237
 
 
238
 
* Fix timeout bug in sem_timedwait().
239
 
- Thanks to Stephan Mueller for reporting, providing diagnostic output
240
 
and test code.
241
 
 
242
 
* Fix several problems in the NEED_SEM conditionally included code.
243
 
NEED_SEM included code is provided for systems that don't implement W32
244
 
semaphores, such as WinCE prior to version 3.0. An alternate implementation
245
 
of POSIX semaphores is built using W32 events for these systems when
246
 
NEED_SEM is defined. This code has been completely rewritten in this
247
 
release to reuse most of the default POSIX semaphore code, and particularly,
248
 
to implement all of the sem_* routines supported by pthreads-win32. Tim
249
 
Theisen also run the test suite over the NEED_SEM code on his MP system. All
250
 
tests passed.
251
 
 
252
 
* The library now builds without errors for the Borland Builder 5.5 compiler.
253
 
 
254
 
New features
255
 
------------
256
 
 
257
 
* pthread_mutex_timedlock() and all sem_* routines provided by
258
 
pthreads-win32 are now implemented for WinCE versions prior to 3.0. Those
259
 
versions did not implement W32 semaphores. Define NEED_SEM in config.h when
260
 
building the library for these systems.
261
 
 
262
 
Known issues in this release
263
 
----------------------------
264
 
 
265
 
* pthread_once is too complicated - but it works as far as testing can
266
 
determine..
267
 
 
268
 
* The Borland version of the dll fails some of the tests with a memory read
269
 
exception. The cause is not yet known but a compiler bug has not been ruled
270
 
out.
271
 
 
272
 
 
273
 
RELEASE 2.3.0
274
 
-------------
275
 
(2005-04-12)
276
 
 
277
 
General
278
 
-------
279
 
 
280
 
Release 1.7.0 is a backport of features and bug fixes new in
281
 
this release. See earlier notes under Release 2.0.0/General.
282
 
 
283
 
Bugs fixed
284
 
----------
285
 
 
286
 
* Fixed pthread_once potential for post once_routine cancellation
287
 
hanging due to starvation. See comments in pthread_once.c.
288
 
Momentary priority boosting is used to ensure that, after a
289
 
once_routine is cancelled, the thread that will run the
290
 
once_routine is not starved by higher priority waiting threads at
291
 
critical times. Priority boosting occurs only AFTER a once_routine 
292
 
cancellation, and is applied only to that once_control. The
293
 
once_routine is run at the thread's normal base priority.
294
 
 
295
 
New tests
296
 
---------
297
 
 
298
 
* once4.c: Aggressively tests pthread_once() under realtime
299
 
conditions using threads with varying priorities. Windows'
300
 
random priority boosting does not occur for threads with realtime
301
 
priority levels.
302
 
 
303
 
 
304
 
RELEASE 2.2.0
305
 
-------------
306
 
(2005-04-04)
307
 
 
308
 
General
309
 
-------
310
 
 
311
 
* Added makefile targets to build static link versions of the library.
312
 
Both MinGW and MSVC. Please note that this does not imply any change
313
 
to the LGPL licensing, which still imposes psecific conditions on
314
 
distributing software that has been statically linked with this library.
315
 
 
316
 
* There is a known bug in pthread_once(). Cancellation of the init_routine
317
 
exposes a potential starvation (i.e. deadlock) problem if a waiting thread
318
 
has a higher priority than the initting thread. This problem will be fixed
319
 
in version 3.0.0 of the library.
320
 
 
321
 
Bugs fixed
322
 
----------
323
 
 
324
 
* Fix integer overrun error in sem_timedwait().
325
 
Kevin Lussier
326
 
 
327
 
* Fix preprocessor directives for static linking.
328
 
Dimitar Panayotov
329
 
 
330
 
 
331
 
RELEASE 2.1.0
332
 
-------------
333
 
(2005-03-16)
334
 
 
335
 
Bugs fixed
336
 
----------
337
 
 
338
 
* Reverse change to pthread_setcancelstate() in 2.0.0.
339
 
 
340
 
 
341
 
RELEASE 2.0.0
342
 
-------------
343
 
(2005-03-16)
344
 
 
345
 
General
346
 
-------
347
 
 
348
 
This release represents an ABI change and the DLL version naming has
349
 
incremented from 1 to 2, e.g. pthreadVC2.dll.
350
 
 
351
 
Version 1.4.0 back-ports the new functionality included in this
352
 
release. Please distribute DLLs built from that version with updates
353
 
to applications built on pthreads-win32 version 1.x.x.
354
 
 
355
 
The package naming has changed, replacing the snapshot date with 
356
 
the version number + descriptive information. E.g. this
357
 
release is "pthreads-w32-2-0-0-release".
358
 
 
359
 
Bugs fixed
360
 
----------
361
 
 
362
 
* pthread_setcancelstate() no longer checks for a pending
363
 
async cancel event if the library is using alertable async
364
 
cancel. See the README file (Prerequisites section) for info
365
 
on adding alertable async cancelation.
366
 
 
367
 
New features
368
 
------------
369
 
 
370
 
* pthread_once() now supports init_routine cancellability.
371
 
 
372
 
New tests
373
 
---------
374
 
 
375
 
* Agressively test pthread_once() init_routine cancellability.
376
 
 
377
 
 
378
 
SNAPSHOT 2005-03-08
379
 
-------------------
380
 
Version 1.3.0
381
 
 
382
 
Bug reports (fixed)
383
 
-------------------
384
 
 
385
 
* Implicitly created threads leave Win32 handles behind after exiting.
386
 
- Dmitrii Semii
387
 
 
388
 
* pthread_once() starvation problem.
389
 
- Gottlob Frege
390
 
 
391
 
New tests
392
 
---------
393
 
 
394
 
* More intense testing of pthread_once().
395
 
 
396
 
 
397
 
SNAPSHOT 2005-01-25
398
 
-------------------
399
 
Version 1.2.0
400
 
 
401
 
Bug fixes
402
 
---------
403
 
 
404
 
* Attempted acquisition of a recursive mutex could cause waiting threads
405
 
to not be woken when the mutex was released.
406
 
- Ralf Kubis  <RKubis at mc.com>
407
 
 
408
 
* Various package omissions have been fixed.
409
 
 
410
 
 
411
 
SNAPSHOT 2005-01-03
412
 
-------------------
413
 
Version 1.1.0
414
 
 
415
 
Bug fixes
416
 
---------
417
 
 
418
 
* Unlocking recursive or errorcheck mutexes would sometimes
419
 
unexpectedly return an EPERM error (bug introduced in
420
 
snapshot-2004-11-03).
421
 
- Konstantin Voronkov  <beowinkle at yahoo.com>
422
 
 
423
 
 
424
 
SNAPSHOT 2004-11-22
425
 
-------------------
426
 
Version 1.0.0
427
 
 
428
 
This snapshot primarily fixes the condvar bug introduced in
429
 
snapshot-2004-11-03. DLL versioning has also been included to allow
430
 
applications to runtime check the Microsoft compatible DLL version
431
 
information, and to extend the DLL naming system for ABI and major
432
 
(non-backward compatible) API changes. See the README file for details.
433
 
 
434
 
Bug fixes
435
 
---------
436
 
 
437
 
* Condition variables no longer deadlock (bug introduced in
438
 
snapshot-2004-11-03).
439
 
- Alexander Kotliarov and Nicolas at saintmac
440
 
 
441
 
* DLL naming extended to avoid 'DLL hell' in the future, and to
442
 
accommodate the ABI change introduced in snapshot-2004-11-03. Snapshot
443
 
2004-11-03 will be removed from FTP sites.
444
 
 
445
 
New features
446
 
------------
447
 
 
448
 
* A Microsoft-style version resource has been added to the DLL for
449
 
applications that wish to check DLL compatibility at runtime.
450
 
 
451
 
* Pthreads-win32 DLL naming has been extended to allow incompatible DLL
452
 
versions to co-exist in the same filesystem. See the README file for details,
453
 
but briefly: while the version information inside the DLL will change with
454
 
each release from now on, the DLL version names will only change if the new
455
 
DLL is not backward compatible with older applications.
456
 
 
457
 
The versioning scheme has been borrowed from GNU Libtool, and the DLL
458
 
naming scheme is from Cygwin. Provided the Libtool-style numbering rules are
459
 
honoured, the Cygwin DLL naming scheme automatcally ensures that DLL name
460
 
changes are minimal and that applications will not load an incompatible
461
 
pthreads-win32 DLL.
462
 
 
463
 
Those who use the pre-built DLLs will find that the DLL/LIB names have a new
464
 
suffix (1) in this snapshot. E.g. pthreadVC1.dll etc.
465
 
 
466
 
* The POSIX thread ID reuse uniqueness feature introduced in the last snapshot
467
 
has been kept as default, but the behaviour can now be controlled when the DLL
468
 
is built to effectively switch it off. This makes the library much more
469
 
sensitive to applications that assume that POSIX thread IDs are unique, i.e.
470
 
are not strictly compliant with POSIX. See the PTW32_THREAD_ID_REUSE_INCREMENT
471
 
macro comments in config.h for details.
472
 
 
473
 
Other changes
474
 
-------------
475
 
Certain POSIX macros have changed.
476
 
 
477
 
These changes are intended to conform to the Single Unix Specification version 3,
478
 
which states that, if set to 0 (zero) or not defined, then applications may use
479
 
sysconf() to determine their values at runtime. Pthreads-win32 does not
480
 
implement sysconf().
481
 
 
482
 
The following macros are no longer undefined, but defined and set to -1
483
 
(not implemented):
484
 
 
485
 
      _POSIX_THREAD_ATTR_STACKADDR
486
 
      _POSIX_THREAD_PRIO_INHERIT
487
 
      _POSIX_THREAD_PRIO_PROTECT
488
 
      _POSIX_THREAD_PROCESS_SHARED
489
 
 
490
 
The following macros are defined and set to 200112L (implemented):
491
 
 
492
 
      _POSIX_THREADS
493
 
      _POSIX_THREAD_SAFE_FUNCTIONS
494
 
      _POSIX_THREAD_ATTR_STACKSIZE
495
 
      _POSIX_THREAD_PRIORITY_SCHEDULING
496
 
      _POSIX_SEMAPHORES
497
 
      _POSIX_READER_WRITER_LOCKS
498
 
      _POSIX_SPIN_LOCKS
499
 
      _POSIX_BARRIERS
500
 
 
501
 
The following macros are defined and set to appropriate values:
502
 
 
503
 
      _POSIX_THREAD_THREADS_MAX
504
 
      _POSIX_SEM_VALUE_MAX
505
 
      _POSIX_SEM_NSEMS_MAX
506
 
      PTHREAD_DESTRUCTOR_ITERATIONS
507
 
      PTHREAD_KEYS_MAX
508
 
      PTHREAD_STACK_MIN
509
 
      PTHREAD_THREADS_MAX
510
 
 
511
 
 
512
 
SNAPSHOT 2004-11-03
513
 
-------------------
514
 
 
515
 
DLLs produced from this snapshot cannot be used with older applications without
516
 
recompiling the application, due to a change to pthread_t to provide unique POSIX
517
 
thread IDs.
518
 
 
519
 
Although this snapshot passes the extended test suite, many of the changes are
520
 
fairly major, and some applications may show different behaviour than previously,
521
 
so adopt with care. Hopefully, any changed behaviour will be due to the library
522
 
being better at it's job, not worse.
523
 
 
524
 
Bug fixes
525
 
---------
526
 
 
527
 
* pthread_create() no longer accepts NULL as the thread reference arg.
528
 
A segfault (memory access fault) will result, and no thread will be
529
 
created.
530
 
 
531
 
* pthread_barrier_wait() no longer acts as a cancelation point.
532
 
 
533
 
* Fix potential race condition in pthread_once()
534
 
- Tristan Savatier  <tristan at mpegtv.com>
535
 
 
536
 
* Changes to pthread_cond_destroy() exposed some coding weaknesses in several
537
 
test suite mini-apps because pthread_cond_destroy() now returns EBUSY if the CV
538
 
is still in use.
539
 
 
540
 
New features
541
 
------------
542
 
 
543
 
* Added for compatibility:
544
 
PTHREAD_RECURSIVE_MUTEX_INITIALIZER,
545
 
PTHREAD_ERRORCHECK_MUTEX_INITIALIZER,
546
 
PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
547
 
PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
548
 
 
549
 
* Initial support for Digital Mars compiler
550
 
- Anuj Goyal  <anuj.goyal at gmail.com>
551
 
 
552
 
* Faster Mutexes. These have been been rewritten following a model provided by
553
 
Alexander Terekhov that reduces kernel space checks, and eliminates some additional
554
 
critical sections used to manage a race between timedlock expiration and unlock.
555
 
Please be aware that the new mutexes do not enforce strict absolute FIFO scheduling
556
 
of mutexes, however any out-of-order lock acquisition should be very rare.
557
 
 
558
 
* Faster semaphores. Following a similar model to mutexes above, these have been
559
 
rewritten to use preliminary users space checks.
560
 
 
561
 
* sem_getvalue() now returns the number of waiters.
562
 
 
563
 
* The POSIX thread ID now has much stronger uniqueness characteristics. The library
564
 
garrantees not to reuse the same thread ID for at least 2^(wordsize) thread
565
 
destruction/creation cycles.
566
 
 
567
 
New tests
568
 
---------
569
 
 
570
 
* semaphore4.c: Tests cancelation of the new sem_wait().
571
 
 
572
 
* semaphore4t.c: Likewise for sem_timedwait().
573
 
 
574
 
* rwlock8.c: Tests and times the slow execution paths of r/w locks, and the CVs,
575
 
mutexes, and semaphores that they're built on.
576
 
 
577
 
 
578
 
SNAPSHOT 2004-05-16
579
 
-------------------
580
 
 
581
 
Attempt to add Watcom to the list of compilers that can build the library.
582
 
This failed in the end due to it's non-thread-aware errno. The library
583
 
builds but the test suite fails. See README.Watcom for more details.
584
 
 
585
 
Bug fixes
586
 
---------
587
 
* Bug and memory leak in sem_init()
588
 
- Alex Blanco  <Alex.Blanco at motorola.com>
589
 
 
590
 
* ptw32_getprocessors() now returns CPU count of 1 for WinCE.
591
 
- James Ewing  <james.ewing at sveasoft.com>
592
 
 
593
 
* pthread_cond_wait() could be canceled at a point where it should not
594
 
be cancelable. Fixed.
595
 
- Alexander Terekhov  <TEREKHOV at de.ibm.com>
596
 
 
597
 
* sem_timedwait() had an incorrect timeout calculation.
598
 
- Philippe Di Cristo  <philipped at voicebox.com>
599
 
 
600
 
* Fix a memory leak left behind after threads are destroyed.
601
 
- P. van Bruggen  <pietvb at newbridges.nl>
602
 
 
603
 
New features
604
 
------------
605
 
* Ported to AMD64.
606
 
- Makoto Kato  <raven at oldskool.jp>
607
 
 
608
 
* True pre-emptive asynchronous cancelation of threads. This is optional
609
 
and requires that Panagiotis E. Hadjidoukas's QueueUserAPCEx package be
610
 
installed. This package is included in the pthreads-win32 self-unpacking
611
 
Zip archive starting from this snapshot. See the README.txt file inside
612
 
the package for installation details.
613
 
 
614
 
Note: If you don't use async cancelation in your application, or don't need
615
 
to cancel threads that are blocked on system resources such as network I/O,
616
 
then the default non-preemptive async cancelation is probably good enough.
617
 
However, pthreads-win32 auto-detects the availability of these components
618
 
at run-time, so you don't need to rebuild the library from source if you
619
 
change your mind later.
620
 
 
621
 
All of the advice available in books and elsewhere on the undesirability
622
 
of using async cancelation in any application still stands, but this
623
 
feature is a welcome addition with respect to the library's conformance to
624
 
the POSIX standard.
625
 
 
626
 
SNAPSHOT 2003-09-18
627
 
-------------------
628
 
 
629
 
Cleanup of thread priority management. In particular, setting of thread
630
 
priority now attempts to map invalid Win32 values within the range returned
631
 
by sched_get_priority_min/max() to useful values. See README.NONPORTABLE
632
 
under "Thread priority".
633
 
 
634
 
Bug fixes
635
 
---------
636
 
* pthread_getschedparam() now returns the priority given by the most recent
637
 
call to pthread_setschedparam() or established by pthread_create(), as
638
 
required by the standard. Previously, pthread_getschedparam() incorrectly
639
 
returned the running thread priority at the time of the call, which may have
640
 
been adjusted or temporarily promoted/demoted.
641
 
 
642
 
* sched_get_priority_min() and sched_get_priority_max() now return -1 on error
643
 
and set errno. Previously, they incorrectly returned the error value directly.
644
 
 
645
 
 
646
 
SNAPSHOT 2003-09-04
647
 
-------------------
648
 
 
649
 
Bug fixes
650
 
---------
651
 
* ptw32_cancelableWait() now allows cancelation of waiting implicit POSIX
652
 
threads.
653
 
 
654
 
New test
655
 
--------
656
 
* cancel8.c tests cancelation of Win32 threads waiting at a POSIX cancelation
657
 
point.
658
 
 
659
 
 
660
 
SNAPSHOT 2003-09-03
661
 
-------------------
662
 
 
663
 
Bug fixes
664
 
---------
665
 
* pthread_self() would free the newly created implicit POSIX thread handle if
666
 
DuplicateHandle failed instead of recycle it (very unlikely).
667
 
 
668
 
* pthread_exit() was neither freeing nor recycling the POSIX thread struct
669
 
for implicit POSIX threads.
670
 
 
671
 
New feature - Cancelation of/by Win32 (non-POSIX) threads
672
 
---------------------------------------------------------
673
 
Since John Bossom's original implementation, the library has allowed non-POSIX
674
 
initialised threads (Win32 threads) to call pthreads-win32 routines and
675
 
therefore interact with POSIX threads. This is done by creating an on-the-fly
676
 
POSIX thread ID for the Win32 thread that, once created, allows fully
677
 
reciprical interaction. This did not extend to thread cancelation (async or
678
 
deferred). Now it does.
679
 
 
680
 
Any thread can be canceled by any other thread (Win32 or POSIX) if the former
681
 
thread's POSIX pthread_t value is known. It's TSD destructors and POSIX
682
 
cleanup handlers will be run before the thread exits with an exit code of
683
 
PTHREAD_CANCELED (retrieved with GetExitCodeThread()).
684
 
 
685
 
This allows a Win32 thread to, for example, call POSIX CV routines in the same way
686
 
that POSIX threads would/should, with pthread_cond_wait() cancelability and
687
 
cleanup handlers (pthread_cond_wait() is a POSIX cancelation point).
688
 
 
689
 
By adding cancelation, Win32 threads should now be able to call all POSIX
690
 
threads routines that make sense including semaphores, mutexes, condition
691
 
variables, read/write locks, barriers, spinlocks, tsd, cleanup push/pop,
692
 
cancelation, pthread_exit, scheduling, etc.
693
 
 
694
 
Note that these on-the-fly 'implicit' POSIX thread IDs are initialised as detached
695
 
(not joinable) with deferred cancelation type. The POSIX thread ID will be created
696
 
automatically by any POSIX routines that need a POSIX handle (unless the routine
697
 
needs a pthread_t as a parameter of course). A Win32 thread can discover it's own
698
 
POSIX thread ID by calling pthread_self(), which will create the handle if
699
 
necessary and return the pthread_t value.
700
 
 
701
 
New tests
702
 
---------
703
 
Test the above new feature.
704
 
 
705
 
 
706
 
SNAPSHOT 2003-08-19
707
 
-------------------
708
 
 
709
 
This snapshot fixes some accidental corruption to new test case sources.
710
 
There are no changes to the library source code.
711
 
 
712
 
 
713
 
SNAPSHOT 2003-08-15
714
 
-------------------
715
 
 
716
 
Bug fixes
717
 
---------
718
 
 
719
 
* pthread.dsp now uses correct compile flags (/MD).
720
 
- Viv  <vcotirlea@hotmail.com>
721
 
 
722
 
* pthread_win32_process_detach_np() fixed memory leak.
723
 
- Steven Reddie  <Steven.Reddie@ca.com>
724
 
 
725
 
* pthread_mutex_destroy() fixed incorrect return code.
726
 
- Nicolas Barry  <boozai@yahoo.com>
727
 
 
728
 
* pthread_spin_destroy() fixed memory leak.
729
 
- Piet van Bruggen  <pietvb@newbridges.nl>
730
 
 
731
 
* Various changes to tighten arg checking, and to work with later versions of
732
 
MinGW32 and MsysDTK.
733
 
 
734
 
* pthread_getschedparam() etc, fixed dangerous thread validity checking.
735
 
- Nicolas Barry  <boozai@yahoo.com>
736
 
 
737
 
* POSIX thread handles are now reused and their memory is not freed on thread exit.
738
 
This allows for stronger thread validity checking.
739
 
 
740
 
New standard routine
741
 
--------------------
742
 
 
743
 
* pthread_kill() added to provide thread validity checking to applications.
744
 
It does not accept any non zero values for the signal arg.
745
 
 
746
 
New test cases
747
 
--------------
748
 
 
749
 
* New test cases to confirm validity checking, pthread_kill(), and thread reuse.
750
 
 
751
 
 
752
 
SNAPSHOT 2003-05-10
753
 
-------------------
754
 
 
755
 
Bug fixes
756
 
---------
757
 
 
758
 
* pthread_mutex_trylock() now returns correct error values.
759
 
pthread_mutex_destroy() will no longer destroy a recursively locked mutex.
760
 
pthread_mutex_lock() is no longer inadvertantly behaving as a cancelation point.
761
 
- Thomas Pfaff  <tpfaff@gmx.net>
762
 
 
763
 
* pthread_mutex_timedlock() no longer occasionally sets incorrect mutex
764
 
ownership, causing deadlocks in some applications.
765
 
- Robert Strycek <strycek@posam.sk> and Alexander Terekhov  <TEREKHOV@de.ibm.com>
766
 
 
767
 
 
768
 
SNAPSHOT 2002-11-04
769
 
-------------------
770
 
 
771
 
Bug fixes
772
 
---------
773
 
 
774
 
* sem_getvalue() now returns the correct value under Win NT and WinCE.
775
 
- Rob Fanner  <rfanner@stonethree.com>
776
 
 
777
 
* sem_timedwait() now uses tighter checks for unreasonable
778
 
abstime values - that would result in unexpected timeout values.
779
 
 
780
 
* ptw32_cond_wait_cleanup() no longer mysteriously consumes
781
 
CV signals but may produce more spurious wakeups. It is believed
782
 
that the sem_timedwait() call is consuming a CV signal that it
783
 
shouldn't.
784
 
- Alexander Terekhov  <TEREKHOV@de.ibm.com>
785
 
 
786
 
* Fixed a memory leak in ptw32_threadDestroy() for implicit threads.
787
 
 
788
 
* Fixed potential for deadlock in pthread_cond_destroy().
789
 
A deadlock could occur for statically declared CVs (PTHREAD_COND_INITIALIZER),
790
 
when one thread is attempting to destroy the condition variable while another
791
 
is attempting to dynamically initialize it.
792
 
- Michael Johnson  <michaelj@maine.rr.com>
793
 
 
794
 
 
795
 
SNAPSHOT 2002-03-02
796
 
-------------------
797
 
 
798
 
Cleanup code default style. (IMPORTANT)
799
 
----------------------------------------------------------------------
800
 
Previously, if not defined, the cleanup style was determined automatically
801
 
from the compiler/language, and one of the following was defined accordingly:
802
 
 
803
 
        __CLEANUP_SEH   MSVC only
804
 
        __CLEANUP_CXX   C++, including MSVC++, GNU G++
805
 
        __CLEANUP_C             C, including GNU GCC, not MSVC
806
 
 
807
 
These defines determine the style of cleanup (see pthread.h) and,
808
 
most importantly, the way that cancelation and thread exit (via
809
 
pthread_exit) is performed (see the routine ptw32_throw() in private.c).
810
 
 
811
 
In short, the exceptions versions of the library throw an exception
812
 
when a thread is canceled or exits (via pthread_exit()), which is
813
 
caught by a handler in the thread startup routine, so that the
814
 
the correct stack unwinding occurs regardless of where the thread
815
 
is when it's canceled or exits via pthread_exit().
816
 
 
817
 
In this and future snapshots, unless the build explicitly defines (e.g.
818
 
via a compiler option) __CLEANUP_SEH, __CLEANUP_CXX, or __CLEANUP_C, then
819
 
the build NOW always defaults to __CLEANUP_C style cleanup. This style
820
 
uses setjmp/longjmp in the cancelation and pthread_exit implementations,
821
 
and therefore won't do stack unwinding even when linked to applications
822
 
that have it (e.g. C++ apps). This is for consistency with most
823
 
current commercial Unix POSIX threads implementations. Compaq's TRU64
824
 
may be an exception (no pun intended) and possible future trend.
825
 
 
826
 
Although it was not clearly documented before, it is still necessary to
827
 
build your application using the same __CLEANUP_* define as was
828
 
used for the version of the library that you link with, so that the
829
 
correct parts of pthread.h are included. That is, the possible
830
 
defines require the following library versions:
831
 
 
832
 
        __CLEANUP_SEH   pthreadVSE.dll
833
 
        __CLEANUP_CXX   pthreadVCE.dll or pthreadGCE.dll
834
 
        __CLEANUP_C     pthreadVC.dll or pthreadGC.dll
835
 
 
836
 
E.g. regardless of whether your app is C or C++, if you link with
837
 
pthreadVC.lib or libpthreadGC.a, then you must define __CLEANUP_C.
838
 
 
839
 
 
840
 
THE POINT OF ALL THIS IS: if you have not been defining one of these
841
 
explicitly, then the defaults as described at the top of this
842
 
section were being used.
843
 
 
844
 
THIS NOW CHANGES, as has been explained above, but to try to make this
845
 
clearer here's an example:
846
 
 
847
 
If you were building your application with MSVC++ i.e. using C++
848
 
exceptions and not explicitly defining one of __CLEANUP_*, then
849
 
__CLEANUP_C++ was automatically defined for you in pthread.h.
850
 
You should have been linking with pthreadVCE.dll, which does
851
 
stack unwinding.
852
 
 
853
 
If you now build your application as you had before, pthread.h will now
854
 
automatically set __CLEANUP_C as the default style, and you will need to
855
 
link with pthreadVC.dll. Stack unwinding will now NOT occur when a thread
856
 
is canceled, or the thread calls pthread_exit().
857
 
 
858
 
Your application will now most likely behave differently to previous
859
 
versions, and in non-obvious ways. Most likely is that locally
860
 
instantiated objects may not be destroyed or cleaned up after a thread
861
 
is canceled.
862
 
 
863
 
If you want the same behaviour as before, then you must now define
864
 
__CLEANUP_C++ explicitly using a compiler option and link with
865
 
pthreadVCE.dll as you did before.
866
 
 
867
 
 
868
 
WHY ARE WE MAKING THE DEFAULT STYLE LESS EXCEPTION-FRIENDLY?
869
 
Because no commercial Unix POSIX threads implementation allows you to
870
 
choose to have stack unwinding. Therefore, providing it in pthread-win32
871
 
as a default is dangerous. We still provide the choice but unless
872
 
you consciously choose to do otherwise, your pthreads applications will
873
 
now run or crash in similar ways irrespective of the threads platform
874
 
you use. Or at least this is the hope.
875
 
 
876
 
 
877
 
WHY NOT REMOVE THE EXCEPTIONS VERSIONS OF THE LIBRARY ALTOGETHER?
878
 
There are a few reasons:
879
 
- because there are well respected POSIX threads people who believe
880
 
  that POSIX threads implementations should be exceptions aware and
881
 
  do the expected thing in that context. (There are equally respected
882
 
  people who believe it should not be easily accessible, if it's there
883
 
  at all, for unconditional conformity to other implementations.)
884
 
- because pthreads-win32 is one of the few implementations that has
885
 
  the choice, perhaps the only freely available one, and so offers
886
 
  a laboratory to people who may want to explore the effects;
887
 
- although the code will always be around somewhere for anyone who
888
 
  wants it, once it's removed from the current version it will not be
889
 
  nearly as visible to people who may have a use for it.
890
 
 
891
 
 
892
 
Source module splitting
893
 
-----------------------
894
 
In order to enable smaller image sizes to be generated
895
 
for applications that link statically with the library,
896
 
most routines have been separated out into individual
897
 
source code files.
898
 
 
899
 
This is being done in such a way as to be backward compatible.
900
 
The old source files are reused to congregate the individual
901
 
routine files into larger translation units (via a bunch of
902
 
# includes) so that the compiler can still optimise wherever
903
 
possible, e.g. through inlining, which can only be done
904
 
within the same translation unit.
905
 
 
906
 
It is also possible to build the entire library by compiling
907
 
the single file named "pthread.c", which just #includes all
908
 
the secondary congregation source files. The compiler
909
 
may be able to use this to do more inlining of routines.
910
 
 
911
 
Although the GNU compiler is able to produce libraries with
912
 
the necessary separation (the -ffunction-segments switch),
913
 
AFAIK, the MSVC and other compilers don't have this feature.
914
 
 
915
 
Finally, since I use makefiles and command-line compilation,
916
 
I don't know what havoc this reorganisation may wreak amongst
917
 
IDE project file users. You should be able to continue
918
 
using your existing project files without modification.
919
 
 
920
 
 
921
 
New non-portable functions
922
 
--------------------------
923
 
pthread_num_processors_np():
924
 
  Returns the number of processors in the system that are
925
 
  available to the process, as determined from the processor
926
 
  affinity mask.
927
 
 
928
 
pthread_timechange_handler_np():
929
 
  To improve tolerance against operator or time service initiated
930
 
  system clock changes.
931
 
 
932
 
  This routine can be called by an application when it
933
 
  receives a WM_TIMECHANGE message from the system. At present
934
 
  it broadcasts all condition variables so that waiting threads
935
 
  can wake up and re-evaluate their conditions and restart
936
 
  their timed waits if required.
937
 
  - Suggested by Alexander Terekhov
938
 
 
939
 
 
940
 
Platform dependence
941
 
-------------------
942
 
As Win95 doesn't provide one, the library now contains
943
 
it's own InterlockedCompareExchange() routine, which is used
944
 
whenever Windows doesn't provide it. InterlockedCompareExchange()
945
 
is used to implement spinlocks and barriers, and also in mutexes.
946
 
This routine relies on the CMPXCHG machine instruction which
947
 
is not available on i386 CPUs. This library (from snapshot
948
 
20010712 onwards) is therefore no longer supported on i386
949
 
processor platforms.
950
 
 
951
 
 
952
 
New standard routines
953
 
---------------------
954
 
For source code portability only - rwlocks cannot be process shared yet.
955
 
 
956
 
        pthread_rwlockattr_init()
957
 
        pthread_rwlockattr_destroy()
958
 
        pthread_rwlockattr_setpshared()
959
 
        pthread_rwlockattr_getpshared()
960
 
 
961
 
As defined in the new POSIX standard, and the Single Unix Spec version 3:
962
 
 
963
 
        sem_timedwait()
964
 
        pthread_mutex_timedlock()    - Alexander Terekhov and Thomas Pfaff
965
 
        pthread_rwlock_timedrdlock() - adapted from pthread_rwlock_rdlock()
966
 
        pthread_rwlock_timedwrlock() - adapted from pthread_rwlock_wrlock()
967
 
 
968
 
 
969
 
pthread.h no longer includes windows.h
970
 
--------------------------------------
971
 
[Not yet for G++]
972
 
 
973
 
This was done to prevent conflicts.
974
 
 
975
 
HANDLE, DWORD, and NULL are temporarily defined within pthread.h if
976
 
they are not already.
977
 
 
978
 
 
979
 
pthread.h, sched.h and semaphore.h now use dllexport/dllimport
980
 
--------------------------------------------------------------
981
 
Not only to avoid the need for the pthread.def file, but to
982
 
improve performance. Apparently, declaring functions with dllimport
983
 
generates a direct call to the function and avoids the overhead
984
 
of a stub function call.
985
 
 
986
 
Bug fixes
987
 
---------
988
 
* Fixed potential NULL pointer dereferences in pthread_mutexattr_init,
989
 
pthread_mutexattr_getpshared, pthread_barrierattr_init,
990
 
pthread_barrierattr_getpshared, and pthread_condattr_getpshared.
991
 
- Scott McCaskill <scott@magruder.org>
992
 
 
993
 
* Removed potential race condition in pthread_mutex_trylock and
994
 
pthread_mutex_lock;
995
 
- Alexander Terekhov <TEREKHOV@de.ibm.com>
996
 
 
997
 
* The behaviour of pthread_mutex_trylock in relation to
998
 
recursive mutexes was inconsistent with commercial implementations.
999
 
Trylock would return EBUSY if the lock was owned already by the
1000
 
calling thread regardless of mutex type. Trylock now increments the
1001
 
recursion count and returns 0 for RECURSIVE mutexes, and will
1002
 
return EDEADLK rather than EBUSY for ERRORCHECK mutexes. This is
1003
 
consistent with Solaris.
1004
 
- Thomas Pfaff <tpfaff@gmx.net>
1005
 
 
1006
 
* Found a fix for the library and workaround for applications for
1007
 
the known bug #2, i.e. where __CLEANUP_CXX or __CLEANUP_SEH is defined.
1008
 
See the "Known Bugs in this snapshot" section below.
1009
 
 
1010
 
This could be made transparent to applications by replacing the macros that
1011
 
define the current C++ and SEH versions of pthread_cleanup_push/pop
1012
 
with the C version, but AFAIK cleanup handlers would not then run in the
1013
 
correct sequence with destructors and exception cleanup handlers when
1014
 
an exception occurs.
1015
 
 
1016
 
* Cancelation once started in a thread cannot now be inadvertantly
1017
 
double canceled. That is, once a thread begins it's cancelation run,
1018
 
cancelation is disabled and a subsequent cancel request will
1019
 
return an error (ESRCH).
1020
 
 
1021
 
* errno: An incorrect compiler directive caused a local version
1022
 
of errno to be used instead of the Win32 errno. Both instances are
1023
 
thread-safe but applications checking errno after a pthreads-win32
1024
 
call would be wrong. Fixing this also fixed a bad compiler
1025
 
option in the testsuite (/MT should have been /MD) which is
1026
 
needed to link with the correct library MSVCRT.LIB.
1027
 
 
1028
 
 
1029
 
SNAPSHOT 2001-07-12
1030
 
-------------------
1031
 
 
1032
 
To be added
1033
 
 
1034
 
 
1035
 
SNAPSHOT 2001-07-03
1036
 
-------------------
1037
 
 
1038
 
To be added
1039
 
 
1040
 
 
1041
 
SNAPSHOT 2000-08-13
1042
 
-------------------
1043
 
 
1044
 
New:
1045
 
-       Renamed DLL and LIB files:
1046
 
                pthreadVSE.dll  (MS VC++/Structured EH)
1047
 
                pthreadVSE.lib
1048
 
                pthreadVCE.dll  (MS VC++/C++ EH)
1049
 
                pthreadVCE.lib
1050
 
                pthreadGCE.dll  (GNU G++/C++ EH)
1051
 
                libpthreadw32.a
1052
 
 
1053
 
        Both your application and the pthread dll should use the
1054
 
        same exception handling scheme.
1055
 
 
1056
 
Bugs fixed:
1057
 
-       MSVC++ C++ exception handling.
1058
 
 
1059
 
Some new tests have been added.
1060
 
 
1061
 
 
1062
 
SNAPSHOT 2000-08-10
1063
 
-------------------
1064
 
 
1065
 
New:
1066
 
-       asynchronous cancelation on X86 (Jason Nye)
1067
 
-       Makefile compatible with MS nmake to replace
1068
 
        buildlib.bat
1069
 
-       GNUmakefile for Mingw32
1070
 
-       tests/Makefile for MS nmake replaces runall.bat
1071
 
-       tests/GNUmakefile for Mingw32
1072
 
 
1073
 
Bugs fixed:
1074
 
-       kernel32 load/free problem
1075
 
-       attempt to hide internel exceptions from application
1076
 
        exception handlers (__try/__except and try/catch blocks)
1077
 
-       Win32 thread handle leakage bug
1078
 
        (David Baggett/Paul Redondo/Eyal Lebedinsky)
1079
 
 
1080
 
Some new tests have been added.
1081
 
 
1082
 
 
1083
 
SNAPSHOT 1999-11-02
1084
 
-------------------
1085
 
 
1086
 
Bugs fixed:
1087
 
-       ctime_r macro had an incorrect argument (Erik Hensema),
1088
 
-       threads were not being created 
1089
 
        PTHREAD_CANCEL_DEFERRED. This should have
1090
 
        had little effect as deferred is the only
1091
 
        supported type. (Ross Johnson).
1092
 
 
1093
 
Some compatibility improvements added, eg.
1094
 
-       pthread_setcancelstate accepts NULL pointer
1095
 
        for the previous value argument. Ditto for
1096
 
        pthread_setcanceltype. This is compatible
1097
 
        with Solaris but should not affect
1098
 
        standard applications (Erik Hensema)
1099
 
 
1100
 
Some new tests have been added.
1101
 
 
1102
 
 
1103
 
SNAPSHOT 1999-10-17
1104
 
-------------------
1105
 
 
1106
 
Bug fix - Cancelation of threads waiting on condition variables
1107
 
now works properly (Lorin Hochstein and Peter Slacik)
1108
 
 
1109
 
 
1110
 
SNAPSHOT 1999-08-12
1111
 
-------------------
1112
 
 
1113
 
Fixed exception stack cleanup if calling pthread_exit()
1114
 
- (Lorin Hochstein and John Bossom).
1115
 
 
1116
 
Fixed bugs in condition variables - (Peter Slacik):
1117
 
        - additional contention checks
1118
 
        - properly adjust number of waiting threads after timed
1119
 
          condvar timeout.
1120
 
 
1121
 
 
1122
 
SNAPSHOT 1999-05-30
1123
 
-------------------
1124
 
 
1125
 
Some minor bugs have been fixed. See the ChangeLog file for details.
1126
 
 
1127
 
Some more POSIX 1b functions are now included but ony return an
1128
 
error (ENOSYS) if called. They are:
1129
 
 
1130
 
        sem_open
1131
 
        sem_close
1132
 
        sem_unlink
1133
 
        sem_getvalue
1134
 
 
1135
 
 
1136
 
SNAPSHOT 1999-04-07
1137
 
-------------------
1138
 
 
1139
 
Some POSIX 1b functions which were internally supported are now
1140
 
available as exported functions:
1141
 
 
1142
 
        sem_init
1143
 
        sem_destroy
1144
 
        sem_wait
1145
 
        sem_trywait
1146
 
        sem_post
1147
 
        sched_yield
1148
 
        sched_get_priority_min
1149
 
        sched_get_priority_max
1150
 
 
1151
 
Some minor bugs have been fixed. See the ChangeLog file for details.
1152
 
 
1153
 
 
1154
 
SNAPSHOT 1999-03-16
1155
 
-------------------
1156
 
 
1157
 
Initial release.
1158