Update.
[glibc.git] / linuxthreads / ChangeLog
blob2125fee40108afb17a33ce78e90fdba7868ad631
1 2001-11-15  Ulrich Drepper  <drepper@redhat.com>
3         * sysdeps/i386/i686/Implies: Removed.
4         * sysdeps/i386/i686/Versions: New file.
6 2001-10-31  Andreas Jaeger  <aj@suse.de>
8         * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
10 2001-10-05  Kevin Buettner  <kevinb@cygnus.com>
12         * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
13         to __linuxthreads_pthread_sizeof_descr to match name used by
14         symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
15         linuxthreads_db/td_symbol_list.c.
17 2001-09-22  Andreas Jaeger  <aj@suse.de>
19         * linuxthreads/tst-context.c: Avoid compile warning.
21 2001-09-20  Andreas Jaeger  <aj@suse.de>
23         * shlib-versions: Add x86-64.
25 2001-09-19  Andreas Jaeger  <aj@suse.de>
27         * sysdeps/x86_64/Makefile: New file.
28         * sysdeps/x86_64/pspinlock.c: New file.
29         * sysdeps/x86_64/pt-machine.h: New file.
31 2001-09-12  Jakub Jelinek  <jakub@redhat.com>
33         * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
34         for SIGEV_NONE.
35         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
37 2001-09-11  Ulrich Drepper  <drepper@redhat.com>
38             Wolfram Gloger <wg@malloc.de>
40         * join.c: Protect all communications from and to manager with
41         TEMP_FAILURE_RETRY.
42         * manager.c: Likewise.
43         * pthread.c: Likewise.
44         * smeaphore.c: Likewise.
46 2001-08-29  Ulrich Drepper  <drepper@redhat.com>
48         * spinlock.c (__pthread_lock): Top max_count value with
49         MAX_ADAPTIVE_SPIN_COUNT.
50         * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
52         * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
53         help P4.
55 2001-08-27  Jakub Jelinek  <jakub@redhat.com>
57         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
58         non-opaque type if __USE_UNIX98.
60 2001-08-26  Jakub Jelinek  <jakub@redhat.com>
62         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
63         non-opaque lock types also if _IO_MTSAFE_IO is defined.
65 2001-08-23  Roland McGrath  <roland@frob.com>
67         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
68         new first argument, skip the cleanup handler if it's zero.
69         (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
70         (__libc_lock_define_initialized_recursive): Use it.
71         * sysdeps/pthread/bits/stdio-lock.h: File removed.
72         The sysdeps/generic file from the main tree now suffices.
74 2001-08-22  Roland McGrath  <roland@frob.com>
76         * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
77         instead of <pthread.h>.
78         (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
79         (_IO_lock_initializer): Add braces.
80         (_IO_lock_lock): Use __libc_lock_lock_recursive.
81         (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
83         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
84         (__libc_lock_define_initialized_recursive): Use it.
85         (__libc_lock_init_recursive): Likewise.
86         (__libc_lock_fini_recursive): Likewise.
87         (__libc_lock_lock_recursive): Likewise.
88         (__libc_lock_trylock_recursive): Likewise.
89         (__libc_lock_unlock_recursive): Likewise.
90         (__libc_lock_define_recursive): New macro.
92 2001-08-14  Jakub Jelinek  <jakub@redhat.com>
94         * lockfile.c (__pthread_provide_lockfile): New variable.
95         * pthread.c (__pthread_require_lockfile): New variable.
96         * cancel.c (__pthread_require_lockfile): New variable.
98 2001-07-31  Ulrich Drepper  <drepper@redhat.com>
100         * tst-context.c (threadfct): Initialize context before calling
101         makecontext.
103         * Examples/ex17.c: Make sure test thread is around long enough.
105 2001-07-26  kaz Kojima  <kkojima@rr.iij4u.or.jp>
107         * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
109 2001-07-24  Ulrich Drepper  <drepper@redhat.com>
111         * tst-context.c (main): Print explanation before bailing out
112         because context handling is not supported.
114 2001-07-23  Ulrich Drepper  <drepper@redhat.com>
116         * Makefile (tests): Add tst-context.
117         * tst-context.c: New file.
119         * sysdeps/pthread/bits/stdio-lock.h: Define
120         _IO_cleanup_region_start_noarg.
122 2001-07-23  Jakub Jelinek  <jakub@redhat.com>
124         * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
125         (ARCH_STACK_MAX_SIZE): Define.
126         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
127         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
129 2001-07-19  Jakub Jelinek  <jakub@redhat.com>
131         * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
133         * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
134         (ARCH_STACK_MAX_SIZE): Define.
135         * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
136         NEED_SEPARATE_REGISTER_STACK.
138 2001-07-16  Andreas Schwab  <schwab@suse.de>
140         * Makefile (before-compile): Don't add $(objpfx)crti.o.
141         (omit-deps): Add crti.
142         ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
143         it is filtered out of the link command.
145 2001-07-16  Ulrich Drepper  <drepper@redhat.com>
147         * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
148         to find the right value for __pthread_initial_thread_bos, it's not
149         used.  If not FLOATING_STACKS first run
150         __pthread_init_max_stacksize.
152 2001-06-16  H.J. Lu  <hjl@gnu.org>
154         * internals.h: Include <stackinfo.h>.
156         * attr.c: Don't include <stackinfo.h> here.
157         * cancel.c: Likewise.
158         * manager.c: Likewise.
159         * pthread.c: Likewise.
160         * ptlongjmp.c: Likewise.
162 2001-03-23  Matthew Wilcox  <willy@ldl.fc.hp.com>
164         * attr.c: Make _STACK_GROWS_UP work.
165         * internals.h: Likewise.
166         * manager.c: Likewise.
167         * pthread.c: Likewise.
169 2001-06-15  H.J. Lu  <hjl@gnu.org>
171         * pthread.c (__pthread_reset_main_thread): Fix a typo.
173 2001-02-02  John S. Marvin  <jsm@udlkern.fc.hp.com>
175         * semaphore.h: Use struct _pthread_fastlock as an element of
176         sem_t instead of an identical struct.
177         * rwlock.c: Remove casts.
178         * semaphore.c: Likewise.
180 2001-04-30  Alan Modra  <amodra@one.net.au>
182         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
184 2001-05-25  Bruce Mitchener  <bruce@cubik.org>
186         * linuxthreads.texi: Spelling corrections.
188 2001-05-25  Ulrich Drepper  <drepper@redhat.com>
190         * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
191         returning successfully.
192         Patch by Gene Cooperman <gene@ccs.neu.edu>.
194 2001-05-24  Ulrich Drepper  <drepper@redhat.com>
196         * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
197         serious work try once whether the lock is uncontested.
198         Remove duplicate reading of __status before loop.
199         Change suggested by Hans Boehm <hans_boehm@hp.com>.
201         * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
202         (__pthread_alt_trylock): Likewise.
204 2001-05-01  Kaz Kylheku  <kaz@ashi.footprints.net>
206         Memory barrier overhaul following line by line inspection.
207         * mutex.c (pthread_once): Missing memory barriers added.
208         * pthread.c (__pthread_wait_for_restart_signal,
209         __pthread_timedsuspend_new, __pthread_restart_new): Added
210         memory barriers ``just in case'' and for documentary value.
211         * spinlock.c (__pthread_release): New inline function for releasing
212         spinlock, to complement __pthread_acquire.  Includes memory
213         barrier prior to assignment to spinlock, and __asm __volatile
214         dance to prevent reordering or optimization of the spinlock access.
215         * spinlock.c (__pthread_unlock, __pthread_alt_lock,
216         __pthread_alt_timedlock, __pthread_alt_unlock,
217         __pthread_compare_and_swap): Updated to use new __pthread_release
218         instead of updating spinlock directly.
219         * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
220         wait_node_free, wait_node_dequeue, __pthread_alt_lock,
221         __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
222         Memory barrier overhaul.  Lots of missing memory barriers added,
223         a couple needless ones removed.
224         * spinlock.c (__pthread_compare_and_swap): testandset optimization
225         removed, just calls __pthread_acquire, which has the new read
226         barrier in it before its testandset.
228 2001-05-20  Roland McGrath  <roland@frob.com>
230         * Makeconfig: New file, variables used to be in main libc Makeconfig.
232 2001-05-09  Geoff Keating  <geoffk@redhat.com>
234         * sysdeps/powerpc/pt-machine.h
235         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
236         (__compare_and_swap): Remove memory barriers.
237         (__compare_and_swap_with_release_semantics): New function.
239 2001-04-24  Andreas Jaeger  <aj@suse.de>
241         * wrapsyscall.c: send* and recv* return ssize_t.
243         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
244         mutex instead of double locking it.
245         Reported by Pierre Artaud <partaud@sodatec.com>.
247 2001-04-23  Ulrich Drepper  <drepper@redhat.com>
249         * sysdeps/pthread/getcpuclockid.c: Make function generic, test
250         using #ifdef whether the clock is available.
251         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
253         * sysdeps/ia64/Versions: New file.
255         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
256         have to call __gmon_start__ in the libpthread DSO.
257         * sysdeps/pthread/pt-initfini.c (_init): Likewise.
259         * Makefile (libpthread-routines): Add ptclock_gettime and
260         ptclock_settime.
261         * internals.h: Don't use cpuclock-init.h definitions, use
262         hp-timing.h definitions.
263         * pthread.c: Likewise.
264         * manager.c: Likewise.
265         * ptclock_gettime.c: New file.
266         * ptclock_settime.c: New file.
267         * internals.h: Fix parameter type for __pthread_clock_gettime and
268         __pthread_clock_settime.
270         * sysdeps/i386/i586/ptclock_gettime.c: Removed.
271         * sysdeps/i386/i586/ptclock_settime.c: Removed.
272         * sysdeps/i386/i586/Makefile: Removed.
274 2001-04-22  Ulrich Drepper  <drepper@redhat.com>
276         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
277         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
279 2001-04-21  Andreas Jaeger  <aj@suse.de>
281         * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
282         attribute, remove statements that will never be executed.
283         (thread_func): Remove mutex_unlock call since it's never executed.
284         (thread_func): Fix comment as suggested by Jakub Jelinek.
286         * manager.c (__pthread_manager): Add noreturn
287         attribute.
288         (pthread_start_thread): Likewise, remove return statement.
289         (pthread_start_thread_event): Likewise.
290         Add noreturn attribute for pthread_handle_exit.
291         * weaks.c: Add noreturn attribute for pthread_exit.
293         * internals.h: Add __pthread_clock_gettime and
294         __pthread_clock_settime prototypes.
296 2001-04-21  Ulrich Drepper  <drepper@redhat.com>
298         * internals.h: Include <cpuclock-init.h>.
299         (struct _pthread_descr_struct): Add p_cpuclock_offset field if
300         CPUCLOCK_VARDEF is defined.
301         * pthread.c (__pthread_initialize_minimal): Initialize
302         p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
303         * manager.c (pthread_start_thread): Set p_cpuclock_offset field
304         for new thread to current CPU clock value.
306         * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
308         * sysdeps/i386/i586/Makefile: New file.
309         * sysdeps/i386/i586/Versions: New file.
310         * sysdeps/i386/i586/ptclock_gettime.c: New file.
311         * sysdeps/i386/i586/ptclock_settime.c: New file.
312         * sysdeps/i386/i686/Implies: New file.
314 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
316         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
317         $generated, not $postclean-generated.
319 2001-04-18  Andreas Jaeger  <aj@suse.de>
321         * Makefile (otherlibs): Added.
323 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
325         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
327 2001-04-16  Ulrich Drepper  <drepper@redhat.com>
329         * signals.c (sigwait): NSIG is no signal number.  Block all
330         signals while in signal handler for signals in SET.
331         Patch by Manfred Spraul <manfred@colorfullife.com>.
333 2001-04-12  Ulrich Drepper  <drepper@redhat.com>
335         * tst-cancel.c: Disable most tests.  Add new test where all
336         cleanup handlers must run.
337         * Makefile (tests): Add tst-cancel again.
339         * cancel.c (__pthread_perform_cleanup): Correct condition for
340         leaving cleanup loop early.
342         * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
343         all the files which use CURRENT_STACK_FRAME.
344         * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
345         __builtin_frame_address.
346         * sysdeps/i386/i686/pt-machine.h: Likewise.
348 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
350         * Makefile (tests): Comment out tst-cancel for now.
352         * tst-cancel.c (main): Cleanup 4 is supposed to run.  Create
353         temporary file in object directory.
354         * Makefile: Don't allow inlining when compiling tst-cancel.c.
355         Pass $(objpfx) to tst-cancel.
357 2001-04-11  David S. Miller  <davem@redhat.com>
359         * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
360         up closer to user local variables so that new cleanup heuristics work.
361         * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
363 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
365         * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
366         and remove it.
367         (_pthread_cleanup_push_defer): Likewise.
369         * tst-cancel.c (main): Fix loop printing cleanup output.
371 2001-04-10  kaz Kojima  <kkojima@rr.iij4u.or.jp>
373         * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
374         test.
375         (__pthread_spin_trylock): Likewise.
376         * sysdeps/sh/pt-machine.h (testandset): Likewise.
378 2001-04-10  Ulrich Drepper  <drepper@redhat.com>
380         * join.c (pthread_exit): Move code to new function __pthread_do_exit
381         which takes an extra parameter with the current frame pointer.
382         Call new function with CURRENT_STACK_FRAME.
383         (__pthread_do_exit): New function.  Call __pthread_perform_cleanup
384         with the new parameter.
385         (pthread_join): Call __pthread_do_exit instead of pthread_exit.
386         * cancel.c (__pthread_perform_cleanup): Takes extra parameter.  Use
387         this parameter as the initial value the cleanup handler records are
388         compared against.  No active cleanup handler record must have an
389         address lower than the previous one and the initial record must be
390         above (below on PA) the frame address passed in.
391         (pthread_setcancelstate): Call __pthread_do_exit instead of
392         pthread_exit.
393         (pthread_setcanceltype): Likewise.
394         (pthread_testcancel): Likewise.
395         (_pthread_cleanup_pop_restore): Likewise.
396         * condvar.c (pthread_cond_wait): Likewise.
397         (pthread_cond_timedwait_relative): Likewise.
398         * manager.c (pthread_start_thread): Likewise.
399         * oldsemaphore.c (__old_sem_wait): Likewise.
400         * pthread.c (pthread_handle_sigcancel): Likewise.
401         * semaphore.c (__new_sem_wait): Likewise.
402         (sem_timedwait): Likewise.
403         * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
404         to limit the cleanup handlers which get run.
405         * internals.h: Add prototype for __pthread_do_exit.  Adjust prototype
406         for __pthread_perform_cleanup.
408         * Makefile (tests): Add tst-cancel.
409         * tst-cancel.c: New file.
411 2001-04-08  Hans-Peter Nilsson  <hp@axis.com>
413         * sysdeps/cris/pt-machine.h: New file.
414         * sysdeps/cris/pspinlock.c: New file.
416 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
418         * shlib-versions: Add case for Linux on CRIS.
420 2001-03-26  Ulrich Drepper  <drepper@redhat.com>
422         * attr.c (pthread_getattr_np): Correct computation of stack size
423         for machiens with register stack.
425         * Examples/ex17.c (main): Correct detection of failed mmap call.
427 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
429         * pthread.c (__pthread_initialize_manager): Fix a typo.
431 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
433         * attr.c (__pthread_attr_setstack): Fix alignment check.
434         (pthread_getattr_np): __stackaddr is top of stack, not bottom.
435         * Makefile (tests): Add ex17 test.
436         * Examples/ex17.c: New test.
438 2001-03-20  Ulrich Drepper  <drepper@redhat.com>
440         * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
441         * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
442         * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
444 2001-03-18  Ulrich Drepper  <drepper@redhat.com>
446         * Makefile: When generating DSO link with libc_nonshared.a.
448 2001-02-26  Jakub Jelinek  <jakub@redhat.com>
450         * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
452 2001-02-23  Jakub Jelinek  <jakub@redhat.com>
454         * internals.h (__pthread_init_max_stacksize): New prototype.
455         * attr.c (__pthread_attr_setstacksize): Call
456         __pthread_init_max_stacksize if not yet initialized.
457         * pthread.c (__pthread_init_max_stacksize): New function.
458         (__pthread_initialize_manager): Call it.
459         Patch by <dtc@cmucl.cons.org>.
461 2001-03-16  Ulrich Drepper  <drepper@redhat.com>
463         * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
465 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
467         * shlib-versions: Add rule for Linux on 64 bit S/390.
468         * sysdeps/s390/s390-64/pt-machine.h: New file.
469         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
471 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
473         * sysdeps/s390/pt-machine.h: Move to...
474         * sysdeps/s390/s390-32/pt-machine.h: ...here.
475         Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
477 2001-03-15  Ulrich Drepper  <drepper@redhat.com>
479         * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
480         * attr.c: Implement pthread_getattr_np.
481         * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
482         * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
483         * manager.c (pthread_handle_create): Initialize p_inheritsched.
485 2001-03-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
487         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
488         code alignment.
490 2001-02-20  Hans Boehm  <hans_boehm@hp.com>
492         * manager.c (manager_mask): Removed static vesion.  Now always local
493         to __pthread_manager().
494         (manager_mask_all): Removed completely.
495         (__pthread_manager): Remove manager_mask_all initialization.
496         (pthread_handle_create): Remove code to set and reset signal mask
497         around __clone2() calls.
499 2001-02-17  Jakub Jelinek  <jakub@redhat.com>
501         * spinlock.c (__pthread_lock): Force lock->__status to be read from
502         memory on every spin.
504 2001-02-10  Andreas Jaeger  <aj@suse.de>
506         * Makefile (extra-objs): New.
508 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
510         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
511         __pthread_initialize_minimal prototype.
513 2001-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
515         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
517 2001-02-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
519         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
521 2001-02-06  Ulrich Drepper  <drepper@redhat.com>
523         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
524         broken code.  Patch by Jes Sorensen.
526 2001-02-06  Andreas Jaeger  <aj@suse.de>
528         * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
529         to...
530         * internals.h: ...here.
532 2001-02-05  Jes Sorensen  <jes@linuxcare.com>
534         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
536 2001-02-02  Ulrich Drepper  <drepper@redhat.com>
538         * Versions: Remove __pthread_initialize_minimal.
540 2001-02-01  Ulrich Drepper  <drepper@redhat.com>
542         * Makefile: Add rules to build crti.o and make it being used in
543         building libpthread.so.
544         * sysdeps/i386/Makefile: New file.
545         * sysdeps/pthread/pt-initfini.c: New file.
547         * pthread.c: Cleanups.
549 2001-01-28  Andreas Jaeger  <aj@suse.de>
551         * oldsemaphore.c (__old_sem_init): Adjust for last change.
552         * sysdeps/pthread/bits/libc-lock.h: Likewise.
553         * spinlock.c: Likewise.
555 2001-01-28  Ulrich Drepper  <drepper@redhat.com>
557         * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
558         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
559         * manager.c: Adjust for namespace cleanup in bits/initspin.h.
560         * pthread.c: Likewise.
561         * spinlock.h: Likewise.
562         * sysdeps/pthread/pthread.h: Likewise.
564 2001-01-26  Ulrich Drepper  <drepper@redhat.com>
566         * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
567         as struct __pthread_attr_s.
569         * semaphore.h (sem_t): Cleanup namespace, rename status and
570         spinlock elements.
572 2001-01-13  Jakub Jelinek  <jakub@redhat.com>
574         * pthread.c (pthread_onexit_process): Clear
575         __pthread_manager_thread_bos after freeing it.
576         * Makefile (tests): Add ex16.
577         * Examples/ex16.c: New file.
579 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
581         * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
582         -z nodelete.
583         * pthread.c (pthread_exit_process): Rename to...
584         (pthread_onexit_process): ...this.
585         (pthread_atexit_process, pthread_atexit_retcode): New.
586         (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
587         and only if HAVE_Z_NODELETE is not defined.
588         (__pthread_initialize_manager): Register pthread_atexit_retcode
589         with __cxa_atexit.
591 2001-01-11  Ulrich Drepper  <drepper@redhat.com>
593         * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
595 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
597         * Makefile (tests): Add ex15.
598         * Examples/ex15.c: New test.
600 2001-01-08  Ulrich Drepper  <drepper@redhat.com>
602         * pthread.c (pthread_exit_process): Free memory allocated for
603         manager stack.
605 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
607         * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
608         (pthread_free): Always unmap the stack.  It's safe now that we don't
609         use MAP_FIXED to allocate stacks.
611 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
613         * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
615         * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
617 2000-11-15  Wolfram Gloger  <wg@malloc.de>
619         * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
620         stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
622 2000-12-27  Andreas Jaeger  <aj@suse.de>
624         * Examples/ex13.c: Make local functions static.
625         * ecmutex.c: Likewise.
626         * joinrace.c: Likewise.
627         * Examples/ex14.c: Likewise.
629         * Examples/ex2.c: Make local functions static; reformat.
630         * Examples/ex1.c: Likewise.
631         * Examples/ex4.c: Likewise.
632         * Examples/ex5.c: Likewise.
633         * Examples/ex7.c: Likewise.
635         * oldsemaphore.c: Add prototypes to shut up GCC.
636         * pt-machine.c: Likewise.
638         * weaks.c: Add prototype for pthread_exit.
640         * internals.h: Add some prototypes, format prototypes and add
641         missing externs.
642         Move __libc_waitpid prototype to include/sys/wait.h.
644         * rwlock.c: Include <bits/libc-lock.h> for prototypes.
645         * mutex.c: Likewise.
646         * specific.c: Likewise.
647         * ptfork.c: Likewise.
649         * lockfile.c: Include internals.h to get prototypes.
650         * events.c: Likewise.
651         * sysdeps/alpha/pspinlock.c: Likewise.
652         * sysdeps/arm/pspinlock.c: Likewise.
653         * sysdeps/hppa/pspinlock.c: Likewise.
654         * sysdeps/i386/pspinlock.c: Likewise.
655         * sysdeps/ia64/pspinlock.c: Likewise.
656         * sysdeps/m68k/pspinlock.c: Likewise.
657         * sysdeps/mips/pspinlock.c: Likewise.
658         * sysdeps/powerpc/pspinlock.c: Likewise.
659         * sysdeps/s390/pspinlock.c: Likewise.
660         * sysdeps/sh/pspinlock.c: Likewise.
661         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
662         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
663         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
665 2000-12-27  Ulrich Drepper  <drepper@redhat.com>
667         * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
668         (__pthread_attr_getstack): Return correct address.
669         Add warnings for using pthread_attr_getstackaddr and
670         pthread_attr_setstackaddr.
672 2000-12-26  Ulrich Drepper  <drepper@redhat.com>
674         * Examples/ex6.c (test_thread): Make static.
675         * Examples/ex12.c (test_thread): Make static and add noreturn
676         attribute.
678 2000-12-18  Jes Sorensen  <jes@linuxcare.com>
680         * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
681         and compare_and_swap_with_release_semantics returns int not long.
683 2000-12-17  Andreas Jaeger  <aj@suse.de>
685         * sysdeps/s390/pt-machine.h (testandset): Use long int as return
686         value.
687         * sysdeps/arm/pt-machine.h (testandset): Likewise.
688         * sysdeps/hppa/pt-machine.h (testandset): Likewise.
689         * sysdeps/m68k/pt-machine.h (testandset): Likewise.
690         * sysdeps/sh/pt-machine.h (testandset): Likewise.
691         * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
692         * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
694 2000-12-17  Ulrich Drepper  <drepper@redhat.com>
696         * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
697         * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
699 2000-12-17  Andreas Jaeger  <aj@suse.de>
701         * internals.h: Add prototypes for testandset and
702         __compare_and_swap to shut up gcc warnings.
704 2000-12-06  Wolfram Gloger  <wg@malloc.de>
706         * join.c (pthread_detach): Allow case where the thread has already
707         terminated.
709 2000-12-05  Andreas Jaeger  <aj@suse.de>
711         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
712         * sysdeps/mips/pt-machine.h (testandset): Likewise.
713         (__compare_and_swap): Likewise.
714         Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
716 2000-11-20  Jakub Jelinek  <jakub@redhat.com>
718         * Examples/ex3.c (main): Cast int to long before casting to void *.
719         (search): Cast void * to long, not int.
720         * Examples/ex8.c (main, thread): Similarly.
721         * Examples/ex11.c (main): Similarly.
722         * Examples/ex14.c (worker, do_test): Similarly.
723         * ecmutex.c (worker, do_test): Similarly.
724         (nlocks): Cast to int.
726 2000-11-08  Bruce Mitchener  <bruce@cubik.org>
728         * linuxthreads.texi:  Add documentation for pthreads attributes
729         guardsize, stackaddr, stacksize, and stack.  Fix typo in previous
730         patch.  Document pthread_[sg]etconcurrency().  Mark
731         pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
733 2000-11-07  Ulrich Drepper  <drepper@redhat.com>
735         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
736         Don't define it.
737         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
738         Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
740 2000-11-06  Ulrich Drepper  <drepper@redhat.com>
742         * cancel.c (pthread_cancel): Always set p_canceled, even if we are
743         not doing it right now.
744         Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
746 2000-10-30  Ulrich Drepper  <drepper@redhat.com>
748         * Examples/ex4.c (main): Don't use exit() to avoid warning with
749         broken compilers.
751 2000-10-29  Ulrich Drepper  <drepper@redhat.com>
753         * attr.c (__pthread_attr_setguardsize): Don't round guardsize
754         here.  Reported by Bruce Mitchener <bruce@cubik.org>.
756         * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
757         discussing mutexes. (As per the Unix98 name for the API.)
758         Changes documentation for pthread_mutexattr_setkind_np() and
759         pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
760         same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
761         Changes references to PTHREAD_MUTEXATTR_FAST_NP to
762         PTHREAD_MUTEXATTR_ADAPTIVE_NP.
763         Begins to introduce discussion of the ``timed'' mutex type.  This
764         discussion is currently incomplete.
765         Patch by Bruce Mitchener <bruce@cubik.org>.
767 2000-10-26  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
768             Yutaka Niibe  <gniibe@chroot.org>
770         * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
771         has restrictions, use register.
773 2000-10-23  Andreas Schwab  <schwab@suse.de>
775         * Examples/ex14.c (TIMEOUT): Override default timeout.
777 2000-10-16  Ulrich Drepper  <drepper@redhat.com>
779         * specific.c: Protect tsd array modification in thread data
780         structures by getting the thread lock in pthread_key_delete and
781         __pthread_destroy_specifics.
782         Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
784 2000-10-12  Alan Modra <alan@linuxcare.com.au>
786         * sysdeps/pthread/bits/initspin.h: New file.
787         * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
788         (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
789         (__pthread_alt_init_lock): Likewise.
790         (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
792 2000-10-12  David Huggins-Daines  <dhd@linuxcare.com>
794         * oldsemaphore.c (__old_sem_init): Release lock with
795         LT_SPINLOCK_INIT, not zero.
796         * spinlock.c (__pthread_unlock): Likewise.
797         (__pthread_alt_lock): Likewise.
798         (__pthread_alt_timedlock): Likewise.
799         (__pthread_alt_unlock): Likewise.
800         * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
801         LT_SPINLOCK_INIT if it is non-zero.  Likewise for init-once flags.
802         * sysdeps/pthread/pthread.h: Include bits/initspin.h.  Use
803         LT_SPINLOCK_INIT do initialize spinlocks not 0.
805 2000-10-12  David Huggins-Daines <dhd@linuxcare.com>
807         * shlib-versions: Add version definitions for hppa-linux.
809 2000-10-12  Alan Modra <alan@linuxcare.com.au>
811         * sysdeps/hppa/pspinlock.c: New file.
812         * sysdeps/hppa/pt-machine.h: New file.
813         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
815 2000-10-05  Jakub Jelinek  <jakub@redhat.com>
817         * mutex.c (__pthread_mutex_destroy): Correct test of
818         busy mutex for mutexes using alternate fastlocks.
819         Patch by dtc@cmucl.cons.org.
821 2000-09-28  Martin Schwidefsksy    <schwidefsky@de.ibm.com>
823         * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
825 2000-09-28  Ulrich Drepper  <drepper@redhat.com>
827         * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
828         test for owner first.
829         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
831         * cancel.c (pthread_cancel): Don't do anything if cancelation is
832         disabled.
834 2000-09-26  Ulrich Drepper  <drepper@redhat.com>
836         * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
837         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
839         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
840         _POSIX_MONOTONIC_CLOCK.
842         * spinlock.h (__pthread_set_own_extricate_if): Add back locking
843         and explain why.
845 2000-09-20  Andreas Jaeger  <aj@suse.de>
847         * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
848         "testrtsig.h" conditional.
850 2000-09-11  Ulrich Drepper  <drepper@redhat.com>
852         * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
853         pthread_attr_setstack.
854         * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
855         pthread_attr_setstack.
856         * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
858 2000-09-05  Ulrich Drepper  <drepper@redhat.com>
860         * Examples/ex14.c: New file.
861         * Makefile (tests): Add ex14.
863         * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
864         mutex.  Patch by dtc@cmucl.cons.org.
866         * ecmutex.c: New file.
867         * Makefile (tests): Add ecmutex.
869 2000-09-04  H.J. Lu  <hjl@gnu.org>
871         * attr.c (__pthread_attr_setguardsize): Use page_roundup
872         instead of roundup to round up to the page size.
874 2000-09-03  Mark Kettenis  <kettenis@gnu.org>
876         * manager.c (pthread_exited): Correctly report event as TD_REAP
877         instead of TD_DEATH.  Fix comments.
879 2000-09-03  Ulrich Drepper  <drepper@redhat.com>
881         * spinlock.h (testandset): Add cast to avoid warning.
882         Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
884 2000-09-02  Andreas Jaeger  <aj@suse.de>
886         * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
887         prototype.
889 2000-09-01  Ulrich Drepper  <drepper@redhat.com>
891         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
892         Fix typo in last patch (_mode -> _flags).
894         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
895         Provide definition which respects _IO_USER_LOCK flag.
897 2000-08-30  Ulrich Drepper  <drepper@redhat.com>
899         * manager.c (pthread_allocate_stack): Clear descriptor only if not
900         mmaped.
902 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
904         * Makefile: Add rules to build and run unload.
905         * unload.c: New file.
907         * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
909         * sysdeps/pthread/pthread.h
910         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
911         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
913 2000-08-24  Andreas Jaeger  <aj@suse.de>
915         * Examples/ex13.c: Include <string.h> for strerror prototype and
916         <stdlib.h> for abort prototype.
917         (pthr_cond_signal_mutex): Rewrite to silence GCC.
918         (thread_start): Remove unused variable err.
919         (main): Silence GCC warnings.
921 2000-08-22  Andreas Jaeger  <aj@suse.de>
923         * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
925         * Makefile (tests): Add ex13.
927 2000-08-20  Ulrich Drepper  <drepper@redhat.com>
929         * semaphore.h: Add restrict where required by AGd4.
930         * sysdeps/pthread/pthread.h: Likewise.
931         * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
933 2000-08-15  Ulrich Drepper  <drepper@redhat.com>
935         * Makefile (tests): Add ex12.  Add rule to build it.
936         * Examples/ex12.c: New file.
938 2000-08-13  Ulrich Drepper  <drepper@redhat.com>
940         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
941         even though the implementation is not quite complete (but it reports
942         it).  Define _POSIX_MESSAGE_PASSING to -1.
943         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
945 2000-08-12  Andreas Jaeger  <aj@suse.de>
947         * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
948         assembler.
949         (__compare_and_swap): Likewise.
950         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
952 2000-08-10  Ulrich Drepper  <drepper@redhat.com>
954         * pthread.c (__pthread_initial_thread): Initialize p_errnop and
955         p_h_errnop correctly and not to NULL.
957 2000-08-05  Ulrich Drepper  <drepper@redhat.com>
959         * Banner: Bump version number to 0.9.
961 2000-08-04  Ulrich Drepper  <drepper@redhat.com>
963         * Makefile (tests): Add tststack.  Add rule to build the program.
964         * tststack.c: New file.
966         * internals.h: Declare __pthread_max_stacksize.
967         * pthread.c (__pthread_max_stacksize): New variable.
968         (__pthread_initialize_manager): Determine __pthread_initialize_manager
969         value.
970         * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
971         (pthread_allocate_stack): Allow kernel to choose stack address if
972         FLOATING_STACKS.  This also handles variable-sized stacks.
973         Always allocate stack and guardpage together.  Use mprotect to
974         change guardpage access.
975         * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
976         ARCH_STACK_MAX_SIZE.
978         * attr.c (__pthread_attr_setstacksize): Also test value against
979         upper limit.
981         * manager.c (__pthread_nonstandard_stacks): Define only if
982         THREAD_SELF is not defined.
983         (pthread_allocate_stack): Always initialize gardaddr to a correct
984         value.
985         (pthread_handle_create): Unmap thread with one call.
986         (pthread_free): Remove test for initial thread before removing stack.
987         Unmap stack with one call.
989         * pthread.c (__pthread_initial_thread): Initialize p_userstack to
990         1 to avoid removing the stack.
992 2000-07-27  Jes Sorensen  <jes@linuxcare.com>
994         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
995         load of spin lock to prime the cache before the atomic compare and
996         exchange operation (cmpxchg4). This avoids the spinning on the
997         cmpxchg4 instruction and reduces movement of the cache line back
998         and forth between the processors (explanation by Asis K. Mallick
999         from Intel). This basically makes the implementation operate the
1000         same as the Linux kernel implementation.
1002         * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
1003         * sysdeps/ia64/pspinlock.c: New file.
1005 2000-08-03  Ulrich Drepper  <drepper@redhat.com>
1007         * pthread.c: Move definition of __pthread_set_own_extricate_if...
1008         * spinlock.h: ...here.  Remove locking.
1009         * internals.h: Remove __pthread_set_own_extricate_if prototype.
1011         * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
1012         (rwlock_rd_extricate_func): Don't determine self, let
1013         __pthread_lock do it.
1014         (rwlock_wr_extricate_func): Likewise.
1015         (rwlock_have_already): Optimize *pself handling a bit.
1017         * mutex.c: Use __builtin_expect.
1018         * pthread.c: Likewise.
1020 2000-08-02  Andreas Jaeger  <aj@suse.de>
1022         * sysdeps/s390/pspinlock.c: New file.
1023         * sysdeps/s390/pt-machine.h: New file.
1024         Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
1026 2000-07-12  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
1028         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
1029         R3K.
1030         * sysdeps/mips/pt-machine.h (testandset): Likewise.
1032 2000-07-26  Andreas Jaeger  <aj@suse.de>
1034         * pthread.c: Initialize p_sem_avail.
1036 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
1038         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
1039         * semaphore.c: Handle spurious wakeups.
1041         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
1042         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
1044         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
1045         (__pthread_wait_for_restart): Likewise.
1047         * condvar.c (pthread_cond_wait): Also check whether thread is
1048         cancelable before aborting loop.
1049         (pthread_cond_timedwait): Likewise.
1051         * signals.c (pthread_sighandler): Remove special code to restrore
1052         %gs on x86.
1053         (pthread_sighandler_t): Likewise.
1055 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
1057         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
1058         * pthread.c: Include <resolv.h>.
1059         (_res): Undefine.  Add extern declaration.
1061 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
1063         * pthread.c (__pthread_initial_thread): Update initializer.
1064         (__pthread_manager_thread): Likewise.
1065         (pthread_initialize): Move setrlimit call to...
1066         (__pthread_initialize_manager): ...here.
1067         (__pthread_reset_main_thread): Reset also soft limit on stack size.
1069         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
1070         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
1072 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
1074         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
1075         __compare_and_swap to define testandset.
1076         * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
1077         Define IMPLEMENT_TAS_WITH_CAS.
1079 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
1081         * Makefile: Pass -z nodelete to linker for libpthread.so
1082         generation if it understand this option.
1084 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
1086         * manager.c (pthread_handle_create): Remove initialization of
1087         new_thread->p_res._sock.
1089 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
1091         Bugfixes to the variant of the code for machines with no compare
1092         and swap.
1094         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
1095         node was not being properly enqueued, due to failing to update
1096         the lock->__status field.
1098         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
1099         being set inappropriately, causing the suspend function to be called
1100         with a null self pointer and crash.
1102 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
1104         * spinlock.h (__pthread_alt_trylock): Fix code used if no
1105         compare&swap is available.
1107         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
1108         compare_and_swap.
1110         * pthread.c (pthread_initialize): Don't use sysconf to determine
1111         whether the machine has more than one processor.
1113         * spinlock.c (__pthread_alt_timedlock): Add back one of the
1114         removed thread_self calls.
1116 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
1118         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
1119         __compare_and_swap to compare_and_swap in code which assumes
1120         compare swap is available.
1122 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
1124         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
1125         bug whereby thr field of waitnode structure would not be correctly
1126         set unless a null self pointer is passed to the functions.
1127         Eliminated redundant calls to thread_self().
1129 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
1131         * pthread.c (__pthread_initialize_manager): Lock
1132         __pthread_manager_thread.p_lock before calling clone.
1134 2000-05-05  H.J. Lu  <hjl@gnu.org>
1136         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
1137         have acquire semantics.
1138         (__compare_and_swap_with_release_semantics): New inline
1139         function.
1140         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
1142 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
1144         * manager.c: Fix the problem with signals at startup.
1145         Change the way that thread stacks are allocated on IA64.
1146         Clean up some of the guard page allocation stuff.
1148 1999-12-19  H.J. Lu  <hjl@gnu.org>
1150         * internals.h (page_roundup): New.
1151         * attr.c (__pthread_attr_setguardsize); Use page_roundup
1152         instead of roundup.
1153         * manager.c (pthread_allocate_stack): Make sure guardaddr is
1154         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
1155         is define.
1157 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
1159         * manager.c (pthread_allocate_stack): Unmap the stack top
1160         if failed to map the stack bottom.
1161         Fix the guard page.
1162         (pthread_free): Fix the guard page.
1164         * pthread.c (pthread_initialize): Set rlimit correctly for
1165         NEED_SEPARATE_REGISTER_STACK.
1167 1999-12-16  H.J. Lu  <hjl@gnu.org>
1169         * pthread.c (__pthread_initialize_manager): Pass
1170         __pthread_manager_thread_bos instead of
1171         __pthread_manager_thread_tos to __clone2.
1173 1999-12-16  H.J. Lu  <hjl@gnu.org>
1175         * manager.c (pthread_allocate_stack): Correct the calculation
1176         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
1177         stack bottom.
1179 1999-12-13  H.J. Lu  <hjl@gnu.org>
1181         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
1182         bit after setting ar.ccv.
1184 1999-12-12  H.J. Lu  <hjl@gnu.org>
1186         * manager.c (pthread_allocate_stack): Make the starting
1187         address of the stack bottom page aligned. FIXME: it may
1188         need changes in other places.
1189         (pthread_handle_create): Likewise.
1191 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
1193         * manager.c (pthread_allocate_stack): Handle
1194         NEED_SEPARATE_REGISTER_STACK.
1195         (pthread_handle_create): Likewise.
1196         * pthread.c (__pthread_initialize_manager): Likewise.
1198         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
1200 1999-12-02  H.J. Lu  <hjl@gnu.org>
1202         * sysdeps/ia64/pt-machine.h: New.
1204 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
1206         * wrapsyscall.c: Mark non-__ protected names as weak.
1207         PR libc/1466.
1209 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
1211         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
1213 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
1215         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
1216         Add tests also to new alternative spinlock implementation.
1217         * spinlock.h: Likewise.
1218         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1220 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
1222         * Version: Export __sigaction.
1223         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
1224         of __sigaction.
1225         * pthread.c: Use __libc_sigaction instead of __sigaction.
1227         * condvar.c: Implement pthread_condattr_getpshared and
1228         pthread_condattr_setpshared.
1229         * mutex.c: Implement pthread_mutexattr_getpshared and
1230          pthread_mutexattr_setpshared.
1231         * Versions: Export new functions.
1232         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1234         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
1235         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
1236         is not selected.
1238 2000-07-04  Greg McGary  <greg@mcgary.org>
1240         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
1241         pragmas.  Include bp-sym.h only if _LIBC.
1243 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
1245         * spinlock.c (__pthread_unlock): Properly place write barrier.
1246         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1248 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
1250         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
1251         faster on SMP systems.  No more emulation of compare&swap for adaptive
1252         spinlocks.
1253         * spinlock.h: Likewise.
1254         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
1255         Replace fast with adaptive mutex.
1256         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
1257         * condvar.c: Likewise.
1258         * pthread.c: Define and initialize __pthread_smp_kernel variable.
1259         * internals.h: Declare __pthread_smp_kernel.
1260         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
1261         _pthread_fastlock structure.
1262         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1264         * pthread.c: Remove initialization to zero from global variables.
1266 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
1268         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
1270 2000-06-28  Greg McGary  <greg@mcgary.org>
1272         * weaks.c: Wrap BP_SYM () around weak extern declarations of
1273         pthread functions that have pointers in their return+arg signatures.
1275 2000-06-27  Greg McGary  <greg@mcgary.org>
1277         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
1278         extern declarations of pthread functions that have pointers in
1279         their return+arg signatures.
1281 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
1283         * Makefile (tests): Add ex11.  Add rules to build it.
1284         * Examples/ex11.c: New file.
1285         * rwlock.c: Fix complete braindamaged previous try to implement
1286         timedout functions.
1288         * spinlock.c: Pretty print.
1290 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
1292         * Makefile (tests): Add ex10.  Add rules to build it.
1293         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
1294         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
1295         * condvar.c (pthread_cond_wait): Allow mutex of kind
1296         PTHREAD_MUTEX_TIMED_NP.
1297         (pthread_cond_timedwait_relative): Likewise.
1298         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
1299         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
1300         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
1301         (__pthread_mutex_lock): Use __pthread_alt_lock for
1302         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
1303         (__pthread_mutex_timedlock): New function.
1304         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
1305         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
1306         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
1307         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
1308         * spinlock.c: Implement alternate fastlocks.
1309         * spinlock.h: Add prototypes.
1310         * Examples/ex10.c: New file.
1311         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1312         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1314         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
1315         (__pthread_rwlock_timedrdlock): New function.
1316         (__pthread_rwlock_timedwrlock): New function.
1317         Use laternate fastlock function everywhere.
1319 2000-06-21  Andreas Jaeger  <aj@suse.de>
1321         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
1322         prototype.
1324         * join.c: Include <stdlib.h> for exit prototype.
1326 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
1328         * sysdeps/i386/useldt.h: Include <stdlib.h>.
1330         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
1331         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1333         * Makefile (libpthread-routines): Add barrier.
1334         (tests): Add ex9.  Add rule to build ex9.
1335         * Versions: Export barrier functions.
1336         * barrier.c: New file.
1337         * Examples/ex9.c: New file.
1338         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
1339         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
1340         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1342 2000-06-19  H.J. Lu  <hjl@gnu.org>
1344         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
1345         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
1346         (compare_and_swap_with_release_semantics): New. Default to
1347         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
1348         is not defined.
1350         * spinlock.c (__pthread_unlock): Call
1351         compare_and_swap_with_release_semantics () instead of
1352         compare_and_swap ().
1354 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
1356         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
1357         to errno directly.
1358         * sysdeps/pthread/timer_delete.c: Likewise.
1359         * sysdeps/pthread/timer_getoverr.c: Likewise.
1360         * sysdeps/pthread/timer_gettime.c: Likewise.
1361         * sysdeps/pthread/timer_settime.c: Likewise.
1363 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
1365         Timer nodes are now reference counted, and can be marked
1366         as deleted. This allows for the safe release of the global mutex
1367         in the middle without losing the timer being operated on.
1369         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
1370         member is now an enum with three values, so that an intermediate
1371         state can be represented (deleted but not free for reuse yet).
1372         New refcount member added.
1373         * sysdeps/pthread/timer_routines.c: Likewise.
1375         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
1376         timer_valid): New inline functions added.
1378         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
1379         restructured, recursive deadlock bug fixed.
1381         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
1382         timer_addref to ensure that timer won't be deleted while mutex is not
1383         held. Also uses timer_invalid to perform validation of timer handle.
1384         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1385         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
1387 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
1389         * shlib-versions: Add entry for SH.
1390         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
1392 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
1394         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
1395         tightened up some critical regions and micro-optimized some list
1396         manipulation code.
1398         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1399         Returns int value now to indicate whether timer was queued at head.
1400         * sysdeps/pthread/posix-timer.h: Likewise.
1401         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
1402         new return value from __timer_thread_queue_timer to avoid waking
1403         up timer thread unnecessarily.
1405         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
1406         inuse flag, because this requires mutex to be held.  Callers updated
1407         to do the check when they have the mutex.
1408         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
1410         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
1411         regions: avoids making system calls while holding timer mutex, and
1412         a few computations were moved outside of the mutex as well.
1413         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
1415         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
1416         to list_unlink_ip, meaning idempotent.  Pointer manipulation
1417         changed to get better better code out of gcc.
1418         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
1419         version of list_unlink added here.
1420         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
1421         function in all places: idempotent one for timers, non-idempotent
1422         one for thread nodes.
1423         * sysdeps/pthread/timer_settime: Likewise.
1424         * sysdeps/pthread/timer_routines.c: Likewise.
1426 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
1428         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
1429         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1431         * sysdeps/pthread/Makefile: Remove tests definition.
1433 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
1434             Yutaka Niibe  <gniibe@chroot.org>
1436         * sysdeps/sh/pspinlock.c: New file.
1437         * sysdeps/sh/pt-machine.h: New file.
1439 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
1441         * Makefile (tests): Add joinrace.
1443         * Examples/ex6.c: Test return value of pthread_join.
1445 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
1447         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
1448         (__pthread_spin_trylock): Implement.
1449         (__pthread_spin_unlock): Implement.
1450         (__pthread_spin_init): Implement.
1451         (__pthread_spin_destroy): Implement.
1453 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
1455         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
1456         really append the entry.
1458 2000-06-10  Andreas Jaeger  <aj@suse.de>
1460         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
1462 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
1464         * sysdeps/pthread/timer_create.c: Thread matching now done on
1465         clock type as well as thread attributes.
1466         There are individual global signal-delivering threads for
1467         different clock types.
1468         * sysdeps/pthread/posix-timer.h: Likewise.
1469         * sysdeps/pthread/timer_routines.c: Likewise.
1471         * sysdeps/pthread/timer_routines.c: Thread allocation and
1472         deallocation function now remembers to put thread on active
1473         list and remove from active list.
1474         Thus now the feature of binding multiple timers
1475         to a single thread actually works.
1477 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
1479         * pthread.c (__pthread_create_2_1): Optimize a bit.
1481         * internals.h (invalid_handle): Also test for p_terminated != 0.
1482         (nonexisting_handle): New function.  Same as old invalid_handle.
1483         * join.c (pthread_join): Use nonexisting_handle instead of
1484         invalid_handle to test for acceptable thread handle.
1485         * manager.c (pthread_handle_free): Likewise.
1486         * joinrace.c: New file.
1487         Reported by Permaine Cheung <pcheung@cygnus.com>.
1489 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
1491         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1492         Correct handling of matching variable.
1494         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1495         avoid warnings.
1497         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1498         Be prepared for empty timer list.
1500         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1501         CPUTIME clock ID.  Add support for thread clocks.
1503         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1504         subtraction were switched.
1506         * sysdeps/pthread/timer_routines.c (init_module): Use
1507         THREAD_MAXNODES threads.
1509         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1510         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1511         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1512         with sigqueueinfo is this system call is available.
1514         * sysdeps/pthread/timer_create.c (timer_create): Allow
1515         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1517         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
1518         functionality.
1519         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1521 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
1523         * sysdeps/pthread/posix-timer.h: New file.
1524         * sysdeps/pthread/timer_create.c: New file.
1525         * sysdeps/pthread/timer_delete.c: New file.
1526         * sysdeps/pthread/timer_getoverr.c: New file.
1527         * sysdeps/pthread/timer_gettime.c: New file.
1528         * sysdeps/pthread/timer_routines.c: New file.
1529         * sysdeps/pthread/timer_settime.c: New file.
1530         * sysdeps/pthread/tst-timer.c: New file.
1532 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
1534         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1535         LINK_MAX definitions if necessary.
1537 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
1539         Added missing fork time handling of global libio lock.
1541         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1542         not just the individual stream locks. Rewritten to use new
1543         iterator interface provided by libio rather than accessing
1544         global variable.
1546         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1547         which lock and unlock the stream list using the new interface
1548         provied by libio.
1549         * internals.h: Likewise.
1551         * ptfork.c (__fork): Now calls __flockfilelist before fork,
1552         and __funlockfilelist in the parent after the fork.
1553         Child still calls __fresetlockfiles as before.
1555         * linuxthreads.texi: Now explains what happens to streams at
1556         fork time. Also whole new section on forking and thread added.
1557         Definition of pthread_atfork moved out of Miscellaneous Functions
1558         to this new section.
1560 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
1562         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1563         Add missing register.
1564         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1566 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
1568         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1569         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1570         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1572 2000-05-31  Andreas Jaeger  <aj@suse.de>
1574         * sysdeps/mips/pspinlock.c: Implement spinlocks.
1576 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
1578         * spinlock.c (__pthread_lock): Remove ASSERT.
1580         * Makefile (tests): Add ex8.
1581         * Examples/ex8.c: New file.
1583 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
1585         Bugfix: The pthread_atfork mechanism now takes care of its
1586         own internal mutex at fork time.
1588         * ptfork.c (__fork): Revised so that the mutex is held across
1589         the fork operation and while the handlers are called, and so that
1590         the child resets the mutex.
1592         * linuxthreads.texi: Updated pthread_atfork documentation to make
1593         it clear that fork and pthread_atfork can't be reentered from
1594         atfork handlers, that pthread_atfork and fork are mutually atomic,
1595         and that the handlers are inherited by the child process.
1597 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
1599         * Makefile (libpthread-routines): Add pspinlock.
1600         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1601         Use struct _pthread_fastlock instead of pthread_spinlock_t.
1602         * condvar.c: Likewise.
1603         * internals.h: Likewise.
1604         * join.c: Likewise.
1605         * manager.c: Likewise.
1606         * mutex.c: Likewise.
1607         * pthread.c: Likewise.
1608         * rwlock.c: Likewise.
1609         * semaphore.c: Likewise.
1610         * signals.c: Likewise.
1611         * spinlock.h: Likewise.
1612         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
1613         * sysdeps/alpha/pspinlock.c: New file.
1614         * sysdeps/arm/pspinlock.c: New file.
1615         * sysdeps/i386/pspinlock.c: New file.
1616         * sysdeps/m68k/pspinlock.c: New file.
1617         * sysdeps/mips/pspinlock.c: New file.
1618         * sysdeps/powerpc/pspinlock.c: New file.
1619         * sysdeps/sparc/sparc32/pspinlock.c: New file.
1620         * sysdeps/sparc/sparc64/pspinlock.c: New file.
1621         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
1622         back to _pthread_fastlock.  Define new pthread_spinlock_t.
1624 2000-05-24  Andreas Jaeger  <aj@suse.de>
1626         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
1628 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
1630         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
1632 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
1634         * internals.h (__RES_PTHREAD_INTERNAL): Define.
1636 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
1638         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
1639         object state is represented with additional bits which distinguish
1640         whether that state was set up in the current process, or
1641         in an ancestor process. If that state was set in an ancestor,
1642         it means that a fork happened while thread was executing the init
1643         function. In that case, the state is reset to NEVER.
1644         * mutex.c (__pthread_once_fork_prepare): New function.
1645         (__pthread_once_fork_child): Likewise
1646         (__pthread_once_fork_parent): Likewise
1647         (__pthread_reset_pthread_once): Removed.
1648         * ptfork.c (__fork): Call new handlers in mutex.c.
1649         * internals.h: Declarations of new mutex.c functions added.
1650         Declaration of removed function deleted.
1651         * linuxthreads.texi: Updated documentation about pthread_once
1652         to clarify what happens under cancellation and forking.
1654 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
1656         * internals.h: New thread manager request type, REQ_KICK.
1657         * join.c (pthread_exit): main thread now calls exit() instead
1658         of _exit() in order to proper process cleanup.
1659         * manager.c (__pthread_manager): Do not terminate manager
1660         after unblocking main thread; wait for main thread's
1661         REQ_PROCESS_EXIT request instead.
1662         Also, added REQ_KICK case to handle new request; this just does
1663         nothing.
1664         * manager.c (pthread_exited): Do not terminate manager after
1665         unblocking main thread.
1666         * manager.c (__pthread_manager_sighandler): If the main thread
1667         is waiting for all other threads to die, send a REQ_KICK into
1668         the thread manager request pipe to get it to clean out the threads
1669         and unblock the main thread as soon as possible. This fixes
1670         the 2000 millisecond hang on shutdown bug.
1671         * Examples/ex7.c: New file, tests shutdown behavior when all threads
1672         including the main one call pthread_exit(), or implicitly do so.
1673         * Makefile (tests): Add ex7.
1675 2000-05-05  Andreas Jaeger  <aj@suse.de>
1677         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1678         (pthread_getcpuclockid): Correct test for ourselves.
1680 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
1682         * internals.h (struct _pthread_descr_struct): Reorganization.
1683         Allocate room for 16 pointers at head of the structure for future
1684         thread-local data handling.  Move p_self member in this area.
1685         * manager.c (pthread_handle_create): Adjust use of p_self.
1686         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
1687         * pthread.c (__pthread_initial_thread): Adjust initialization.
1688         (__pthread_manager_thread): Likewise.
1690 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
1692         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
1693         for eventmask larger than 1 word.
1695 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
1697         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
1698         * pthread.c (__pthread_initialize_minimal): New function.  Perform
1699         minimal initialization.
1700         (pthread_initialize): Remove this code here.
1701         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
1702         are working around the problem in glibc.
1704 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
1706         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
1707         now.  First gcc must be fixed (more concrete: libgcc).
1709 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
1711         * pthread.c: Remove special treatement for interrupt handlers on x86.
1712         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
1713         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
1714         necessary.
1715         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
1717 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
1719         * join.c (pthread_exit): Set p_terminated after reporting the
1720         termination event instead of before.
1722 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
1724         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
1725         if __USE_UNIX98.
1727 2000-04-18  Andreas Jaeger  <aj@suse.de>
1729         * Versions: Use ld instead of ld.so.
1731 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
1733         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
1734         Remove the typedef keyword.
1736 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
1738         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
1739         not stbar.
1740         (READ_MEMORY_BARRIER): Define.
1741         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
1742         MEMORY_BARRIER.
1743         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
1744         headers.
1746 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
1748         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1749         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
1750         use thread_handle().
1752 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
1754         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
1755         if fast mutex is used.  Don't initialize `already_canceled' twice.
1756         Correctly test for return value of timedsuspend.
1758         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
1759         therefore don't need the _rt versions of the signal handlers.
1761 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
1763         * pthread.c (pthread_yield): New function.
1764         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
1765         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
1766         * internals.h: Declare __pthread_yield.
1768         * pthread.c (pthread_initialize): Avoid a bit more code if
1769         realtime signals are known to exist.
1771         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
1772         to dynamically detect RT signals and avoid generating compatibility
1773         functions with old kernel.
1774         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
1775         __pthread_restart_new directly.
1776         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
1777         __pthread_wait_for_restart_signal directly.
1778         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
1779         __pthread_timedsuspend_new directly.
1781 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
1783         * condvar.c: Remove all the special code to handle cond_timedwait.
1784         Use timedsuspend instead.
1785         * internals.h: Declare __pthread_timedsuspend_old,
1786         __pthread_timedsuspend_new, and __pthread_timedsuspend.
1787         Remove declaration of __pthread_init_condvar.
1788         * pthread.c: Define __pthread_timedsuspend variable.
1789         (__pthread_timedsuspend_old): New function.  Timed suspension
1790         implementation for old Linux kernels.
1791         (__pthread_timedsuspend_new): New function.  Timed suspension
1792         implementation for new Linux kernels.
1793         * restart.h (timedsuspend): New function.  Call appropriate
1794         suspension function through __pthread_timedsuspend.
1795         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
1796         the code.
1797         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1799         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
1800         undefined.
1801         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
1802         where possible.
1803         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
1804         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1806         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
1807         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1809 2000-04-14  Andreas Jaeger  <aj@suse.de>
1811         * weaks.c: Fix typo.
1813         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
1814         2.2 for linuxthreads.
1816 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
1818         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1819         (pthread_getcpuclockid): Fix typo.
1821 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
1823         * Makefile (libpthread-routines): Add getcpuclockid.
1824         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
1825         * sysdeps/pthread/getcpuclockid.c: New file.
1826         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
1827         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
1829         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
1830         Defined.
1831         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1833         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
1834         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1835         and pthread_spin_unlock.
1836         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
1837         into pthread_spinlock_t.  Change all uses.
1838         * spinlock.c: Implement pthread_spin_lock.
1839         Rename __pthread_unlock to __pthread_spin_unlock and define weak
1840         alias for real name.
1841         Define pthread_spin_trylock, pthread_spin_init, and
1842         pthread_spin_destroy.
1843         Change all uses of _pthread_fastlock to pthread_spinlock_t.
1844         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
1845         Change all uses of _pthread_fastlock to pthread_spinlock_t.
1846         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
1847         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1848         and pthread_spin_unlock.
1849         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
1850         Change all uses of _pthread_fastlock to pthread_spinlock_t.
1851         * condvar.c: Likewise.
1852         * internals.h: Likewise.
1853         * join.c: Likewise.
1854         * manager.c: Likewise.
1855         * mutex.c: Likewise.
1856         * pthread.c: Likewise.
1857         * rwlock.c: Likewise.
1858         * semaphore.c: Likewise.
1859         * signals.c: Likewise.
1861         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
1862         macros.
1863         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
1865 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
1867         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
1868         _POSIX_SHARED_MEMORY_OBJECTS.
1870 2000-04-11  Andreas Jaeger  <aj@suse.de>
1872         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
1873         (__compare_and_swap): Mark as modifying memory.
1875 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
1877         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
1878         __volatile__.
1879         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
1880         Don't have the 'asm' __volatile__.
1882 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
1884         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
1885         * spinlock.c (__pthread_lock): Add memory barriers.
1886         (__pthread_unlock): Likewise.
1887         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
1888         instruction.
1889         (RELEASE): Not needed anymore.
1890         (__compare_and_swap): Mark asm as modifying memory.
1891         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
1892         of MEMORY_BARRIER.
1893         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
1894         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
1895         (MEMORY_BARRIER): Define using stbar.
1896         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
1897         stbar.
1898         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
1899         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
1900         Mike Burrows <m3b@pa.dec.com>.
1902 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
1904         * signals.c (sigaction): Fix return value for the case SIG is one
1905         of the signals the implementation uses.
1906         Patch by Xavier.Leroy@inria.fr.
1908 2000-04-01  Andreas Jaeger  <aj@suse.de>
1910         * attr.c: Use shlib-compat macros.
1911         * oldsemaphore.c: Likewise.
1912         * pthread.c: Likewise.
1913         * weaks.c: Likewise.
1915 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
1917         * semaphore.c (sem_timedwait): New function.
1918         Patch by Carl Mailloux <carlm@oricom.ca>.
1919         * semaphore.h: Declare sem_timedwait.
1920         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
1922 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
1924         * sysdeps/pthread/Makefile: File removed.
1926 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
1928         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
1929         * internals.h (__pthread_reset_pthread_once): Add prototype.
1930         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
1932         * manager.c (pthread_handle_create): Store ID of new thread before
1933         clone call.
1935 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
1937         * attr.c: Use new macros from shlib-compat.h to define versions.
1938         * oldsemaphore.c: Likewise.
1939         * semaphore.c: Likewise.
1940         * weaks.c: Likewise.
1942         * pthread.c: Update for new SHLIB_COMPAT definition.
1944         * manager.c (__pthread_manager): Unmask debug signal.
1946         * pthread.c (pthread_initialize): Test for address of __dso_handle
1947         being NULL, not value.  Use __on_exit, not on_exit.
1948         Patch by Andreas Jaeger <aj@suse.de>.
1950         * pthread.c: Use new macros from shlib-compat.h to define versions.
1952 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
1954         * pthread.c (pthread_initialize): Instead of on_exit use
1955         __cxa_atexit if __dso_label is available to allow unloading the
1956         libpthread shared library.
1958 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
1960         * condvar.c: Make tests for ownership of mutex less strict.
1962 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
1964         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
1965         current thread and return error if not.
1966         (pthread_cond_timedwait_relative_old): Likewise.
1967         (pthread_cond_timedwait_relative_new): Likewise.
1969         * mutex.c (__pthread_once): Handle cancelled init function correctly.
1970         (pthread_once_cancelhandler): New function.
1971         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1973 2000-03-14  Andreas Jaeger  <aj@suse.de>
1975         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
1976         REG_GS.
1977         (pthread_handle_sigrestart_rt): Likewise.
1978         * signals.c (pthread_sighandler_rt): Likewise.
1980 2000-03-02  Andreas Jaeger  <aj@suse.de>
1982         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
1983         Reported by Sean Chen <sean.chen@turbolinux.com>.
1985 2000-02-28  Andreas Jaeger  <aj@suse.de>
1987         * rwlock.c: Fix typo.
1989 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
1991         * rwlock.c: Define __* variants of the functions and make old names
1992         aliases.
1993         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
1994         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
1996 2000-02-25  Andreas Jaeger  <aj@suse.de>
1998         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1999         pwrite64, lseek64, open64, and __open64 with version 2.2.
2001 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
2003         * semaphore.h (SEM_FAILED): Use 0 not NULL.
2005 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
2007         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
2008         nanosleep does not work either.  Get absolute time inside the
2009         loop.
2010         (pthread_cond_timedwait_relative_new): Likewise.
2011         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2013 2000-02-13  Andreas Jaeger  <aj@suse.de>
2015         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
2016         (pthread_cond_timedwait_relative_old): Likewise.
2018 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
2020         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
2021         but keep the code around.  A bug in the kernel prevent us from
2022         using the code.
2023         (pthread_cond_timedwait_relative_new): Likewise.
2024         (PR libc/1597 and libc/1598).
2026 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
2028         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
2029         loop around nanosleep calls instead of around most of the function
2030         (pthread_cond_timedwait_relative_new): Likewise.
2031         body.  Got rid of backwards goto and one local.
2033 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
2035         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
2036         before every nanosleep call to account for time spent in the rest
2037         of the function.
2038         (pthread_cond_timedwait_relative_new): Likewise.
2039         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
2041 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
2043         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
2044         from nanosleep call so that in case we restart we only wait for the
2045         remaining time.
2046         (pthread_cond_timedwait_relative_new): Likewise.
2047         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
2049 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
2051         * manager.c (pthread_allocate_stack): Compute guard page address
2052         correctly.  Patch by HJ Lu.
2054         * sysdeps/pthread/pthread.h: Define
2055         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
2057 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
2059         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
2060         preference handling.
2061         (pthread_rwlockattr_setkind_np): Allow
2062         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
2063         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2065 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
2067         * internals.h (pthread_readlock_info): New structure.
2068         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
2069         p_untracked_readlock_count.
2070         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2071         Add initializers for new fields.
2072         * manager.c (pthread_free): Free read/write lock lists.
2073         * queue.h (queue_is_empty): New function.
2074         * rwlock.c: Implement requirements about when readers should get
2075         locks assigned.
2076         * sysdeps/pthread/pthread.h
2077         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
2078         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
2079         Define this name as well.
2080         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2082 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
2084         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2085         Adjust initializers for struct _pthread_descr_struct change.
2086         * internals.h (struct _pthread_descr_struct): Move new elements to
2087         the end.
2089 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
2091         Redesigned how cancellation unblocks a thread from internal
2092         cancellation points (sem_wait, pthread_join,
2093         pthread_cond_{wait,timedwait}).
2094         Cancellation won't eat a signal in any of these functions
2095         (*required* by POSIX and Single Unix Spec!).
2096         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
2097         simultaneous condition variable signal (not required by POSIX
2098         or Single Unix Spec, but nice).
2099         * spinlock.c: __pthread_lock queues back any received restarts
2100         that don't belong to it instead of assuming ownership of lock
2101         upon any restart; fastlock can no longer be acquired by two threads
2102         simultaneously.
2103         * restart.h: Restarts queue even on kernels that don't have
2104         queued real time signals (2.0, early 2.1), thanks to atomic counter,
2105         avoiding a rare race condition in pthread_cond_timedwait.
2107 1999-12-31  Andreas Jaeger  <aj@suse.de>
2109         * internals.h: Remove duplicate prototype declarations.
2111         * weaks.c: Remove __THROW from prototypes since the file is not
2112         compiled by a C++ compiler.
2113         * internals.h: Likewise.
2115 1999-12-30  Andreas Jaeger  <aj@suse.de>
2117         * sysdeps/pthread/pthread.h: Move internal functions to...
2118         * sysdeps/pthread/bits/libc-lock.h: ...here.
2120 1999-12-29  Andreas Jaeger  <aj@suse.de>
2122         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
2124 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
2126         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
2127         beginning.
2129         * manager.c (__pthread_start): Add one more cast to prevent
2130         warning on 64bit machines.
2132 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
2134         * manager.c (pthread_handle_create): Set p_pid of new thread
2135         before calling the callback function to report a new thread.
2137 1999-12-20  Andreas Jaeger  <aj@suse.de>
2139         * pthread.c (pthread_initialize): Move getrlimit call after
2140         setting of errno.
2142 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
2144         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2145         pwrite64, lseek64, open64, and __open64.
2146         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
2147         pwrite64, lseek64, open64, and __open64.
2149         * manager.c (pthread_allocate_stack): Correct computation of
2150         new_thread_bottom.  Correct handling of stack size and when the
2151         rlimit method to guard for stack growth is used.
2152         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
2153         minus one pagesize (not two).
2155 1999-12-03  Andreas Jaeger  <aj@suse.de>
2157         * Versions: Add __res_state with version GLIBC_2.2.
2159         * errno.c (__res_state): New function to return thread specific
2160         resolver state.
2162         * pthread.c (pthread_initialize): Initialize p_resp.
2163         (__pthread_reset_main_thread): Also set p_resp.
2165         * manager.c (pthread_handle_create): Initialize p_resp.
2167         * internals.h: Add thread specific resolver state.
2168         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
2170 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
2172         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
2173         beginning.
2174         * sysdeps/i386/i686/pt-machine.h: Likewise.
2175         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
2177 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
2179         * manager.c (pthread_start_thread_event): Initialize p_pid already
2180         here.
2182 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
2184         * internals.h: Add prototype for __pthread_manager_event.
2185         * manager.c (__pthread_manager_event): New function.
2186         (pthread_start_thread_event): Correct computation of self.
2187         Use INIT_THREAD_SELF.
2188         * pthread.c (__pthread_manager_thread): Initialize p_lock.
2189         (__pthread_initialize_manager): Respect event flags also for creation
2190         of the manager thread.
2192 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
2194         * pthread.c (__pthread_initialize_manager): Initialize
2195         __pthread_manager_thread.p_tid.
2197 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
2199         * internals.h: Declare __pthread_last_event.
2200         * manager.c: Define __pthread_last_event.
2201         (pthread_handle_create): Set __pthread_last_event.
2202         (pthread_exited): Likewise.
2203         * join.c (pthread_exit): Likewise.
2205         * Makefile (libpthread-routines): Add events.
2206         * events.c: New file.
2207         * internals.h: Protect against multiple inclusion.
2208         Include thread_dbP.h header.
2209         (struct _pthread_descr_struct): Add new fields p_report_events and
2210         p_eventbuf.
2211         Declare event reporting functions.
2212         * join.c (pthread_exit): Signal event if this is wanted.
2213         * manager.c (__pthread_threads_events): New variable.
2214         (pthread_handle_create): Take new parameters with event information.
2215         Signal TD_CREATE event if wanted.
2216         (__pthread_manager): Adjust pthread_handle_create call.
2217         (pthread_start_thread_event): New function.  Block until manager is
2218         finished and then call pthread_start_thread.
2219         (pthread_exited): Signal TD_REAP event if wanted.
2221 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
2223         * restart.h (suspend_with_cancellation): Rewrite as a macro.
2225         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
2227 1999-10-25  Andreas Jaeger  <aj@suse.de>
2229         * internals.h: Remove K&R compatibility.
2230         * no-tsd.c: Likewise.
2231         * semaphore.h: Likewise.
2232         * signals.c: Likewise.
2233         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2234         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2235         * weaks.c: Likewise.
2237 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
2239         * pthread.c: For i386, wrap pthread_handle_sigrestart and
2240         pthread_handle_sigcancel with functions that restore %gs from the
2241         signal context.  For each signal handling function, two wrappers
2242         are required, one for a non-RT signal and one for a RT signal.
2243         * signal.c: For i386, add code to restore %gs from the signal
2244         context in pthread_sighandler and pthread_sighandler_rt.
2246 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
2248         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
2250 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
2252         * pthread.c (__pthread_initial_thread): Pass argument to
2253         PTHREAD_START_ARGS_INITIALIZER.
2254         (__pthread_manager_thread): Likewise.
2256         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
2257         initialize function.
2259         * manager.c (pthread_handle_create): Remove p_startfct initialization.
2261         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
2263 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
2265         * internals.h: Correct return types for __libc_read and __libc_write.
2267 1999-10-09  Andreas Jaeger  <aj@suse.de>
2269         * internals.h: Add __new_sem_post to get prototype in
2270         manager.c; include semaphore.h for needed types.
2272 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
2274         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
2275         directly instead of calling sem_post which should not be necessary
2276         but is faster and might help in some case to work around problems.
2277         Patch by khendricks@ivey.uwo.ca [libc/1382].
2279 1999-10-08  Andreas Schwab  <schwab@suse.de>
2281         * sysdeps/pthread/Subdirs: New file.
2282         * Implies: Removed.
2284 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
2286         * Implies: New file.
2287         * internals.h (struct _pthread_descr_struct): Add p_startfct.
2288         * manager.c (pthread_handle_create): Initialize p_startfct.
2289         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
2291 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
2293         * manager.c (__linuxthreads_pthread_threads_max): New variable.
2294         * specific.c (__linuxthreads_pthread_keys_max): New variable.
2295         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
2297         * condvar.c (pthread_cond_timedwait_relative): Never return with
2298         EINTR.  Patch by Andreas Schwab.
2300 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
2302         * signals.c (sigaction): Correct last patch.  Don't select
2303         pthread_sighandler_rt based on the signal number but instead of
2304         the SA_SIGINFO flag.
2306 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
2308         * specific.c: Move definitions of struct pthread_key_struct and
2309         destr_function to ...
2310         * internals.h: ...here.
2312 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
2314         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
2315         this instead of pthread_handle_sigrestart if the signal is an RT
2316         signal.
2318         * signals.c: Handle passing through of sighandler arguments also
2319         for real-time signals.
2321 1999-09-03  Andreas Schwab  <schwab@suse.de>
2323         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
2324         fork as weak alias.
2325         (__vfork): New function, alias vfork.
2326         * Versions: Export __fork, vfork, and __vfork in libpthread.
2328 1999-08-23  Andreas Schwab  <schwab@suse.de>
2330         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
2331         call to signal handler.
2333 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
2335         * pthread.c (__pthread_reset_main_thread): Undo last change.
2336         (__pthread_kill_other_threads_np): Reset signal handlers for the
2337         signals we used in the thread implementation here.
2339 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
2341         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
2342         for the signals we used in the thread implementation [PR libc/1234].
2344         * Versions: Export __pthread_kill_other_threads_np from libpthread
2345         for GLIBC_2.1.2.
2347         * signals.c: Pass sigcontext through wrapper to the user function.
2349 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
2351         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
2352         __libc_internal_tsd_set.
2354 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2356         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
2357         needed anymore.
2359 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2361         * internals.h: Align _pthread_descr_struct to 32 bytes.
2362         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
2363         libc/1206.
2365 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
2367         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
2368         swap function.
2370 1999-07-09  Cristian Gafton  <gafton@redhat.com>
2372         * Makefile (libpthread-routines): Add oldsemaphore routine.
2373         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
2374         sem_trywait, and sem_wait to GLIBC_2.1.
2375         * oldsemaphore.c: New file.
2376         * semaphore.c: Add default_symbol_versions for the changed functions.
2377         (__new_sem_init): Rename from sem_init.
2378         (__new_sem_post): Rename from sem_post.
2379         (__new_sem_wait): Rename from sem_wait.
2380         (__new_sem_trywait): Rename from sem_trywait.
2381         (__new_sem_getvalue): Rename from sem_getvalue.
2382         (__new_sem_destroy): Rename from sem_destroy.
2384 1999-06-23  Robey Pointer  <robey@netscape.com>
2386         * internals.h: Added p_nextlock entry to separate queueing for a
2387         lock from queueing for a CV (sometimes a thread queues on a lock
2388         to serialize removing itself from a CV queue).
2389         * pthread.c: Added p_nextlock to initializers.
2390         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
2392 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
2394         * manager.c (pthread_handle_create): Free mmap region after stack
2395         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
2397 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2399         * man/pthread_cond_init.man: Correct example.
2400         Reported by Tomas Berndtsson <tomas@nocrew.org>.
2402         * linuxthreads.texi (Condition Variables): Likewise.
2404 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
2406         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
2407         casx not cas, also successful casx returns the old value in rd
2408         and not the new value.
2410 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
2412         * manager.c: If pthread_create() is given a NULL attribute
2413         and the thread manager runs with a realtime policy, set the
2414         scheduling policy of the newly created thread back to SCHED_OTHER.
2415         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
2416         initialize the schedpolicy field of new_thread->p_start_args
2417         to that of the calling thread.
2419 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
2421         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
2422         instruction does not allow memory element to use offset.
2424 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
2426         * manager.c (pthread_allocate_stack): Optimize initialization of new
2427         thread descriptor.
2429         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
2430         Don't use initializer since it is all zeroes.
2431         (__libc_once_define): Likewise.
2433 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2435         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
2436         doesn't exist anymore.
2437         * sysdeps/i386/Implies: Likewise.
2438         * sysdeps/m68k/Implies: Likewise.
2439         * sysdeps/mips/Implies: Likewise.
2440         * sysdeps/powerpc/Implies: Likewise.
2441         * sysdeps/sparc/sparc32/Implies: Likewise.
2442         * sysdeps/sparc/sparc64/Implies: Likewise.
2444 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
2446         * sysdeps/alpha/bits/semaphore.h: Removed.
2447         * sysdeps/powerpc/bits/semaphore.h: Removed.
2448         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
2449         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
2450         * Makefile (headers): Remove bits/semaphore.h.
2452         * semaphore.h: Define _pthread_descr if necessary.
2453         Don't include limits.h.  Define SEM_VALUE_MAX directly.
2454         Define SEM_FAILED.
2455         (sem_t): Protect element names with leading __.
2456         Add declarations for sem_close, sem_open, and sem_unlink.
2457         * semaphore.c: Adjust all functions for new element names.
2458         Define sem_close, sem_open, and sem_unlink.
2459         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
2460         GLIBC_2.1.1.
2461         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
2462         necessary.
2464 1999-03-16  H.J. Lu  <hjl@gnu.org>
2466         * specific.c (pthread_key_delete): Check th->p_terminated to see
2467         if the thread is running.
2469         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2470         Added to GLIBC_2.0 for libc.so.
2472 1999-02-12  H.J. Lu  <hjl@gnu.org>
2474         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2475         __libc_allocate_rtsig): Added to GLIBC_2.1.
2477         * internals.h (DEFAULT_SIG_RESTART): Removed.
2478         (DEFAULT_SIG_CANCEL): Removed.
2480         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2481         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2482         (__pthread_sig_restart, __pthread_sig_cancel,
2483         __pthread_sig_debug): Initialized.
2484         (pthread_initialize): Call init_rtsigs () to initialize
2485         real-time signals.
2487 1999-02-03  H.J. Lu  <hjl@gnu.org>
2489         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2490         Don't restart the thread which sent REQ_DEBUG.
2491         (pthread_start_thread): Check if __pthread_sig_debug > 0
2492         before debugging.
2494         * pthread.c (__pthread_initialize_manager): Suspend ourself
2495         after sending __pthread_sig_debug to gdb instead of
2496         __pthread_sig_cancel.
2498 1999-01-24  H.J. Lu  <hjl@gnu.org>
2500         * manager.c (__pthread_manager): Delete __pthread_sig_debug
2501         from mask if __pthread_sig_debug > 0.
2502         (pthread_handle_create): Increment __pthread_handles_num.
2504         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2505         * pthread.c (__pthread_initialize_manager): Likewise.
2507         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2508         instead of __libc_allocate_rtsig (2).
2509         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2510         instead of __pthread_sig_cancel.
2511         (pthread_handle_sigdebug): Fix comments.
2513 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
2515         * manager.c (pthread_allocate_stack): Set
2516         __pthread_nonstandard_stacks if user-specified stack is used.
2518 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
2520         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2521         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2523 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
2525         * pthread.c: Use a third signal __pthread_sig_debug distinct
2526         from __pthread_sig_cancel to notify gdb when a thread is
2527         created
2528         * manager.c: Likewise.
2529         * internals.h: Likewise.
2530         * signals.c: The implementation of sigwait(s) assumed that
2531         all signals in s have signal handlers already attached.
2532         This is not required by the standard, so make it work
2533         also if some of the signals have no handlers.
2535 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
2537         * linuxthreads.texi: Remove pointers from first @node.  Move old
2538         @node spec inside comment.
2540 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
2542         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2543         _IO_lock_unlock.
2545 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
2547         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2548         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2550 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
2552         * manager.c: Threads now send __pthread_sig_cancel on termination.
2553         Change clone call and signal masks.
2554         * thread.c (pthread_handle_sigrestart): Remove special code for
2555         manager.
2556         (pthread_handle_sigcancel): In manager thread call
2557         __pthread_manager_sighandler.
2558         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2559         * sysdeps/i386/i686/pt-machine.h: Likewise.
2560         Patches by Xavier Leroy.
2562 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
2564         * spinlock.c (__pthread_unlock): Don't crash if called for an
2565         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2567         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2568         overall runtime.
2570 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
2572         * Examples/ex3.c: Wait until all threads are started before
2573         searching for the number to avoid race condition on very fast
2574         systems.
2576 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2578         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2579         declaration since it's not needed.
2581         * sysdeps/pthread/pthread.h: Move internal functions to ...
2582         * internals.h: ...here.
2584 1998-12-02  H.J. Lu  <hjl@gnu.org>
2586         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2587         SIGRTMIN is defined.
2588         (__pthread_sig_cancel): Likewise.
2590 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2592         * wrapsyscall.c: Include <sys/mman.h> for msync,
2593         <stdlib.h> for system and <termios.h> for tcdrain prototype.
2594         Correct msync declaration.
2596 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
2598         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2599         __libc_tsd_set): New macros for new interface.
2600         * no-tsd.c: New file, provide uninitialized defns of
2601         __libc_internal_tsd_get and __libc_internal_tsd_set.
2602         * Makefile (routines): Add no-tsd.
2604 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
2606         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
2607         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2608         __libc_internal_tsd_set): Move decls to ...
2609         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
2610         declarations.
2612         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2613         __libc_internal_tsd_set): Make these pointers to functions, not
2614         functions; remove #pragma weak decls for them.
2615         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
2616         Define static functions and initialized pointers to them.
2618 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
2620         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
2621         (CFLAGS-specific.c): Likewise.
2622         (CFLAGS-pthread.c): Likewise.
2623         (CFLAGS-ptfork.c): Likewise.
2624         (CFLAGS-cancel.c): Likewise.
2625         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
2626         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
2628         * mutex.c (pthread_mutex_init): Define as strong symbol.
2629         (pthread_mutex_destroy): Likewise.
2630         (pthread_mutex_trylock): Likewise.
2631         (pthread_mutex_lock): Likewise.
2632         (pthread_mutex_unlock): Likewise.
2633         (pthread_mutexattr_init): Likewise.
2634         (pthread_mutexattr_destroy): Likewise.
2635         (pthread_once): Likewise.
2636         * ptfork.c (pthread_atfork): Likewise.
2637         * specific.c (pthread_key_create): Likewise.
2638         (pthread_setspecific): Likewise.
2639         (pthread_getspecific): Likewise.
2641 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
2643         * linuxthreads.texi: Fix punctuation after xref.
2645 1998-11-10  H.J. Lu  <hjl@gnu.org>
2647         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
2648         if it is defined in <linux/limits.h>.
2650 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
2652         * spinlock.h (__pthread_trylock): Define inline.
2653         (__pthread_lock): Add extra parameter to declaration.  Declare
2654         using internal_function.
2655         (__pthread_unlock): Declare using internal_function.
2656         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
2657         of local variable self.  Avoid recomputing self.  Define using
2658         internal_function.
2659         (__pthread_trylock): Remove.
2660         (__pthread_unlock): Define using internal_function.
2661         * cancel.c: Adjust for __pthread_lock interface change.  Use already
2662         computed self value is possible.
2663         * condvar.c: Likewise.
2664         * join.c: Likewise.
2665         * manager.c: Likewise.
2666         * mutex.c: Likewise.
2667         * pthread.c: Likewise.
2668         * rwlock.c: Likewise.
2669         * semaphore.c: Likewise.
2670         * signals.c: Likewise.
2672 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
2674         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
2675         __ to field names of the struct.
2676         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
2677         Likewise.
2678         (pthread_attr_t): Likewise.
2679         (pthread_cond_t): Likewise.
2680         (pthread_condattr_t): Likewise.
2681         (pthread_mutex_t): Likewise.
2682         (pthread_mutexattr_t): Likewise.
2683         (pthread_rwlock_t): Likewise.
2684         (pthread_rwlockattr_t): Likewise.
2685         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
2686         * cancel.c: Likewise.
2687         * condvar.c: Likewise.
2688         * manager.c: Likewise.
2689         * mutex.c: Likewise.
2690         * pthread.c: Likewise.
2691         * ptlongjmp.c: Likewise.
2692         * rwlock.c: Likewise.
2693         * spinlock.c: Likewise.
2695 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
2697         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
2698         also with PT_EI.
2700         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
2701         definitions.
2703         * Makefile (libpthread-routines): Add pt-machine.
2704         * pt-machine.c: New file.
2705         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
2706         yet defined.  Use PT_EI in extern inline definitions.
2707         * sysdeps/arm/pt-machine.h: Likewise.
2708         * sysdeps/i386/pt-machine.h: Likewise.
2709         * sysdeps/i386/i686/pt-machine.h: Likewise.
2710         * sysdeps/m68k/pt-machine.h: Likewise.
2711         * sysdeps/mips/pt-machine.h: Likewise.
2712         * sysdeps/powerpc/pt-machine.h: Likewise.
2713         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2714         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2716 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2718         * semaphore.h: Include <sys/types.h> so that _pthread_descr
2719         is declared.
2721 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
2723         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
2724         argument.
2725         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
2727 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
2729         * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
2730         guard.
2732 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2734         * signals.c (sigaction): Check that sig is less than NSIG to avoid
2735         array index overflow.
2737 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
2739         * sysdeps/pthread/semaphore.h: New file.
2741 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
2743         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
2744         _LIBC_TSD_KEY_DL_ERROR.
2746 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
2748         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
2749         * sysdeps/i386/pt-machine.h: Likewise.
2750         Suggested by Roland McGrath.
2752 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
2754         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
2755         access thread data with non-constant offsets.
2756         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
2757         necessary.
2759         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
2760         THREAD_SETMEM_NC definitions.
2762         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
2763         THREAD_SETMEM_NC.
2764         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2766 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
2768         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
2769         not already defined.
2770         (struct _pthread_descr_struct): Add p_self and p_nr field.
2771         * manager.c (__pthread_handles): Define second element to point
2772         to manager thread.
2773         (__pthread_handles_num): Initialize to 2.
2774         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
2775         (pthread_start_thread): Likewise.
2776         (pthread_handle_create): Start search for free slot at entry 2.
2777         Initialize new fields p_self and p_nr.
2778         Call __clone with CLONE_PTRACE if available.
2779         (pthread_free): Call FREE_THREAD_SELF if available.
2780         * pthread.c (__pthread_initial_thread): Initialize new fields.
2781         (__pthread_manager_thread): Likewise.
2782         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
2784         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
2785         elements of the thread descriptor.
2786         * condvar.c: Likewise.
2787         * errno.c: Likewise.
2788         * join.c: Likewise.
2789         * manager.c: Likewise.
2790         * pthread.c: Likewise.
2791         * ptlongjmp.c: Likewise.
2792         * semaphore.c: Likewise.
2793         * signals.c: Likewise.
2794         * specific.c: Likewise.
2795         * spinlock.c: Likewise.
2797         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
2799         * sysdeps/i386/useldt.h: New file.
2800         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
2802         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
2803         THREAD_SETMEM using __thread_self.
2804         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2806 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
2808         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
2809         turned out that we didn't need to queue after all.
2811 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
2813         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
2814         and wastes space; correct types.
2816 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
2818         * signals.c (sigaction): Handle NULL argument.
2820 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
2822         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
2823         of sigset_t.
2825 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2827         * Makefile (linuxthreads-version): Extract correct number from
2828         Banner.
2830 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
2832         * Banner: Bump version number to 0.8
2833         * FAQ.html: Many updates, in particular w.r.t. debugging.
2834         * manager.c: Support for non-default stacksize for
2835         LinuxThreads-allocated stacks;
2836         don't use guard pages for stacks with default size, rely on
2837         rlimit(RLIMIT_STACK) instead (it's cheaper).
2838         * attr.c: Likewise.
2839         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
2840         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
2841         * condvar.c: Likewise.
2842         * internals.h: Likewise.
2843         * restart.h: Likewise.
2844         * signals.c: Likewise.
2845         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
2847 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2849         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
2850         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
2851         * Versions: Put __pthread_mutexattr_settype under version
2852         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
2853         __pthread_mutexattr_gettype.
2855 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2857         * sysdeps/pthread/bits/libc-lock.h: Make
2858         __pthread_mutexattr_settype weak.  Don't make
2859         __pthread_mutexattr_setkind_np weak.
2861 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
2863         * manager.c (pthread_handle_create): Check whether sched_setscheduler
2864         call can succeed here.
2866         * mutex.c: Define __pthread_mutexattr_settype and make
2867         __pthread_mutexattr_setkind_np an alias.
2868         Likewise for __pthread_mutexattr_gettype.
2870 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
2872         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
2873         is root.
2875 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
2877         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
2879 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2881         * Examples/ex6.c: Include <unistd.h> for usleep.
2883 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2885         * Examples/ex4.c (main): Use exit, not pthread_exit.
2887 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
2889         * Versions: Add __pthread_mutexattr_gettype and
2890         __pthread_mutexattr_settype.
2891         * lockfile.c: Use __pthread_mutexattr_settype instead of
2892         __pthread_mutexattr_setkind_np.
2893         * mutex.c: Define __pthread_mutexattr_gettype and
2894         __pthread_mutexattr_settype.
2895         * weak.c: Likewise.
2896         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
2897         __pthread_mutexattr_settype.
2898         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
2899         Use __pthread_mutexattr_settype.
2901 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
2903         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
2904         * mutex.c: Define weak alias pthread_mutexattr_gettype and
2905         pthread_mutexattr_settype.
2906         * sysdeps/pthread/pthread.h: Declare these functions.
2907         Move pthread_sigmask and pthread_kill declaration in separate header.
2908         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
2910 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
2912         * Makefile: Add rules to compile and run tests.
2913         * Examples/ex1.c: Little changes to fix warnings.
2914         * Examples/ex2.c: Likewise.
2915         * Examples/ex3.c: Likewise.
2916         * Examples/ex4.c: Likewise.
2917         * Examples/ex5.c: Likewise.
2918         * Examples/ex6.c: New file.
2920 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
2922         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
2924 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2926         * attr.c: Include <string.h>.
2928 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
2930         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
2931         * internals.h: Include limits.h.
2932         * manager.c: Use memcpy to copy sched_param.
2933         * ptfork.c: Include errno.h.
2934         * pthread.c: Likewise.
2935         * semaphore.c: Likewise.
2936         * specific.c: Likewise.
2937         * spinlock.h: Likewise.
2938         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
2939         type definition to ...
2940         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
2942 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
2944         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
2946         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
2947         as macros as demanded in POSIX.1, Annex C.
2949 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
2951         * internals.h (struct pthread_request): For free use pthread_t
2952         instead of pthread_descr.
2953         * join.c (pthread_join): Pass thread_id, not th to manager.
2954         (pthread_detach): Likewise.
2955         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
2956         (pthread_exited): Remove detached queue code.
2957         (pthread_handle_free): Expect thread ID parameter and use it to
2958         validate the thread decsriptor.  Don't use detached queue.
2959         Patches by Xavier Leroy.
2961 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
2963         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
2964         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
2965         __pthread_atfork, __pthread_key_create, __pthread_once.
2966         * internals.h: Doc fix.
2967         * pthread.c (__pthread_initialize): Define again.
2969 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
2971         * manager.c (pthread_exited): If thread is not detached put it on
2972         special list.
2973         (pthread_handle_free): If thread is not on list with living threads
2974         search on list with detached threads.
2976         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
2977         for new definition of pthread_rwlock_t.
2979         * spinlock.c: Correct test whether to compile
2980         __pthread_compare_and_swap or not.
2982 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
2984         * attr.c: Finish user stack support.  Change locking code to be safe
2985         in situations with different priorities.
2986         * cancel.c: Likewise.
2987         * condvar.c: Likewise.
2988         * internals.h: Likewise.
2989         * join.c: Likewise.
2990         * manager.c: Likewise.
2991         * mutex.c: Likewise.
2992         * pthread.c: Likewise.
2993         * ptlongjmp.c: Likewise.
2994         * queue.h: Likewise.
2995         * rwlock.c: Likewise.
2996         * semaphore.c: Likewise.
2997         * semaphore.h: Likewise.
2998         * signals.c: Likewise.
2999         * spinlock.c: Likewise.
3000         * spinlock.h: Likewise.
3001         * sysdeps/pthread/pthread.h: Likewise.
3002         Patches by Xavier Leroy.
3004         * sysdeps/i386/i686/pt-machine.h: New file.
3006 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
3008         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
3009         [sg]et_stackaddr prototypes always available.
3011         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3012         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
3014 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
3016         * manager.c (pthread_free): Undo patch from 980430.
3017         Reported by David Wragg <dpw@doc.ic.ac.uk>.
3019 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
3021         * manager.c: Define __pthread_manager_adjust_prio and use it to
3022         increase priority when needed.
3023         * internals.h: Add prototype for __pthread_manager_adjust_prio.
3024         * mutex.c: Optimize mutexes to wake up only one thread.
3025         * pthread.c: Move PID of manager for global variable in structure
3026         element.
3027         Patches by Xavier Leroy.
3029 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
3031         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
3033 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
3035         * attr.c: Correct typo.
3037 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
3039         * manager.c (pthread_free): Unmap guard before the stack.
3040         Patch by Matthias Urlichs.
3042 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
3044         * manager.c (pthread_free): Detect already free child.
3045         Patch by Xavier Leroy, reported by Matthias Urlichs.
3047 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3049         * Makefile (linuxthreads-version): Renamed back from
3050         libpthread-version.
3052 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
3054         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
3055         __libc_longjmp.
3057 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
3059         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
3060         * internals.h: Add definitions for new spinlock implementation.
3061         * ptlongjmp.c: New file.
3062         * spinlock.c: New file.
3063         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
3064         new function __pthread_acquire to prevent deadlocks with thread
3065         with different priorities.
3066         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
3068 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3070         * manager.c (__pthread_manager): Reduce first argument to select
3071         to include just the needed file descriptor.
3073 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
3075         * manager.c: Fix last patch which caused core dumps.
3077         * pthread.c: Correctly handle missing SIGRTMIN.
3079 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3081         * libpthread.map: Add __libc_internal_tsd_get and
3082         __libc_internal_tsd_set.  Add missing cancelable functions. Export
3083         libc internal versions of the cancelable functions.
3085 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
3087         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
3089 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
3091         * attr.c: Implement pthread_attr_[gs]etguardsize,
3092         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
3093         Change pthread_attr_init to have two interfaces.
3094         * internals.h (struct _pthread_descr_struct): Add new fields for
3095         above functions.
3096         * libpthread.map: Add names in GLIBC_2.1 section.
3097         * manager.c (pthread_handle_create): Implement guardsize and
3098         user stack.
3099         (pthread_free): Likewise.
3100         * pthread.c (pthread_create): Add new interface for changed
3101         pthread_attr_t.
3102         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
3103         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
3104         PTHREAD_STACK_MIN.
3106 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
3108         * manager.c: Enable resetting of the thread scheduling policy
3109         to SCHED_OTHER when the parent thread has a different one.
3111 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
3113         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3114         _POSIX_ASYNCHRONOUS_IO.
3116         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
3117         mutexes.
3118         * mutex.c: Implement new mutex types.
3120         * internals.h: Include <signal.h>.
3122         * libpthread.map: Add __erno_location and __h_errno_location.
3124         * errno.c: Return pointer to variable actually in use.  This might
3125         not be the one in the thread structure.
3126         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
3127         and p_h_errnop.
3128         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
3129         of manager thread structure.
3130         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
3131         thread.
3132         * pthread.c: Adapt initializer for thread structures.
3133         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
3134         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
3135         current thread to global variables.
3137 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
3139         * rwlock.c: New file.
3140         * Makefile (libpthread-routines): Add rwlock.
3141         * sysdeps/pthread/pthread.h: Define data structures and declare
3142         functions.
3143         * libpthread.map: Add new functions.
3145 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
3147         * sysdeps/arm/pt-machine.h: New file; add ARM support.
3148         * sysdeps/arm/Implies: likewise.
3149         * README: Document it.
3151 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3153         * signals.c: Remove unneeded initializer for sigwaited, saving a
3154         warning.
3156 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3158         * semaphore.c (sem_init): Set sem_spinlock only if available.
3160 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
3162         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
3163         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
3165         * Makefile: Update from LinuxThreads 0.7.
3166         * internals.h. Likewise.
3167         * manager.c: Likewise.
3168         * mutex.c: Likewise.
3169         * pthread.c: Likewise.
3170         * signals.c: Likewise.
3171         * specific.c: Likewise.
3172         * Examples/ex3.c: Likewise.
3174 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
3176         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
3177         open.
3179 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
3181         * wrapsyscall.c: Add socket functions which are also cancelation
3182         points.
3184 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
3186         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
3187         New functions for fast thread specific data within libc.
3189         * internals.h: Add new array p_libc_specific to struct
3190         _pthread_descr_struct.
3192         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
3194 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
3196         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
3197         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
3199 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
3201         * internals.h (struct _pthread_descr_struct): Add definitions for
3202         two-level specific key handling.
3203         * manager.c (pthread_handle_create): Initialize specific memory array.
3204         * specific.c: Implement two-level key handling.
3205         * weaks.c: Don't provide dummy key handling.
3206         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
3207         Add definition of __libc_key_t.
3208         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
3209         as 1024.
3210         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
3211         PTHREAD_DESTRUCTOR_ITERATIONS.
3213         * manager.c (pthread_handle_create): Compare mmap result with
3214         MAP_FAILED.
3216         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
3217         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
3219 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
3221         sysdeps/sparc -> sysdeps/sparc/sparc32
3222         sysdeps/sparc64 -> sysdeps/sparc/sparc64
3224         * internals.h: Change definition of THREAD_SELF to be an expression,
3225         not a statement that did a return.
3226         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
3227         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
3228         Follow Solaris and use a "system reserved" register (%g6) to hold
3229         the thread descriptor.
3230         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3232 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
3234         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
3235         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
3236         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
3238         * semaphore.c: Include spinlock.h only when needed.
3240         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
3241         keys for entries not in use.
3243         * weaks.c: Implement key handling functions for real.
3245 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
3247         Initial sparc64-linux support:
3248         * sysdeps/sparc64/Implies: New file.
3249         * sysdeps/sparc64/pt-machine.h: Likewise.
3251 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
3253         * semaphore.c: Include spinlock.h at correct place.
3254         Patch by HJ Lu.
3256 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
3258         The Great Bit File Move:
3259         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
3260         * sysdeps/powerpc/semaphorebits.h: Likewise.
3261         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
3262         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
3263         * sysdeps/pthread/libc-lock.h: -> bits/
3264         * sysdeps/pthread/stdio-lock.h: Likewise.
3265         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
3266         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
3267         * semaphore.h: Likewise.
3268         * sysdeps/pthread/pthread.h: Likewise.
3270         * lockfile.c: <foo.h> -> <bits/foo.h>.
3271         * semaphore.h: Likewise.
3273         * Makefile: (headers): foo.h -> bits/foo.h.
3274         * sysdeps/pthread/Makefile: Likewise.
3276 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3278         * semaphore.c (sem_init): Set sem_spinlock only if available.
3280         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
3281         asm constraints.
3283 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
3285         Update from LinuxThreads 0.6.
3287         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
3288         and __sched_get_priority_min instead of names without `__'.
3290         * manager.c: Rewrite large parts to implement opaque pthread_t.
3292         * cancel.c: Adapt for opaque pthread_t type.
3293         * condvar.c: Likewise.
3294         * errno.c: Likewise.
3295         * join.c: Likewise.
3296         * mutex.c: Likewise.
3297         * pthread.c: Likewise.
3298         * signals.c: Likewise.
3299         * specific.c: Likewise.
3300         * restart.h: Likewise.
3301         * queue.h: Likewise.
3302         * Examples/ex3.c: Likewise.
3303         * Examples/ex4.c: Likewise.
3304         * sysdeps/pthread/pthread.h: Likewise.
3306         * pthread.c: Accumulate time for all threads in thread manager.
3308         * semaphore.c: Implement fallback implementation for architectures
3309         sometimes missing compare-exchange operations.
3311         * cancel.c (pthread_cancel): Validate handle argument.
3312         * join.c (pthread_join): Likewise.
3313         (pthread_detach): Likewise.
3314         * signals.c (pthread_kill): Likewise.
3316         * spinlock.h (acquire): Use __sched_yield not sched_yield.
3318         * queue.h (enqueue): Enqueue thread according to priority.
3320         * internals.c (struct pthread_start_args): New struct for passing
3321         args to cloning function.
3322         (struct _pthread): Rename to _pthread_descr_struct and adapt for
3323         opaque pthread_t.
3325         * Examples/Makefile (clean): Pass -f option to rm.
3327         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
3328         and define TEST_FOR_COMPARE_AND_SWAP.
3329         * sysdeps/i386/i486/pt-machine.h: Removed.
3331         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
3332         to 1024.
3334 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
3336         * restart.h (suspend): Clear p_signal before suspending.
3337         (suspend_with_cancellation): Likewise.
3338         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
3340         * weaks.c: Make __pthread_key_create return 1.
3341         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
3342         __libc_getspecific, __libc_setspecific, and __libc_key_t.
3343         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
3344         using libio.
3346 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
3348         * sysdeps/sparc/pt-machine (RELEASE): Fix.
3350 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
3352         * sysdeps/powerpc/Implies: Added.
3353         * sysdeps/powerpc/pt-machine.h: Added.
3354         * sysdeps/powerpc/semaphorebits.h: Added.
3356 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
3358         * pthread.c (__pthread_initial_thread): Correct
3359         initializer.
3360         (__pthread_manager_thread): Likewise.
3361         Reported by Andreas Jaeger.
3363 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
3365         Since sigset_t no longer fits in a register, we can't pass in the
3366         thread's initial mask so easily.  Take this opportunity to simplify
3367         the clone implementation by only accepting a single void* argument.
3369         * manager.c (__pthread_manager): Put thread vitals in the thread
3370         struct instead of as arguments through clone.
3371         (pthread_start_thread): Look for them there.
3372         * internals.h (struct _pthread): Add p_initial_fn,
3373         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
3374         * pthread.c (pthread_initialize_manager): Revise clone invocation.