Update.
[platform/upstream/glibc.git] / linuxthreads / ChangeLog
1 2001-02-23  Jakub Jelinek  <jakub@redhat.com>
2
3         * internals.h (__pthread_init_max_stacksize): New prototype.
4         * attr.c (__pthread_attr_setstacksize): Call
5         __pthread_init_max_stacksize if not yet initialized.
6         * pthread.c (__pthread_init_max_stacksize): New function.
7         (__pthread_initialize_manager): Call it.
8         Patch by <dtc@cmucl.cons.org>.
9
10 2001-03-16  Ulrich Drepper  <drepper@redhat.com>
11
12         * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
13
14 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
15
16         * shlib-versions: Add rule for Linux on 64 bit S/390.
17         * sysdeps/s390/s390-64/pt-machine.h: New file.
18         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
19
20 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
21
22         * sysdeps/s390/pt-machine.h: Move to...
23         * sysdeps/s390/s390-32/pt-machine.h: ...here.
24         Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
25
26 2001-03-15  Ulrich Drepper  <drepper@redhat.com>
27
28         * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
29         * attr.c: Implement pthread_getattr_np.
30         * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
31         * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
32         * manager.c (pthread_handle_create): Initialize p_inheritsched.
33
34 2001-03-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
35
36         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
37         code alignment.
38
39 2001-02-20  Hans Boehm  <hans_boehm@hp.com>
40
41         * manager.c (manager_mask): Removed static vesion.  Now always local
42         to __pthread_manager().
43         (manager_mask_all): Removed completely.
44         (__pthread_manager): Remove manager_mask_all initialization.
45         (pthread_handle_create): Remove code to set and reset signal mask
46         around __clone2() calls.
47
48 2001-02-17  Jakub Jelinek  <jakub@redhat.com>
49
50         * spinlock.c (__pthread_lock): Force lock->__status to be read from
51         memory on every spin.
52
53 2001-02-10  Andreas Jaeger  <aj@suse.de>
54
55         * Makefile (extra-objs): New.
56
57 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
58
59         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
60         __pthread_initialize_minimal prototype.
61
62 2001-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
63
64         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
65
66 2001-02-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
67
68         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
69
70 2001-02-06  Ulrich Drepper  <drepper@redhat.com>
71
72         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
73         broken code.  Patch by Jes Sorensen.
74
75 2001-02-06  Andreas Jaeger  <aj@suse.de>
76
77         * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
78         to...
79         * internals.h: ...here.
80
81 2001-02-05  Jes Sorensen  <jes@linuxcare.com>
82
83         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
84
85 2001-02-02  Ulrich Drepper  <drepper@redhat.com>
86
87         * Versions: Remove __pthread_initialize_minimal.
88
89 2001-02-01  Ulrich Drepper  <drepper@redhat.com>
90
91         * Makefile: Add rules to build crti.o and make it being used in
92         building libpthread.so.
93         * sysdeps/i386/Makefile: New file.
94         * sysdeps/pthread/pt-initfini.c: New file.
95
96         * pthread.c: Cleanups.
97
98 2001-01-28  Andreas Jaeger  <aj@suse.de>
99
100         * oldsemaphore.c (__old_sem_init): Adjust for last change.
101         * sysdeps/pthread/bits/libc-lock.h: Likewise.
102         * spinlock.c: Likewise.
103
104 2001-01-28  Ulrich Drepper  <drepper@redhat.com>
105
106         * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
107         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
108         * manager.c: Adjust for namespace cleanup in bits/initspin.h.
109         * pthread.c: Likewise.
110         * spinlock.h: Likewise.
111         * sysdeps/pthread/pthread.h: Likewise.
112
113 2001-01-26  Ulrich Drepper  <drepper@redhat.com>
114
115         * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
116         as struct __pthread_attr_s.
117
118         * semaphore.h (sem_t): Cleanup namespace, rename status and
119         spinlock elements.
120
121 2001-01-13  Jakub Jelinek  <jakub@redhat.com>
122
123         * pthread.c (pthread_onexit_process): Clear
124         __pthread_manager_thread_bos after freeing it.
125         * Makefile (tests): Add ex16.
126         * Examples/ex16.c: New file.
127
128 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
129
130         * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
131         -z nodelete.
132         * pthread.c (pthread_exit_process): Rename to...
133         (pthread_onexit_process): ...this.
134         (pthread_atexit_process, pthread_atexit_retcode): New.
135         (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
136         and only if HAVE_Z_NODELETE is not defined.
137         (__pthread_initialize_manager): Register pthread_atexit_retcode
138         with __cxa_atexit.
139
140 2001-01-11  Ulrich Drepper  <drepper@redhat.com>
141
142         * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
143
144 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
145
146         * Makefile (tests): Add ex15.
147         * Examples/ex15.c: New test.
148
149 2001-01-08  Ulrich Drepper  <drepper@redhat.com>
150
151         * pthread.c (pthread_exit_process): Free memory allocated for
152         manager stack.
153
154 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
155
156         * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
157         (pthread_free): Always unmap the stack.  It's safe now that we don't
158         use MAP_FIXED to allocate stacks.
159
160 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
161
162         * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
163
164         * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
165
166 2000-11-15  Wolfram Gloger  <wg@malloc.de>
167
168         * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
169         stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
170
171 2000-12-27  Andreas Jaeger  <aj@suse.de>
172
173         * Examples/ex13.c: Make local functions static.
174         * ecmutex.c: Likewise.
175         * joinrace.c: Likewise.
176         * Examples/ex14.c: Likewise.
177
178         * Examples/ex2.c: Make local functions static; reformat.
179         * Examples/ex1.c: Likewise.
180         * Examples/ex4.c: Likewise.
181         * Examples/ex5.c: Likewise.
182         * Examples/ex7.c: Likewise.
183
184         * oldsemaphore.c: Add prototypes to shut up GCC.
185         * pt-machine.c: Likewise.
186
187         * weaks.c: Add prototype for pthread_exit.
188
189         * internals.h: Add some prototypes, format prototypes and add
190         missing externs.
191         Move __libc_waitpid prototype to include/sys/wait.h.
192
193         * rwlock.c: Include <bits/libc-lock.h> for prototypes.
194         * mutex.c: Likewise.
195         * specific.c: Likewise.
196         * ptfork.c: Likewise.
197
198         * lockfile.c: Include internals.h to get prototypes.
199         * events.c: Likewise.
200         * sysdeps/alpha/pspinlock.c: Likewise.
201         * sysdeps/arm/pspinlock.c: Likewise.
202         * sysdeps/hppa/pspinlock.c: Likewise.
203         * sysdeps/i386/pspinlock.c: Likewise.
204         * sysdeps/ia64/pspinlock.c: Likewise.
205         * sysdeps/m68k/pspinlock.c: Likewise.
206         * sysdeps/mips/pspinlock.c: Likewise.
207         * sysdeps/powerpc/pspinlock.c: Likewise.
208         * sysdeps/s390/pspinlock.c: Likewise.
209         * sysdeps/sh/pspinlock.c: Likewise.
210         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
211         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
212         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
213
214 2000-12-27  Ulrich Drepper  <drepper@redhat.com>
215
216         * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
217         (__pthread_attr_getstack): Return correct address.
218         Add warnings for using pthread_attr_getstackaddr and
219         pthread_attr_setstackaddr.
220
221 2000-12-26  Ulrich Drepper  <drepper@redhat.com>
222
223         * Examples/ex6.c (test_thread): Make static.
224         * Examples/ex12.c (test_thread): Make static and add noreturn
225         attribute.
226
227 2000-12-18  Jes Sorensen  <jes@linuxcare.com>
228
229         * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
230         and compare_and_swap_with_release_semantics returns int not long.
231
232 2000-12-17  Andreas Jaeger  <aj@suse.de>
233
234         * sysdeps/s390/pt-machine.h (testandset): Use long int as return
235         value.
236         * sysdeps/arm/pt-machine.h (testandset): Likewise.
237         * sysdeps/hppa/pt-machine.h (testandset): Likewise.
238         * sysdeps/m68k/pt-machine.h (testandset): Likewise.
239         * sysdeps/sh/pt-machine.h (testandset): Likewise.
240         * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
241         * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
242
243 2000-12-17  Ulrich Drepper  <drepper@redhat.com>
244
245         * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
246         * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
247
248 2000-12-17  Andreas Jaeger  <aj@suse.de>
249
250         * internals.h: Add prototypes for testandset and
251         __compare_and_swap to shut up gcc warnings.
252
253 2000-12-06  Wolfram Gloger  <wg@malloc.de>
254
255         * join.c (pthread_detach): Allow case where the thread has already
256         terminated.
257
258 2000-12-05  Andreas Jaeger  <aj@suse.de>
259
260         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
261         * sysdeps/mips/pt-machine.h (testandset): Likewise.
262         (__compare_and_swap): Likewise.
263         Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
264
265 2000-11-20  Jakub Jelinek  <jakub@redhat.com>
266
267         * Examples/ex3.c (main): Cast int to long before casting to void *.
268         (search): Cast void * to long, not int.
269         * Examples/ex8.c (main, thread): Similarly.
270         * Examples/ex11.c (main): Similarly.
271         * Examples/ex14.c (worker, do_test): Similarly.
272         * ecmutex.c (worker, do_test): Similarly.
273         (nlocks): Cast to int.
274
275 2000-11-08  Bruce Mitchener  <bruce@cubik.org>
276
277         * linuxthreads.texi:  Add documentation for pthreads attributes
278         guardsize, stackaddr, stacksize, and stack.  Fix typo in previous
279         patch.  Document pthread_[sg]etconcurrency().  Mark
280         pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
281
282 2000-11-07  Ulrich Drepper  <drepper@redhat.com>
283
284         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
285         Don't define it.
286         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
287         Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
288
289 2000-11-06  Ulrich Drepper  <drepper@redhat.com>
290
291         * cancel.c (pthread_cancel): Always set p_canceled, even if we are
292         not doing it right now.
293         Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
294
295 2000-10-30  Ulrich Drepper  <drepper@redhat.com>
296
297         * Examples/ex4.c (main): Don't use exit() to avoid warning with
298         broken compilers.
299
300 2000-10-29  Ulrich Drepper  <drepper@redhat.com>
301
302         * attr.c (__pthread_attr_setguardsize): Don't round guardsize
303         here.  Reported by Bruce Mitchener <bruce@cubik.org>.
304
305         * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
306         discussing mutexes. (As per the Unix98 name for the API.)
307         Changes documentation for pthread_mutexattr_setkind_np() and
308         pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
309         same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
310         Changes references to PTHREAD_MUTEXATTR_FAST_NP to
311         PTHREAD_MUTEXATTR_ADAPTIVE_NP.
312         Begins to introduce discussion of the ``timed'' mutex type.  This
313         discussion is currently incomplete.
314         Patch by Bruce Mitchener <bruce@cubik.org>.
315
316 2000-10-26  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
317             Yutaka Niibe  <gniibe@chroot.org>
318
319         * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
320         has restrictions, use register.
321
322 2000-10-23  Andreas Schwab  <schwab@suse.de>
323
324         * Examples/ex14.c (TIMEOUT): Override default timeout.
325
326 2000-10-16  Ulrich Drepper  <drepper@redhat.com>
327
328         * specific.c: Protect tsd array modification in thread data
329         structures by getting the thread lock in pthread_key_delete and
330         __pthread_destroy_specifics.
331         Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
332
333 2000-10-12  Alan Modra <alan@linuxcare.com.au>
334
335         * sysdeps/pthread/bits/initspin.h: New file.
336         * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
337         (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
338         (__pthread_alt_init_lock): Likewise.
339         (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
340
341 2000-10-12  David Huggins-Daines  <dhd@linuxcare.com>
342
343         * oldsemaphore.c (__old_sem_init): Release lock with
344         LT_SPINLOCK_INIT, not zero.
345         * spinlock.c (__pthread_unlock): Likewise.
346         (__pthread_alt_lock): Likewise.
347         (__pthread_alt_timedlock): Likewise.
348         (__pthread_alt_unlock): Likewise.
349         * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
350         LT_SPINLOCK_INIT if it is non-zero.  Likewise for init-once flags.
351         * sysdeps/pthread/pthread.h: Include bits/initspin.h.  Use
352         LT_SPINLOCK_INIT do initialize spinlocks not 0.
353
354 2000-10-12  David Huggins-Daines <dhd@linuxcare.com>
355
356         * shlib-versions: Add version definitions for hppa-linux.
357
358 2000-10-12  Alan Modra <alan@linuxcare.com.au>
359
360         * sysdeps/hppa/pspinlock.c: New file.
361         * sysdeps/hppa/pt-machine.h: New file.
362         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
363
364 2000-10-05  Jakub Jelinek  <jakub@redhat.com>
365
366         * mutex.c (__pthread_mutex_destroy): Correct test of
367         busy mutex for mutexes using alternate fastlocks.
368         Patch by dtc@cmucl.cons.org.
369
370 2000-09-28  Martin Schwidefsksy    <schwidefsky@de.ibm.com>
371
372         * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
373
374 2000-09-28  Ulrich Drepper  <drepper@redhat.com>
375
376         * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
377         test for owner first.
378         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
379
380         * cancel.c (pthread_cancel): Don't do anything if cancelation is
381         disabled.
382
383 2000-09-26  Ulrich Drepper  <drepper@redhat.com>
384
385         * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
386         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
387
388         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
389         _POSIX_MONOTONIC_CLOCK.
390
391         * spinlock.h (__pthread_set_own_extricate_if): Add back locking
392         and explain why.
393
394 2000-09-20  Andreas Jaeger  <aj@suse.de>
395
396         * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
397         "testrtsig.h" conditional.
398
399 2000-09-11  Ulrich Drepper  <drepper@redhat.com>
400
401         * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
402         pthread_attr_setstack.
403         * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
404         pthread_attr_setstack.
405         * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
406
407 2000-09-05  Ulrich Drepper  <drepper@redhat.com>
408
409         * Examples/ex14.c: New file.
410         * Makefile (tests): Add ex14.
411
412         * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
413         mutex.  Patch by dtc@cmucl.cons.org.
414
415         * ecmutex.c: New file.
416         * Makefile (tests): Add ecmutex.
417
418 2000-09-04  H.J. Lu  <hjl@gnu.org>
419
420         * attr.c (__pthread_attr_setguardsize): Use page_roundup
421         instead of roundup to round up to the page size.
422
423 2000-09-03  Mark Kettenis  <kettenis@gnu.org>
424
425         * manager.c (pthread_exited): Correctly report event as TD_REAP
426         instead of TD_DEATH.  Fix comments.
427
428 2000-09-03  Ulrich Drepper  <drepper@redhat.com>
429
430         * spinlock.h (testandset): Add cast to avoid warning.
431         Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
432
433 2000-09-02  Andreas Jaeger  <aj@suse.de>
434
435         * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
436         prototype.
437
438 2000-09-01  Ulrich Drepper  <drepper@redhat.com>
439
440         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
441         Fix typo in last patch (_mode -> _flags).
442
443         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
444         Provide definition which respects _IO_USER_LOCK flag.
445
446 2000-08-30  Ulrich Drepper  <drepper@redhat.com>
447
448         * manager.c (pthread_allocate_stack): Clear descriptor only if not
449         mmaped.
450
451 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
452
453         * Makefile: Add rules to build and run unload.
454         * unload.c: New file.
455
456         * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
457
458         * sysdeps/pthread/pthread.h
459         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
460         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
461
462 2000-08-24  Andreas Jaeger  <aj@suse.de>
463
464         * Examples/ex13.c: Include <string.h> for strerror prototype and
465         <stdlib.h> for abort prototype.
466         (pthr_cond_signal_mutex): Rewrite to silence GCC.
467         (thread_start): Remove unused variable err.
468         (main): Silence GCC warnings.
469
470 2000-08-22  Andreas Jaeger  <aj@suse.de>
471
472         * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
473
474         * Makefile (tests): Add ex13.
475
476 2000-08-20  Ulrich Drepper  <drepper@redhat.com>
477
478         * semaphore.h: Add restrict where required by AGd4.
479         * sysdeps/pthread/pthread.h: Likewise.
480         * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
481
482 2000-08-15  Ulrich Drepper  <drepper@redhat.com>
483
484         * Makefile (tests): Add ex12.  Add rule to build it.
485         * Examples/ex12.c: New file.
486
487 2000-08-13  Ulrich Drepper  <drepper@redhat.com>
488
489         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
490         even though the implementation is not quite complete (but it reports
491         it).  Define _POSIX_MESSAGE_PASSING to -1.
492         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
493
494 2000-08-12  Andreas Jaeger  <aj@suse.de>
495
496         * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
497         assembler.
498         (__compare_and_swap): Likewise.
499         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
500
501 2000-08-10  Ulrich Drepper  <drepper@redhat.com>
502
503         * pthread.c (__pthread_initial_thread): Initialize p_errnop and
504         p_h_errnop correctly and not to NULL.
505
506 2000-08-05  Ulrich Drepper  <drepper@redhat.com>
507
508         * Banner: Bump version number to 0.9.
509
510 2000-08-04  Ulrich Drepper  <drepper@redhat.com>
511
512         * Makefile (tests): Add tststack.  Add rule to build the program.
513         * tststack.c: New file.
514
515         * internals.h: Declare __pthread_max_stacksize.
516         * pthread.c (__pthread_max_stacksize): New variable.
517         (__pthread_initialize_manager): Determine __pthread_initialize_manager
518         value.
519         * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
520         (pthread_allocate_stack): Allow kernel to choose stack address if
521         FLOATING_STACKS.  This also handles variable-sized stacks.
522         Always allocate stack and guardpage together.  Use mprotect to
523         change guardpage access.
524         * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
525         ARCH_STACK_MAX_SIZE.
526
527         * attr.c (__pthread_attr_setstacksize): Also test value against
528         upper limit.
529
530         * manager.c (__pthread_nonstandard_stacks): Define only if
531         THREAD_SELF is not defined.
532         (pthread_allocate_stack): Always initialize gardaddr to a correct
533         value.
534         (pthread_handle_create): Unmap thread with one call.
535         (pthread_free): Remove test for initial thread before removing stack.
536         Unmap stack with one call.
537
538         * pthread.c (__pthread_initial_thread): Initialize p_userstack to
539         1 to avoid removing the stack.
540
541 2000-07-27  Jes Sorensen  <jes@linuxcare.com>
542
543         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
544         load of spin lock to prime the cache before the atomic compare and
545         exchange operation (cmpxchg4). This avoids the spinning on the
546         cmpxchg4 instruction and reduces movement of the cache line back
547         and forth between the processors (explanation by Asis K. Mallick
548         from Intel). This basically makes the implementation operate the
549         same as the Linux kernel implementation.
550
551         * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
552         * sysdeps/ia64/pspinlock.c: New file.
553
554 2000-08-03  Ulrich Drepper  <drepper@redhat.com>
555
556         * pthread.c: Move definition of __pthread_set_own_extricate_if...
557         * spinlock.h: ...here.  Remove locking.
558         * internals.h: Remove __pthread_set_own_extricate_if prototype.
559
560         * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
561         (rwlock_rd_extricate_func): Don't determine self, let
562         __pthread_lock do it.
563         (rwlock_wr_extricate_func): Likewise.
564         (rwlock_have_already): Optimize *pself handling a bit.
565
566         * mutex.c: Use __builtin_expect.
567         * pthread.c: Likewise.
568
569 2000-08-02  Andreas Jaeger  <aj@suse.de>
570
571         * sysdeps/s390/pspinlock.c: New file.
572         * sysdeps/s390/pt-machine.h: New file.
573         Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
574
575 2000-07-12  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
576
577         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
578         R3K.
579         * sysdeps/mips/pt-machine.h (testandset): Likewise.
580
581 2000-07-26  Andreas Jaeger  <aj@suse.de>
582
583         * pthread.c: Initialize p_sem_avail.
584
585 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
586
587         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
588         * semaphore.c: Handle spurious wakeups.
589
590         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
591         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
592
593         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
594         (__pthread_wait_for_restart): Likewise.
595
596         * condvar.c (pthread_cond_wait): Also check whether thread is
597         cancelable before aborting loop.
598         (pthread_cond_timedwait): Likewise.
599
600         * signals.c (pthread_sighandler): Remove special code to restrore
601         %gs on x86.
602         (pthread_sighandler_t): Likewise.
603
604 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
605
606         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
607         * pthread.c: Include <resolv.h>.
608         (_res): Undefine.  Add extern declaration.
609
610 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
611
612         * pthread.c (__pthread_initial_thread): Update initializer.
613         (__pthread_manager_thread): Likewise.
614         (pthread_initialize): Move setrlimit call to...
615         (__pthread_initialize_manager): ...here.
616         (__pthread_reset_main_thread): Reset also soft limit on stack size.
617
618         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
619         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
620
621 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
622
623         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
624         __compare_and_swap to define testandset.
625         * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
626         Define IMPLEMENT_TAS_WITH_CAS.
627
628 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
629
630         * Makefile: Pass -z nodelete to linker for libpthread.so
631         generation if it understand this option.
632
633 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
634
635         * manager.c (pthread_handle_create): Remove initialization of
636         new_thread->p_res._sock.
637
638 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
639
640         Bugfixes to the variant of the code for machines with no compare
641         and swap.
642
643         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
644         node was not being properly enqueued, due to failing to update
645         the lock->__status field.
646
647         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
648         being set inappropriately, causing the suspend function to be called
649         with a null self pointer and crash.
650
651 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
652
653         * spinlock.h (__pthread_alt_trylock): Fix code used if no
654         compare&swap is available.
655
656         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
657         compare_and_swap.
658
659         * pthread.c (pthread_initialize): Don't use sysconf to determine
660         whether the machine has more than one processor.
661
662         * spinlock.c (__pthread_alt_timedlock): Add back one of the
663         removed thread_self calls.
664
665 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
666
667         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
668         __compare_and_swap to compare_and_swap in code which assumes
669         compare swap is available.
670
671 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
672
673         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
674         bug whereby thr field of waitnode structure would not be correctly
675         set unless a null self pointer is passed to the functions.
676         Eliminated redundant calls to thread_self().
677
678 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
679
680         * pthread.c (__pthread_initialize_manager): Lock
681         __pthread_manager_thread.p_lock before calling clone.
682
683 2000-05-05  H.J. Lu  <hjl@gnu.org>
684
685         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
686         have acquire semantics.
687         (__compare_and_swap_with_release_semantics): New inline
688         function.
689         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
690
691 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
692
693         * manager.c: Fix the problem with signals at startup.
694         Change the way that thread stacks are allocated on IA64.
695         Clean up some of the guard page allocation stuff.
696
697 1999-12-19  H.J. Lu  <hjl@gnu.org>
698
699         * internals.h (page_roundup): New.
700         * attr.c (__pthread_attr_setguardsize); Use page_roundup
701         instead of roundup.
702         * manager.c (pthread_allocate_stack): Make sure guardaddr is
703         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
704         is define.
705
706 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
707
708         * manager.c (pthread_allocate_stack): Unmap the stack top
709         if failed to map the stack bottom.
710         Fix the guard page.
711         (pthread_free): Fix the guard page.
712
713         * pthread.c (pthread_initialize): Set rlimit correctly for
714         NEED_SEPARATE_REGISTER_STACK.
715
716 1999-12-16  H.J. Lu  <hjl@gnu.org>
717
718         * pthread.c (__pthread_initialize_manager): Pass
719         __pthread_manager_thread_bos instead of
720         __pthread_manager_thread_tos to __clone2.
721
722 1999-12-16  H.J. Lu  <hjl@gnu.org>
723
724         * manager.c (pthread_allocate_stack): Correct the calculation
725         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
726         stack bottom.
727
728 1999-12-13  H.J. Lu  <hjl@gnu.org>
729
730         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
731         bit after setting ar.ccv.
732
733 1999-12-12  H.J. Lu  <hjl@gnu.org>
734
735         * manager.c (pthread_allocate_stack): Make the starting
736         address of the stack bottom page aligned. FIXME: it may
737         need changes in other places.
738         (pthread_handle_create): Likewise.
739
740 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
741
742         * manager.c (pthread_allocate_stack): Handle
743         NEED_SEPARATE_REGISTER_STACK.
744         (pthread_handle_create): Likewise.
745         * pthread.c (__pthread_initialize_manager): Likewise.
746
747         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
748
749 1999-12-02  H.J. Lu  <hjl@gnu.org>
750
751         * sysdeps/ia64/pt-machine.h: New.
752
753 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
754
755         * wrapsyscall.c: Mark non-__ protected names as weak.
756         PR libc/1466.
757
758 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
759
760         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
761
762 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
763
764         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
765         Add tests also to new alternative spinlock implementation.
766         * spinlock.h: Likewise.
767         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
768
769 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
770
771         * Version: Export __sigaction.
772         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
773         of __sigaction.
774         * pthread.c: Use __libc_sigaction instead of __sigaction.
775
776         * condvar.c: Implement pthread_condattr_getpshared and
777         pthread_condattr_setpshared.
778         * mutex.c: Implement pthread_mutexattr_getpshared and
779          pthread_mutexattr_setpshared.
780         * Versions: Export new functions.
781         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
782
783         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
784         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
785         is not selected.
786
787 2000-07-04  Greg McGary  <greg@mcgary.org>
788
789         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
790         pragmas.  Include bp-sym.h only if _LIBC.
791
792 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
793
794         * spinlock.c (__pthread_unlock): Properly place write barrier.
795         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
796
797 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
798
799         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
800         faster on SMP systems.  No more emulation of compare&swap for adaptive
801         spinlocks.
802         * spinlock.h: Likewise.
803         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
804         Replace fast with adaptive mutex.
805         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
806         * condvar.c: Likewise.
807         * pthread.c: Define and initialize __pthread_smp_kernel variable.
808         * internals.h: Declare __pthread_smp_kernel.
809         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
810         _pthread_fastlock structure.
811         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
812
813         * pthread.c: Remove initialization to zero from global variables.
814
815 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
816
817         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
818
819 2000-06-28  Greg McGary  <greg@mcgary.org>
820
821         * weaks.c: Wrap BP_SYM () around weak extern declarations of
822         pthread functions that have pointers in their return+arg signatures.
823
824 2000-06-27  Greg McGary  <greg@mcgary.org>
825
826         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
827         extern declarations of pthread functions that have pointers in
828         their return+arg signatures.
829
830 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
831
832         * Makefile (tests): Add ex11.  Add rules to build it.
833         * Examples/ex11.c: New file.
834         * rwlock.c: Fix complete braindamaged previous try to implement
835         timedout functions.
836
837         * spinlock.c: Pretty print.
838
839 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
840
841         * Makefile (tests): Add ex10.  Add rules to build it.
842         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
843         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
844         * condvar.c (pthread_cond_wait): Allow mutex of kind
845         PTHREAD_MUTEX_TIMED_NP.
846         (pthread_cond_timedwait_relative): Likewise.
847         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
848         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
849         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
850         (__pthread_mutex_lock): Use __pthread_alt_lock for
851         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
852         (__pthread_mutex_timedlock): New function.
853         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
854         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
855         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
856         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
857         * spinlock.c: Implement alternate fastlocks.
858         * spinlock.h: Add prototypes.
859         * Examples/ex10.c: New file.
860         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
861         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
862
863         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
864         (__pthread_rwlock_timedrdlock): New function.
865         (__pthread_rwlock_timedwrlock): New function.
866         Use laternate fastlock function everywhere.
867
868 2000-06-21  Andreas Jaeger  <aj@suse.de>
869
870         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
871         prototype.
872
873         * join.c: Include <stdlib.h> for exit prototype.
874
875 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
876
877         * sysdeps/i386/useldt.h: Include <stdlib.h>.
878
879         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
880         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
881
882         * Makefile (libpthread-routines): Add barrier.
883         (tests): Add ex9.  Add rule to build ex9.
884         * Versions: Export barrier functions.
885         * barrier.c: New file.
886         * Examples/ex9.c: New file.
887         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
888         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
889         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
890
891 2000-06-19  H.J. Lu  <hjl@gnu.org>
892
893         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
894         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
895         (compare_and_swap_with_release_semantics): New. Default to
896         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
897         is not defined.
898
899         * spinlock.c (__pthread_unlock): Call
900         compare_and_swap_with_release_semantics () instead of
901         compare_and_swap ().
902
903 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
904
905         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
906         to errno directly.
907         * sysdeps/pthread/timer_delete.c: Likewise.
908         * sysdeps/pthread/timer_getoverr.c: Likewise.
909         * sysdeps/pthread/timer_gettime.c: Likewise.
910         * sysdeps/pthread/timer_settime.c: Likewise.
911
912 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
913
914         Timer nodes are now reference counted, and can be marked
915         as deleted. This allows for the safe release of the global mutex
916         in the middle without losing the timer being operated on.
917
918         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
919         member is now an enum with three values, so that an intermediate
920         state can be represented (deleted but not free for reuse yet).
921         New refcount member added.
922         * sysdeps/pthread/timer_routines.c: Likewise.
923
924         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
925         timer_valid): New inline functions added.
926
927         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
928         restructured, recursive deadlock bug fixed.
929
930         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
931         timer_addref to ensure that timer won't be deleted while mutex is not
932         held. Also uses timer_invalid to perform validation of timer handle.
933         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
934         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
935
936 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
937
938         * shlib-versions: Add entry for SH.
939         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
940
941 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
942
943         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
944         tightened up some critical regions and micro-optimized some list
945         manipulation code.
946
947         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
948         Returns int value now to indicate whether timer was queued at head.
949         * sysdeps/pthread/posix-timer.h: Likewise.
950         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
951         new return value from __timer_thread_queue_timer to avoid waking
952         up timer thread unnecessarily.
953
954         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
955         inuse flag, because this requires mutex to be held.  Callers updated
956         to do the check when they have the mutex.
957         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
958
959         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
960         regions: avoids making system calls while holding timer mutex, and
961         a few computations were moved outside of the mutex as well.
962         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
963
964         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
965         to list_unlink_ip, meaning idempotent.  Pointer manipulation
966         changed to get better better code out of gcc.
967         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
968         version of list_unlink added here.
969         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
970         function in all places: idempotent one for timers, non-idempotent
971         one for thread nodes.
972         * sysdeps/pthread/timer_settime: Likewise.
973         * sysdeps/pthread/timer_routines.c: Likewise.
974
975 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
976
977         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
978         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
979
980         * sysdeps/pthread/Makefile: Remove tests definition.
981
982 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
983             Yutaka Niibe  <gniibe@chroot.org>
984
985         * sysdeps/sh/pspinlock.c: New file.
986         * sysdeps/sh/pt-machine.h: New file.
987
988 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
989
990         * Makefile (tests): Add joinrace.
991
992         * Examples/ex6.c: Test return value of pthread_join.
993
994 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
995
996         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
997         (__pthread_spin_trylock): Implement.
998         (__pthread_spin_unlock): Implement.
999         (__pthread_spin_init): Implement.
1000         (__pthread_spin_destroy): Implement.
1001
1002 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
1003
1004         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
1005         really append the entry.
1006
1007 2000-06-10  Andreas Jaeger  <aj@suse.de>
1008
1009         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
1010
1011 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
1012
1013         * sysdeps/pthread/timer_create.c: Thread matching now done on
1014         clock type as well as thread attributes.
1015         There are individual global signal-delivering threads for
1016         different clock types.
1017         * sysdeps/pthread/posix-timer.h: Likewise.
1018         * sysdeps/pthread/timer_routines.c: Likewise.
1019
1020         * sysdeps/pthread/timer_routines.c: Thread allocation and
1021         deallocation function now remembers to put thread on active
1022         list and remove from active list.
1023         Thus now the feature of binding multiple timers
1024         to a single thread actually works.
1025
1026 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
1027
1028         * pthread.c (__pthread_create_2_1): Optimize a bit.
1029
1030         * internals.h (invalid_handle): Also test for p_terminated != 0.
1031         (nonexisting_handle): New function.  Same as old invalid_handle.
1032         * join.c (pthread_join): Use nonexisting_handle instead of
1033         invalid_handle to test for acceptable thread handle.
1034         * manager.c (pthread_handle_free): Likewise.
1035         * joinrace.c: New file.
1036         Reported by Permaine Cheung <pcheung@cygnus.com>.
1037
1038 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
1039
1040         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1041         Correct handling of matching variable.
1042
1043         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1044         avoid warnings.
1045
1046         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1047         Be prepared for empty timer list.
1048
1049         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1050         CPUTIME clock ID.  Add support for thread clocks.
1051
1052         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1053         subtraction were switched.
1054
1055         * sysdeps/pthread/timer_routines.c (init_module): Use
1056         THREAD_MAXNODES threads.
1057
1058         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1059         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1060         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1061         with sigqueueinfo is this system call is available.
1062
1063         * sysdeps/pthread/timer_create.c (timer_create): Allow
1064         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1065
1066         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
1067         functionality.
1068         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1069
1070 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
1071
1072         * sysdeps/pthread/posix-timer.h: New file.
1073         * sysdeps/pthread/timer_create.c: New file.
1074         * sysdeps/pthread/timer_delete.c: New file.
1075         * sysdeps/pthread/timer_getoverr.c: New file.
1076         * sysdeps/pthread/timer_gettime.c: New file.
1077         * sysdeps/pthread/timer_routines.c: New file.
1078         * sysdeps/pthread/timer_settime.c: New file.
1079         * sysdeps/pthread/tst-timer.c: New file.
1080
1081 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
1082
1083         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1084         LINK_MAX definitions if necessary.
1085
1086 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
1087
1088         Added missing fork time handling of global libio lock.
1089
1090         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1091         not just the individual stream locks. Rewritten to use new
1092         iterator interface provided by libio rather than accessing
1093         global variable.
1094
1095         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1096         which lock and unlock the stream list using the new interface
1097         provied by libio.
1098         * internals.h: Likewise.
1099
1100         * ptfork.c (__fork): Now calls __flockfilelist before fork,
1101         and __funlockfilelist in the parent after the fork.
1102         Child still calls __fresetlockfiles as before.
1103
1104         * linuxthreads.texi: Now explains what happens to streams at
1105         fork time. Also whole new section on forking and thread added.
1106         Definition of pthread_atfork moved out of Miscellaneous Functions
1107         to this new section.
1108
1109 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
1110
1111         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1112         Add missing register.
1113         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1114
1115 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
1116
1117         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1118         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1119         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1120
1121 2000-05-31  Andreas Jaeger  <aj@suse.de>
1122
1123         * sysdeps/mips/pspinlock.c: Implement spinlocks.
1124
1125 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
1126
1127         * spinlock.c (__pthread_lock): Remove ASSERT.
1128
1129         * Makefile (tests): Add ex8.
1130         * Examples/ex8.c: New file.
1131
1132 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
1133
1134         Bugfix: The pthread_atfork mechanism now takes care of its
1135         own internal mutex at fork time.
1136
1137         * ptfork.c (__fork): Revised so that the mutex is held across
1138         the fork operation and while the handlers are called, and so that
1139         the child resets the mutex.
1140
1141         * linuxthreads.texi: Updated pthread_atfork documentation to make
1142         it clear that fork and pthread_atfork can't be reentered from
1143         atfork handlers, that pthread_atfork and fork are mutually atomic,
1144         and that the handlers are inherited by the child process.
1145
1146 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
1147
1148         * Makefile (libpthread-routines): Add pspinlock.
1149         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1150         Use struct _pthread_fastlock instead of pthread_spinlock_t.
1151         * condvar.c: Likewise.
1152         * internals.h: Likewise.
1153         * join.c: Likewise.
1154         * manager.c: Likewise.
1155         * mutex.c: Likewise.
1156         * pthread.c: Likewise.
1157         * rwlock.c: Likewise.
1158         * semaphore.c: Likewise.
1159         * signals.c: Likewise.
1160         * spinlock.h: Likewise.
1161         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
1162         * sysdeps/alpha/pspinlock.c: New file.
1163         * sysdeps/arm/pspinlock.c: New file.
1164         * sysdeps/i386/pspinlock.c: New file.
1165         * sysdeps/m68k/pspinlock.c: New file.
1166         * sysdeps/mips/pspinlock.c: New file.
1167         * sysdeps/powerpc/pspinlock.c: New file.
1168         * sysdeps/sparc/sparc32/pspinlock.c: New file.
1169         * sysdeps/sparc/sparc64/pspinlock.c: New file.
1170         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
1171         back to _pthread_fastlock.  Define new pthread_spinlock_t.
1172
1173 2000-05-24  Andreas Jaeger  <aj@suse.de>
1174
1175         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
1176
1177 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
1178
1179         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
1180
1181 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
1182
1183         * internals.h (__RES_PTHREAD_INTERNAL): Define.
1184
1185 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
1186
1187         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
1188         object state is represented with additional bits which distinguish
1189         whether that state was set up in the current process, or
1190         in an ancestor process. If that state was set in an ancestor,
1191         it means that a fork happened while thread was executing the init
1192         function. In that case, the state is reset to NEVER.
1193         * mutex.c (__pthread_once_fork_prepare): New function.
1194         (__pthread_once_fork_child): Likewise
1195         (__pthread_once_fork_parent): Likewise
1196         (__pthread_reset_pthread_once): Removed.
1197         * ptfork.c (__fork): Call new handlers in mutex.c.
1198         * internals.h: Declarations of new mutex.c functions added.
1199         Declaration of removed function deleted.
1200         * linuxthreads.texi: Updated documentation about pthread_once
1201         to clarify what happens under cancellation and forking.
1202
1203 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
1204
1205         * internals.h: New thread manager request type, REQ_KICK.
1206         * join.c (pthread_exit): main thread now calls exit() instead
1207         of _exit() in order to proper process cleanup.
1208         * manager.c (__pthread_manager): Do not terminate manager
1209         after unblocking main thread; wait for main thread's
1210         REQ_PROCESS_EXIT request instead.
1211         Also, added REQ_KICK case to handle new request; this just does
1212         nothing.
1213         * manager.c (pthread_exited): Do not terminate manager after
1214         unblocking main thread.
1215         * manager.c (__pthread_manager_sighandler): If the main thread
1216         is waiting for all other threads to die, send a REQ_KICK into
1217         the thread manager request pipe to get it to clean out the threads
1218         and unblock the main thread as soon as possible. This fixes
1219         the 2000 millisecond hang on shutdown bug.
1220         * Examples/ex7.c: New file, tests shutdown behavior when all threads
1221         including the main one call pthread_exit(), or implicitly do so.
1222         * Makefile (tests): Add ex7.
1223
1224 2000-05-05  Andreas Jaeger  <aj@suse.de>
1225
1226         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1227         (pthread_getcpuclockid): Correct test for ourselves.
1228
1229 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
1230
1231         * internals.h (struct _pthread_descr_struct): Reorganization.
1232         Allocate room for 16 pointers at head of the structure for future
1233         thread-local data handling.  Move p_self member in this area.
1234         * manager.c (pthread_handle_create): Adjust use of p_self.
1235         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
1236         * pthread.c (__pthread_initial_thread): Adjust initialization.
1237         (__pthread_manager_thread): Likewise.
1238
1239 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
1240
1241         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
1242         for eventmask larger than 1 word.
1243
1244 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
1245
1246         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
1247         * pthread.c (__pthread_initialize_minimal): New function.  Perform
1248         minimal initialization.
1249         (pthread_initialize): Remove this code here.
1250         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
1251         are working around the problem in glibc.
1252
1253 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
1254
1255         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
1256         now.  First gcc must be fixed (more concrete: libgcc).
1257
1258 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
1259
1260         * pthread.c: Remove special treatement for interrupt handlers on x86.
1261         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
1262         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
1263         necessary.
1264         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
1265
1266 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
1267
1268         * join.c (pthread_exit): Set p_terminated after reporting the
1269         termination event instead of before.
1270
1271 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
1272
1273         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
1274         if __USE_UNIX98.
1275
1276 2000-04-18  Andreas Jaeger  <aj@suse.de>
1277
1278         * Versions: Use ld instead of ld.so.
1279
1280 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
1281
1282         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
1283         Remove the typedef keyword.
1284
1285 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
1286
1287         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
1288         not stbar.
1289         (READ_MEMORY_BARRIER): Define.
1290         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
1291         MEMORY_BARRIER.
1292         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
1293         headers.
1294
1295 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
1296
1297         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1298         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
1299         use thread_handle().
1300
1301 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
1302
1303         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
1304         if fast mutex is used.  Don't initialize `already_canceled' twice.
1305         Correctly test for return value of timedsuspend.
1306
1307         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
1308         therefore don't need the _rt versions of the signal handlers.
1309
1310 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
1311
1312         * pthread.c (pthread_yield): New function.
1313         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
1314         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
1315         * internals.h: Declare __pthread_yield.
1316
1317         * pthread.c (pthread_initialize): Avoid a bit more code if
1318         realtime signals are known to exist.
1319
1320         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
1321         to dynamically detect RT signals and avoid generating compatibility
1322         functions with old kernel.
1323         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
1324         __pthread_restart_new directly.
1325         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
1326         __pthread_wait_for_restart_signal directly.
1327         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
1328         __pthread_timedsuspend_new directly.
1329
1330 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
1331
1332         * condvar.c: Remove all the special code to handle cond_timedwait.
1333         Use timedsuspend instead.
1334         * internals.h: Declare __pthread_timedsuspend_old,
1335         __pthread_timedsuspend_new, and __pthread_timedsuspend.
1336         Remove declaration of __pthread_init_condvar.
1337         * pthread.c: Define __pthread_timedsuspend variable.
1338         (__pthread_timedsuspend_old): New function.  Timed suspension
1339         implementation for old Linux kernels.
1340         (__pthread_timedsuspend_new): New function.  Timed suspension
1341         implementation for new Linux kernels.
1342         * restart.h (timedsuspend): New function.  Call appropriate
1343         suspension function through __pthread_timedsuspend.
1344         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
1345         the code.
1346         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1347
1348         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
1349         undefined.
1350         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
1351         where possible.
1352         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
1353         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1354
1355         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
1356         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1357
1358 2000-04-14  Andreas Jaeger  <aj@suse.de>
1359
1360         * weaks.c: Fix typo.
1361
1362         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
1363         2.2 for linuxthreads.
1364
1365 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
1366
1367         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1368         (pthread_getcpuclockid): Fix typo.
1369
1370 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
1371
1372         * Makefile (libpthread-routines): Add getcpuclockid.
1373         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
1374         * sysdeps/pthread/getcpuclockid.c: New file.
1375         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
1376         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
1377
1378         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
1379         Defined.
1380         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1381
1382         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
1383         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1384         and pthread_spin_unlock.
1385         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
1386         into pthread_spinlock_t.  Change all uses.
1387         * spinlock.c: Implement pthread_spin_lock.
1388         Rename __pthread_unlock to __pthread_spin_unlock and define weak
1389         alias for real name.
1390         Define pthread_spin_trylock, pthread_spin_init, and
1391         pthread_spin_destroy.
1392         Change all uses of _pthread_fastlock to pthread_spinlock_t.
1393         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
1394         Change all uses of _pthread_fastlock to pthread_spinlock_t.
1395         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
1396         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1397         and pthread_spin_unlock.
1398         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
1399         Change all uses of _pthread_fastlock to pthread_spinlock_t.
1400         * condvar.c: Likewise.
1401         * internals.h: Likewise.
1402         * join.c: Likewise.
1403         * manager.c: Likewise.
1404         * mutex.c: Likewise.
1405         * pthread.c: Likewise.
1406         * rwlock.c: Likewise.
1407         * semaphore.c: Likewise.
1408         * signals.c: Likewise.
1409
1410         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
1411         macros.
1412         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
1413
1414 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
1415
1416         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
1417         _POSIX_SHARED_MEMORY_OBJECTS.
1418
1419 2000-04-11  Andreas Jaeger  <aj@suse.de>
1420
1421         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
1422         (__compare_and_swap): Mark as modifying memory.
1423
1424 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
1425
1426         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
1427         __volatile__.
1428         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
1429         Don't have the 'asm' __volatile__.
1430
1431 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
1432
1433         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
1434         * spinlock.c (__pthread_lock): Add memory barriers.
1435         (__pthread_unlock): Likewise.
1436         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
1437         instruction.
1438         (RELEASE): Not needed anymore.
1439         (__compare_and_swap): Mark asm as modifying memory.
1440         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
1441         of MEMORY_BARRIER.
1442         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
1443         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
1444         (MEMORY_BARRIER): Define using stbar.
1445         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
1446         stbar.
1447         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
1448         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
1449         Mike Burrows <m3b@pa.dec.com>.
1450
1451 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
1452
1453         * signals.c (sigaction): Fix return value for the case SIG is one
1454         of the signals the implementation uses.
1455         Patch by Xavier.Leroy@inria.fr.
1456
1457 2000-04-01  Andreas Jaeger  <aj@suse.de>
1458
1459         * attr.c: Use shlib-compat macros.
1460         * oldsemaphore.c: Likewise.
1461         * pthread.c: Likewise.
1462         * weaks.c: Likewise.
1463
1464 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
1465
1466         * semaphore.c (sem_timedwait): New function.
1467         Patch by Carl Mailloux <carlm@oricom.ca>.
1468         * semaphore.h: Declare sem_timedwait.
1469         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
1470
1471 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
1472
1473         * sysdeps/pthread/Makefile: File removed.
1474
1475 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
1476
1477         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
1478         * internals.h (__pthread_reset_pthread_once): Add prototype.
1479         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
1480
1481         * manager.c (pthread_handle_create): Store ID of new thread before
1482         clone call.
1483
1484 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
1485
1486         * attr.c: Use new macros from shlib-compat.h to define versions.
1487         * oldsemaphore.c: Likewise.
1488         * semaphore.c: Likewise.
1489         * weaks.c: Likewise.
1490
1491         * pthread.c: Update for new SHLIB_COMPAT definition.
1492
1493         * manager.c (__pthread_manager): Unmask debug signal.
1494
1495         * pthread.c (pthread_initialize): Test for address of __dso_handle
1496         being NULL, not value.  Use __on_exit, not on_exit.
1497         Patch by Andreas Jaeger <aj@suse.de>.
1498
1499         * pthread.c: Use new macros from shlib-compat.h to define versions.
1500
1501 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
1502
1503         * pthread.c (pthread_initialize): Instead of on_exit use
1504         __cxa_atexit if __dso_label is available to allow unloading the
1505         libpthread shared library.
1506
1507 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
1508
1509         * condvar.c: Make tests for ownership of mutex less strict.
1510
1511 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
1512
1513         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
1514         current thread and return error if not.
1515         (pthread_cond_timedwait_relative_old): Likewise.
1516         (pthread_cond_timedwait_relative_new): Likewise.
1517
1518         * mutex.c (__pthread_once): Handle cancelled init function correctly.
1519         (pthread_once_cancelhandler): New function.
1520         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1521
1522 2000-03-14  Andreas Jaeger  <aj@suse.de>
1523
1524         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
1525         REG_GS.
1526         (pthread_handle_sigrestart_rt): Likewise.
1527         * signals.c (pthread_sighandler_rt): Likewise.
1528
1529 2000-03-02  Andreas Jaeger  <aj@suse.de>
1530
1531         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
1532         Reported by Sean Chen <sean.chen@turbolinux.com>.
1533
1534 2000-02-28  Andreas Jaeger  <aj@suse.de>
1535
1536         * rwlock.c: Fix typo.
1537
1538 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
1539
1540         * rwlock.c: Define __* variants of the functions and make old names
1541         aliases.
1542         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
1543         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
1544
1545 2000-02-25  Andreas Jaeger  <aj@suse.de>
1546
1547         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1548         pwrite64, lseek64, open64, and __open64 with version 2.2.
1549
1550 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
1551
1552         * semaphore.h (SEM_FAILED): Use 0 not NULL.
1553
1554 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
1555
1556         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
1557         nanosleep does not work either.  Get absolute time inside the
1558         loop.
1559         (pthread_cond_timedwait_relative_new): Likewise.
1560         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1561
1562 2000-02-13  Andreas Jaeger  <aj@suse.de>
1563
1564         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
1565         (pthread_cond_timedwait_relative_old): Likewise.
1566
1567 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
1568
1569         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
1570         but keep the code around.  A bug in the kernel prevent us from
1571         using the code.
1572         (pthread_cond_timedwait_relative_new): Likewise.
1573         (PR libc/1597 and libc/1598).
1574
1575 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
1576
1577         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
1578         loop around nanosleep calls instead of around most of the function
1579         (pthread_cond_timedwait_relative_new): Likewise.
1580         body.  Got rid of backwards goto and one local.
1581
1582 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
1583
1584         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
1585         before every nanosleep call to account for time spent in the rest
1586         of the function.
1587         (pthread_cond_timedwait_relative_new): Likewise.
1588         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
1589
1590 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
1591
1592         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
1593         from nanosleep call so that in case we restart we only wait for the
1594         remaining time.
1595         (pthread_cond_timedwait_relative_new): Likewise.
1596         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
1597
1598 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
1599
1600         * manager.c (pthread_allocate_stack): Compute guard page address
1601         correctly.  Patch by HJ Lu.
1602
1603         * sysdeps/pthread/pthread.h: Define
1604         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
1605
1606 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
1607
1608         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
1609         preference handling.
1610         (pthread_rwlockattr_setkind_np): Allow
1611         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
1612         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1613
1614 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
1615
1616         * internals.h (pthread_readlock_info): New structure.
1617         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
1618         p_untracked_readlock_count.
1619         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1620         Add initializers for new fields.
1621         * manager.c (pthread_free): Free read/write lock lists.
1622         * queue.h (queue_is_empty): New function.
1623         * rwlock.c: Implement requirements about when readers should get
1624         locks assigned.
1625         * sysdeps/pthread/pthread.h
1626         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
1627         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
1628         Define this name as well.
1629         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1630
1631 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
1632
1633         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1634         Adjust initializers for struct _pthread_descr_struct change.
1635         * internals.h (struct _pthread_descr_struct): Move new elements to
1636         the end.
1637
1638 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
1639
1640         Redesigned how cancellation unblocks a thread from internal
1641         cancellation points (sem_wait, pthread_join,
1642         pthread_cond_{wait,timedwait}).
1643         Cancellation won't eat a signal in any of these functions
1644         (*required* by POSIX and Single Unix Spec!).
1645         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
1646         simultaneous condition variable signal (not required by POSIX
1647         or Single Unix Spec, but nice).
1648         * spinlock.c: __pthread_lock queues back any received restarts
1649         that don't belong to it instead of assuming ownership of lock
1650         upon any restart; fastlock can no longer be acquired by two threads
1651         simultaneously.
1652         * restart.h: Restarts queue even on kernels that don't have
1653         queued real time signals (2.0, early 2.1), thanks to atomic counter,
1654         avoiding a rare race condition in pthread_cond_timedwait.
1655
1656 1999-12-31  Andreas Jaeger  <aj@suse.de>
1657
1658         * internals.h: Remove duplicate prototype declarations.
1659
1660         * weaks.c: Remove __THROW from prototypes since the file is not
1661         compiled by a C++ compiler.
1662         * internals.h: Likewise.
1663
1664 1999-12-30  Andreas Jaeger  <aj@suse.de>
1665
1666         * sysdeps/pthread/pthread.h: Move internal functions to...
1667         * sysdeps/pthread/bits/libc-lock.h: ...here.
1668
1669 1999-12-29  Andreas Jaeger  <aj@suse.de>
1670
1671         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
1672
1673 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
1674
1675         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
1676         beginning.
1677
1678         * manager.c (__pthread_start): Add one more cast to prevent
1679         warning on 64bit machines.
1680
1681 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
1682
1683         * manager.c (pthread_handle_create): Set p_pid of new thread
1684         before calling the callback function to report a new thread.
1685
1686 1999-12-20  Andreas Jaeger  <aj@suse.de>
1687
1688         * pthread.c (pthread_initialize): Move getrlimit call after
1689         setting of errno.
1690
1691 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
1692
1693         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1694         pwrite64, lseek64, open64, and __open64.
1695         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
1696         pwrite64, lseek64, open64, and __open64.
1697
1698         * manager.c (pthread_allocate_stack): Correct computation of
1699         new_thread_bottom.  Correct handling of stack size and when the
1700         rlimit method to guard for stack growth is used.
1701         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
1702         minus one pagesize (not two).
1703
1704 1999-12-03  Andreas Jaeger  <aj@suse.de>
1705
1706         * Versions: Add __res_state with version GLIBC_2.2.
1707
1708         * errno.c (__res_state): New function to return thread specific
1709         resolver state.
1710
1711         * pthread.c (pthread_initialize): Initialize p_resp.
1712         (__pthread_reset_main_thread): Also set p_resp.
1713
1714         * manager.c (pthread_handle_create): Initialize p_resp.
1715
1716         * internals.h: Add thread specific resolver state.
1717         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
1718
1719 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
1720
1721         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
1722         beginning.
1723         * sysdeps/i386/i686/pt-machine.h: Likewise.
1724         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
1725
1726 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
1727
1728         * manager.c (pthread_start_thread_event): Initialize p_pid already
1729         here.
1730
1731 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
1732
1733         * internals.h: Add prototype for __pthread_manager_event.
1734         * manager.c (__pthread_manager_event): New function.
1735         (pthread_start_thread_event): Correct computation of self.
1736         Use INIT_THREAD_SELF.
1737         * pthread.c (__pthread_manager_thread): Initialize p_lock.
1738         (__pthread_initialize_manager): Respect event flags also for creation
1739         of the manager thread.
1740
1741 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
1742
1743         * pthread.c (__pthread_initialize_manager): Initialize
1744         __pthread_manager_thread.p_tid.
1745
1746 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
1747
1748         * internals.h: Declare __pthread_last_event.
1749         * manager.c: Define __pthread_last_event.
1750         (pthread_handle_create): Set __pthread_last_event.
1751         (pthread_exited): Likewise.
1752         * join.c (pthread_exit): Likewise.
1753
1754         * Makefile (libpthread-routines): Add events.
1755         * events.c: New file.
1756         * internals.h: Protect against multiple inclusion.
1757         Include thread_dbP.h header.
1758         (struct _pthread_descr_struct): Add new fields p_report_events and
1759         p_eventbuf.
1760         Declare event reporting functions.
1761         * join.c (pthread_exit): Signal event if this is wanted.
1762         * manager.c (__pthread_threads_events): New variable.
1763         (pthread_handle_create): Take new parameters with event information.
1764         Signal TD_CREATE event if wanted.
1765         (__pthread_manager): Adjust pthread_handle_create call.
1766         (pthread_start_thread_event): New function.  Block until manager is
1767         finished and then call pthread_start_thread.
1768         (pthread_exited): Signal TD_REAP event if wanted.
1769
1770 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
1771
1772         * restart.h (suspend_with_cancellation): Rewrite as a macro.
1773
1774         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
1775
1776 1999-10-25  Andreas Jaeger  <aj@suse.de>
1777
1778         * internals.h: Remove K&R compatibility.
1779         * no-tsd.c: Likewise.
1780         * semaphore.h: Likewise.
1781         * signals.c: Likewise.
1782         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
1783         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
1784         * weaks.c: Likewise.
1785
1786 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
1787
1788         * pthread.c: For i386, wrap pthread_handle_sigrestart and
1789         pthread_handle_sigcancel with functions that restore %gs from the
1790         signal context.  For each signal handling function, two wrappers
1791         are required, one for a non-RT signal and one for a RT signal.
1792         * signal.c: For i386, add code to restore %gs from the signal
1793         context in pthread_sighandler and pthread_sighandler_rt.
1794
1795 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
1796
1797         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
1798
1799 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
1800
1801         * pthread.c (__pthread_initial_thread): Pass argument to
1802         PTHREAD_START_ARGS_INITIALIZER.
1803         (__pthread_manager_thread): Likewise.
1804
1805         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
1806         initialize function.
1807
1808         * manager.c (pthread_handle_create): Remove p_startfct initialization.
1809
1810         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
1811
1812 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
1813
1814         * internals.h: Correct return types for __libc_read and __libc_write.
1815
1816 1999-10-09  Andreas Jaeger  <aj@suse.de>
1817
1818         * internals.h: Add __new_sem_post to get prototype in
1819         manager.c; include semaphore.h for needed types.
1820
1821 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
1822
1823         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
1824         directly instead of calling sem_post which should not be necessary
1825         but is faster and might help in some case to work around problems.
1826         Patch by khendricks@ivey.uwo.ca [libc/1382].
1827
1828 1999-10-08  Andreas Schwab  <schwab@suse.de>
1829
1830         * sysdeps/pthread/Subdirs: New file.
1831         * Implies: Removed.
1832
1833 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
1834
1835         * Implies: New file.
1836         * internals.h (struct _pthread_descr_struct): Add p_startfct.
1837         * manager.c (pthread_handle_create): Initialize p_startfct.
1838         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
1839
1840 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
1841
1842         * manager.c (__linuxthreads_pthread_threads_max): New variable.
1843         * specific.c (__linuxthreads_pthread_keys_max): New variable.
1844         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
1845
1846         * condvar.c (pthread_cond_timedwait_relative): Never return with
1847         EINTR.  Patch by Andreas Schwab.
1848
1849 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
1850
1851         * signals.c (sigaction): Correct last patch.  Don't select
1852         pthread_sighandler_rt based on the signal number but instead of
1853         the SA_SIGINFO flag.
1854
1855 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
1856
1857         * specific.c: Move definitions of struct pthread_key_struct and
1858         destr_function to ...
1859         * internals.h: ...here.
1860
1861 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
1862
1863         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
1864         this instead of pthread_handle_sigrestart if the signal is an RT
1865         signal.
1866
1867         * signals.c: Handle passing through of sighandler arguments also
1868         for real-time signals.
1869
1870 1999-09-03  Andreas Schwab  <schwab@suse.de>
1871
1872         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
1873         fork as weak alias.
1874         (__vfork): New function, alias vfork.
1875         * Versions: Export __fork, vfork, and __vfork in libpthread.
1876
1877 1999-08-23  Andreas Schwab  <schwab@suse.de>
1878
1879         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
1880         call to signal handler.
1881
1882 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
1883
1884         * pthread.c (__pthread_reset_main_thread): Undo last change.
1885         (__pthread_kill_other_threads_np): Reset signal handlers for the
1886         signals we used in the thread implementation here.
1887
1888 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
1889
1890         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
1891         for the signals we used in the thread implementation [PR libc/1234].
1892
1893         * Versions: Export __pthread_kill_other_threads_np from libpthread
1894         for GLIBC_2.1.2.
1895
1896         * signals.c: Pass sigcontext through wrapper to the user function.
1897
1898 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
1899
1900         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
1901         __libc_internal_tsd_set.
1902
1903 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1904
1905         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
1906         needed anymore.
1907
1908 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1909
1910         * internals.h: Align _pthread_descr_struct to 32 bytes.
1911         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
1912         libc/1206.
1913
1914 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
1915
1916         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
1917         swap function.
1918
1919 1999-07-09  Cristian Gafton  <gafton@redhat.com>
1920
1921         * Makefile (libpthread-routines): Add oldsemaphore routine.
1922         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
1923         sem_trywait, and sem_wait to GLIBC_2.1.
1924         * oldsemaphore.c: New file.
1925         * semaphore.c: Add default_symbol_versions for the changed functions.
1926         (__new_sem_init): Rename from sem_init.
1927         (__new_sem_post): Rename from sem_post.
1928         (__new_sem_wait): Rename from sem_wait.
1929         (__new_sem_trywait): Rename from sem_trywait.
1930         (__new_sem_getvalue): Rename from sem_getvalue.
1931         (__new_sem_destroy): Rename from sem_destroy.
1932
1933 1999-06-23  Robey Pointer  <robey@netscape.com>
1934
1935         * internals.h: Added p_nextlock entry to separate queueing for a
1936         lock from queueing for a CV (sometimes a thread queues on a lock
1937         to serialize removing itself from a CV queue).
1938         * pthread.c: Added p_nextlock to initializers.
1939         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
1940
1941 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
1942
1943         * manager.c (pthread_handle_create): Free mmap region after stack
1944         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
1945
1946 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1947
1948         * man/pthread_cond_init.man: Correct example.
1949         Reported by Tomas Berndtsson <tomas@nocrew.org>.
1950
1951         * linuxthreads.texi (Condition Variables): Likewise.
1952
1953 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
1954
1955         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
1956         casx not cas, also successful casx returns the old value in rd
1957         and not the new value.
1958
1959 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
1960
1961         * manager.c: If pthread_create() is given a NULL attribute
1962         and the thread manager runs with a realtime policy, set the
1963         scheduling policy of the newly created thread back to SCHED_OTHER.
1964         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
1965         initialize the schedpolicy field of new_thread->p_start_args
1966         to that of the calling thread.
1967
1968 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
1969
1970         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
1971         instruction does not allow memory element to use offset.
1972
1973 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
1974
1975         * manager.c (pthread_allocate_stack): Optimize initialization of new
1976         thread descriptor.
1977
1978         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
1979         Don't use initializer since it is all zeroes.
1980         (__libc_once_define): Likewise.
1981
1982 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1983
1984         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
1985         doesn't exist anymore.
1986         * sysdeps/i386/Implies: Likewise.
1987         * sysdeps/m68k/Implies: Likewise.
1988         * sysdeps/mips/Implies: Likewise.
1989         * sysdeps/powerpc/Implies: Likewise.
1990         * sysdeps/sparc/sparc32/Implies: Likewise.
1991         * sysdeps/sparc/sparc64/Implies: Likewise.
1992
1993 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
1994
1995         * sysdeps/alpha/bits/semaphore.h: Removed.
1996         * sysdeps/powerpc/bits/semaphore.h: Removed.
1997         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
1998         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
1999         * Makefile (headers): Remove bits/semaphore.h.
2000
2001         * semaphore.h: Define _pthread_descr if necessary.
2002         Don't include limits.h.  Define SEM_VALUE_MAX directly.
2003         Define SEM_FAILED.
2004         (sem_t): Protect element names with leading __.
2005         Add declarations for sem_close, sem_open, and sem_unlink.
2006         * semaphore.c: Adjust all functions for new element names.
2007         Define sem_close, sem_open, and sem_unlink.
2008         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
2009         GLIBC_2.1.1.
2010         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
2011         necessary.
2012
2013 1999-03-16  H.J. Lu  <hjl@gnu.org>
2014
2015         * specific.c (pthread_key_delete): Check th->p_terminated to see
2016         if the thread is running.
2017
2018         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2019         Added to GLIBC_2.0 for libc.so.
2020
2021 1999-02-12  H.J. Lu  <hjl@gnu.org>
2022
2023         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2024         __libc_allocate_rtsig): Added to GLIBC_2.1.
2025
2026         * internals.h (DEFAULT_SIG_RESTART): Removed.
2027         (DEFAULT_SIG_CANCEL): Removed.
2028
2029         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2030         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2031         (__pthread_sig_restart, __pthread_sig_cancel,
2032         __pthread_sig_debug): Initialized.
2033         (pthread_initialize): Call init_rtsigs () to initialize
2034         real-time signals.
2035
2036 1999-02-03  H.J. Lu  <hjl@gnu.org>
2037
2038         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2039         Don't restart the thread which sent REQ_DEBUG.
2040         (pthread_start_thread): Check if __pthread_sig_debug > 0
2041         before debugging.
2042
2043         * pthread.c (__pthread_initialize_manager): Suspend ourself
2044         after sending __pthread_sig_debug to gdb instead of
2045         __pthread_sig_cancel.
2046
2047 1999-01-24  H.J. Lu  <hjl@gnu.org>
2048
2049         * manager.c (__pthread_manager): Delete __pthread_sig_debug
2050         from mask if __pthread_sig_debug > 0.
2051         (pthread_handle_create): Increment __pthread_handles_num.
2052
2053         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2054         * pthread.c (__pthread_initialize_manager): Likewise.
2055
2056         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2057         instead of __libc_allocate_rtsig (2).
2058         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2059         instead of __pthread_sig_cancel.
2060         (pthread_handle_sigdebug): Fix comments.
2061
2062 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
2063
2064         * manager.c (pthread_allocate_stack): Set
2065         __pthread_nonstandard_stacks if user-specified stack is used.
2066
2067 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
2068
2069         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2070         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2071
2072 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
2073
2074         * pthread.c: Use a third signal __pthread_sig_debug distinct
2075         from __pthread_sig_cancel to notify gdb when a thread is
2076         created
2077         * manager.c: Likewise.
2078         * internals.h: Likewise.
2079         * signals.c: The implementation of sigwait(s) assumed that
2080         all signals in s have signal handlers already attached.
2081         This is not required by the standard, so make it work
2082         also if some of the signals have no handlers.
2083
2084 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
2085
2086         * linuxthreads.texi: Remove pointers from first @node.  Move old
2087         @node spec inside comment.
2088
2089 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
2090
2091         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2092         _IO_lock_unlock.
2093
2094 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
2095
2096         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2097         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2098
2099 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
2100
2101         * manager.c: Threads now send __pthread_sig_cancel on termination.
2102         Change clone call and signal masks.
2103         * thread.c (pthread_handle_sigrestart): Remove special code for
2104         manager.
2105         (pthread_handle_sigcancel): In manager thread call
2106         __pthread_manager_sighandler.
2107         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2108         * sysdeps/i386/i686/pt-machine.h: Likewise.
2109         Patches by Xavier Leroy.
2110
2111 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
2112
2113         * spinlock.c (__pthread_unlock): Don't crash if called for an
2114         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2115
2116         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2117         overall runtime.
2118
2119 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
2120
2121         * Examples/ex3.c: Wait until all threads are started before
2122         searching for the number to avoid race condition on very fast
2123         systems.
2124
2125 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2126
2127         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2128         declaration since it's not needed.
2129
2130         * sysdeps/pthread/pthread.h: Move internal functions to ...
2131         * internals.h: ...here.
2132
2133 1998-12-02  H.J. Lu  <hjl@gnu.org>
2134
2135         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2136         SIGRTMIN is defined.
2137         (__pthread_sig_cancel): Likewise.
2138
2139 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2140
2141         * wrapsyscall.c: Include <sys/mman.h> for msync,
2142         <stdlib.h> for system and <termios.h> for tcdrain prototype.
2143         Correct msync declaration.
2144
2145 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
2146
2147         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2148         __libc_tsd_set): New macros for new interface.
2149         * no-tsd.c: New file, provide uninitialized defns of
2150         __libc_internal_tsd_get and __libc_internal_tsd_set.
2151         * Makefile (routines): Add no-tsd.
2152
2153 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
2154
2155         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
2156         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2157         __libc_internal_tsd_set): Move decls to ...
2158         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
2159         declarations.
2160
2161         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2162         __libc_internal_tsd_set): Make these pointers to functions, not
2163         functions; remove #pragma weak decls for them.
2164         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
2165         Define static functions and initialized pointers to them.
2166
2167 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
2168
2169         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
2170         (CFLAGS-specific.c): Likewise.
2171         (CFLAGS-pthread.c): Likewise.
2172         (CFLAGS-ptfork.c): Likewise.
2173         (CFLAGS-cancel.c): Likewise.
2174         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
2175         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
2176
2177         * mutex.c (pthread_mutex_init): Define as strong symbol.
2178         (pthread_mutex_destroy): Likewise.
2179         (pthread_mutex_trylock): Likewise.
2180         (pthread_mutex_lock): Likewise.
2181         (pthread_mutex_unlock): Likewise.
2182         (pthread_mutexattr_init): Likewise.
2183         (pthread_mutexattr_destroy): Likewise.
2184         (pthread_once): Likewise.
2185         * ptfork.c (pthread_atfork): Likewise.
2186         * specific.c (pthread_key_create): Likewise.
2187         (pthread_setspecific): Likewise.
2188         (pthread_getspecific): Likewise.
2189
2190 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
2191
2192         * linuxthreads.texi: Fix punctuation after xref.
2193
2194 1998-11-10  H.J. Lu  <hjl@gnu.org>
2195
2196         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
2197         if it is defined in <linux/limits.h>.
2198
2199 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
2200
2201         * spinlock.h (__pthread_trylock): Define inline.
2202         (__pthread_lock): Add extra parameter to declaration.  Declare
2203         using internal_function.
2204         (__pthread_unlock): Declare using internal_function.
2205         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
2206         of local variable self.  Avoid recomputing self.  Define using
2207         internal_function.
2208         (__pthread_trylock): Remove.
2209         (__pthread_unlock): Define using internal_function.
2210         * cancel.c: Adjust for __pthread_lock interface change.  Use already
2211         computed self value is possible.
2212         * condvar.c: Likewise.
2213         * join.c: Likewise.
2214         * manager.c: Likewise.
2215         * mutex.c: Likewise.
2216         * pthread.c: Likewise.
2217         * rwlock.c: Likewise.
2218         * semaphore.c: Likewise.
2219         * signals.c: Likewise.
2220
2221 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
2222
2223         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
2224         __ to field names of the struct.
2225         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
2226         Likewise.
2227         (pthread_attr_t): Likewise.
2228         (pthread_cond_t): Likewise.
2229         (pthread_condattr_t): Likewise.
2230         (pthread_mutex_t): Likewise.
2231         (pthread_mutexattr_t): Likewise.
2232         (pthread_rwlock_t): Likewise.
2233         (pthread_rwlockattr_t): Likewise.
2234         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
2235         * cancel.c: Likewise.
2236         * condvar.c: Likewise.
2237         * manager.c: Likewise.
2238         * mutex.c: Likewise.
2239         * pthread.c: Likewise.
2240         * ptlongjmp.c: Likewise.
2241         * rwlock.c: Likewise.
2242         * spinlock.c: Likewise.
2243
2244 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
2245
2246         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
2247         also with PT_EI.
2248
2249         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
2250         definitions.
2251
2252         * Makefile (libpthread-routines): Add pt-machine.
2253         * pt-machine.c: New file.
2254         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
2255         yet defined.  Use PT_EI in extern inline definitions.
2256         * sysdeps/arm/pt-machine.h: Likewise.
2257         * sysdeps/i386/pt-machine.h: Likewise.
2258         * sysdeps/i386/i686/pt-machine.h: Likewise.
2259         * sysdeps/m68k/pt-machine.h: Likewise.
2260         * sysdeps/mips/pt-machine.h: Likewise.
2261         * sysdeps/powerpc/pt-machine.h: Likewise.
2262         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2263         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2264
2265 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2266
2267         * semaphore.h: Include <sys/types.h> so that _pthread_descr
2268         is declared.
2269
2270 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
2271
2272         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
2273         argument.
2274         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
2275
2276 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
2277
2278         * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
2279         guard.
2280
2281 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2282
2283         * signals.c (sigaction): Check that sig is less than NSIG to avoid
2284         array index overflow.
2285
2286 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
2287
2288         * sysdeps/pthread/semaphore.h: New file.
2289
2290 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
2291
2292         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
2293         _LIBC_TSD_KEY_DL_ERROR.
2294
2295 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
2296
2297         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
2298         * sysdeps/i386/pt-machine.h: Likewise.
2299         Suggested by Roland McGrath.
2300
2301 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
2302
2303         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
2304         access thread data with non-constant offsets.
2305         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
2306         necessary.
2307
2308         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
2309         THREAD_SETMEM_NC definitions.
2310
2311         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
2312         THREAD_SETMEM_NC.
2313         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2314
2315 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
2316
2317         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
2318         not already defined.
2319         (struct _pthread_descr_struct): Add p_self and p_nr field.
2320         * manager.c (__pthread_handles): Define second element to point
2321         to manager thread.
2322         (__pthread_handles_num): Initialize to 2.
2323         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
2324         (pthread_start_thread): Likewise.
2325         (pthread_handle_create): Start search for free slot at entry 2.
2326         Initialize new fields p_self and p_nr.
2327         Call __clone with CLONE_PTRACE if available.
2328         (pthread_free): Call FREE_THREAD_SELF if available.
2329         * pthread.c (__pthread_initial_thread): Initialize new fields.
2330         (__pthread_manager_thread): Likewise.
2331         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
2332
2333         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
2334         elements of the thread descriptor.
2335         * condvar.c: Likewise.
2336         * errno.c: Likewise.
2337         * join.c: Likewise.
2338         * manager.c: Likewise.
2339         * pthread.c: Likewise.
2340         * ptlongjmp.c: Likewise.
2341         * semaphore.c: Likewise.
2342         * signals.c: Likewise.
2343         * specific.c: Likewise.
2344         * spinlock.c: Likewise.
2345
2346         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
2347
2348         * sysdeps/i386/useldt.h: New file.
2349         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
2350
2351         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
2352         THREAD_SETMEM using __thread_self.
2353         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2354
2355 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
2356
2357         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
2358         turned out that we didn't need to queue after all.
2359
2360 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
2361
2362         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
2363         and wastes space; correct types.
2364
2365 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
2366
2367         * signals.c (sigaction): Handle NULL argument.
2368
2369 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
2370
2371         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
2372         of sigset_t.
2373
2374 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2375
2376         * Makefile (linuxthreads-version): Extract correct number from
2377         Banner.
2378
2379 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
2380
2381         * Banner: Bump version number to 0.8
2382         * FAQ.html: Many updates, in particular w.r.t. debugging.
2383         * manager.c: Support for non-default stacksize for
2384         LinuxThreads-allocated stacks;
2385         don't use guard pages for stacks with default size, rely on
2386         rlimit(RLIMIT_STACK) instead (it's cheaper).
2387         * attr.c: Likewise.
2388         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
2389         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
2390         * condvar.c: Likewise.
2391         * internals.h: Likewise.
2392         * restart.h: Likewise.
2393         * signals.c: Likewise.
2394         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
2395
2396 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2397
2398         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
2399         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
2400         * Versions: Put __pthread_mutexattr_settype under version
2401         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
2402         __pthread_mutexattr_gettype.
2403
2404 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2405
2406         * sysdeps/pthread/bits/libc-lock.h: Make
2407         __pthread_mutexattr_settype weak.  Don't make
2408         __pthread_mutexattr_setkind_np weak.
2409
2410 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
2411
2412         * manager.c (pthread_handle_create): Check whether sched_setscheduler
2413         call can succeed here.
2414
2415         * mutex.c: Define __pthread_mutexattr_settype and make
2416         __pthread_mutexattr_setkind_np an alias.
2417         Likewise for __pthread_mutexattr_gettype.
2418
2419 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
2420
2421         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
2422         is root.
2423
2424 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
2425
2426         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
2427
2428 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2429
2430         * Examples/ex6.c: Include <unistd.h> for usleep.
2431
2432 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2433
2434         * Examples/ex4.c (main): Use exit, not pthread_exit.
2435
2436 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
2437
2438         * Versions: Add __pthread_mutexattr_gettype and
2439         __pthread_mutexattr_settype.
2440         * lockfile.c: Use __pthread_mutexattr_settype instead of
2441         __pthread_mutexattr_setkind_np.
2442         * mutex.c: Define __pthread_mutexattr_gettype and
2443         __pthread_mutexattr_settype.
2444         * weak.c: Likewise.
2445         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
2446         __pthread_mutexattr_settype.
2447         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
2448         Use __pthread_mutexattr_settype.
2449
2450 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
2451
2452         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
2453         * mutex.c: Define weak alias pthread_mutexattr_gettype and
2454         pthread_mutexattr_settype.
2455         * sysdeps/pthread/pthread.h: Declare these functions.
2456         Move pthread_sigmask and pthread_kill declaration in separate header.
2457         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
2458
2459 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
2460
2461         * Makefile: Add rules to compile and run tests.
2462         * Examples/ex1.c: Little changes to fix warnings.
2463         * Examples/ex2.c: Likewise.
2464         * Examples/ex3.c: Likewise.
2465         * Examples/ex4.c: Likewise.
2466         * Examples/ex5.c: Likewise.
2467         * Examples/ex6.c: New file.
2468
2469 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
2470
2471         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
2472
2473 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2474
2475         * attr.c: Include <string.h>.
2476
2477 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
2478
2479         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
2480         * internals.h: Include limits.h.
2481         * manager.c: Use memcpy to copy sched_param.
2482         * ptfork.c: Include errno.h.
2483         * pthread.c: Likewise.
2484         * semaphore.c: Likewise.
2485         * specific.c: Likewise.
2486         * spinlock.h: Likewise.
2487         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
2488         type definition to ...
2489         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
2490
2491 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
2492
2493         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
2494
2495         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
2496         as macros as demanded in POSIX.1, Annex C.
2497
2498 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
2499
2500         * internals.h (struct pthread_request): For free use pthread_t
2501         instead of pthread_descr.
2502         * join.c (pthread_join): Pass thread_id, not th to manager.
2503         (pthread_detach): Likewise.
2504         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
2505         (pthread_exited): Remove detached queue code.
2506         (pthread_handle_free): Expect thread ID parameter and use it to
2507         validate the thread decsriptor.  Don't use detached queue.
2508         Patches by Xavier Leroy.
2509
2510 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2511
2512         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
2513         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
2514         __pthread_atfork, __pthread_key_create, __pthread_once.
2515         * internals.h: Doc fix.
2516         * pthread.c (__pthread_initialize): Define again.
2517
2518 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
2519
2520         * manager.c (pthread_exited): If thread is not detached put it on
2521         special list.
2522         (pthread_handle_free): If thread is not on list with living threads
2523         search on list with detached threads.
2524
2525         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
2526         for new definition of pthread_rwlock_t.
2527
2528         * spinlock.c: Correct test whether to compile
2529         __pthread_compare_and_swap or not.
2530
2531 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
2532
2533         * attr.c: Finish user stack support.  Change locking code to be safe
2534         in situations with different priorities.
2535         * cancel.c: Likewise.
2536         * condvar.c: Likewise.
2537         * internals.h: Likewise.
2538         * join.c: Likewise.
2539         * manager.c: Likewise.
2540         * mutex.c: Likewise.
2541         * pthread.c: Likewise.
2542         * ptlongjmp.c: Likewise.
2543         * queue.h: Likewise.
2544         * rwlock.c: Likewise.
2545         * semaphore.c: Likewise.
2546         * semaphore.h: Likewise.
2547         * signals.c: Likewise.
2548         * spinlock.c: Likewise.
2549         * spinlock.h: Likewise.
2550         * sysdeps/pthread/pthread.h: Likewise.
2551         Patches by Xavier Leroy.
2552
2553         * sysdeps/i386/i686/pt-machine.h: New file.
2554
2555 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
2556
2557         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
2558         [sg]et_stackaddr prototypes always available.
2559
2560         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2561         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
2562
2563 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
2564
2565         * manager.c (pthread_free): Undo patch from 980430.
2566         Reported by David Wragg <dpw@doc.ic.ac.uk>.
2567
2568 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
2569
2570         * manager.c: Define __pthread_manager_adjust_prio and use it to
2571         increase priority when needed.
2572         * internals.h: Add prototype for __pthread_manager_adjust_prio.
2573         * mutex.c: Optimize mutexes to wake up only one thread.
2574         * pthread.c: Move PID of manager for global variable in structure
2575         element.
2576         Patches by Xavier Leroy.
2577
2578 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
2579
2580         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
2581
2582 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2583
2584         * attr.c: Correct typo.
2585
2586 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
2587
2588         * manager.c (pthread_free): Unmap guard before the stack.
2589         Patch by Matthias Urlichs.
2590
2591 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
2592
2593         * manager.c (pthread_free): Detect already free child.
2594         Patch by Xavier Leroy, reported by Matthias Urlichs.
2595
2596 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2597
2598         * Makefile (linuxthreads-version): Renamed back from
2599         libpthread-version.
2600
2601 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
2602
2603         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
2604         __libc_longjmp.
2605
2606 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
2607
2608         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
2609         * internals.h: Add definitions for new spinlock implementation.
2610         * ptlongjmp.c: New file.
2611         * spinlock.c: New file.
2612         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
2613         new function __pthread_acquire to prevent deadlocks with thread
2614         with different priorities.
2615         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
2616
2617 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2618
2619         * manager.c (__pthread_manager): Reduce first argument to select
2620         to include just the needed file descriptor.
2621
2622 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
2623
2624         * manager.c: Fix last patch which caused core dumps.
2625
2626         * pthread.c: Correctly handle missing SIGRTMIN.
2627
2628 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2629
2630         * libpthread.map: Add __libc_internal_tsd_get and
2631         __libc_internal_tsd_set.  Add missing cancelable functions. Export
2632         libc internal versions of the cancelable functions.
2633
2634 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
2635
2636         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
2637
2638 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
2639
2640         * attr.c: Implement pthread_attr_[gs]etguardsize,
2641         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
2642         Change pthread_attr_init to have two interfaces.
2643         * internals.h (struct _pthread_descr_struct): Add new fields for
2644         above functions.
2645         * libpthread.map: Add names in GLIBC_2.1 section.
2646         * manager.c (pthread_handle_create): Implement guardsize and
2647         user stack.
2648         (pthread_free): Likewise.
2649         * pthread.c (pthread_create): Add new interface for changed
2650         pthread_attr_t.
2651         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2652         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
2653         PTHREAD_STACK_MIN.
2654
2655 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
2656
2657         * manager.c: Enable resetting of the thread scheduling policy
2658         to SCHED_OTHER when the parent thread has a different one.
2659
2660 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
2661
2662         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2663         _POSIX_ASYNCHRONOUS_IO.
2664
2665         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
2666         mutexes.
2667         * mutex.c: Implement new mutex types.
2668
2669         * internals.h: Include <signal.h>.
2670
2671         * libpthread.map: Add __erno_location and __h_errno_location.
2672
2673         * errno.c: Return pointer to variable actually in use.  This might
2674         not be the one in the thread structure.
2675         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
2676         and p_h_errnop.
2677         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
2678         of manager thread structure.
2679         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
2680         thread.
2681         * pthread.c: Adapt initializer for thread structures.
2682         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
2683         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
2684         current thread to global variables.
2685
2686 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
2687
2688         * rwlock.c: New file.
2689         * Makefile (libpthread-routines): Add rwlock.
2690         * sysdeps/pthread/pthread.h: Define data structures and declare
2691         functions.
2692         * libpthread.map: Add new functions.
2693
2694 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
2695
2696         * sysdeps/arm/pt-machine.h: New file; add ARM support.
2697         * sysdeps/arm/Implies: likewise.
2698         * README: Document it.
2699
2700 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2701
2702         * signals.c: Remove unneeded initializer for sigwaited, saving a
2703         warning.
2704
2705 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2706
2707         * semaphore.c (sem_init): Set sem_spinlock only if available.
2708
2709 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
2710
2711         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
2712         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
2713
2714         * Makefile: Update from LinuxThreads 0.7.
2715         * internals.h. Likewise.
2716         * manager.c: Likewise.
2717         * mutex.c: Likewise.
2718         * pthread.c: Likewise.
2719         * signals.c: Likewise.
2720         * specific.c: Likewise.
2721         * Examples/ex3.c: Likewise.
2722
2723 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
2724
2725         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
2726         open.
2727
2728 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
2729
2730         * wrapsyscall.c: Add socket functions which are also cancelation
2731         points.
2732
2733 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
2734
2735         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
2736         New functions for fast thread specific data within libc.
2737
2738         * internals.h: Add new array p_libc_specific to struct
2739         _pthread_descr_struct.
2740
2741         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
2742
2743 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
2744
2745         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
2746         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
2747
2748 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
2749
2750         * internals.h (struct _pthread_descr_struct): Add definitions for
2751         two-level specific key handling.
2752         * manager.c (pthread_handle_create): Initialize specific memory array.
2753         * specific.c: Implement two-level key handling.
2754         * weaks.c: Don't provide dummy key handling.
2755         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
2756         Add definition of __libc_key_t.
2757         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
2758         as 1024.
2759         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
2760         PTHREAD_DESTRUCTOR_ITERATIONS.
2761
2762         * manager.c (pthread_handle_create): Compare mmap result with
2763         MAP_FAILED.
2764
2765         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
2766         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
2767
2768 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
2769
2770         sysdeps/sparc -> sysdeps/sparc/sparc32
2771         sysdeps/sparc64 -> sysdeps/sparc/sparc64
2772
2773         * internals.h: Change definition of THREAD_SELF to be an expression,
2774         not a statement that did a return.
2775         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
2776         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
2777         Follow Solaris and use a "system reserved" register (%g6) to hold
2778         the thread descriptor.
2779         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2780
2781 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
2782
2783         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
2784         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
2785         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
2786
2787         * semaphore.c: Include spinlock.h only when needed.
2788
2789         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
2790         keys for entries not in use.
2791
2792         * weaks.c: Implement key handling functions for real.
2793
2794 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
2795
2796         Initial sparc64-linux support:
2797         * sysdeps/sparc64/Implies: New file.
2798         * sysdeps/sparc64/pt-machine.h: Likewise.
2799
2800 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
2801
2802         * semaphore.c: Include spinlock.h at correct place.
2803         Patch by HJ Lu.
2804
2805 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
2806
2807         The Great Bit File Move:
2808         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
2809         * sysdeps/powerpc/semaphorebits.h: Likewise.
2810         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
2811         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
2812         * sysdeps/pthread/libc-lock.h: -> bits/
2813         * sysdeps/pthread/stdio-lock.h: Likewise.
2814         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
2815         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
2816         * semaphore.h: Likewise.
2817         * sysdeps/pthread/pthread.h: Likewise.
2818
2819         * lockfile.c: <foo.h> -> <bits/foo.h>.
2820         * semaphore.h: Likewise.
2821
2822         * Makefile: (headers): foo.h -> bits/foo.h.
2823         * sysdeps/pthread/Makefile: Likewise.
2824
2825 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2826
2827         * semaphore.c (sem_init): Set sem_spinlock only if available.
2828
2829         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
2830         asm constraints.
2831
2832 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
2833
2834         Update from LinuxThreads 0.6.
2835
2836         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
2837         and __sched_get_priority_min instead of names without `__'.
2838
2839         * manager.c: Rewrite large parts to implement opaque pthread_t.
2840
2841         * cancel.c: Adapt for opaque pthread_t type.
2842         * condvar.c: Likewise.
2843         * errno.c: Likewise.
2844         * join.c: Likewise.
2845         * mutex.c: Likewise.
2846         * pthread.c: Likewise.
2847         * signals.c: Likewise.
2848         * specific.c: Likewise.
2849         * restart.h: Likewise.
2850         * queue.h: Likewise.
2851         * Examples/ex3.c: Likewise.
2852         * Examples/ex4.c: Likewise.
2853         * sysdeps/pthread/pthread.h: Likewise.
2854
2855         * pthread.c: Accumulate time for all threads in thread manager.
2856
2857         * semaphore.c: Implement fallback implementation for architectures
2858         sometimes missing compare-exchange operations.
2859
2860         * cancel.c (pthread_cancel): Validate handle argument.
2861         * join.c (pthread_join): Likewise.
2862         (pthread_detach): Likewise.
2863         * signals.c (pthread_kill): Likewise.
2864
2865         * spinlock.h (acquire): Use __sched_yield not sched_yield.
2866
2867         * queue.h (enqueue): Enqueue thread according to priority.
2868
2869         * internals.c (struct pthread_start_args): New struct for passing
2870         args to cloning function.
2871         (struct _pthread): Rename to _pthread_descr_struct and adapt for
2872         opaque pthread_t.
2873
2874         * Examples/Makefile (clean): Pass -f option to rm.
2875
2876         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
2877         and define TEST_FOR_COMPARE_AND_SWAP.
2878         * sysdeps/i386/i486/pt-machine.h: Removed.
2879
2880         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
2881         to 1024.
2882
2883 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
2884
2885         * restart.h (suspend): Clear p_signal before suspending.
2886         (suspend_with_cancellation): Likewise.
2887         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
2888
2889         * weaks.c: Make __pthread_key_create return 1.
2890         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
2891         __libc_getspecific, __libc_setspecific, and __libc_key_t.
2892         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
2893         using libio.
2894
2895 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
2896
2897         * sysdeps/sparc/pt-machine (RELEASE): Fix.
2898
2899 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
2900
2901         * sysdeps/powerpc/Implies: Added.
2902         * sysdeps/powerpc/pt-machine.h: Added.
2903         * sysdeps/powerpc/semaphorebits.h: Added.
2904
2905 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
2906
2907         * pthread.c (__pthread_initial_thread): Correct
2908         initializer.
2909         (__pthread_manager_thread): Likewise.
2910         Reported by Andreas Jaeger.
2911
2912 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
2913
2914         Since sigset_t no longer fits in a register, we can't pass in the
2915         thread's initial mask so easily.  Take this opportunity to simplify
2916         the clone implementation by only accepting a single void* argument.
2917
2918         * manager.c (__pthread_manager): Put thread vitals in the thread
2919         struct instead of as arguments through clone.
2920         (pthread_start_thread): Look for them there.
2921         * internals.h (struct _pthread): Add p_initial_fn,
2922         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
2923         * pthread.c (pthread_initialize_manager): Revise clone invocation.