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