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