Update.
[glibc.git] / linuxthreads / ChangeLog
blob83be97f6fdf0a39f206d3cdd678ff64b1ce6404b
1 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
3         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
4         * semaphore.c: Handle spurious wakeups.
6         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
7         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
9         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
10         (__pthread_wait_for_restart): Likewise.
12         * condvar.c (pthread_cond_wait): Also check whether thread is
13         cancelable before aborting loop.
14         (pthread_cond_timedwait): Likewise.
16         * signals.c (pthread_sighandler): Remove special code to restrore
17         %gs on x86.
18         (pthread_sighandler_t): Likewise.
20 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
22         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
23         * pthread.c: Include <resolv.h>.
24         (_res): Undefine.  Add extern declaration.
26 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
28         * pthread.c (__pthread_initial_thread): Update initializer.
29         (__pthread_manager_thread): Likewise.
30         (pthread_initialize): Move setrlimit call to...
31         (__pthread_initialize_manager): ...here.
32         (__pthread_reset_main_thread): Reset also soft limit on stack size.
34         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
35         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
37 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
39         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
40         __compare_and_swap to define testandset.
41         * linuxthreads/sysdeps/powerpc/pt-machine.h: Add volatile to asms.
42         Define IMPLEMENT_TAS_WITH_CAS.
44 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
46         * Makefile: Pass -z nodelete to linker for libpthread.so
47         generation if it understand this option.
49 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
51         * manager.c (pthread_handle_create): Remove initialization of
52         new_thread->p_res._sock.
54 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
56         Bugfixes to the variant of the code for machines with no compare
57         and swap.
59         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
60         node was not being properly enqueued, due to failing to update
61         the lock->__status field.
63         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
64         being set inappropriately, causing the suspend function to be called
65         with a null self pointer and crash.
67 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
69         * spinlock.h (__pthread_alt_trylock): Fix code used if no
70         compare&swap is available.
72         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
73         compare_and_swap.
75         * pthread.c (pthread_initialize): Don't use sysconf to determine
76         whether the machine has more than one processor.
78         * spinlock.c (__pthread_alt_timedlock): Add back one of the
79         removed thread_self calls.
81 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
83         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
84         __compare_and_swap to compare_and_swap in code which assumes
85         compare swap is available.
87 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
89         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
90         bug whereby thr field of waitnode structure would not be correctly
91         set unless a null self pointer is passed to the functions.
92         Eliminated redundant calls to thread_self().
94 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
96         * pthread.c (__pthread_initialize_manager): Lock
97         __pthread_manager_thread.p_lock before calling clone.
99 2000-05-05  H.J. Lu  <hjl@gnu.org>
101         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
102         have acquire semantics.
103         (__compare_and_swap_with_release_semantics): New inline
104         function.
105         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
107 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
109         * manager.c: Fix the problem with signals at startup.
110         Change the way that thread stacks are allocated on IA64.
111         Clean up some of the guard page allocation stuff.
113 1999-12-19  H.J. Lu  <hjl@gnu.org>
115         * internals.h (page_roundup): New.
116         * attr.c (__pthread_attr_setguardsize); Use page_roundup
117         instead of roundup.
118         * manager.c (pthread_allocate_stack): Make sure guardaddr is
119         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
120         is define.
122 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
124         * manager.c (pthread_allocate_stack): Unmap the stack top
125         if failed to map the stack bottom.
126         Fix the guard page.
127         (pthread_free): Fix the guard page.
129         * pthread.c (pthread_initialize): Set rlimit correctly for
130         NEED_SEPARATE_REGISTER_STACK.
132 1999-12-16  H.J. Lu  <hjl@gnu.org>
134         * pthread.c (__pthread_initialize_manager): Pass
135         __pthread_manager_thread_bos instead of
136         __pthread_manager_thread_tos to __clone2.
138 1999-12-16  H.J. Lu  <hjl@gnu.org>
140         * manager.c (pthread_allocate_stack): Correct the calculation
141         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
142         stack bottom.
144 1999-12-13  H.J. Lu  <hjl@gnu.org>
146         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
147         bit after setting ar.ccv.
149 1999-12-12  H.J. Lu  <hjl@gnu.org>
151         * manager.c (pthread_allocate_stack): Make the starting
152         address of the stack bottom page aligned. FIXME: it may
153         need changes in other places.
154         (pthread_handle_create): Likewise.
156 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
158         * manager.c (pthread_allocate_stack): Handle
159         NEED_SEPARATE_REGISTER_STACK.
160         (pthread_handle_create): Likewise.
161         * pthread.c (__pthread_initialize_manager): Likewise.
163         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
165 1999-12-02  H.J. Lu  <hjl@gnu.org>
167         * sysdeps/ia64/pt-machine.h: New.
169 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
171         * wrapsyscall.c: Mark non-__ protected names as weak.
172         PR libc/1466.
174 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
176         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
178 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
180         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
181         Add tests also to new alternative spinlock implementation.
182         * spinlock.h: Likewise.
183         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
185 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
187         * Version: Export __sigaction.
188         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
189         of __sigaction.
190         * pthread.c: Use __libc_sigaction instead of __sigaction.
192         * condvar.c: Implement pthread_condattr_getpshared and
193         pthread_condattr_setpshared.
194         * mutex.c: Implement pthread_mutexattr_getpshared and
195          pthread_mutexattr_setpshared.
196         * Versions: Export new functions.
197         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
199         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
200         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
201         is not selected.
203 2000-07-04  Greg McGary  <greg@mcgary.org>
205         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
206         pragmas.  Include bp-sym.h only if _LIBC.
208 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
210         * spinlock.c (__pthread_unlock): Properly place write barrier.
211         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
213 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
215         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
216         faster on SMP systems.  No more emulation of compare&swap for adaptive
217         spinlocks.
218         * spinlock.h: Likewise.
219         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
220         Replace fast with adaptive mutex.
221         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
222         * condvar.c: Likewise.
223         * pthread.c: Define and initialize __pthread_smp_kernel variable.
224         * internals.h: Declare __pthread_smp_kernel.
225         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
226         _pthread_fastlock structure.
227         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
229         * pthread.c: Remove initialization to zero from global variables.
231 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
233         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
235 2000-06-28  Greg McGary  <greg@mcgary.org>
237         * weaks.c: Wrap BP_SYM () around weak extern declarations of
238         pthread functions that have pointers in their return+arg signatures.
240 2000-06-27  Greg McGary  <greg@mcgary.org>
242         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
243         extern declarations of pthread functions that have pointers in
244         their return+arg signatures.
246 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
248         * Makefile (tests): Add ex11.  Add rules to build it.
249         * Examples/ex11.c: New file.
250         * rwlock.c: Fix complete braindamaged previous try to implement
251         timedout functions.
253         * spinlock.c: Pretty print.
255 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
257         * Makefile (tests): Add ex10.  Add rules to build it.
258         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
259         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
260         * condvar.c (pthread_cond_wait): Allow mutex of kind
261         PTHREAD_MUTEX_TIMED_NP.
262         (pthread_cond_timedwait_relative): Likewise.
263         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
264         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
265         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
266         (__pthread_mutex_lock): Use __pthread_alt_lock for
267         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
268         (__pthread_mutex_timedlock): New function.
269         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
270         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
271         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
272         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
273         * spinlock.c: Implement alternate fastlocks.
274         * spinlock.h: Add prototypes.
275         * Examples/ex10.c: New file.
276         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
277         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
279         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
280         (__pthread_rwlock_timedrdlock): New function.
281         (__pthread_rwlock_timedwrlock): New function.
282         Use laternate fastlock function everywhere.
284 2000-06-21  Andreas Jaeger  <aj@suse.de>
286         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
287         prototype.
289         * join.c: Include <stdlib.h> for exit prototype.
291 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
293         * sysdeps/i386/useldt.h: Include <stdlib.h>.
295         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
296         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
298         * Makefile (libpthread-routines): Add barrier.
299         (tests): Add ex9.  Add rule to build ex9.
300         * Versions: Export barrier functions.
301         * barrier.c: New file.
302         * Examples/ex9.c: New file.
303         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
304         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
305         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
307 2000-06-19  H.J. Lu  <hjl@gnu.org>
309         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
310         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
311         (compare_and_swap_with_release_semantics): New. Default to
312         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
313         is not defined.
315         * spinlock.c (__pthread_unlock): Call
316         compare_and_swap_with_release_semantics () instead of
317         compare_and_swap ().
319 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
321         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
322         to errno directly.
323         * sysdeps/pthread/timer_delete.c: Likewise.
324         * sysdeps/pthread/timer_getoverr.c: Likewise.
325         * sysdeps/pthread/timer_gettime.c: Likewise.
326         * sysdeps/pthread/timer_settime.c: Likewise.
328 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
330         Timer nodes are now reference counted, and can be marked
331         as deleted. This allows for the safe release of the global mutex
332         in the middle without losing the timer being operated on.
334         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
335         member is now an enum with three values, so that an intermediate
336         state can be represented (deleted but not free for reuse yet).
337         New refcount member added.
338         * sysdeps/pthread/timer_routines.c: Likewise.
340         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
341         timer_valid): New inline functions added.
343         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
344         restructured, recursive deadlock bug fixed.
346         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
347         timer_addref to ensure that timer won't be deleted while mutex is not
348         held. Also uses timer_invalid to perform validation of timer handle.
349         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
350         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
352 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
354         * shlib-versions: Add entry for SH.
355         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
357 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
359         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
360         tightened up some critical regions and micro-optimized some list
361         manipulation code.
363         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
364         Returns int value now to indicate whether timer was queued at head.
365         * sysdeps/pthread/posix-timer.h: Likewise.
366         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
367         new return value from __timer_thread_queue_timer to avoid waking
368         up timer thread unnecessarily.
370         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
371         inuse flag, because this requires mutex to be held.  Callers updated
372         to do the check when they have the mutex.
373         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
375         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
376         regions: avoids making system calls while holding timer mutex, and
377         a few computations were moved outside of the mutex as well.
378         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
380         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
381         to list_unlink_ip, meaning idempotent.  Pointer manipulation
382         changed to get better better code out of gcc.
383         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
384         version of list_unlink added here.
385         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
386         function in all places: idempotent one for timers, non-idempotent
387         one for thread nodes.
388         * sysdeps/pthread/timer_settime: Likewise.
389         * sysdeps/pthread/timer_routines.c: Likewise.
391 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
393         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
394         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
396         * sysdeps/pthread/Makefile: Remove tests definition.
398 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
399             Yutaka Niibe  <gniibe@chroot.org>
401         * sysdeps/sh/pspinlock.c: New file.
402         * sysdeps/sh/pt-machine.h: New file.
404 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
406         * Makefile (tests): Add joinrace.
408         * Examples/ex6.c: Test return value of pthread_join.
410 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
412         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
413         (__pthread_spin_trylock): Implement.
414         (__pthread_spin_unlock): Implement.
415         (__pthread_spin_init): Implement.
416         (__pthread_spin_destroy): Implement.
418 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
420         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
421         really append the entry.
423 2000-06-10  Andreas Jaeger  <aj@suse.de>
425         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
427 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
429         * sysdeps/pthread/timer_create.c: Thread matching now done on
430         clock type as well as thread attributes.
431         There are individual global signal-delivering threads for
432         different clock types.
433         * sysdeps/pthread/posix-timer.h: Likewise.
434         * sysdeps/pthread/timer_routines.c: Likewise.
436         * sysdeps/pthread/timer_routines.c: Thread allocation and
437         deallocation function now remembers to put thread on active
438         list and remove from active list.
439         Thus now the feature of binding multiple timers
440         to a single thread actually works.
442 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
444         * pthread.c (__pthread_create_2_1): Optimize a bit.
446         * internals.h (invalid_handle): Also test for p_terminated != 0.
447         (nonexisting_handle): New function.  Same as old invalid_handle.
448         * join.c (pthread_join): Use nonexisting_handle instead of
449         invalid_handle to test for acceptable thread handle.
450         * manager.c (pthread_handle_free): Likewise.
451         * joinrace.c: New file.
452         Reported by Permaine Cheung <pcheung@cygnus.com>.
454 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
456         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
457         Correct handling of matching variable.
459         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
460         avoid warnings.
462         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
463         Be prepared for empty timer list.
465         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
466         CPUTIME clock ID.  Add support for thread clocks.
468         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
469         subtraction were switched.
471         * sysdeps/pthread/timer_routines.c (init_module): Use
472         THREAD_MAXNODES threads.
474         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
475         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
476         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
477         with sigqueueinfo is this system call is available.
479         * sysdeps/pthread/timer_create.c (timer_create): Allow
480         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
482         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
483         functionality.
484         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
486 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
488         * sysdeps/pthread/posix-timer.h: New file.
489         * sysdeps/pthread/timer_create.c: New file.
490         * sysdeps/pthread/timer_delete.c: New file.
491         * sysdeps/pthread/timer_getoverr.c: New file.
492         * sysdeps/pthread/timer_gettime.c: New file.
493         * sysdeps/pthread/timer_routines.c: New file.
494         * sysdeps/pthread/timer_settime.c: New file.
495         * sysdeps/pthread/tst-timer.c: New file.
497 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
499         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
500         LINK_MAX definitions if necessary.
502 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
504         Added missing fork time handling of global libio lock.
506         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
507         not just the individual stream locks. Rewritten to use new
508         iterator interface provided by libio rather than accessing
509         global variable.
511         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
512         which lock and unlock the stream list using the new interface
513         provied by libio.
514         * internals.h: Likewise.
516         * ptfork.c (__fork): Now calls __flockfilelist before fork,
517         and __funlockfilelist in the parent after the fork.
518         Child still calls __fresetlockfiles as before.
520         * linuxthreads.texi: Now explains what happens to streams at
521         fork time. Also whole new section on forking and thread added.
522         Definition of pthread_atfork moved out of Miscellaneous Functions
523         to this new section.
525 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
527         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
528         Add missing register.
529         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
531 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
533         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
534         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
535         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
537 2000-05-31  Andreas Jaeger  <aj@suse.de>
539         * sysdeps/mips/pspinlock.c: Implement spinlocks.
541 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
543         * spinlock.c (__pthread_lock): Remove ASSERT.
545         * Makefile (tests): Add ex8.
546         * Examples/ex8.c: New file.
548 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
550         Bugfix: The pthread_atfork mechanism now takes care of its
551         own internal mutex at fork time.
553         * ptfork.c (__fork): Revised so that the mutex is held across
554         the fork operation and while the handlers are called, and so that
555         the child resets the mutex.
557         * linuxthreads.texi: Updated pthread_atfork documentation to make
558         it clear that fork and pthread_atfork can't be reentered from
559         atfork handlers, that pthread_atfork and fork are mutually atomic,
560         and that the handlers are inherited by the child process.
562 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
564         * Makefile (libpthread-routines): Add pspinlock.
565         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
566         Use struct _pthread_fastlock instead of pthread_spinlock_t.
567         * condvar.c: Likewise.
568         * internals.h: Likewise.
569         * join.c: Likewise.
570         * manager.c: Likewise.
571         * mutex.c: Likewise.
572         * pthread.c: Likewise.
573         * rwlock.c: Likewise.
574         * semaphore.c: Likewise.
575         * signals.c: Likewise.
576         * spinlock.h: Likewise.
577         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
578         * sysdeps/alpha/pspinlock.c: New file.
579         * sysdeps/arm/pspinlock.c: New file.
580         * sysdeps/i386/pspinlock.c: New file.
581         * sysdeps/m68k/pspinlock.c: New file.
582         * sysdeps/mips/pspinlock.c: New file.
583         * sysdeps/powerpc/pspinlock.c: New file.
584         * sysdeps/sparc/sparc32/pspinlock.c: New file.
585         * sysdeps/sparc/sparc64/pspinlock.c: New file.
586         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
587         back to _pthread_fastlock.  Define new pthread_spinlock_t.
589 2000-05-24  Andreas Jaeger  <aj@suse.de>
591         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
593 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
595         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
597 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
599         * internals.h (__RES_PTHREAD_INTERNAL): Define.
601 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
603         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
604         object state is represented with additional bits which distinguish
605         whether that state was set up in the current process, or
606         in an ancestor process. If that state was set in an ancestor,
607         it means that a fork happened while thread was executing the init
608         function. In that case, the state is reset to NEVER.
609         * mutex.c (__pthread_once_fork_prepare): New function.
610         (__pthread_once_fork_child): Likewise
611         (__pthread_once_fork_parent): Likewise
612         (__pthread_reset_pthread_once): Removed.
613         * ptfork.c (__fork): Call new handlers in mutex.c.
614         * internals.h: Declarations of new mutex.c functions added.
615         Declaration of removed function deleted.
616         * linuxthreads.texi: Updated documentation about pthread_once
617         to clarify what happens under cancellation and forking.
619 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
621         * internals.h: New thread manager request type, REQ_KICK.
622         * join.c (pthread_exit): main thread now calls exit() instead
623         of _exit() in order to proper process cleanup.
624         * manager.c (__pthread_manager): Do not terminate manager
625         after unblocking main thread; wait for main thread's
626         REQ_PROCESS_EXIT request instead.
627         Also, added REQ_KICK case to handle new request; this just does
628         nothing.
629         * manager.c (pthread_exited): Do not terminate manager after
630         unblocking main thread.
631         * manager.c (__pthread_manager_sighandler): If the main thread
632         is waiting for all other threads to die, send a REQ_KICK into
633         the thread manager request pipe to get it to clean out the threads
634         and unblock the main thread as soon as possible. This fixes
635         the 2000 millisecond hang on shutdown bug.
636         * Examples/ex7.c: New file, tests shutdown behavior when all threads
637         including the main one call pthread_exit(), or implicitly do so.
638         * Makefile (tests): Add ex7.
640 2000-05-05  Andreas Jaeger  <aj@suse.de>
642         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
643         (pthread_getcpuclockid): Correct test for ourselves.
645 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
647         * internals.h (struct _pthread_descr_struct): Reorganization.
648         Allocate room for 16 pointers at head of the structure for future
649         thread-local data handling.  Move p_self member in this area.
650         * manager.c (pthread_handle_create): Adjust use of p_self.
651         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
652         * pthread.c (__pthread_initial_thread): Adjust initialization.
653         (__pthread_manager_thread): Likewise.
655 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
657         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
658         for eventmask larger than 1 word.
660 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
662         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
663         * pthread.c (__pthread_initialize_minimal): New function.  Perform
664         minimal initialization.
665         (pthread_initialize): Remove this code here.
666         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
667         are working around the problem in glibc.
669 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
671         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
672         now.  First gcc must be fixed (more concrete: libgcc).
674 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
676         * pthread.c: Remove special treatement for interrupt handlers on x86.
677         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
678         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
679         necessary.
680         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
682 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
684         * join.c (pthread_exit): Set p_terminated after reporting the
685         termination event instead of before.
687 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
689         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
690         if __USE_UNIX98.
692 2000-04-18  Andreas Jaeger  <aj@suse.de>
694         * Versions: Use ld instead of ld.so.
696 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
698         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
699         Remove the typedef keyword.
701 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
703         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
704         not stbar.
705         (READ_MEMORY_BARRIER): Define.
706         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
707         MEMORY_BARRIER.
708         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
709         headers.
711 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
713         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
714         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
715         use thread_handle().
717 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
719         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
720         if fast mutex is used.  Don't initialize `already_canceled' twice.
721         Correctly test for return value of timedsuspend.
723         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
724         therefore don't need the _rt versions of the signal handlers.
726 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
728         * pthread.c (pthread_yield): New function.
729         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
730         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
731         * internals.h: Declare __pthread_yield.
733         * pthread.c (pthread_initialize): Avoid a bit more code if
734         realtime signals are known to exist.
736         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
737         to dynamically detect RT signals and avoid generating compatibility
738         functions with old kernel.
739         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
740         __pthread_restart_new directly.
741         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
742         __pthread_wait_for_restart_signal directly.
743         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
744         __pthread_timedsuspend_new directly.
746 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
748         * condvar.c: Remove all the special code to handle cond_timedwait.
749         Use timedsuspend instead.
750         * internals.h: Declare __pthread_timedsuspend_old,
751         __pthread_timedsuspend_new, and __pthread_timedsuspend.
752         Remove declaration of __pthread_init_condvar.
753         * pthread.c: Define __pthread_timedsuspend variable.
754         (__pthread_timedsuspend_old): New function.  Timed suspension
755         implementation for old Linux kernels.
756         (__pthread_timedsuspend_new): New function.  Timed suspension
757         implementation for new Linux kernels.
758         * restart.h (timedsuspend): New function.  Call appropriate
759         suspension function through __pthread_timedsuspend.
760         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
761         the code.
762         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
764         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
765         undefined.
766         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
767         where possible.
768         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
769         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
771         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
772         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
774 2000-04-14  Andreas Jaeger  <aj@suse.de>
776         * weaks.c: Fix typo.
778         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
779         2.2 for linuxthreads.
781 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
783         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
784         (pthread_getcpuclockid): Fix typo.
786 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
788         * Makefile (libpthread-routines): Add getcpuclockid.
789         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
790         * sysdeps/pthread/getcpuclockid.c: New file.
791         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
792         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
794         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
795         Defined.
796         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
798         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
799         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
800         and pthread_spin_unlock.
801         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
802         into pthread_spinlock_t.  Change all uses.
803         * spinlock.c: Implement pthread_spin_lock.
804         Rename __pthread_unlock to __pthread_spin_unlock and define weak
805         alias for real name.
806         Define pthread_spin_trylock, pthread_spin_init, and
807         pthread_spin_destroy.
808         Change all uses of _pthread_fastlock to pthread_spinlock_t.
809         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
810         Change all uses of _pthread_fastlock to pthread_spinlock_t.
811         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
812         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
813         and pthread_spin_unlock.
814         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
815         Change all uses of _pthread_fastlock to pthread_spinlock_t.
816         * condvar.c: Likewise.
817         * internals.h: Likewise.
818         * join.c: Likewise.
819         * manager.c: Likewise.
820         * mutex.c: Likewise.
821         * pthread.c: Likewise.
822         * rwlock.c: Likewise.
823         * semaphore.c: Likewise.
824         * signals.c: Likewise.
826         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
827         macros.
828         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
830 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
832         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
833         _POSIX_SHARED_MEMORY_OBJECTS.
835 2000-04-11  Andreas Jaeger  <aj@suse.de>
837         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
838         (__compare_and_swap): Mark as modifying memory.
840 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
842         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
843         __volatile__.
844         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
845         Don't have the 'asm' __volatile__.
847 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
849         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
850         * spinlock.c (__pthread_lock): Add memory barriers.
851         (__pthread_unlock): Likewise.
852         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
853         instruction.
854         (RELEASE): Not needed anymore.
855         (__compare_and_swap): Mark asm as modifying memory.
856         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
857         of MEMORY_BARRIER.
858         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
859         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
860         (MEMORY_BARRIER): Define using stbar.
861         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
862         stbar.
863         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
864         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
865         Mike Burrows <m3b@pa.dec.com>.
867 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
869         * signals.c (sigaction): Fix return value for the case SIG is one
870         of the signals the implementation uses.
871         Patch by Xavier.Leroy@inria.fr.
873 2000-04-01  Andreas Jaeger  <aj@suse.de>
875         * attr.c: Use shlib-compat macros.
876         * oldsemaphore.c: Likewise.
877         * pthread.c: Likewise.
878         * weaks.c: Likewise.
880 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
882         * semaphore.c (sem_timedwait): New function.
883         Patch by Carl Mailloux <carlm@oricom.ca>.
884         * semaphore.h: Declare sem_timedwait.
885         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
887 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
889         * sysdeps/pthread/Makefile: File removed.
891 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
893         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
894         * internals.h (__pthread_reset_pthread_once): Add prototype.
895         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
897         * manager.c (pthread_handle_create): Store ID of new thread before
898         clone call.
900 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
902         * attr.c: Use new macros from shlib-compat.h to define versions.
903         * oldsemaphore.c: Likewise.
904         * semaphore.c: Likewise.
905         * weaks.c: Likewise.
907         * pthread.c: Update for new SHLIB_COMPAT definition.
909         * manager.c (__pthread_manager): Unmask debug signal.
911         * pthread.c (pthread_initialize): Test for address of __dso_handle
912         being NULL, not value.  Use __on_exit, not on_exit.
913         Patch by Andreas Jaeger <aj@suse.de>.
915         * pthread.c: Use new macros from shlib-compat.h to define versions.
917 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
919         * pthread.c (pthread_initialize): Instead of on_exit use
920         __cxa_atexit if __dso_label is available to allow unloading the
921         libpthread shared library.
923 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
925         * condvar.c: Make tests for ownership of mutex less strict.
927 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
929         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
930         current thread and return error if not.
931         (pthread_cond_timedwait_relative_old): Likewise.
932         (pthread_cond_timedwait_relative_new): Likewise.
934         * mutex.c (__pthread_once): Handle cancelled init function correctly.
935         (pthread_once_cancelhandler): New function.
936         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
938 2000-03-14  Andreas Jaeger  <aj@suse.de>
940         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
941         REG_GS.
942         (pthread_handle_sigrestart_rt): Likewise.
943         * signals.c (pthread_sighandler_rt): Likewise.
945 2000-03-02  Andreas Jaeger  <aj@suse.de>
947         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
948         Reported by Sean Chen <sean.chen@turbolinux.com>.
950 2000-02-28  Andreas Jaeger  <aj@suse.de>
952         * rwlock.c: Fix typo.
954 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
956         * rwlock.c: Define __* variants of the functions and make old names
957         aliases.
958         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
959         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
961 2000-02-25  Andreas Jaeger  <aj@suse.de>
963         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
964         pwrite64, lseek64, open64, and __open64 with version 2.2.
966 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
968         * semaphore.h (SEM_FAILED): Use 0 not NULL.
970 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
972         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
973         nanosleep does not work either.  Get absolute time inside the
974         loop.
975         (pthread_cond_timedwait_relative_new): Likewise.
976         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
978 2000-02-13  Andreas Jaeger  <aj@suse.de>
980         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
981         (pthread_cond_timedwait_relative_old): Likewise.
983 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
985         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
986         but keep the code around.  A bug in the kernel prevent us from
987         using the code.
988         (pthread_cond_timedwait_relative_new): Likewise.
989         (PR libc/1597 and libc/1598).
991 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
993         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
994         loop around nanosleep calls instead of around most of the function
995         (pthread_cond_timedwait_relative_new): Likewise.
996         body.  Got rid of backwards goto and one local.
998 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
1000         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
1001         before every nanosleep call to account for time spent in the rest
1002         of the function.
1003         (pthread_cond_timedwait_relative_new): Likewise.
1004         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
1006 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
1008         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
1009         from nanosleep call so that in case we restart we only wait for the
1010         remaining time.
1011         (pthread_cond_timedwait_relative_new): Likewise.
1012         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
1014 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
1016         * manager.c (pthread_allocate_stack): Compute guard page address
1017         correctly.  Patch by HJ Lu.
1019         * sysdeps/pthread/pthread.h: Define
1020         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
1022 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
1024         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
1025         preference handling.
1026         (pthread_rwlockattr_setkind_np): Allow
1027         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
1028         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1030 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
1032         * internals.h (pthread_readlock_info): New structure.
1033         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
1034         p_untracked_readlock_count.
1035         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1036         Add initializers for new fields.
1037         * manager.c (pthread_free): Free read/write lock lists.
1038         * queue.h (queue_is_empty): New function.
1039         * rwlock.c: Implement requirements about when readers should get
1040         locks assigned.
1041         * sysdeps/pthread/pthread.h
1042         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
1043         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
1044         Define this name as well.
1045         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1047 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
1049         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1050         Adjust initializers for struct _pthread_descr_struct change.
1051         * internals.h (struct _pthread_descr_struct): Move new elements to
1052         the end.
1054 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
1056         Redesigned how cancellation unblocks a thread from internal
1057         cancellation points (sem_wait, pthread_join,
1058         pthread_cond_{wait,timedwait}).
1059         Cancellation won't eat a signal in any of these functions
1060         (*required* by POSIX and Single Unix Spec!).
1061         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
1062         simultaneous condition variable signal (not required by POSIX
1063         or Single Unix Spec, but nice).
1064         * spinlock.c: __pthread_lock queues back any received restarts
1065         that don't belong to it instead of assuming ownership of lock
1066         upon any restart; fastlock can no longer be acquired by two threads
1067         simultaneously.
1068         * restart.h: Restarts queue even on kernels that don't have
1069         queued real time signals (2.0, early 2.1), thanks to atomic counter,
1070         avoiding a rare race condition in pthread_cond_timedwait.
1072 1999-12-31  Andreas Jaeger  <aj@suse.de>
1074         * internals.h: Remove duplicate prototype declarations.
1076         * weaks.c: Remove __THROW from prototypes since the file is not
1077         compiled by a C++ compiler.
1078         * internals.h: Likewise.
1080 1999-12-30  Andreas Jaeger  <aj@suse.de>
1082         * sysdeps/pthread/pthread.h: Move internal functions to...
1083         * sysdeps/pthread/bits/libc-lock.h: ...here.
1085 1999-12-29  Andreas Jaeger  <aj@suse.de>
1087         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
1089 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
1091         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
1092         beginning.
1094         * manager.c (__pthread_start): Add one more cast to prevent
1095         warning on 64bit machines.
1097 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
1099         * manager.c (pthread_handle_create): Set p_pid of new thread
1100         before calling the callback function to report a new thread.
1102 1999-12-20  Andreas Jaeger  <aj@suse.de>
1104         * pthread.c (pthread_initialize): Move getrlimit call after
1105         setting of errno.
1107 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
1109         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1110         pwrite64, lseek64, open64, and __open64.
1111         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
1112         pwrite64, lseek64, open64, and __open64.
1114         * manager.c (pthread_allocate_stack): Correct computation of
1115         new_thread_bottom.  Correct handling of stack size and when the
1116         rlimit method to guard for stack growth is used.
1117         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
1118         minus one pagesize (not two).
1120 1999-12-03  Andreas Jaeger  <aj@suse.de>
1122         * Versions: Add __res_state with version GLIBC_2.2.
1124         * errno.c (__res_state): New function to return thread specific
1125         resolver state.
1127         * pthread.c (pthread_initialize): Initialize p_resp.
1128         (__pthread_reset_main_thread): Also set p_resp.
1130         * manager.c (pthread_handle_create): Initialize p_resp.
1132         * internals.h: Add thread specific resolver state.
1133         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
1135 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
1137         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
1138         beginning.
1139         * sysdeps/i386/i686/pt-machine.h: Likewise.
1140         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
1142 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
1144         * manager.c (pthread_start_thread_event): Initialize p_pid already
1145         here.
1147 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
1149         * internals.h: Add prototype for __pthread_manager_event.
1150         * manager.c (__pthread_manager_event): New function.
1151         (pthread_start_thread_event): Correct computation of self.
1152         Use INIT_THREAD_SELF.
1153         * pthread.c (__pthread_manager_thread): Initialize p_lock.
1154         (__pthread_initialize_manager): Respect event flags also for creation
1155         of the manager thread.
1157 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
1159         * pthread.c (__pthread_initialize_manager): Initialize
1160         __pthread_manager_thread.p_tid.
1162 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
1164         * internals.h: Declare __pthread_last_event.
1165         * manager.c: Define __pthread_last_event.
1166         (pthread_handle_create): Set __pthread_last_event.
1167         (pthread_exited): Likewise.
1168         * join.c (pthread_exit): Likewise.
1170         * Makefile (libpthread-routines): Add events.
1171         * events.c: New file.
1172         * internals.h: Protect against multiple inclusion.
1173         Include thread_dbP.h header.
1174         (struct _pthread_descr_struct): Add new fields p_report_events and
1175         p_eventbuf.
1176         Declare event reporting functions.
1177         * join.c (pthread_exit): Signal event if this is wanted.
1178         * manager.c (__pthread_threads_events): New variable.
1179         (pthread_handle_create): Take new parameters with event information.
1180         Signal TD_CREATE event if wanted.
1181         (__pthread_manager): Adjust pthread_handle_create call.
1182         (pthread_start_thread_event): New function.  Block until manager is
1183         finished and then call pthread_start_thread.
1184         (pthread_exited): Signal TD_REAP event if wanted.
1186 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
1188         * restart.h (suspend_with_cancellation): Rewrite as a macro.
1190         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
1192 1999-10-25  Andreas Jaeger  <aj@suse.de>
1194         * internals.h: Remove K&R compatibility.
1195         * no-tsd.c: Likewise.
1196         * semaphore.h: Likewise.
1197         * signals.c: Likewise.
1198         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
1199         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
1200         * weaks.c: Likewise.
1202 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
1204         * linuxthreads/pthread.c: For i386, wrap pthread_handle_sigrestart
1205         and pthread_handle_sigcancel with functions that restore
1206         %gs from the signal context.  For each signal handling function,
1207         two wrappers are required, one for a non-RT signal and one for
1208         a RT signal.
1209         * linuxthreads/signal.c: For i386, add code to restore %gs
1210         from the signal context in pthread_sighandler and
1211         pthread_sighandler_rt.
1213 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
1215         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
1217 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
1219         * pthread.c (__pthread_initial_thread): Pass argument to
1220         PTHREAD_START_ARGS_INITIALIZER.
1221         (__pthread_manager_thread): Likewise.
1223         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
1224         initialize function.
1226         * manager.c (pthread_handle_create): Remove p_startfct initialization.
1228         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
1230 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
1232         * internals.h: Correct return types for __libc_read and __libc_write.
1234 1999-10-09  Andreas Jaeger  <aj@suse.de>
1236         * internals.h: Add __new_sem_post to get prototype in
1237         manager.c; include semaphore.h for needed types.
1239 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
1241         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
1242         directly instead of calling sem_post which should not be necessary
1243         but is faster and might help in some case to work around problems.
1244         Patch by khendricks@ivey.uwo.ca [libc/1382].
1246 1999-10-08  Andreas Schwab  <schwab@suse.de>
1248         * sysdeps/pthread/Subdirs: New file.
1249         * Implies: Removed.
1251 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
1253         * Implies: New file.
1254         * internals.h (struct _pthread_descr_struct): Add p_startfct.
1255         * manager.c (pthread_handle_create): Initialize p_startfct.
1256         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
1258 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
1260         * manager.c (__linuxthreads_pthread_threads_max): New variable.
1261         * specific.c (__linuxthreads_pthread_keys_max): New variable.
1262         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
1264         * condvar.c (pthread_cond_timedwait_relative): Never return with
1265         EINTR.  Patch by Andreas Schwab.
1267 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
1269         * signals.c (sigaction): Correct last patch.  Don't select
1270         pthread_sighandler_rt based on the signal number but instead of
1271         the SA_SIGINFO flag.
1273 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
1275         * specific.c: Move definitions of struct pthread_key_struct and
1276         destr_function to ...
1277         * internals.h: ...here.
1279 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
1281         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
1282         this instead of pthread_handle_sigrestart if the signal is an RT
1283         signal.
1285         * signals.c: Handle passing through of sighandler arguments also
1286         for real-time signals.
1288 1999-09-03  Andreas Schwab  <schwab@suse.de>
1290         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
1291         fork as weak alias.
1292         (__vfork): New function, alias vfork.
1293         * Versions: Export __fork, vfork, and __vfork in libpthread.
1295 1999-08-23  Andreas Schwab  <schwab@suse.de>
1297         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
1298         call to signal handler.
1300 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
1302         * pthread.c (__pthread_reset_main_thread): Undo last change.
1303         (__pthread_kill_other_threads_np): Reset signal handlers for the
1304         signals we used in the thread implementation here.
1306 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
1308         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
1309         for the signals we used in the thread implementation [PR libc/1234].
1311         * Versions: Export __pthread_kill_other_threads_np from libpthread
1312         for GLIBC_2.1.2.
1314         * signals.c: Pass sigcontext through wrapper to the user function.
1316 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
1318         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
1319         __libc_internal_tsd_set.
1321 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1323         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
1324         needed anymore.
1326 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1328         * internals.h: Align _pthread_descr_struct to 32 bytes.
1329         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
1330         libc/1206.
1332 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
1334         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
1335         swap function.
1337 1999-07-09  Cristian Gafton  <gafton@redhat.com>
1339         * Makefile (libpthread-routines): Add oldsemaphore routine.
1340         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
1341         sem_trywait, and sem_wait to GLIBC_2.1.
1342         * oldsemaphore.c: New file.
1343         * semaphore.c: Add default_symbol_versions for the changed functions.
1344         (__new_sem_init): Rename from sem_init.
1345         (__new_sem_post): Rename from sem_post.
1346         (__new_sem_wait): Rename from sem_wait.
1347         (__new_sem_trywait): Rename from sem_trywait.
1348         (__new_sem_getvalue): Rename from sem_getvalue.
1349         (__new_sem_destroy): Rename from sem_destroy.
1351 1999-06-23  Robey Pointer  <robey@netscape.com>
1353         * internals.h: Added p_nextlock entry to separate queueing for a
1354         lock from queueing for a CV (sometimes a thread queues on a lock
1355         to serialize removing itself from a CV queue).
1356         * pthread.c: Added p_nextlock to initializers.
1357         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
1359 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
1361         * manager.c (pthread_handle_create): Free mmap region after stack
1362         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
1364 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1366         * man/pthread_cond_init.man: Correct example.
1367         Reported by Tomas Berndtsson <tomas@nocrew.org>.
1369         * linuxthreads.texi (Condition Variables): Likewise.
1371 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
1373         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
1374         casx not cas, also successful casx returns the old value in rd
1375         and not the new value.
1377 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
1379         * manager.c: If pthread_create() is given a NULL attribute
1380         and the thread manager runs with a realtime policy, set the
1381         scheduling policy of the newly created thread back to SCHED_OTHER.
1382         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
1383         initialize the schedpolicy field of new_thread->p_start_args
1384         to that of the calling thread.
1386 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
1388         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
1389         instruction does not allow memory element to use offset.
1391 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
1393         * manager.c (pthread_allocate_stack): Optimize initialization of new
1394         thread descriptor.
1396         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
1397         Don't use initializer since it is all zeroes.
1398         (__libc_once_define): Likewise.
1400 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1402         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
1403         doesn't exist anymore.
1404         * sysdeps/i386/Implies: Likewise.
1405         * sysdeps/m68k/Implies: Likewise.
1406         * sysdeps/mips/Implies: Likewise.
1407         * sysdeps/powerpc/Implies: Likewise.
1408         * sysdeps/sparc/sparc32/Implies: Likewise.
1409         * sysdeps/sparc/sparc64/Implies: Likewise.
1411 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
1413         * sysdeps/alpha/bits/semaphore.h: Removed.
1414         * sysdeps/powerpc/bits/semaphore.h: Removed.
1415         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
1416         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
1417         * Makefile (headers): Remove bits/semaphore.h.
1419         * semaphore.h: Define _pthread_descr if necessary.
1420         Don't include limits.h.  Define SEM_VALUE_MAX directly.
1421         Define SEM_FAILED.
1422         (sem_t): Protect element names with leading __.
1423         Add declarations for sem_close, sem_open, and sem_unlink.
1424         * semaphore.c: Adjust all functions for new element names.
1425         Define sem_close, sem_open, and sem_unlink.
1426         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
1427         GLIBC_2.1.1.
1428         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
1429         necessary.
1431 1999-03-16  H.J. Lu  <hjl@gnu.org>
1433         * specific.c (pthread_key_delete): Check th->p_terminated to see
1434         if the thread is running.
1436         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
1437         Added to GLIBC_2.0 for libc.so.
1439 1999-02-12  H.J. Lu  <hjl@gnu.org>
1441         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
1442         __libc_allocate_rtsig): Added to GLIBC_2.1.
1444         * internals.h (DEFAULT_SIG_RESTART): Removed.
1445         (DEFAULT_SIG_CANCEL): Removed.
1447         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
1448         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
1449         (__pthread_sig_restart, __pthread_sig_cancel,
1450         __pthread_sig_debug): Initialized.
1451         (pthread_initialize): Call init_rtsigs () to initialize
1452         real-time signals.
1454 1999-02-03  H.J. Lu  <hjl@gnu.org>
1456         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
1457         Don't restart the thread which sent REQ_DEBUG.
1458         (pthread_start_thread): Check if __pthread_sig_debug > 0
1459         before debugging.
1461         * pthread.c (__pthread_initialize_manager): Suspend ourself
1462         after sending __pthread_sig_debug to gdb instead of
1463         __pthread_sig_cancel.
1465 1999-01-24  H.J. Lu  <hjl@gnu.org>
1467         * manager.c (__pthread_manager): Delete __pthread_sig_debug
1468         from mask if __pthread_sig_debug > 0.
1469         (pthread_handle_create): Increment __pthread_handles_num.
1471         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
1472         * pthread.c (__pthread_initialize_manager): Likewise.
1474         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
1475         instead of __libc_allocate_rtsig (2).
1476         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
1477         instead of __pthread_sig_cancel.
1478         (pthread_handle_sigdebug): Fix comments.
1480 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
1482         * manager.c (pthread_allocate_stack): Set
1483         __pthread_nonstandard_stacks if user-specified stack is used.
1485 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
1487         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
1488         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
1490 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
1492         * pthread.c: Use a third signal __pthread_sig_debug distinct
1493         from __pthread_sig_cancel to notify gdb when a thread is
1494         created
1495         * manager.c: Likewise.
1496         * internals.h: Likewise.
1497         * signals.c: The implementation of sigwait(s) assumed that
1498         all signals in s have signal handlers already attached.
1499         This is not required by the standard, so make it work
1500         also if some of the signals have no handlers.
1502 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
1504         * linuxthreads.texi: Remove pointers from first @node.  Move old
1505         @node spec inside comment.
1507 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
1509         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
1510         _IO_lock_unlock.
1512 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
1514         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
1515         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
1517 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
1519         * manager.c: Threads now send __pthread_sig_cancel on termination.
1520         Change clone call and signal masks.
1521         * thread.c (pthread_handle_sigrestart): Remove special code for
1522         manager.
1523         (pthread_handle_sigcancel): In manager thread call
1524         __pthread_manager_sighandler.
1525         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
1526         * sysdeps/i386/i686/pt-machine.h: Likewise.
1527         Patches by Xavier Leroy.
1529 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
1531         * spinlock.c (__pthread_unlock): Don't crash if called for an
1532         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
1534         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
1535         overall runtime.
1537 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
1539         * Examples/ex3.c: Wait until all threads are started before
1540         searching for the number to avoid race condition on very fast
1541         systems.
1543 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1545         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
1546         declaration since it's not needed.
1548         * sysdeps/pthread/pthread.h: Move internal functions to ...
1549         * internals.h: ...here.
1551 1998-12-02  H.J. Lu  <hjl@gnu.org>
1553         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
1554         SIGRTMIN is defined.
1555         (__pthread_sig_cancel): Likewise.
1557 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1559         * wrapsyscall.c: Include <sys/mman.h> for msync,
1560         <stdlib.h> for system and <termios.h> for tcdrain prototype.
1561         Correct msync declaration.
1563 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
1565         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
1566         __libc_tsd_set): New macros for new interface.
1567         * no-tsd.c: New file, provide uninitialized defns of
1568         __libc_internal_tsd_get and __libc_internal_tsd_set.
1569         * Makefile (routines): Add no-tsd.
1571 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
1573         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
1574         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1575         __libc_internal_tsd_set): Move decls to ...
1576         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
1577         declarations.
1579         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1580         __libc_internal_tsd_set): Make these pointers to functions, not
1581         functions; remove #pragma weak decls for them.
1582         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
1583         Define static functions and initialized pointers to them.
1585 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
1587         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
1588         (CFLAGS-specific.c): Likewise.
1589         (CFLAGS-pthread.c): Likewise.
1590         (CFLAGS-ptfork.c): Likewise.
1591         (CFLAGS-cancel.c): Likewise.
1592         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
1593         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
1595         * mutex.c (pthread_mutex_init): Define as strong symbol.
1596         (pthread_mutex_destroy): Likewise.
1597         (pthread_mutex_trylock): Likewise.
1598         (pthread_mutex_lock): Likewise.
1599         (pthread_mutex_unlock): Likewise.
1600         (pthread_mutexattr_init): Likewise.
1601         (pthread_mutexattr_destroy): Likewise.
1602         (pthread_once): Likewise.
1603         * ptfork.c (pthread_atfork): Likewise.
1604         * specific.c (pthread_key_create): Likewise.
1605         (pthread_setspecific): Likewise.
1606         (pthread_getspecific): Likewise.
1608 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
1610         * linuxthreads.texi: Fix punctuation after xref.
1612 1998-11-10  H.J. Lu  <hjl@gnu.org>
1614         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
1615         if it is defined in <linux/limits.h>.
1617 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
1619         * spinlock.h (__pthread_trylock): Define inline.
1620         (__pthread_lock): Add extra parameter to declaration.  Declare
1621         using internal_function.
1622         (__pthread_unlock): Declare using internal_function.
1623         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
1624         of local variable self.  Avoid recomputing self.  Define using
1625         internal_function.
1626         (__pthread_trylock): Remove.
1627         (__pthread_unlock): Define using internal_function.
1628         * cancel.c: Adjust for __pthread_lock interface change.  Use already
1629         computed self value is possible.
1630         * condvar.c: Likewise.
1631         * join.c: Likewise.
1632         * manager.c: Likewise.
1633         * mutex.c: Likewise.
1634         * pthread.c: Likewise.
1635         * rwlock.c: Likewise.
1636         * semaphore.c: Likewise.
1637         * signals.c: Likewise.
1639 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
1641         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
1642         __ to field names of the struct.
1643         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
1644         Likewise.
1645         (pthread_attr_t): Likewise.
1646         (pthread_cond_t): Likewise.
1647         (pthread_condattr_t): Likewise.
1648         (pthread_mutex_t): Likewise.
1649         (pthread_mutexattr_t): Likewise.
1650         (pthread_rwlock_t): Likewise.
1651         (pthread_rwlockattr_t): Likewise.
1652         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
1653         * cancel.c: Likewise.
1654         * condvar.c: Likewise.
1655         * manager.c: Likewise.
1656         * mutex.c: Likewise.
1657         * pthread.c: Likewise.
1658         * ptlongjmp.c: Likewise.
1659         * rwlock.c: Likewise.
1660         * spinlock.c: Likewise.
1662 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
1664         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
1665         also with PT_EI.
1667         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
1668         definitions.
1670         * Makefile (libpthread-routines): Add pt-machine.
1671         * pt-machine.c: New file.
1672         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
1673         yet defined.  Use PT_EI in extern inline definitions.
1674         * sysdeps/arm/pt-machine.h: Likewise.
1675         * sysdeps/i386/pt-machine.h: Likewise.
1676         * sysdeps/i386/i686/pt-machine.h: Likewise.
1677         * sysdeps/m68k/pt-machine.h: Likewise.
1678         * sysdeps/mips/pt-machine.h: Likewise.
1679         * sysdeps/powerpc/pt-machine.h: Likewise.
1680         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1681         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1683 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1685         * semaphore.h: Include <sys/types.h> so that _pthread_descr
1686         is declared.
1688 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
1690         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
1691         argument.
1692         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
1694 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
1696         * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
1697         multiple inclusion guard.
1699 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1701         * signals.c (sigaction): Check that sig is less than NSIG to avoid
1702         array index overflow.
1704 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
1706         * sysdeps/pthread/semaphore.h: New file.
1708 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
1710         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
1711         _LIBC_TSD_KEY_DL_ERROR.
1713 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
1715         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
1716         * sysdeps/i386/pt-machine.h: Likewise.
1717         Suggested by Roland McGrath.
1719 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
1721         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
1722         access thread data with non-constant offsets.
1723         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
1724         necessary.
1726         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
1727         THREAD_SETMEM_NC definitions.
1729         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
1730         THREAD_SETMEM_NC.
1731         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1733 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
1735         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
1736         not already defined.
1737         (struct _pthread_descr_struct): Add p_self and p_nr field.
1738         * manager.c (__pthread_handles): Define second element to point
1739         to manager thread.
1740         (__pthread_handles_num): Initialize to 2.
1741         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
1742         (pthread_start_thread): Likewise.
1743         (pthread_handle_create): Start search for free slot at entry 2.
1744         Initialize new fields p_self and p_nr.
1745         Call __clone with CLONE_PTRACE if available.
1746         (pthread_free): Call FREE_THREAD_SELF if available.
1747         * pthread.c (__pthread_initial_thread): Initialize new fields.
1748         (__pthread_manager_thread): Likewise.
1749         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
1751         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
1752         elements of the thread descriptor.
1753         * condvar.c: Likewise.
1754         * errno.c: Likewise.
1755         * join.c: Likewise.
1756         * manager.c: Likewise.
1757         * pthread.c: Likewise.
1758         * ptlongjmp.c: Likewise.
1759         * semaphore.c: Likewise.
1760         * signals.c: Likewise.
1761         * specific.c: Likewise.
1762         * spinlock.c: Likewise.
1764         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
1766         * sysdeps/i386/useldt.h: New file.
1767         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
1769         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
1770         THREAD_SETMEM using __thread_self.
1771         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1773 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
1775         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
1776         turned out that we didn't need to queue after all.
1778 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
1780         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
1781         and wastes space; correct types.
1783 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
1785         * signals.c (sigaction): Handle NULL argument.
1787 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
1789         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
1790         of sigset_t.
1792 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1794         * Makefile (linuxthreads-version): Extract correct number from
1795         Banner.
1797 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
1799         * Banner: Bump version number to 0.8
1800         * FAQ.html: Many updates, in particular w.r.t. debugging.
1801         * manager.c: Support for non-default stacksize for
1802         LinuxThreads-allocated stacks;
1803         don't use guard pages for stacks with default size, rely on
1804         rlimit(RLIMIT_STACK) instead (it's cheaper).
1805         * attr.c: Likewise.
1806         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
1807         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
1808         * condvar.c: Likewise.
1809         * internals.h: Likewise.
1810         * restart.h: Likewise.
1811         * signals.c: Likewise.
1812         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
1814 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1816         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
1817         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
1818         * Versions: Put __pthread_mutexattr_settype under version
1819         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
1820         __pthread_mutexattr_gettype.
1822 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1824         * sysdeps/pthread/bits/libc-lock.h: Make
1825         __pthread_mutexattr_settype weak.  Don't make
1826         __pthread_mutexattr_setkind_np weak.
1828 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
1830         * manager.c (pthread_handle_create): Check whether sched_setscheduler
1831         call can succeed here.
1833         * mutex.c: Define __pthread_mutexattr_settype and make
1834         __pthread_mutexattr_setkind_np an alias.
1835         Likewise for __pthread_mutexattr_gettype.
1837 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
1839         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
1840         is root.
1842 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
1844         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
1846 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1848         * Examples/ex6.c: Include <unistd.h> for usleep.
1850 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1852         * Examples/ex4.c (main): Use exit, not pthread_exit.
1854 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
1856         * Versions: Add __pthread_mutexattr_gettype and
1857         __pthread_mutexattr_settype.
1858         * lockfile.c: Use __pthread_mutexattr_settype instead of
1859         __pthread_mutexattr_setkind_np.
1860         * mutex.c: Define __pthread_mutexattr_gettype and
1861         __pthread_mutexattr_settype.
1862         * weak.c: Likewise.
1863         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
1864         __pthread_mutexattr_settype.
1865         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
1866         Use __pthread_mutexattr_settype.
1868 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
1870         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
1871         * mutex.c: Define weak alias pthread_mutexattr_gettype and
1872         pthread_mutexattr_settype.
1873         * sysdeps/pthread/pthread.h: Declare these functions.
1874         Move pthread_sigmask and pthread_kill declaration in separate header.
1875         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
1877 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
1879         * Makefile: Add rules to compile and run tests.
1880         * Examples/ex1.c: Little changes to fix warnings.
1881         * Examples/ex2.c: Likewise.
1882         * Examples/ex3.c: Likewise.
1883         * Examples/ex4.c: Likewise.
1884         * Examples/ex5.c: Likewise.
1885         * Examples/ex6.c: New file.
1887 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
1889         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
1891 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1893         * attr.c: Include <string.h>.
1895 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
1897         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
1898         * internals.h: Include limits.h.
1899         * manager.c: Use memcpy to copy sched_param.
1900         * ptfork.c: Include errno.h.
1901         * pthread.c: Likewise.
1902         * semaphore.c: Likewise.
1903         * specific.c: Likewise.
1904         * spinlock.h: Likewise.
1905         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
1906         type definition to ...
1907         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
1909 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
1911         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
1913         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
1914         as macros as demanded in POSIX.1, Annex C.
1916 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
1918         * internals.h (struct pthread_request): For free use pthread_t
1919         instead of pthread_descr.
1920         * join.c (pthread_join): Pass thread_id, not th to manager.
1921         (pthread_detach): Likewise.
1922         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
1923         (pthread_exited): Remove detached queue code.
1924         (pthread_handle_free): Expect thread ID parameter and use it to
1925         validate the thread decsriptor.  Don't use detached queue.
1926         Patches by Xavier Leroy.
1928 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1930         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
1931         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
1932         __pthread_atfork, __pthread_key_create, __pthread_once.
1933         * internals.h: Doc fix.
1934         * pthread.c (__pthread_initialize): Define again.
1936 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
1938         * manager.c (pthread_exited): If thread is not detached put it on
1939         special list.
1940         (pthread_handle_free): If thread is not on list with living threads
1941         search on list with detached threads.
1943         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
1944         for new definition of pthread_rwlock_t.
1946         * spinlock.c: Correct test whether to compile
1947         __pthread_compare_and_swap or not.
1949 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
1951         * attr.c: Finish user stack support.  Change locking code to be safe
1952         in situations with different priorities.
1953         * cancel.c: Likewise.
1954         * condvar.c: Likewise.
1955         * internals.h: Likewise.
1956         * join.c: Likewise.
1957         * manager.c: Likewise.
1958         * mutex.c: Likewise.
1959         * pthread.c: Likewise.
1960         * ptlongjmp.c: Likewise.
1961         * queue.h: Likewise.
1962         * rwlock.c: Likewise.
1963         * semaphore.c: Likewise.
1964         * semaphore.h: Likewise.
1965         * signals.c: Likewise.
1966         * spinlock.c: Likewise.
1967         * spinlock.h: Likewise.
1968         * sysdeps/pthread/pthread.h: Likewise.
1969         Patches by Xavier Leroy.
1971         * sysdeps/i386/i686/pt-machine.h: New file.
1973 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
1975         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
1976         [sg]et_stackaddr prototypes always available.
1978         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1979         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
1981 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
1983         * manager.c (pthread_free): Undo patch from 980430.
1984         Reported by David Wragg <dpw@doc.ic.ac.uk>.
1986 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
1988         * manager.c: Define __pthread_manager_adjust_prio and use it to
1989         increase priority when needed.
1990         * internals.h: Add prototype for __pthread_manager_adjust_prio.
1991         * mutex.c: Optimize mutexes to wake up only one thread.
1992         * pthread.c: Move PID of manager for global variable in structure
1993         element.
1994         Patches by Xavier Leroy.
1996 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
1998         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
2000 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2002         * attr.c: Correct typo.
2004 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
2006         * manager.c (pthread_free): Unmap guard before the stack.
2007         Patch by Matthias Urlichs.
2009 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
2011         * manager.c (pthread_free): Detect already free child.
2012         Patch by Xavier Leroy, reported by Matthias Urlichs.
2014 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2016         * Makefile (linuxthreads-version): Renamed back from
2017         libpthread-version.
2019 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
2021         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
2022         __libc_longjmp.
2024 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
2026         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
2027         * internals.h: Add definitions for new spinlock implementation.
2028         * ptlongjmp.c: New file.
2029         * spinlock.c: New file.
2030         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
2031         new function __pthread_acquire to prevent deadlocks with thread
2032         with different priorities.
2033         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
2035 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2037         * manager.c (__pthread_manager): Reduce first argument to select
2038         to include just the needed file descriptor.
2040 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
2042         * manager.c: Fix last patch which caused core dumps.
2044         * pthread.c: Correctly handle missing SIGRTMIN.
2046 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2048         * libpthread.map: Add __libc_internal_tsd_get and
2049         __libc_internal_tsd_set.  Add missing cancelable functions. Export
2050         libc internal versions of the cancelable functions.
2052 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
2054         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
2056 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
2058         * attr.c: Implement pthread_attr_[gs]etguardsize,
2059         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
2060         Change pthread_attr_init to have two interfaces.
2061         * internals.h (struct _pthread_descr_struct): Add new fields for
2062         above functions.
2063         * libpthread.map: Add names in GLIBC_2.1 section.
2064         * manager.c (pthread_handle_create): Implement guardsize and
2065         user stack.
2066         (pthread_free): Likewise.
2067         * pthread.c (pthread_create): Add new interface for changed
2068         pthread_attr_t.
2069         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2070         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
2071         PTHREAD_STACK_MIN.
2073 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
2075         * manager.c: Enable resetting of the thread scheduling policy
2076         to SCHED_OTHER when the parent thread has a different one.
2078 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
2080         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2081         _POSIX_ASYNCHRONOUS_IO.
2083         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
2084         mutexes.
2085         * mutex.c: Implement new mutex types.
2087         * internals.h: Include <signal.h>.
2089         * libpthread.map: Add __erno_location and __h_errno_location.
2091         * errno.c: Return pointer to variable actually in use.  This might
2092         not be the one in the thread structure.
2093         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
2094         and p_h_errnop.
2095         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
2096         of manager thread structure.
2097         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
2098         thread.
2099         * pthread.c: Adapt initializer for thread structures.
2100         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
2101         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
2102         current thread to global variables.
2104 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
2106         * rwlock.c: New file.
2107         * Makefile (libpthread-routines): Add rwlock.
2108         * sysdeps/pthread/pthread.h: Define data structures and declare
2109         functions.
2110         * libpthread.map: Add new functions.
2112 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
2114         * sysdeps/arm/pt-machine.h: New file; add ARM support.
2115         * sysdeps/arm/Implies: likewise.
2116         * README: Document it.
2118 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2120         * signals.c: Remove unneeded initializer for sigwaited, saving a
2121         warning.
2123 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2125         * semaphore.c (sem_init): Set sem_spinlock only if available.
2127 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
2129         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
2130         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
2132         * Makefile: Update from LinuxThreads 0.7.
2133         * internals.h. Likewise.
2134         * manager.c: Likewise.
2135         * mutex.c: Likewise.
2136         * pthread.c: Likewise.
2137         * signals.c: Likewise.
2138         * specific.c: Likewise.
2139         * Examples/ex3.c: Likewise.
2141 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
2143         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
2144         open.
2146 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
2148         * wrapsyscall.c: Add socket functions which are also cancelation
2149         points.
2151 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
2153         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
2154         New functions for fast thread specific data within libc.
2156         * internals.h: Add new array p_libc_specific to struct
2157         _pthread_descr_struct.
2159         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
2161 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
2163         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
2164         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
2166 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
2168         * internals.h (struct _pthread_descr_struct): Add definitions for
2169         two-level specific key handling.
2170         * manager.c (pthread_handle_create): Initialize specific memory array.
2171         * specific.c: Implement two-level key handling.
2172         * weaks.c: Don't provide dummy key handling.
2173         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
2174         Add definition of __libc_key_t.
2175         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
2176         as 1024.
2177         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
2178         PTHREAD_DESTRUCTOR_ITERATIONS.
2180         * manager.c (pthread_handle_create): Compare mmap result with
2181         MAP_FAILED.
2183         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
2184         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
2186 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
2188         sysdeps/sparc -> sysdeps/sparc/sparc32
2189         sysdeps/sparc64 -> sysdeps/sparc/sparc64
2191         * internals.h: Change definition of THREAD_SELF to be an expression,
2192         not a statement that did a return.
2193         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
2194         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
2195         Follow Solaris and use a "system reserved" register (%g6) to hold
2196         the thread descriptor.
2197         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2199 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
2201         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
2202         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
2203         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
2205         * semaphore.c: Include spinlock.h only when needed.
2207         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
2208         keys for entries not in use.
2210         * weaks.c: Implement key handling functions for real.
2212 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
2214         Initial sparc64-linux support:
2215         * linuxthreads/sysdeps/sparc64/Implies: New file.
2216         * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
2218 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
2220         * semaphore.c: Include spinlock.h at correct place.
2221         Patch by HJ Lu.
2223 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
2225         The Great Bit File Move:
2226         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
2227         * sysdeps/powerpc/semaphorebits.h: Likewise.
2228         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
2229         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
2230         * sysdeps/pthread/libc-lock.h: -> bits/
2231         * sysdeps/pthread/stdio-lock.h: Likewise.
2232         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
2233         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
2234         * semaphore.h: Likewise.
2235         * sysdeps/pthread/pthread.h: Likewise.
2237         * lockfile.c: <foo.h> -> <bits/foo.h>.
2238         * semaphore.h: Likewise.
2240         * Makefile: (headers): foo.h -> bits/foo.h.
2241         * sysdeps/pthread/Makefile: Likewise.
2243 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2245         * semaphore.c (sem_init): Set sem_spinlock only if available.
2247         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
2248         asm constraints.
2250 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
2252         Update from LinuxThreads 0.6.
2254         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
2255         and __sched_get_priority_min instead of names without `__'.
2257         * manager.c: Rewrite large parts to implement opaque pthread_t.
2259         * cancel.c: Adapt for opaque pthread_t type.
2260         * condvar.c: Likewise.
2261         * errno.c: Likewise.
2262         * join.c: Likewise.
2263         * mutex.c: Likewise.
2264         * pthread.c: Likewise.
2265         * signals.c: Likewise.
2266         * specific.c: Likewise.
2267         * restart.h: Likewise.
2268         * queue.h: Likewise.
2269         * Examples/ex3.c: Likewise.
2270         * Examples/ex4.c: Likewise.
2271         * sysdeps/pthread/pthread.h: Likewise.
2273         * pthread.c: Accumulate time for all threads in thread manager.
2275         * semaphore.c: Implement fallback implementation for architectures
2276         sometimes missing compare-exchange operations.
2278         * cancel.c (pthread_cancel): Validate handle argument.
2279         * join.c (pthread_join): Likewise.
2280         (pthread_detach): Likewise.
2281         * signals.c (pthread_kill): Likewise.
2283         * spinlock.h (acquire): Use __sched_yield not sched_yield.
2285         * queue.h (enqueue): Enqueue thread according to priority.
2287         * internals.c (struct pthread_start_args): New struct for passing
2288         args to cloning function.
2289         (struct _pthread): Rename to _pthread_descr_struct and adapt for
2290         opaque pthread_t.
2292         * Examples/Makefile (clean): Pass -f option to rm.
2294         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
2295         and define TEST_FOR_COMPARE_AND_SWAP.
2296         * sysdeps/i386/i486/pt-machine.h: Removed.
2298         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
2299         to 1024.
2301 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
2303         * restart.h (suspend): Clear p_signal before suspending.
2304         (suspend_with_cancellation): Likewise.
2305         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
2307         * weaks.c: Make __pthread_key_create return 1.
2308         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
2309         __libc_getspecific, __libc_setspecific, and __libc_key_t.
2310         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
2311         using libio.
2313 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
2315         * sysdeps/sparc/pt-machine (RELEASE): Fix.
2317 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
2319         * sysdeps/powerpc/Implies: Added.
2320         * sysdeps/powerpc/pt-machine.h: Added.
2321         * sysdeps/powerpc/semaphorebits.h: Added.
2323 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
2325         * linuxtheads/pthread.c (__pthread_initial_thread): Correct
2326         initializer.
2327         (__pthread_manager_thread): Likewise.
2328         Reported by Andreas Jaeger.
2330 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
2332         Since sigset_t no longer fits in a register, we can't pass in the
2333         thread's initial mask so easily.  Take this opportunity to simplify
2334         the clone implementation by only accepting a single void* argument.
2336         * linuxthreads/manager.c (__pthread_manager): Put thread vitals
2337         in the thread struct instead of as arguments through clone.
2338         (pthread_start_thread): Look for them there.
2339         * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
2340         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
2341         * linuxthreads/pthread.c (pthread_initialize_manager): Revise
2342         clone invocation.