Update.
[glibc.git] / linuxthreads / ChangeLog
blob69c05fb214077ca9c1cf6527cb94f7c271501f90
1 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
3         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
4         * pthread.c: Include <resolv.h>.
5         (_res): Undefine.  Add extern declaration.
7 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
9         * pthread.c (__pthread_initial_thread): Update initializer.
10         (__pthread_manager_thread): Likewise.
11         (pthread_initialize): Move setrlimit call to...
12         (__pthread_initialize_manager): ...here.
13         (__pthread_reset_main_thread): Reset also soft limit on stack size.
15         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
16         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
18 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
20         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
21         __compare_and_swap to define testandset.
22         * linuxthreads/sysdeps/powerpc/pt-machine.h: Add volatile to asms.
23         Define IMPLEMENT_TAS_WITH_CAS.
25 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
27         * Makefile: Pass -z nodelete to linker for libpthread.so
28         generation if it understand this option.
30 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
32         * manager.c (pthread_handle_create): Remove initialization of
33         new_thread->p_res._sock.
35 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
37         Bugfixes to the variant of the code for machines with no compare
38         and swap.
40         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
41         node was not being properly enqueued, due to failing to update
42         the lock->__status field.
44         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
45         being set inappropriately, causing the suspend function to be called
46         with a null self pointer and crash.
48 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
50         * spinlock.h (__pthread_alt_trylock): Fix code used if no
51         compare&swap is available.
53         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
54         compare_and_swap.
56         * pthread.c (pthread_initialize): Don't use sysconf to determine
57         whether the machine has more than one processor.
59         * spinlock.c (__pthread_alt_timedlock): Add back one of the
60         removed thread_self calls.
62 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
64         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
65         __compare_and_swap to compare_and_swap in code which assumes
66         compare swap is available.
68 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
70         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
71         bug whereby thr field of waitnode structure would not be correctly
72         set unless a null self pointer is passed to the functions.
73         Eliminated redundant calls to thread_self().
75 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
77         * pthread.c (__pthread_initialize_manager): Lock
78         __pthread_manager_thread.p_lock before calling clone.
80 2000-05-05  H.J. Lu  <hjl@gnu.org>
82         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
83         have acquire semantics.
84         (__compare_and_swap_with_release_semantics): New inline
85         function.
86         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
88 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
90         * manager.c: Fix the problem with signals at startup.
91         Change the way that thread stacks are allocated on IA64.
92         Clean up some of the guard page allocation stuff.
94 1999-12-19  H.J. Lu  <hjl@gnu.org>
96         * internals.h (page_roundup): New.
97         * attr.c (__pthread_attr_setguardsize); Use page_roundup
98         instead of roundup.
99         * manager.c (pthread_allocate_stack): Make sure guardaddr is
100         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
101         is define.
103 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
105         * manager.c (pthread_allocate_stack): Unmap the stack top
106         if failed to map the stack bottom.
107         Fix the guard page.
108         (pthread_free): Fix the guard page.
110         * pthread.c (pthread_initialize): Set rlimit correctly for
111         NEED_SEPARATE_REGISTER_STACK.
113 1999-12-16  H.J. Lu  <hjl@gnu.org>
115         * pthread.c (__pthread_initialize_manager): Pass
116         __pthread_manager_thread_bos instead of
117         __pthread_manager_thread_tos to __clone2.
119 1999-12-16  H.J. Lu  <hjl@gnu.org>
121         * manager.c (pthread_allocate_stack): Correct the calculation
122         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
123         stack bottom.
125 1999-12-13  H.J. Lu  <hjl@gnu.org>
127         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
128         bit after setting ar.ccv.
130 1999-12-12  H.J. Lu  <hjl@gnu.org>
132         * manager.c (pthread_allocate_stack): Make the starting
133         address of the stack bottom page aligned. FIXME: it may
134         need changes in other places.
135         (pthread_handle_create): Likewise.
137 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
139         * manager.c (pthread_allocate_stack): Handle
140         NEED_SEPARATE_REGISTER_STACK.
141         (pthread_handle_create): Likewise.
142         * pthread.c (__pthread_initialize_manager): Likewise.
144         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
146 1999-12-02  H.J. Lu  <hjl@gnu.org>
148         * sysdeps/ia64/pt-machine.h: New.
150 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
152         * wrapsyscall.c: Mark non-__ protected names as weak.
153         PR libc/1466.
155 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
157         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
159 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
161         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
162         Add tests also to new alternative spinlock implementation.
163         * spinlock.h: Likewise.
164         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
166 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
168         * Version: Export __sigaction.
169         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
170         of __sigaction.
171         * pthread.c: Use __libc_sigaction instead of __sigaction.
173         * condvar.c: Implement pthread_condattr_getpshared and
174         pthread_condattr_setpshared.
175         * mutex.c: Implement pthread_mutexattr_getpshared and
176          pthread_mutexattr_setpshared.
177         * Versions: Export new functions.
178         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
180         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
181         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
182         is not selected.
184 2000-07-04  Greg McGary  <greg@mcgary.org>
186         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
187         pragmas.  Include bp-sym.h only if _LIBC.
189 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
191         * spinlock.c (__pthread_unlock): Properly place write barrier.
192         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
194 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
196         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
197         faster on SMP systems.  No more emulation of compare&swap for adaptive
198         spinlocks.
199         * spinlock.h: Likewise.
200         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
201         Replace fast with adaptive mutex.
202         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
203         * condvar.c: Likewise.
204         * pthread.c: Define and initialize __pthread_smp_kernel variable.
205         * internals.h: Declare __pthread_smp_kernel.
206         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
207         _pthread_fastlock structure.
208         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
210         * pthread.c: Remove initialization to zero from global variables.
212 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
214         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
216 2000-06-28  Greg McGary  <greg@mcgary.org>
218         * weaks.c: Wrap BP_SYM () around weak extern declarations of
219         pthread functions that have pointers in their return+arg signatures.
221 2000-06-27  Greg McGary  <greg@mcgary.org>
223         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
224         extern declarations of pthread functions that have pointers in
225         their return+arg signatures.
227 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
229         * Makefile (tests): Add ex11.  Add rules to build it.
230         * Examples/ex11.c: New file.
231         * rwlock.c: Fix complete braindamaged previous try to implement
232         timedout functions.
234         * spinlock.c: Pretty print.
236 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
238         * Makefile (tests): Add ex10.  Add rules to build it.
239         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
240         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
241         * condvar.c (pthread_cond_wait): Allow mutex of kind
242         PTHREAD_MUTEX_TIMED_NP.
243         (pthread_cond_timedwait_relative): Likewise.
244         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
245         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
246         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
247         (__pthread_mutex_lock): Use __pthread_alt_lock for
248         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
249         (__pthread_mutex_timedlock): New function.
250         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
251         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
252         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
253         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
254         * spinlock.c: Implement alternate fastlocks.
255         * spinlock.h: Add prototypes.
256         * Examples/ex10.c: New file.
257         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
258         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
260         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
261         (__pthread_rwlock_timedrdlock): New function.
262         (__pthread_rwlock_timedwrlock): New function.
263         Use laternate fastlock function everywhere.
265 2000-06-21  Andreas Jaeger  <aj@suse.de>
267         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
268         prototype.
270         * join.c: Include <stdlib.h> for exit prototype.
272 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
274         * sysdeps/i386/useldt.h: Include <stdlib.h>.
276         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
277         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
279         * Makefile (libpthread-routines): Add barrier.
280         (tests): Add ex9.  Add rule to build ex9.
281         * Versions: Export barrier functions.
282         * barrier.c: New file.
283         * Examples/ex9.c: New file.
284         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
285         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
286         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
288 2000-06-19  H.J. Lu  <hjl@gnu.org>
290         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
291         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
292         (compare_and_swap_with_release_semantics): New. Default to
293         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
294         is not defined.
296         * spinlock.c (__pthread_unlock): Call
297         compare_and_swap_with_release_semantics () instead of
298         compare_and_swap ().
300 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
302         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
303         to errno directly.
304         * sysdeps/pthread/timer_delete.c: Likewise.
305         * sysdeps/pthread/timer_getoverr.c: Likewise.
306         * sysdeps/pthread/timer_gettime.c: Likewise.
307         * sysdeps/pthread/timer_settime.c: Likewise.
309 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
311         Timer nodes are now reference counted, and can be marked
312         as deleted. This allows for the safe release of the global mutex
313         in the middle without losing the timer being operated on.
315         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
316         member is now an enum with three values, so that an intermediate
317         state can be represented (deleted but not free for reuse yet).
318         New refcount member added.
319         * sysdeps/pthread/timer_routines.c: Likewise.
321         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
322         timer_valid): New inline functions added.
324         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
325         restructured, recursive deadlock bug fixed.
327         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
328         timer_addref to ensure that timer won't be deleted while mutex is not
329         held. Also uses timer_invalid to perform validation of timer handle.
330         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
331         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
333 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
335         * shlib-versions: Add entry for SH.
336         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
338 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
340         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
341         tightened up some critical regions and micro-optimized some list
342         manipulation code.
344         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
345         Returns int value now to indicate whether timer was queued at head.
346         * sysdeps/pthread/posix-timer.h: Likewise.
347         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
348         new return value from __timer_thread_queue_timer to avoid waking
349         up timer thread unnecessarily.
351         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
352         inuse flag, because this requires mutex to be held.  Callers updated
353         to do the check when they have the mutex.
354         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
356         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
357         regions: avoids making system calls while holding timer mutex, and
358         a few computations were moved outside of the mutex as well.
359         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
361         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
362         to list_unlink_ip, meaning idempotent.  Pointer manipulation
363         changed to get better better code out of gcc.
364         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
365         version of list_unlink added here.
366         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
367         function in all places: idempotent one for timers, non-idempotent
368         one for thread nodes.
369         * sysdeps/pthread/timer_settime: Likewise.
370         * sysdeps/pthread/timer_routines.c: Likewise.
372 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
374         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
375         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
377         * sysdeps/pthread/Makefile: Remove tests definition.
379 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
380             Yutaka Niibe  <gniibe@chroot.org>
382         * sysdeps/sh/pspinlock.c: New file.
383         * sysdeps/sh/pt-machine.h: New file.
385 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
387         * Makefile (tests): Add joinrace.
389         * Examples/ex6.c: Test return value of pthread_join.
391 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
393         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
394         (__pthread_spin_trylock): Implement.
395         (__pthread_spin_unlock): Implement.
396         (__pthread_spin_init): Implement.
397         (__pthread_spin_destroy): Implement.
399 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
401         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
402         really append the entry.
404 2000-06-10  Andreas Jaeger  <aj@suse.de>
406         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
408 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
410         * sysdeps/pthread/timer_create.c: Thread matching now done on
411         clock type as well as thread attributes.
412         There are individual global signal-delivering threads for
413         different clock types.
414         * sysdeps/pthread/posix-timer.h: Likewise.
415         * sysdeps/pthread/timer_routines.c: Likewise.
417         * sysdeps/pthread/timer_routines.c: Thread allocation and
418         deallocation function now remembers to put thread on active
419         list and remove from active list.
420         Thus now the feature of binding multiple timers
421         to a single thread actually works.
423 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
425         * pthread.c (__pthread_create_2_1): Optimize a bit.
427         * internals.h (invalid_handle): Also test for p_terminated != 0.
428         (nonexisting_handle): New function.  Same as old invalid_handle.
429         * join.c (pthread_join): Use nonexisting_handle instead of
430         invalid_handle to test for acceptable thread handle.
431         * manager.c (pthread_handle_free): Likewise.
432         * joinrace.c: New file.
433         Reported by Permaine Cheung <pcheung@cygnus.com>.
435 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
437         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
438         Correct handling of matching variable.
440         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
441         avoid warnings.
443         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
444         Be prepared for empty timer list.
446         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
447         CPUTIME clock ID.  Add support for thread clocks.
449         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
450         subtraction were switched.
452         * sysdeps/pthread/timer_routines.c (init_module): Use
453         THREAD_MAXNODES threads.
455         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
456         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
457         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
458         with sigqueueinfo is this system call is available.
460         * sysdeps/pthread/timer_create.c (timer_create): Allow
461         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
463         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
464         functionality.
465         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
467 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
469         * sysdeps/pthread/posix-timer.h: New file.
470         * sysdeps/pthread/timer_create.c: New file.
471         * sysdeps/pthread/timer_delete.c: New file.
472         * sysdeps/pthread/timer_getoverr.c: New file.
473         * sysdeps/pthread/timer_gettime.c: New file.
474         * sysdeps/pthread/timer_routines.c: New file.
475         * sysdeps/pthread/timer_settime.c: New file.
476         * sysdeps/pthread/tst-timer.c: New file.
478 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
480         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
481         LINK_MAX definitions if necessary.
483 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
485         Added missing fork time handling of global libio lock.
487         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
488         not just the individual stream locks. Rewritten to use new
489         iterator interface provided by libio rather than accessing
490         global variable.
492         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
493         which lock and unlock the stream list using the new interface
494         provied by libio.
495         * internals.h: Likewise.
497         * ptfork.c (__fork): Now calls __flockfilelist before fork,
498         and __funlockfilelist in the parent after the fork.
499         Child still calls __fresetlockfiles as before.
501         * linuxthreads.texi: Now explains what happens to streams at
502         fork time. Also whole new section on forking and thread added.
503         Definition of pthread_atfork moved out of Miscellaneous Functions
504         to this new section.
506 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
508         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
509         Add missing register.
510         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
512 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
514         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
515         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
516         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
518 2000-05-31  Andreas Jaeger  <aj@suse.de>
520         * sysdeps/mips/pspinlock.c: Implement spinlocks.
522 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
524         * spinlock.c (__pthread_lock): Remove ASSERT.
526         * Makefile (tests): Add ex8.
527         * Examples/ex8.c: New file.
529 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
531         Bugfix: The pthread_atfork mechanism now takes care of its
532         own internal mutex at fork time.
534         * ptfork.c (__fork): Revised so that the mutex is held across
535         the fork operation and while the handlers are called, and so that
536         the child resets the mutex.
538         * linuxthreads.texi: Updated pthread_atfork documentation to make
539         it clear that fork and pthread_atfork can't be reentered from
540         atfork handlers, that pthread_atfork and fork are mutually atomic,
541         and that the handlers are inherited by the child process.
543 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
545         * Makefile (libpthread-routines): Add pspinlock.
546         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
547         Use struct _pthread_fastlock instead of pthread_spinlock_t.
548         * condvar.c: Likewise.
549         * internals.h: Likewise.
550         * join.c: Likewise.
551         * manager.c: Likewise.
552         * mutex.c: Likewise.
553         * pthread.c: Likewise.
554         * rwlock.c: Likewise.
555         * semaphore.c: Likewise.
556         * signals.c: Likewise.
557         * spinlock.h: Likewise.
558         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
559         * sysdeps/alpha/pspinlock.c: New file.
560         * sysdeps/arm/pspinlock.c: New file.
561         * sysdeps/i386/pspinlock.c: New file.
562         * sysdeps/m68k/pspinlock.c: New file.
563         * sysdeps/mips/pspinlock.c: New file.
564         * sysdeps/powerpc/pspinlock.c: New file.
565         * sysdeps/sparc/sparc32/pspinlock.c: New file.
566         * sysdeps/sparc/sparc64/pspinlock.c: New file.
567         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
568         back to _pthread_fastlock.  Define new pthread_spinlock_t.
570 2000-05-24  Andreas Jaeger  <aj@suse.de>
572         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
574 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
576         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
578 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
580         * internals.h (__RES_PTHREAD_INTERNAL): Define.
582 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
584         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
585         object state is represented with additional bits which distinguish
586         whether that state was set up in the current process, or
587         in an ancestor process. If that state was set in an ancestor,
588         it means that a fork happened while thread was executing the init
589         function. In that case, the state is reset to NEVER.
590         * mutex.c (__pthread_once_fork_prepare): New function.
591         (__pthread_once_fork_child): Likewise
592         (__pthread_once_fork_parent): Likewise
593         (__pthread_reset_pthread_once): Removed.
594         * ptfork.c (__fork): Call new handlers in mutex.c.
595         * internals.h: Declarations of new mutex.c functions added.
596         Declaration of removed function deleted.
597         * linuxthreads.texi: Updated documentation about pthread_once
598         to clarify what happens under cancellation and forking.
600 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
602         * internals.h: New thread manager request type, REQ_KICK.
603         * join.c (pthread_exit): main thread now calls exit() instead
604         of _exit() in order to proper process cleanup.
605         * manager.c (__pthread_manager): Do not terminate manager
606         after unblocking main thread; wait for main thread's
607         REQ_PROCESS_EXIT request instead.
608         Also, added REQ_KICK case to handle new request; this just does
609         nothing.
610         * manager.c (pthread_exited): Do not terminate manager after
611         unblocking main thread.
612         * manager.c (__pthread_manager_sighandler): If the main thread
613         is waiting for all other threads to die, send a REQ_KICK into
614         the thread manager request pipe to get it to clean out the threads
615         and unblock the main thread as soon as possible. This fixes
616         the 2000 millisecond hang on shutdown bug.
617         * Examples/ex7.c: New file, tests shutdown behavior when all threads
618         including the main one call pthread_exit(), or implicitly do so.
619         * Makefile (tests): Add ex7.
621 2000-05-05  Andreas Jaeger  <aj@suse.de>
623         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
624         (pthread_getcpuclockid): Correct test for ourselves.
626 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
628         * internals.h (struct _pthread_descr_struct): Reorganization.
629         Allocate room for 16 pointers at head of the structure for future
630         thread-local data handling.  Move p_self member in this area.
631         * manager.c (pthread_handle_create): Adjust use of p_self.
632         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
633         * pthread.c (__pthread_initial_thread): Adjust initialization.
634         (__pthread_manager_thread): Likewise.
636 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
638         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
639         for eventmask larger than 1 word.
641 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
643         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
644         * pthread.c (__pthread_initialize_minimal): New function.  Perform
645         minimal initialization.
646         (pthread_initialize): Remove this code here.
647         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
648         are working around the problem in glibc.
650 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
652         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
653         now.  First gcc must be fixed (more concrete: libgcc).
655 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
657         * pthread.c: Remove special treatement for interrupt handlers on x86.
658         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
659         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
660         necessary.
661         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
663 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
665         * join.c (pthread_exit): Set p_terminated after reporting the
666         termination event instead of before.
668 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
670         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
671         if __USE_UNIX98.
673 2000-04-18  Andreas Jaeger  <aj@suse.de>
675         * Versions: Use ld instead of ld.so.
677 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
679         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
680         Remove the typedef keyword.
682 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
684         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
685         not stbar.
686         (READ_MEMORY_BARRIER): Define.
687         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
688         MEMORY_BARRIER.
689         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
690         headers.
692 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
694         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
695         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
696         use thread_handle().
698 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
700         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
701         if fast mutex is used.  Don't initialize `already_canceled' twice.
702         Correctly test for return value of timedsuspend.
704         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
705         therefore don't need the _rt versions of the signal handlers.
707 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
709         * pthread.c (pthread_yield): New function.
710         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
711         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
712         * internals.h: Declare __pthread_yield.
714         * pthread.c (pthread_initialize): Avoid a bit more code if
715         realtime signals are known to exist.
717         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
718         to dynamically detect RT signals and avoid generating compatibility
719         functions with old kernel.
720         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
721         __pthread_restart_new directly.
722         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
723         __pthread_wait_for_restart_signal directly.
724         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
725         __pthread_timedsuspend_new directly.
727 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
729         * condvar.c: Remove all the special code to handle cond_timedwait.
730         Use timedsuspend instead.
731         * internals.h: Declare __pthread_timedsuspend_old,
732         __pthread_timedsuspend_new, and __pthread_timedsuspend.
733         Remove declaration of __pthread_init_condvar.
734         * pthread.c: Define __pthread_timedsuspend variable.
735         (__pthread_timedsuspend_old): New function.  Timed suspension
736         implementation for old Linux kernels.
737         (__pthread_timedsuspend_new): New function.  Timed suspension
738         implementation for new Linux kernels.
739         * restart.h (timedsuspend): New function.  Call appropriate
740         suspension function through __pthread_timedsuspend.
741         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
742         the code.
743         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
745         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
746         undefined.
747         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
748         where possible.
749         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
750         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
752         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
753         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
755 2000-04-14  Andreas Jaeger  <aj@suse.de>
757         * weaks.c: Fix typo.
759         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
760         2.2 for linuxthreads.
762 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
764         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
765         (pthread_getcpuclockid): Fix typo.
767 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
769         * Makefile (libpthread-routines): Add getcpuclockid.
770         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
771         * sysdeps/pthread/getcpuclockid.c: New file.
772         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
773         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
775         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
776         Defined.
777         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
779         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
780         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
781         and pthread_spin_unlock.
782         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
783         into pthread_spinlock_t.  Change all uses.
784         * spinlock.c: Implement pthread_spin_lock.
785         Rename __pthread_unlock to __pthread_spin_unlock and define weak
786         alias for real name.
787         Define pthread_spin_trylock, pthread_spin_init, and
788         pthread_spin_destroy.
789         Change all uses of _pthread_fastlock to pthread_spinlock_t.
790         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
791         Change all uses of _pthread_fastlock to pthread_spinlock_t.
792         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
793         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
794         and pthread_spin_unlock.
795         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
796         Change all uses of _pthread_fastlock to pthread_spinlock_t.
797         * condvar.c: Likewise.
798         * internals.h: Likewise.
799         * join.c: Likewise.
800         * manager.c: Likewise.
801         * mutex.c: Likewise.
802         * pthread.c: Likewise.
803         * rwlock.c: Likewise.
804         * semaphore.c: Likewise.
805         * signals.c: Likewise.
807         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
808         macros.
809         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
811 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
813         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
814         _POSIX_SHARED_MEMORY_OBJECTS.
816 2000-04-11  Andreas Jaeger  <aj@suse.de>
818         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
819         (__compare_and_swap): Mark as modifying memory.
821 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
823         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
824         __volatile__.
825         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
826         Don't have the 'asm' __volatile__.
828 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
830         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
831         * spinlock.c (__pthread_lock): Add memory barriers.
832         (__pthread_unlock): Likewise.
833         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
834         instruction.
835         (RELEASE): Not needed anymore.
836         (__compare_and_swap): Mark asm as modifying memory.
837         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
838         of MEMORY_BARRIER.
839         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
840         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
841         (MEMORY_BARRIER): Define using stbar.
842         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
843         stbar.
844         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
845         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
846         Mike Burrows <m3b@pa.dec.com>.
848 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
850         * signals.c (sigaction): Fix return value for the case SIG is one
851         of the signals the implementation uses.
852         Patch by Xavier.Leroy@inria.fr.
854 2000-04-01  Andreas Jaeger  <aj@suse.de>
856         * attr.c: Use shlib-compat macros.
857         * oldsemaphore.c: Likewise.
858         * pthread.c: Likewise.
859         * weaks.c: Likewise.
861 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
863         * semaphore.c (sem_timedwait): New function.
864         Patch by Carl Mailloux <carlm@oricom.ca>.
865         * semaphore.h: Declare sem_timedwait.
866         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
868 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
870         * sysdeps/pthread/Makefile: File removed.
872 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
874         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
875         * internals.h (__pthread_reset_pthread_once): Add prototype.
876         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
878         * manager.c (pthread_handle_create): Store ID of new thread before
879         clone call.
881 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
883         * attr.c: Use new macros from shlib-compat.h to define versions.
884         * oldsemaphore.c: Likewise.
885         * semaphore.c: Likewise.
886         * weaks.c: Likewise.
888         * pthread.c: Update for new SHLIB_COMPAT definition.
890         * manager.c (__pthread_manager): Unmask debug signal.
892         * pthread.c (pthread_initialize): Test for address of __dso_handle
893         being NULL, not value.  Use __on_exit, not on_exit.
894         Patch by Andreas Jaeger <aj@suse.de>.
896         * pthread.c: Use new macros from shlib-compat.h to define versions.
898 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
900         * pthread.c (pthread_initialize): Instead of on_exit use
901         __cxa_atexit if __dso_label is available to allow unloading the
902         libpthread shared library.
904 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
906         * condvar.c: Make tests for ownership of mutex less strict.
908 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
910         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
911         current thread and return error if not.
912         (pthread_cond_timedwait_relative_old): Likewise.
913         (pthread_cond_timedwait_relative_new): Likewise.
915         * mutex.c (__pthread_once): Handle cancelled init function correctly.
916         (pthread_once_cancelhandler): New function.
917         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
919 2000-03-14  Andreas Jaeger  <aj@suse.de>
921         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
922         REG_GS.
923         (pthread_handle_sigrestart_rt): Likewise.
924         * signals.c (pthread_sighandler_rt): Likewise.
926 2000-03-02  Andreas Jaeger  <aj@suse.de>
928         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
929         Reported by Sean Chen <sean.chen@turbolinux.com>.
931 2000-02-28  Andreas Jaeger  <aj@suse.de>
933         * rwlock.c: Fix typo.
935 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
937         * rwlock.c: Define __* variants of the functions and make old names
938         aliases.
939         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
940         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
942 2000-02-25  Andreas Jaeger  <aj@suse.de>
944         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
945         pwrite64, lseek64, open64, and __open64 with version 2.2.
947 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
949         * semaphore.h (SEM_FAILED): Use 0 not NULL.
951 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
953         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
954         nanosleep does not work either.  Get absolute time inside the
955         loop.
956         (pthread_cond_timedwait_relative_new): Likewise.
957         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
959 2000-02-13  Andreas Jaeger  <aj@suse.de>
961         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
962         (pthread_cond_timedwait_relative_old): Likewise.
964 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
966         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
967         but keep the code around.  A bug in the kernel prevent us from
968         using the code.
969         (pthread_cond_timedwait_relative_new): Likewise.
970         (PR libc/1597 and libc/1598).
972 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
974         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
975         loop around nanosleep calls instead of around most of the function
976         (pthread_cond_timedwait_relative_new): Likewise.
977         body.  Got rid of backwards goto and one local.
979 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
981         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
982         before every nanosleep call to account for time spent in the rest
983         of the function.
984         (pthread_cond_timedwait_relative_new): Likewise.
985         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
987 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
989         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
990         from nanosleep call so that in case we restart we only wait for the
991         remaining time.
992         (pthread_cond_timedwait_relative_new): Likewise.
993         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
995 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
997         * manager.c (pthread_allocate_stack): Compute guard page address
998         correctly.  Patch by HJ Lu.
1000         * sysdeps/pthread/pthread.h: Define
1001         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
1003 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
1005         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
1006         preference handling.
1007         (pthread_rwlockattr_setkind_np): Allow
1008         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
1009         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1011 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
1013         * internals.h (pthread_readlock_info): New structure.
1014         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
1015         p_untracked_readlock_count.
1016         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1017         Add initializers for new fields.
1018         * manager.c (pthread_free): Free read/write lock lists.
1019         * queue.h (queue_is_empty): New function.
1020         * rwlock.c: Implement requirements about when readers should get
1021         locks assigned.
1022         * sysdeps/pthread/pthread.h
1023         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
1024         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
1025         Define this name as well.
1026         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1028 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
1030         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1031         Adjust initializers for struct _pthread_descr_struct change.
1032         * internals.h (struct _pthread_descr_struct): Move new elements to
1033         the end.
1035 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
1037         Redesigned how cancellation unblocks a thread from internal
1038         cancellation points (sem_wait, pthread_join,
1039         pthread_cond_{wait,timedwait}).
1040         Cancellation won't eat a signal in any of these functions
1041         (*required* by POSIX and Single Unix Spec!).
1042         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
1043         simultaneous condition variable signal (not required by POSIX
1044         or Single Unix Spec, but nice).
1045         * spinlock.c: __pthread_lock queues back any received restarts
1046         that don't belong to it instead of assuming ownership of lock
1047         upon any restart; fastlock can no longer be acquired by two threads
1048         simultaneously.
1049         * restart.h: Restarts queue even on kernels that don't have
1050         queued real time signals (2.0, early 2.1), thanks to atomic counter,
1051         avoiding a rare race condition in pthread_cond_timedwait.
1053 1999-12-31  Andreas Jaeger  <aj@suse.de>
1055         * internals.h: Remove duplicate prototype declarations.
1057         * weaks.c: Remove __THROW from prototypes since the file is not
1058         compiled by a C++ compiler.
1059         * internals.h: Likewise.
1061 1999-12-30  Andreas Jaeger  <aj@suse.de>
1063         * sysdeps/pthread/pthread.h: Move internal functions to...
1064         * sysdeps/pthread/bits/libc-lock.h: ...here.
1066 1999-12-29  Andreas Jaeger  <aj@suse.de>
1068         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
1070 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
1072         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
1073         beginning.
1075         * manager.c (__pthread_start): Add one more cast to prevent
1076         warning on 64bit machines.
1078 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
1080         * manager.c (pthread_handle_create): Set p_pid of new thread
1081         before calling the callback function to report a new thread.
1083 1999-12-20  Andreas Jaeger  <aj@suse.de>
1085         * pthread.c (pthread_initialize): Move getrlimit call after
1086         setting of errno.
1088 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
1090         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1091         pwrite64, lseek64, open64, and __open64.
1092         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
1093         pwrite64, lseek64, open64, and __open64.
1095         * manager.c (pthread_allocate_stack): Correct computation of
1096         new_thread_bottom.  Correct handling of stack size and when the
1097         rlimit method to guard for stack growth is used.
1098         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
1099         minus one pagesize (not two).
1101 1999-12-03  Andreas Jaeger  <aj@suse.de>
1103         * Versions: Add __res_state with version GLIBC_2.2.
1105         * errno.c (__res_state): New function to return thread specific
1106         resolver state.
1108         * pthread.c (pthread_initialize): Initialize p_resp.
1109         (__pthread_reset_main_thread): Also set p_resp.
1111         * manager.c (pthread_handle_create): Initialize p_resp.
1113         * internals.h: Add thread specific resolver state.
1114         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
1116 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
1118         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
1119         beginning.
1120         * sysdeps/i386/i686/pt-machine.h: Likewise.
1121         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
1123 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
1125         * manager.c (pthread_start_thread_event): Initialize p_pid already
1126         here.
1128 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
1130         * internals.h: Add prototype for __pthread_manager_event.
1131         * manager.c (__pthread_manager_event): New function.
1132         (pthread_start_thread_event): Correct computation of self.
1133         Use INIT_THREAD_SELF.
1134         * pthread.c (__pthread_manager_thread): Initialize p_lock.
1135         (__pthread_initialize_manager): Respect event flags also for creation
1136         of the manager thread.
1138 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
1140         * pthread.c (__pthread_initialize_manager): Initialize
1141         __pthread_manager_thread.p_tid.
1143 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
1145         * internals.h: Declare __pthread_last_event.
1146         * manager.c: Define __pthread_last_event.
1147         (pthread_handle_create): Set __pthread_last_event.
1148         (pthread_exited): Likewise.
1149         * join.c (pthread_exit): Likewise.
1151         * Makefile (libpthread-routines): Add events.
1152         * events.c: New file.
1153         * internals.h: Protect against multiple inclusion.
1154         Include thread_dbP.h header.
1155         (struct _pthread_descr_struct): Add new fields p_report_events and
1156         p_eventbuf.
1157         Declare event reporting functions.
1158         * join.c (pthread_exit): Signal event if this is wanted.
1159         * manager.c (__pthread_threads_events): New variable.
1160         (pthread_handle_create): Take new parameters with event information.
1161         Signal TD_CREATE event if wanted.
1162         (__pthread_manager): Adjust pthread_handle_create call.
1163         (pthread_start_thread_event): New function.  Block until manager is
1164         finished and then call pthread_start_thread.
1165         (pthread_exited): Signal TD_REAP event if wanted.
1167 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
1169         * restart.h (suspend_with_cancellation): Rewrite as a macro.
1171         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
1173 1999-10-25  Andreas Jaeger  <aj@suse.de>
1175         * internals.h: Remove K&R compatibility.
1176         * no-tsd.c: Likewise.
1177         * semaphore.h: Likewise.
1178         * signals.c: Likewise.
1179         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
1180         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
1181         * weaks.c: Likewise.
1183 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
1185         * linuxthreads/pthread.c: For i386, wrap pthread_handle_sigrestart
1186         and pthread_handle_sigcancel with functions that restore
1187         %gs from the signal context.  For each signal handling function,
1188         two wrappers are required, one for a non-RT signal and one for
1189         a RT signal.
1190         * linuxthreads/signal.c: For i386, add code to restore %gs
1191         from the signal context in pthread_sighandler and
1192         pthread_sighandler_rt.
1194 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
1196         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
1198 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
1200         * pthread.c (__pthread_initial_thread): Pass argument to
1201         PTHREAD_START_ARGS_INITIALIZER.
1202         (__pthread_manager_thread): Likewise.
1204         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
1205         initialize function.
1207         * manager.c (pthread_handle_create): Remove p_startfct initialization.
1209         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
1211 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
1213         * internals.h: Correct return types for __libc_read and __libc_write.
1215 1999-10-09  Andreas Jaeger  <aj@suse.de>
1217         * internals.h: Add __new_sem_post to get prototype in
1218         manager.c; include semaphore.h for needed types.
1220 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
1222         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
1223         directly instead of calling sem_post which should not be necessary
1224         but is faster and might help in some case to work around problems.
1225         Patch by khendricks@ivey.uwo.ca [libc/1382].
1227 1999-10-08  Andreas Schwab  <schwab@suse.de>
1229         * sysdeps/pthread/Subdirs: New file.
1230         * Implies: Removed.
1232 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
1234         * Implies: New file.
1235         * internals.h (struct _pthread_descr_struct): Add p_startfct.
1236         * manager.c (pthread_handle_create): Initialize p_startfct.
1237         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
1239 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
1241         * manager.c (__linuxthreads_pthread_threads_max): New variable.
1242         * specific.c (__linuxthreads_pthread_keys_max): New variable.
1243         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
1245         * condvar.c (pthread_cond_timedwait_relative): Never return with
1246         EINTR.  Patch by Andreas Schwab.
1248 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
1250         * signals.c (sigaction): Correct last patch.  Don't select
1251         pthread_sighandler_rt based on the signal number but instead of
1252         the SA_SIGINFO flag.
1254 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
1256         * specific.c: Move definitions of struct pthread_key_struct and
1257         destr_function to ...
1258         * internals.h: ...here.
1260 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
1262         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
1263         this instead of pthread_handle_sigrestart if the signal is an RT
1264         signal.
1266         * signals.c: Handle passing through of sighandler arguments also
1267         for real-time signals.
1269 1999-09-03  Andreas Schwab  <schwab@suse.de>
1271         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
1272         fork as weak alias.
1273         (__vfork): New function, alias vfork.
1274         * Versions: Export __fork, vfork, and __vfork in libpthread.
1276 1999-08-23  Andreas Schwab  <schwab@suse.de>
1278         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
1279         call to signal handler.
1281 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
1283         * pthread.c (__pthread_reset_main_thread): Undo last change.
1284         (__pthread_kill_other_threads_np): Reset signal handlers for the
1285         signals we used in the thread implementation here.
1287 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
1289         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
1290         for the signals we used in the thread implementation [PR libc/1234].
1292         * Versions: Export __pthread_kill_other_threads_np from libpthread
1293         for GLIBC_2.1.2.
1295         * signals.c: Pass sigcontext through wrapper to the user function.
1297 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
1299         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
1300         __libc_internal_tsd_set.
1302 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1304         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
1305         needed anymore.
1307 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1309         * internals.h: Align _pthread_descr_struct to 32 bytes.
1310         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
1311         libc/1206.
1313 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
1315         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
1316         swap function.
1318 1999-07-09  Cristian Gafton  <gafton@redhat.com>
1320         * Makefile (libpthread-routines): Add oldsemaphore routine.
1321         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
1322         sem_trywait, and sem_wait to GLIBC_2.1.
1323         * oldsemaphore.c: New file.
1324         * semaphore.c: Add default_symbol_versions for the changed functions.
1325         (__new_sem_init): Rename from sem_init.
1326         (__new_sem_post): Rename from sem_post.
1327         (__new_sem_wait): Rename from sem_wait.
1328         (__new_sem_trywait): Rename from sem_trywait.
1329         (__new_sem_getvalue): Rename from sem_getvalue.
1330         (__new_sem_destroy): Rename from sem_destroy.
1332 1999-06-23  Robey Pointer  <robey@netscape.com>
1334         * internals.h: Added p_nextlock entry to separate queueing for a
1335         lock from queueing for a CV (sometimes a thread queues on a lock
1336         to serialize removing itself from a CV queue).
1337         * pthread.c: Added p_nextlock to initializers.
1338         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
1340 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
1342         * manager.c (pthread_handle_create): Free mmap region after stack
1343         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
1345 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1347         * man/pthread_cond_init.man: Correct example.
1348         Reported by Tomas Berndtsson <tomas@nocrew.org>.
1350         * linuxthreads.texi (Condition Variables): Likewise.
1352 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
1354         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
1355         casx not cas, also successful casx returns the old value in rd
1356         and not the new value.
1358 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
1360         * manager.c: If pthread_create() is given a NULL attribute
1361         and the thread manager runs with a realtime policy, set the
1362         scheduling policy of the newly created thread back to SCHED_OTHER.
1363         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
1364         initialize the schedpolicy field of new_thread->p_start_args
1365         to that of the calling thread.
1367 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
1369         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
1370         instruction does not allow memory element to use offset.
1372 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
1374         * manager.c (pthread_allocate_stack): Optimize initialization of new
1375         thread descriptor.
1377         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
1378         Don't use initializer since it is all zeroes.
1379         (__libc_once_define): Likewise.
1381 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1383         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
1384         doesn't exist anymore.
1385         * sysdeps/i386/Implies: Likewise.
1386         * sysdeps/m68k/Implies: Likewise.
1387         * sysdeps/mips/Implies: Likewise.
1388         * sysdeps/powerpc/Implies: Likewise.
1389         * sysdeps/sparc/sparc32/Implies: Likewise.
1390         * sysdeps/sparc/sparc64/Implies: Likewise.
1392 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
1394         * sysdeps/alpha/bits/semaphore.h: Removed.
1395         * sysdeps/powerpc/bits/semaphore.h: Removed.
1396         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
1397         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
1398         * Makefile (headers): Remove bits/semaphore.h.
1400         * semaphore.h: Define _pthread_descr if necessary.
1401         Don't include limits.h.  Define SEM_VALUE_MAX directly.
1402         Define SEM_FAILED.
1403         (sem_t): Protect element names with leading __.
1404         Add declarations for sem_close, sem_open, and sem_unlink.
1405         * semaphore.c: Adjust all functions for new element names.
1406         Define sem_close, sem_open, and sem_unlink.
1407         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
1408         GLIBC_2.1.1.
1409         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
1410         necessary.
1412 1999-03-16  H.J. Lu  <hjl@gnu.org>
1414         * specific.c (pthread_key_delete): Check th->p_terminated to see
1415         if the thread is running.
1417         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
1418         Added to GLIBC_2.0 for libc.so.
1420 1999-02-12  H.J. Lu  <hjl@gnu.org>
1422         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
1423         __libc_allocate_rtsig): Added to GLIBC_2.1.
1425         * internals.h (DEFAULT_SIG_RESTART): Removed.
1426         (DEFAULT_SIG_CANCEL): Removed.
1428         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
1429         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
1430         (__pthread_sig_restart, __pthread_sig_cancel,
1431         __pthread_sig_debug): Initialized.
1432         (pthread_initialize): Call init_rtsigs () to initialize
1433         real-time signals.
1435 1999-02-03  H.J. Lu  <hjl@gnu.org>
1437         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
1438         Don't restart the thread which sent REQ_DEBUG.
1439         (pthread_start_thread): Check if __pthread_sig_debug > 0
1440         before debugging.
1442         * pthread.c (__pthread_initialize_manager): Suspend ourself
1443         after sending __pthread_sig_debug to gdb instead of
1444         __pthread_sig_cancel.
1446 1999-01-24  H.J. Lu  <hjl@gnu.org>
1448         * manager.c (__pthread_manager): Delete __pthread_sig_debug
1449         from mask if __pthread_sig_debug > 0.
1450         (pthread_handle_create): Increment __pthread_handles_num.
1452         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
1453         * pthread.c (__pthread_initialize_manager): Likewise.
1455         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
1456         instead of __libc_allocate_rtsig (2).
1457         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
1458         instead of __pthread_sig_cancel.
1459         (pthread_handle_sigdebug): Fix comments.
1461 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
1463         * manager.c (pthread_allocate_stack): Set
1464         __pthread_nonstandard_stacks if user-specified stack is used.
1466 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
1468         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
1469         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
1471 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
1473         * pthread.c: Use a third signal __pthread_sig_debug distinct
1474         from __pthread_sig_cancel to notify gdb when a thread is
1475         created
1476         * manager.c: Likewise.
1477         * internals.h: Likewise.
1478         * signals.c: The implementation of sigwait(s) assumed that
1479         all signals in s have signal handlers already attached.
1480         This is not required by the standard, so make it work
1481         also if some of the signals have no handlers.
1483 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
1485         * linuxthreads.texi: Remove pointers from first @node.  Move old
1486         @node spec inside comment.
1488 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
1490         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
1491         _IO_lock_unlock.
1493 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
1495         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
1496         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
1498 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
1500         * manager.c: Threads now send __pthread_sig_cancel on termination.
1501         Change clone call and signal masks.
1502         * thread.c (pthread_handle_sigrestart): Remove special code for
1503         manager.
1504         (pthread_handle_sigcancel): In manager thread call
1505         __pthread_manager_sighandler.
1506         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
1507         * sysdeps/i386/i686/pt-machine.h: Likewise.
1508         Patches by Xavier Leroy.
1510 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
1512         * spinlock.c (__pthread_unlock): Don't crash if called for an
1513         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
1515         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
1516         overall runtime.
1518 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
1520         * Examples/ex3.c: Wait until all threads are started before
1521         searching for the number to avoid race condition on very fast
1522         systems.
1524 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1526         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
1527         declaration since it's not needed.
1529         * sysdeps/pthread/pthread.h: Move internal functions to ...
1530         * internals.h: ...here.
1532 1998-12-02  H.J. Lu  <hjl@gnu.org>
1534         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
1535         SIGRTMIN is defined.
1536         (__pthread_sig_cancel): Likewise.
1538 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1540         * wrapsyscall.c: Include <sys/mman.h> for msync,
1541         <stdlib.h> for system and <termios.h> for tcdrain prototype.
1542         Correct msync declaration.
1544 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
1546         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
1547         __libc_tsd_set): New macros for new interface.
1548         * no-tsd.c: New file, provide uninitialized defns of
1549         __libc_internal_tsd_get and __libc_internal_tsd_set.
1550         * Makefile (routines): Add no-tsd.
1552 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
1554         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
1555         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1556         __libc_internal_tsd_set): Move decls to ...
1557         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
1558         declarations.
1560         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1561         __libc_internal_tsd_set): Make these pointers to functions, not
1562         functions; remove #pragma weak decls for them.
1563         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
1564         Define static functions and initialized pointers to them.
1566 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
1568         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
1569         (CFLAGS-specific.c): Likewise.
1570         (CFLAGS-pthread.c): Likewise.
1571         (CFLAGS-ptfork.c): Likewise.
1572         (CFLAGS-cancel.c): Likewise.
1573         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
1574         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
1576         * mutex.c (pthread_mutex_init): Define as strong symbol.
1577         (pthread_mutex_destroy): Likewise.
1578         (pthread_mutex_trylock): Likewise.
1579         (pthread_mutex_lock): Likewise.
1580         (pthread_mutex_unlock): Likewise.
1581         (pthread_mutexattr_init): Likewise.
1582         (pthread_mutexattr_destroy): Likewise.
1583         (pthread_once): Likewise.
1584         * ptfork.c (pthread_atfork): Likewise.
1585         * specific.c (pthread_key_create): Likewise.
1586         (pthread_setspecific): Likewise.
1587         (pthread_getspecific): Likewise.
1589 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
1591         * linuxthreads.texi: Fix punctuation after xref.
1593 1998-11-10  H.J. Lu  <hjl@gnu.org>
1595         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
1596         if it is defined in <linux/limits.h>.
1598 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
1600         * spinlock.h (__pthread_trylock): Define inline.
1601         (__pthread_lock): Add extra parameter to declaration.  Declare
1602         using internal_function.
1603         (__pthread_unlock): Declare using internal_function.
1604         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
1605         of local variable self.  Avoid recomputing self.  Define using
1606         internal_function.
1607         (__pthread_trylock): Remove.
1608         (__pthread_unlock): Define using internal_function.
1609         * cancel.c: Adjust for __pthread_lock interface change.  Use already
1610         computed self value is possible.
1611         * condvar.c: Likewise.
1612         * join.c: Likewise.
1613         * manager.c: Likewise.
1614         * mutex.c: Likewise.
1615         * pthread.c: Likewise.
1616         * rwlock.c: Likewise.
1617         * semaphore.c: Likewise.
1618         * signals.c: Likewise.
1620 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
1622         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
1623         __ to field names of the struct.
1624         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
1625         Likewise.
1626         (pthread_attr_t): Likewise.
1627         (pthread_cond_t): Likewise.
1628         (pthread_condattr_t): Likewise.
1629         (pthread_mutex_t): Likewise.
1630         (pthread_mutexattr_t): Likewise.
1631         (pthread_rwlock_t): Likewise.
1632         (pthread_rwlockattr_t): Likewise.
1633         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
1634         * cancel.c: Likewise.
1635         * condvar.c: Likewise.
1636         * manager.c: Likewise.
1637         * mutex.c: Likewise.
1638         * pthread.c: Likewise.
1639         * ptlongjmp.c: Likewise.
1640         * rwlock.c: Likewise.
1641         * spinlock.c: Likewise.
1643 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
1645         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
1646         also with PT_EI.
1648         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
1649         definitions.
1651         * Makefile (libpthread-routines): Add pt-machine.
1652         * pt-machine.c: New file.
1653         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
1654         yet defined.  Use PT_EI in extern inline definitions.
1655         * sysdeps/arm/pt-machine.h: Likewise.
1656         * sysdeps/i386/pt-machine.h: Likewise.
1657         * sysdeps/i386/i686/pt-machine.h: Likewise.
1658         * sysdeps/m68k/pt-machine.h: Likewise.
1659         * sysdeps/mips/pt-machine.h: Likewise.
1660         * sysdeps/powerpc/pt-machine.h: Likewise.
1661         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1662         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1664 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1666         * semaphore.h: Include <sys/types.h> so that _pthread_descr
1667         is declared.
1669 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
1671         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
1672         argument.
1673         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
1675 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
1677         * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
1678         multiple inclusion guard.
1680 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1682         * signals.c (sigaction): Check that sig is less than NSIG to avoid
1683         array index overflow.
1685 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
1687         * sysdeps/pthread/semaphore.h: New file.
1689 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
1691         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
1692         _LIBC_TSD_KEY_DL_ERROR.
1694 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
1696         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
1697         * sysdeps/i386/pt-machine.h: Likewise.
1698         Suggested by Roland McGrath.
1700 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
1702         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
1703         access thread data with non-constant offsets.
1704         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
1705         necessary.
1707         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
1708         THREAD_SETMEM_NC definitions.
1710         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
1711         THREAD_SETMEM_NC.
1712         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1714 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
1716         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
1717         not already defined.
1718         (struct _pthread_descr_struct): Add p_self and p_nr field.
1719         * manager.c (__pthread_handles): Define second element to point
1720         to manager thread.
1721         (__pthread_handles_num): Initialize to 2.
1722         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
1723         (pthread_start_thread): Likewise.
1724         (pthread_handle_create): Start search for free slot at entry 2.
1725         Initialize new fields p_self and p_nr.
1726         Call __clone with CLONE_PTRACE if available.
1727         (pthread_free): Call FREE_THREAD_SELF if available.
1728         * pthread.c (__pthread_initial_thread): Initialize new fields.
1729         (__pthread_manager_thread): Likewise.
1730         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
1732         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
1733         elements of the thread descriptor.
1734         * condvar.c: Likewise.
1735         * errno.c: Likewise.
1736         * join.c: Likewise.
1737         * manager.c: Likewise.
1738         * pthread.c: Likewise.
1739         * ptlongjmp.c: Likewise.
1740         * semaphore.c: Likewise.
1741         * signals.c: Likewise.
1742         * specific.c: Likewise.
1743         * spinlock.c: Likewise.
1745         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
1747         * sysdeps/i386/useldt.h: New file.
1748         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
1750         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
1751         THREAD_SETMEM using __thread_self.
1752         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1754 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
1756         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
1757         turned out that we didn't need to queue after all.
1759 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
1761         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
1762         and wastes space; correct types.
1764 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
1766         * signals.c (sigaction): Handle NULL argument.
1768 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
1770         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
1771         of sigset_t.
1773 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1775         * Makefile (linuxthreads-version): Extract correct number from
1776         Banner.
1778 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
1780         * Banner: Bump version number to 0.8
1781         * FAQ.html: Many updates, in particular w.r.t. debugging.
1782         * manager.c: Support for non-default stacksize for
1783         LinuxThreads-allocated stacks;
1784         don't use guard pages for stacks with default size, rely on
1785         rlimit(RLIMIT_STACK) instead (it's cheaper).
1786         * attr.c: Likewise.
1787         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
1788         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
1789         * condvar.c: Likewise.
1790         * internals.h: Likewise.
1791         * restart.h: Likewise.
1792         * signals.c: Likewise.
1793         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
1795 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1797         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
1798         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
1799         * Versions: Put __pthread_mutexattr_settype under version
1800         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
1801         __pthread_mutexattr_gettype.
1803 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1805         * sysdeps/pthread/bits/libc-lock.h: Make
1806         __pthread_mutexattr_settype weak.  Don't make
1807         __pthread_mutexattr_setkind_np weak.
1809 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
1811         * manager.c (pthread_handle_create): Check whether sched_setscheduler
1812         call can succeed here.
1814         * mutex.c: Define __pthread_mutexattr_settype and make
1815         __pthread_mutexattr_setkind_np an alias.
1816         Likewise for __pthread_mutexattr_gettype.
1818 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
1820         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
1821         is root.
1823 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
1825         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
1827 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1829         * Examples/ex6.c: Include <unistd.h> for usleep.
1831 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1833         * Examples/ex4.c (main): Use exit, not pthread_exit.
1835 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
1837         * Versions: Add __pthread_mutexattr_gettype and
1838         __pthread_mutexattr_settype.
1839         * lockfile.c: Use __pthread_mutexattr_settype instead of
1840         __pthread_mutexattr_setkind_np.
1841         * mutex.c: Define __pthread_mutexattr_gettype and
1842         __pthread_mutexattr_settype.
1843         * weak.c: Likewise.
1844         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
1845         __pthread_mutexattr_settype.
1846         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
1847         Use __pthread_mutexattr_settype.
1849 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
1851         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
1852         * mutex.c: Define weak alias pthread_mutexattr_gettype and
1853         pthread_mutexattr_settype.
1854         * sysdeps/pthread/pthread.h: Declare these functions.
1855         Move pthread_sigmask and pthread_kill declaration in separate header.
1856         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
1858 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
1860         * Makefile: Add rules to compile and run tests.
1861         * Examples/ex1.c: Little changes to fix warnings.
1862         * Examples/ex2.c: Likewise.
1863         * Examples/ex3.c: Likewise.
1864         * Examples/ex4.c: Likewise.
1865         * Examples/ex5.c: Likewise.
1866         * Examples/ex6.c: New file.
1868 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
1870         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
1872 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1874         * attr.c: Include <string.h>.
1876 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
1878         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
1879         * internals.h: Include limits.h.
1880         * manager.c: Use memcpy to copy sched_param.
1881         * ptfork.c: Include errno.h.
1882         * pthread.c: Likewise.
1883         * semaphore.c: Likewise.
1884         * specific.c: Likewise.
1885         * spinlock.h: Likewise.
1886         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
1887         type definition to ...
1888         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
1890 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
1892         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
1894         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
1895         as macros as demanded in POSIX.1, Annex C.
1897 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
1899         * internals.h (struct pthread_request): For free use pthread_t
1900         instead of pthread_descr.
1901         * join.c (pthread_join): Pass thread_id, not th to manager.
1902         (pthread_detach): Likewise.
1903         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
1904         (pthread_exited): Remove detached queue code.
1905         (pthread_handle_free): Expect thread ID parameter and use it to
1906         validate the thread decsriptor.  Don't use detached queue.
1907         Patches by Xavier Leroy.
1909 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1911         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
1912         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
1913         __pthread_atfork, __pthread_key_create, __pthread_once.
1914         * internals.h: Doc fix.
1915         * pthread.c (__pthread_initialize): Define again.
1917 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
1919         * manager.c (pthread_exited): If thread is not detached put it on
1920         special list.
1921         (pthread_handle_free): If thread is not on list with living threads
1922         search on list with detached threads.
1924         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
1925         for new definition of pthread_rwlock_t.
1927         * spinlock.c: Correct test whether to compile
1928         __pthread_compare_and_swap or not.
1930 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
1932         * attr.c: Finish user stack support.  Change locking code to be safe
1933         in situations with different priorities.
1934         * cancel.c: Likewise.
1935         * condvar.c: Likewise.
1936         * internals.h: Likewise.
1937         * join.c: Likewise.
1938         * manager.c: Likewise.
1939         * mutex.c: Likewise.
1940         * pthread.c: Likewise.
1941         * ptlongjmp.c: Likewise.
1942         * queue.h: Likewise.
1943         * rwlock.c: Likewise.
1944         * semaphore.c: Likewise.
1945         * semaphore.h: Likewise.
1946         * signals.c: Likewise.
1947         * spinlock.c: Likewise.
1948         * spinlock.h: Likewise.
1949         * sysdeps/pthread/pthread.h: Likewise.
1950         Patches by Xavier Leroy.
1952         * sysdeps/i386/i686/pt-machine.h: New file.
1954 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
1956         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
1957         [sg]et_stackaddr prototypes always available.
1959         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1960         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
1962 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
1964         * manager.c (pthread_free): Undo patch from 980430.
1965         Reported by David Wragg <dpw@doc.ic.ac.uk>.
1967 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
1969         * manager.c: Define __pthread_manager_adjust_prio and use it to
1970         increase priority when needed.
1971         * internals.h: Add prototype for __pthread_manager_adjust_prio.
1972         * mutex.c: Optimize mutexes to wake up only one thread.
1973         * pthread.c: Move PID of manager for global variable in structure
1974         element.
1975         Patches by Xavier Leroy.
1977 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
1979         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
1981 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1983         * attr.c: Correct typo.
1985 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
1987         * manager.c (pthread_free): Unmap guard before the stack.
1988         Patch by Matthias Urlichs.
1990 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
1992         * manager.c (pthread_free): Detect already free child.
1993         Patch by Xavier Leroy, reported by Matthias Urlichs.
1995 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1997         * Makefile (linuxthreads-version): Renamed back from
1998         libpthread-version.
2000 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
2002         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
2003         __libc_longjmp.
2005 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
2007         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
2008         * internals.h: Add definitions for new spinlock implementation.
2009         * ptlongjmp.c: New file.
2010         * spinlock.c: New file.
2011         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
2012         new function __pthread_acquire to prevent deadlocks with thread
2013         with different priorities.
2014         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
2016 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2018         * manager.c (__pthread_manager): Reduce first argument to select
2019         to include just the needed file descriptor.
2021 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
2023         * manager.c: Fix last patch which caused core dumps.
2025         * pthread.c: Correctly handle missing SIGRTMIN.
2027 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2029         * libpthread.map: Add __libc_internal_tsd_get and
2030         __libc_internal_tsd_set.  Add missing cancelable functions. Export
2031         libc internal versions of the cancelable functions.
2033 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
2035         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
2037 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
2039         * attr.c: Implement pthread_attr_[gs]etguardsize,
2040         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
2041         Change pthread_attr_init to have two interfaces.
2042         * internals.h (struct _pthread_descr_struct): Add new fields for
2043         above functions.
2044         * libpthread.map: Add names in GLIBC_2.1 section.
2045         * manager.c (pthread_handle_create): Implement guardsize and
2046         user stack.
2047         (pthread_free): Likewise.
2048         * pthread.c (pthread_create): Add new interface for changed
2049         pthread_attr_t.
2050         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2051         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
2052         PTHREAD_STACK_MIN.
2054 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
2056         * manager.c: Enable resetting of the thread scheduling policy
2057         to SCHED_OTHER when the parent thread has a different one.
2059 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
2061         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2062         _POSIX_ASYNCHRONOUS_IO.
2064         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
2065         mutexes.
2066         * mutex.c: Implement new mutex types.
2068         * internals.h: Include <signal.h>.
2070         * libpthread.map: Add __erno_location and __h_errno_location.
2072         * errno.c: Return pointer to variable actually in use.  This might
2073         not be the one in the thread structure.
2074         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
2075         and p_h_errnop.
2076         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
2077         of manager thread structure.
2078         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
2079         thread.
2080         * pthread.c: Adapt initializer for thread structures.
2081         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
2082         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
2083         current thread to global variables.
2085 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
2087         * rwlock.c: New file.
2088         * Makefile (libpthread-routines): Add rwlock.
2089         * sysdeps/pthread/pthread.h: Define data structures and declare
2090         functions.
2091         * libpthread.map: Add new functions.
2093 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
2095         * sysdeps/arm/pt-machine.h: New file; add ARM support.
2096         * sysdeps/arm/Implies: likewise.
2097         * README: Document it.
2099 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2101         * signals.c: Remove unneeded initializer for sigwaited, saving a
2102         warning.
2104 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2106         * semaphore.c (sem_init): Set sem_spinlock only if available.
2108 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
2110         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
2111         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
2113         * Makefile: Update from LinuxThreads 0.7.
2114         * internals.h. Likewise.
2115         * manager.c: Likewise.
2116         * mutex.c: Likewise.
2117         * pthread.c: Likewise.
2118         * signals.c: Likewise.
2119         * specific.c: Likewise.
2120         * Examples/ex3.c: Likewise.
2122 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
2124         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
2125         open.
2127 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
2129         * wrapsyscall.c: Add socket functions which are also cancelation
2130         points.
2132 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
2134         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
2135         New functions for fast thread specific data within libc.
2137         * internals.h: Add new array p_libc_specific to struct
2138         _pthread_descr_struct.
2140         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
2142 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
2144         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
2145         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
2147 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
2149         * internals.h (struct _pthread_descr_struct): Add definitions for
2150         two-level specific key handling.
2151         * manager.c (pthread_handle_create): Initialize specific memory array.
2152         * specific.c: Implement two-level key handling.
2153         * weaks.c: Don't provide dummy key handling.
2154         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
2155         Add definition of __libc_key_t.
2156         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
2157         as 1024.
2158         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
2159         PTHREAD_DESTRUCTOR_ITERATIONS.
2161         * manager.c (pthread_handle_create): Compare mmap result with
2162         MAP_FAILED.
2164         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
2165         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
2167 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
2169         sysdeps/sparc -> sysdeps/sparc/sparc32
2170         sysdeps/sparc64 -> sysdeps/sparc/sparc64
2172         * internals.h: Change definition of THREAD_SELF to be an expression,
2173         not a statement that did a return.
2174         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
2175         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
2176         Follow Solaris and use a "system reserved" register (%g6) to hold
2177         the thread descriptor.
2178         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2180 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
2182         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
2183         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
2184         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
2186         * semaphore.c: Include spinlock.h only when needed.
2188         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
2189         keys for entries not in use.
2191         * weaks.c: Implement key handling functions for real.
2193 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
2195         Initial sparc64-linux support:
2196         * linuxthreads/sysdeps/sparc64/Implies: New file.
2197         * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
2199 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
2201         * semaphore.c: Include spinlock.h at correct place.
2202         Patch by HJ Lu.
2204 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
2206         The Great Bit File Move:
2207         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
2208         * sysdeps/powerpc/semaphorebits.h: Likewise.
2209         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
2210         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
2211         * sysdeps/pthread/libc-lock.h: -> bits/
2212         * sysdeps/pthread/stdio-lock.h: Likewise.
2213         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
2214         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
2215         * semaphore.h: Likewise.
2216         * sysdeps/pthread/pthread.h: Likewise.
2218         * lockfile.c: <foo.h> -> <bits/foo.h>.
2219         * semaphore.h: Likewise.
2221         * Makefile: (headers): foo.h -> bits/foo.h.
2222         * sysdeps/pthread/Makefile: Likewise.
2224 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2226         * semaphore.c (sem_init): Set sem_spinlock only if available.
2228         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
2229         asm constraints.
2231 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
2233         Update from LinuxThreads 0.6.
2235         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
2236         and __sched_get_priority_min instead of names without `__'.
2238         * manager.c: Rewrite large parts to implement opaque pthread_t.
2240         * cancel.c: Adapt for opaque pthread_t type.
2241         * condvar.c: Likewise.
2242         * errno.c: Likewise.
2243         * join.c: Likewise.
2244         * mutex.c: Likewise.
2245         * pthread.c: Likewise.
2246         * signals.c: Likewise.
2247         * specific.c: Likewise.
2248         * restart.h: Likewise.
2249         * queue.h: Likewise.
2250         * Examples/ex3.c: Likewise.
2251         * Examples/ex4.c: Likewise.
2252         * sysdeps/pthread/pthread.h: Likewise.
2254         * pthread.c: Accumulate time for all threads in thread manager.
2256         * semaphore.c: Implement fallback implementation for architectures
2257         sometimes missing compare-exchange operations.
2259         * cancel.c (pthread_cancel): Validate handle argument.
2260         * join.c (pthread_join): Likewise.
2261         (pthread_detach): Likewise.
2262         * signals.c (pthread_kill): Likewise.
2264         * spinlock.h (acquire): Use __sched_yield not sched_yield.
2266         * queue.h (enqueue): Enqueue thread according to priority.
2268         * internals.c (struct pthread_start_args): New struct for passing
2269         args to cloning function.
2270         (struct _pthread): Rename to _pthread_descr_struct and adapt for
2271         opaque pthread_t.
2273         * Examples/Makefile (clean): Pass -f option to rm.
2275         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
2276         and define TEST_FOR_COMPARE_AND_SWAP.
2277         * sysdeps/i386/i486/pt-machine.h: Removed.
2279         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
2280         to 1024.
2282 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
2284         * restart.h (suspend): Clear p_signal before suspending.
2285         (suspend_with_cancellation): Likewise.
2286         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
2288         * weaks.c: Make __pthread_key_create return 1.
2289         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
2290         __libc_getspecific, __libc_setspecific, and __libc_key_t.
2291         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
2292         using libio.
2294 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
2296         * sysdeps/sparc/pt-machine (RELEASE): Fix.
2298 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
2300         * sysdeps/powerpc/Implies: Added.
2301         * sysdeps/powerpc/pt-machine.h: Added.
2302         * sysdeps/powerpc/semaphorebits.h: Added.
2304 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
2306         * linuxtheads/pthread.c (__pthread_initial_thread): Correct
2307         initializer.
2308         (__pthread_manager_thread): Likewise.
2309         Reported by Andreas Jaeger.
2311 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
2313         Since sigset_t no longer fits in a register, we can't pass in the
2314         thread's initial mask so easily.  Take this opportunity to simplify
2315         the clone implementation by only accepting a single void* argument.
2317         * linuxthreads/manager.c (__pthread_manager): Put thread vitals
2318         in the thread struct instead of as arguments through clone.
2319         (pthread_start_thread): Look for them there.
2320         * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
2321         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
2322         * linuxthreads/pthread.c (pthread_initialize_manager): Revise
2323         clone invocation.