Updated to fedora-glibc-20050627T0850
[glibc.git] / linuxthreads / ChangeLog
blobd952f9c1646dff6b64423fcf64cffafc8a013c51
1 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
4         Invoke CGOTSETUP and CGOTRESTORE.
5         (CGOTSETUP, CGOTRESTORE): Define.
6         (SINGLE_THREAD_P): Add variant for new PLT/GOT layout.
7         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork): Avoid
8         bl into the GOT when HAVE_ASM_PPC_REL16.
10 2005-05-30  Jakub Jelinek  <jakub@redhat.com>
12         * man/Makefile (SOURCES): Remove all man pages but
13         pthread_cleanup_push.man, pthread_kill_other_threads_np.man
14         and pthread_mutexattr_setkind_np.man.
15         * man/pthread_cleanup_push.man: Replace (3) with (3p) where man page
16         was not kept.
17         * man/pthread_kill_other_threads_np.man: Likewise.
18         * man/pthread_mutexattr_setkind_np.man: Likewise.
20 2005-05-23  Roland McGrath  <roland@redhat.com>
22         * sysdeps/arm, sysdeps/unix/sysv/linux/arm: Subdirectories moved to
23         ports repository.
25 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
27         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
28         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
29         __librt_*_asynccancel@local.
31 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
33         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
34         all occurrences of JUMPTARGET.  Instead append @local to labels.
35         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Likewise.
37 2005-05-19  Richard Henderson  <rth@redhat.com>
39         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Use
40         __sync_val_compare_and_swap, not explicit _si variant.
41         (__pthread_spin_trylock): Likewise.
43 2005-05-05  Daniel Jacobowitz  <dan@codesourcery.com>
45         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
46         .eh_frame section, use cfi_* directives.
48 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
50         * sysdeps/pthread/getcpuclockid.c: Include spinlock.h.
51         Fix a typo in kernel-posix-cpy-timers.h include name, use <> instead
52         of "" includes.
53         (pthread_getcpuclockid): Fix 2 typos.
55 2005-04-27  Roland McGrath  <roland@redhat.com>
57         * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid)
58         [__NR_clock_getres]: Use kernel-supplied CPU clocks if available.
60 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
62         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Use
63         functionally equivalent, but shorter instructions.
65 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
67         * sysdeps/mips/tls.h: New file.
68         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
70 2005-03-21  GOTO Masanori  <gotom@debian.or.jp>
72         * linuxthreads/sysdeps/m68k/Makefile: Remove to delete
73         unneeded o-iterator thing.
75 2005-02-21  H.J. Lu  <hongjiu.lu@intel.com>
77         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Add local _init
78         and _fini labels.
80 2005-03-05  Ulrich Drepper  <drepper@redhat.com>
82         * sysdeps/i386/Makefile (CFLAGS-pt-initfini.s): Unconditionally
83         use -mtune.
85 2005-03-05  Roland McGrath  <roland@redhat.com>
87         * sysdeps/i386/Makefile (CFLAGS-pt-initfini.s): Use $(cc-mtune).
89 2005-03-05  Jakub Jelinek  <jakub@redhat.com>
91         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Rework for GCC 4.
93 2005-02-09  Daniel Jacobowitz  <dan@codesourcery.com>
95         [BZ #740]
96         * descr.h (__pthread_find_self, thread_self): Mark as pure
97         instead of const.
99 2005-02-07  Jakub Jelinek  <jakub@redhat.com>
101         [BZ #739]
102         * specific.c (pthread_key_delete): If pthread_create has not been
103         called yet, clear p_specific for the current thread.
104         * Makefile (tests): Add tst-tsd1.
105         * tst-tsd1.c: New test.
107 2005-01-08  Andreas Jaeger  <aj@suse.de>
109         * pthread.c (init_one_static_tls): Adjust initialization of DTV
110         entry for static tls deallocation fix.
112         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
113         also contains information whether the memory pointed to is static
114         TLS or not, include <stdbool.h>.
115         * sysdeps/i386/tls.h: Likewise.
116         * sysdeps/ia64/tls.h: Likewise.
117         * sysdeps/powerpc/tls.h: Likewise.
118         * sysdeps/s390/tls.h: Likewise.
119         * sysdeps/sh/tls.h: Likewise.
120         * sysdeps/sparc/tls.h: Likewise.
121         * sysdeps/x86_64/tls.h: Likewise.
123 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
125         * Makefile (tests): Add tst-align.
126         * tst-align.c: New test.
127         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Add
128         -mpreferred-stack-boundary=4.
130 2004-12-12  Ulrich Drepper  <drepper@redhat.com>
132         * internals.h: Include <stdbool.h> to match includes used in nptl.
134 2004-12-01  Jakub Jelinek  <jakub@redhat.coM.
136         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
137         _POSIX_THREAD_CPUTIME): Define to 0.
138         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
139         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
140         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
141         __timer_signal_thread_tclk): Remove.
142         (init_module): Remove their initialization.
143         (thread_cleanup): Remove their cleanup assertions.
144         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
145         __timer_signal_thread_tclk): Remove.
146         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
147         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
148         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
149         * tst-clock1.c (do_test): Check for availability of CPU clock.
151 2004-11-18  Daniel Jacobowitz  <dan@codesourcery.com>
153         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Update RETINSTR use.
154         * sysdeps/unix/sysv/linux/arm/vfork.S: Likewise.
156 2004-12-02  Roland McGrath  <roland@redhat.com>
158         * Makefile (libpthread-nonshared): Variable removed.
159         ($(objpfx)libpthread_nonshared.a): Target removed.
160         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
161         These are now handled by generic magic from
162         libpthread-static-only-routines being set.
164 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
166         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
167         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
168         _POSIX_THREAD_PRIO_PROTECT): Define.
169         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
170         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
171         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
173 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
175         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
176         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
177         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
178         _POSIX_TYPED_MEMORY_OBJECTS): Define.
179         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
180         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
181         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
183 2004-11-05  Maciej W. Rozycki  <macro@mips.com>
185         * sysdeps/mips/pspinlock.c: Include <sgidefs.h>.  Use _ABIO32,
186         _ABIN32 and _ABI64 for ABI selection throughout.
187         * sysdeps/mips/pt-machine.h: Use _ABIO32, _ABIN32 and _ABI64 for
188         ABI selection throughout.
190 2004-10-18  Roland McGrath  <roland@redhat.com>
192         [BZ #406]
193         * Makefile (linuxthreads-CPPFLAGS): New variable;
194         adds -DIS_IN_linuxthreads=1.
195         * sysdeps/i386/tls.h: Protect "useldt.h" with
196         [!IS_IN_linuxthreads && !DO_MODIFY_LDT].
197         * sysdeps/i386/i686/pt-machine.h: Revert last change.
199 2004-10-14  Jakub Jelinek  <jakub@redhat.com>
201         * sysdeps/pthread/errno-loc.c: Don't undef #errno
202         if RTLD_PRIVATE_ERRNO.
204 2004-10-05  Dwayne Grant McConnell  <dgm69@us.ibm.com>
206         * pthread.c: Mask restart signal during cancel signal handler.
208 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
210         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
211         _POSIX_THREAD_CPUTIME): Define to 0.
213 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
215         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Set _POSIX_CPUTIME
216         and _POSIX_THREAD_CPUTIME to zero.
217         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
219         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
220         _POSIX_THREAD_PROCESS_SHARED and _POSIX_CLOCK_SELECTION as -1.
221         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
222         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
223         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
225 2004-09-25  Roland McGrath  <roland@redhat.com>
227         [BZ #406]
228         * sysdeps/i386/i686/pt-machine.h: Don't #include "../useldt.h" if
229         [_TLS_H], since sysdeps/i386/tls.h includes it after including us.
231 2004-09-24  Roland McGrath  <roland@redhat.com>
233         [BZ #406]
234         * sysdeps/i386/tls.h: Move #include "useldt.h" outside
235         of [__ASSUME_LDT_WORKS > 0] test.
236         Reported by Carlos Velasco <carlos.velasco@newipnet.com>.
238 2004-09-21  Roland McGrath  <roland@redhat.com>
240         * Versions: Add comment about linuxthreads' frozen ABI.
242 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
244         * Versions: Remove exports for pthread_set*id_np functions.
245         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
246         for now.
247         * Makefile: Don't build pthread_set*id code for now.
249 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
251         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
252         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
253         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
254         and pthread_setresuid_np.
255         * pthread_setgid_np.c: New file.
256         * pthread_setuid_np.c: New file.
257         * pthread_setegid_np.c: New file.
258         * pthread_seteuid_np.c: New file.
259         * pthread_setregid_np.c: New file.
260         * pthread_setreuid_np.c: New file.
261         * pthread_setresgid_np.c: New file.
262         * pthread_setresuid_np.c: New file.
263         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
264         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
265         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
266         and pthread_setresuid_np.
267         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
268         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
269         pthread_setregid, and pthread_setresgid.
271 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
273         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
274         for __USE_XOPEN2K.
275         * sysdeps/pthread/bits/pthreadtypes.h: Define rwlock types also
276         for __USE_XOPEN2K.  [BZ #320]
278 2004-09-04  Jakub Jelinek  <jakub@redhat.com>
280         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
282 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
284         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
285         the initialization function might throw.
287 2004-08-30  Roland McGrath  <roland@frob.com>
289         * Makefile (libpthread-abi-frozen): New variable.
291 2004-08-26  Roland McGrath  <roland@redhat.com>
293         * configure.in: New file.  If nptl add-on is also selected, barf if
294         explicit and elide ourselves if implicit.
295         * configure: Now generated.
297 2004-08-25  Richard Sandiford  <rsandifo@redhat.com>
299         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (CENABLE, CDISABLE,
300         __local_multiple_threads): Fix definitions for IS_IN_librt.
301         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
303 2004-08-22  Andreas Schwab  <schwab@suse.de>
305         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO) [IS_IN_librt]:
306         Save gp around CENABLE/CDISABLE calls.
308 2004-08-15  Roland McGrath  <roland@frob.com>
310         * pthread_atfork.c: Update copyright terms including special exception
311         for these trivial files, which are statically linked into executables
312         that use dynamic linking for the significant library code.
314 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
316         * libc-tsd.c: Move resolv.h include before the #if.
317         (__res_maybe_init): New function.  Add libc_hidden_def.
319 2004-08-02  Ulrich Drepper  <drepper@redhat.com>
321         * linuxthreads.texi (Cleanup Handlers): Fix typo.
322         Reported by Bjoern Engelmann <bjengelmann@gmx.de>.
324 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
326         [BZ #284]
327         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
328         instead of clockid_t.
330 2004-07-21  Roland McGrath  <roland@redhat.com>
332         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
334 2004-07-02  Roland McGrath  <roland@redhat.com>
336         * configure: Don't exit.
338 2004-07-20  Alexandre Oliva  <aoliva@redhat.com>
340         * sysdeps/mips/pt-machine.h: Use standard names for ABI macros,
341         include sgidefs.h.
342         * sysdeps/mips/atomicity.h: Likewise.
344 2004-07-19  Alexandre Oliva  <aoliva@redhat.com>
346         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
347         Remove redundant override that missed -g0.
349 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
351         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
352         (__local_multiple_threads): Define for librt.
353         (SINGLE_THREAD_P): Likewise.
355 2004-07-07  Jakub Jelinek  <jakub@redhat.com>
357         * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid): Allow
358         using other thread's clock.
359         * ptclock_gettime.c (__pthread_clock_gettime): Likewise.
360         * ptclock_settime.c (__pthread_clock_settime): Likewise.
361         * internals.h (__pthread_clock_gettime, __pthread_clock_settime):
362         Remove prototypes.
363         Reported by Bernd Schmidt <bernds@redhat.com>.
364         * Makefile (librt-tests): Add tst-clock1.
365         * tst-clock1.c: New test.
367         * sysdeps/x86_64/Versions: New file.
368         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
369         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
371 2004-04-16  Andreas Schwab  <schwab@suse.de>
373         * sysdeps/ia64/tls.h (INIT_SYSINFO): Cast dl_sysinfo to void*.
375 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
377         * sysdeps/s390/pspinlock.c (__pthread_spin_lock,
378         __pthread_spin_trylock): Use constraint "m" instead of "0" for
379         futex.
380         * sysdeps/ia64/pt-machine.h (__compare_and_swap,
381         __compare_and_swap_with_release_semantic, testandset): Use
382         constraint "m" instead of "0" for futex.
384 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
386         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Fix
387         branch offset for a PLT entry.
388         (CDISABLE): Likewise.
390 2004-05-31  Andreas Jaeger  <aj@suse.de>
392         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
393         Set to -fno-unit-at-a-time.
394         Patch by Dan Kegel <dank@kegel.com>.
396 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
398         * tst-stack1.c: Don't include mcheck.h.
399         (do_test): Make sure user defined stacks aren't reused,
400         don't free them at the end.  [BZ #110]
402 2004-05-02  Jakub Jelinek  <jakub@redhat.com>
404         * manager.c: Include not-cancel.h.
405         (__pthread_manager): Use read_not_cancel instead of __libc_read.
406         (pthread_start_thread, __pthread_manager_sighandler): Use
407         write_not_cancel instead of __libc_write.
408         (pthread_reap_children): Use waitpid_not_cancel instead of
409         __libc_waitpid.
410         * pthread.c: Include not-cancel.h.
411         (__pthread_initialize_minimal, __pthread_create_2_1,
412         pthread_onexit_process, __pthread_message): Use
413         write_not_cancel instead of __libc_write.
414         (__pthread_initialize_manager): Likewise.  Use close_not_cancel
415         instead of __libc_close.
416         (__pthread_reset_main_thread): Use close_not_cancel instead of
417         __libc_close.
418         * join.c: Include not-cancel.h.
419         (__pthread_do_exit, pthread_join, pthread_detach): Use
420         write_not_cancel instead of __libc_write.
421         * semaphore.c: Include not-cancel.h.
422         (__new_sem_post): Use write_not_cancel instead of __libc_write.
423         * specific.c: Include not-cancel.h.
424         (pthread_key_delete): Use write_not_cancel instead of __libc_write.
426 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
428         * Versions (libc): Add __on_exit and __libc_sigaction.
430 2004-04-28  Jakub Jelinek  <jakub@redhat.com>
432         * semaphore.c (sem_timedwait): Return -1 and set errno instead of
433         returning error number [BZ #133].  Patch by <rmhaddad@yahoo.com>.
435 2004-04-22  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
437         * sysdeps/unix/sysv/linux/sh/vfork.S: Fix wrong function pointer
438         reference in PIC case.
440 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
442         * oldsemaphore.c (SEM_VALUE_MAX): Remove.
444 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
446         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
447         for librt.  Save the return value to a safe register.
448         (CDISABLE): Define for librt.  Set the function argument correctly.
450 2004-04-18  Jakub Jelinek  <jakub@redhat.com>
452         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
453         (PSEUDO_CANCEL): Define.
454         (PSEUDO): Use it.
455         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
456         CDISABLE): For librt, append @PLT.
458 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
460         * sysdeps/x86_64/tls.h [!__ASSEMBLER__]: Include tcb-offsets.h.
462         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
463         return it_value { 0, 0 }.
464         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
465         like SIGEV_SIGNAL.
466         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
467         assertion for SIGEV_NONE.
468         (thread_attr_compare): Compare all attributes, not just a partial
469         subset.
471         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
473 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
475         * semaphore.h (SEM_VALUE_MAX): Just use a plain number.
477 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
479         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix last patch.
481 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
483         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
485 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
487         * sysdeps/unix/sysv/linux/mq_notify.c: New file.
489         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE): Define
490         for librt.
491         (CDISABLE): Likewise.
493 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
495         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
496         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
497         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
498         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
499         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
500         Define.
501         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
502         (_POSIX_MESSAGE_PASSING): Define.
504 2004-04-10  Andreas Jaeger  <aj@suse.de>
506         * sysdeps/x86_64/pt-machine.h: Add used attribute to stack_pointer
507         to avoid warnings with GCC 3.5.
509 2004-04-09  Steven Munroe  <sjmunroe@us.ibm.com>
511         * sysdeps/powerpc/tls.h (TLS_INIT_TP): Eliminate lvalue cast from
512         __thread_self assignment.
513         (THREAD_DTV): Replace __thread_register with __thread_self.
514         (INIT_THREAD_SELF): Eliminate lvalue cast from __thread_self
515         assignment.
517 2004-04-08  Alexandre Oliva  <aoliva@redhat.com>
519         * signals.c (pthread_sigmask): Don't ever block or mask
520         __pthread_sig_debug.
522 2004-03-11  Steven Munroe  <sjmunroe@us.ibm.com>
524         * sysdeps/powerpc/tls.h: Remove __powerpc64__ conditional.
526 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
528         * sysdeps/ia64/pt-machine.h (BUSY_WAIT_NOP): Define.
529         * sysdeps/x86_64/pt-machine.h (BUSY_WAIT_NOP): Likewise.
531 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
533         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add HOST_NAME_MAX.
534         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
535         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
536         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
538 2004-03-08  Andreas Jaeger  <aj@suse.de>
540         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT_KERNEL_CHECK):
541         dl_osversion is readonly.
543 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
545         * sysdeps/i386/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
546         _rtlf_global_ro.
547         * sysdeps/ia64/tls.h (INIT_SYSINFO): Likewise.
549 2004-02-20  Steven Munroe  <sjmunroe@us.ibm.com>
551         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c [SHARED]: Code only
552         valid for SHARED case.  Correct spelling of __vmx_longjmp.
554         * sysdeps/powerpc/pspinlock.c: Move from here.
555         * sysdeps/powerpc/powerpc32/pspinlock.c: To here.
556         * sysdeps/powerpc/powerpc64/pspinlock.c: New file.
557         * sysdeps/powerpc/powerpc64/pt-machine.h: Define __compare_and_swap32
558         and __compare_and_swap32_with_release_semantics.
560 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
562         * Makefile (generated): Remove tst-stack1.mtrace and tst-stack1-mem.
563         (tests): Remove $(objpfx)tst-stack1-mem.
564         (tst-stack1-ENV): Remove.
565         ($(objpfx)tst-stack1-mem): Remove.
567         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
568         (__syscall_error_handler2): Call CDISABLE.
569         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
570         (__syscall_error_handler2): Call CDISABLE.
572         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
574 2004-02-10  Steven Munroe  <sjmunroe@us.ibm.com>
576         * Makefile (libpthread-routines): Add ptcleanup.
577         * ptlongjmp.c: Removed.
578         * ptcleanup.c: Copied __pthread_cleanup_upto to here. New file.
579         * sysdeps/pthread/ptlongjmp.c: Copied longjmp to here. New file.
580         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
581         Version longjmp, siglongjmp for GLIBC_2.3.4.
582         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c: New File.
584 2004-01-22  Andreas Jaeger  <aj@suse.de>
586         * spinlock.c (__pthread_lock): Fix contraint to avoid warning.
587         (__pthread_release): Likewise.
589 2004-01-16  Richard Henderson  <rth@redhat.com>
591         * attr.c: Include ldsodefs.h.
592         (pthread_getattr_np): Don't declare __libc_stack_end.
594 2004-01-09  Steven Munroe  <sjmunroe@us.ibm.com>
596         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
597         [!HAVE_TLS_SUPPORT]: Define SINGLE_THREAD_P using static
598         __lib*_multiple_threads.
599         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
600         [!HAVE_TLS_SUPPORT]: Likewise.
602 2004-01-13  Roland McGrath  <roland@redhat.com>
604         * sysdeps/powerpc/tcb-offsets.sym: Put -- separator line before any
605         conditionals.
607 2004-01-10  Andreas Jaeger  <aj@suse.de>
609         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Add cfi directives.
611 2004-01-01  Andreas Jaeger  <aj@suse.de>
613         * Makefile (generated): Add missing files.
615 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
617         * attr.c (pthread_getattr_np): Make sure stack info returned for
618         main thread does not overlap with any other VMA.
619         Patch by Jakub Jelinek.
621 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
623         * sysdeps/ia64/tls.h: Include dl-sysdep.h.
624         (INIT_SYSINFO): Define.
625         (TLS_INIT_TP): Use it.
627 2003-12-28  Carlos O'Donell  <carlos@baldric.uwo.ca>
629         * attr.c (pthread_getattr_np): Add _STACK_GROWS_UP case.
631 2003-12-26  Jakub Jelinek  <jakub@redhat.com>
633         * sysdeps/pthread/pthread.h (pthread_setcancelstate,
634         pthread_setcanceltype, pthread_cancel, pthread_testcancel): Remove
635         __THROW.
636         * semaphore.h (sem_wait, sem_timedwait): Likewise.
638 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
640         * manager.c (pthread_free): Call _dl_deallocate_tls even for
641         p_userstack threads.
642         * pthread.c (__pthread_initialize_manager): Call _dl_deallocate_tls
643         on error.
644         (pthread_onexit_process): Update comment.
645         * Makefile (tests): Add tst-stack1.  Depend on $(objpfx)tst-stack1-mem.
646         (generated): Add tst-stack1.mtrace and tst-stack1-mem.
647         (tst-stack1-ENV): Set.
648         ($(objpfx)tst-stack1-mem): New.
649         * tst-stack1.c: New test.
651 2003-12-16  Steven Munroe  <sjmunroe@us.ibm.com>
653         * sysdeps/powerpc/tcb-offsets.sym [!__powerpc64__]: Remove
654         conditional so MULTIPLE_THREADS_OFFSET is generated for both.
655         * sysdeps/powerpc/tls.h [!__powerpc64__]: Remove conditional
656         so TLS_MULTIPLE_THREADS_IN_TCB is generated for both.
657         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h:
658         Include tls.h.
660 2003-12-04  Steven Munroe  <sjmunroe@us.ibm.com>
662         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
663         (SINGLE_THREAD_P): Test using thread local p_multiple_threads field.
665 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
667         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Update copyright
668         message.  Add include of <stddef.h>.
669         (INIT_NEW_WAY): New macro.
670         (INIT_OLD_WAY): Likewise.
671         (_init): Add unwind directives.  Invoke
672         __pthread_initialize_minimal() via INIT_NEW_WAY or INIT_OLD_WAY,
673         respectively.
674         (_init_EPILOG_BEGINS): Add unwind-directives.  Drop unused .regstk
675         directive.
676         (_fini): Add unwind directives.  Drop unnecessary .align 16
677         directive (bundles are always 16-byte aligned).
678         (_fini_EPILOG_BEGINS): Add unwind-directives.
680 2003-11-19  David Mosberger  <davidm@hpl.hp.com>
682         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
684 2003-12-10  Andreas Jaeger  <aj@suse.de>
685             Ruediger Oertel  <ro@suse.de>
687         * sysdeps/alpha/elf/pt-initfini.c (__asm__): Remove extra .prologue.
689 2003-11-30  Andreas Jaeger  <aj@suse.de>
691         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
692         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
693         Likewise.
695 2003-11-04  Jakub Jelinek  <jakub@redhat.com>
697         * signals.c (__pthread_sigaction): Set __sighandler[sig].old before
698         __libc_sigaction if it has been one of the special values before.
700 2003-10-06  Carlos O'Donell <carlos@baldric.uwo.ca>
702         * pthread.c (__pthread_self_stack): _STACK_GROWS_UP case added.
703         (__pthread_find_self): Likewise.
704         * manager.c (thread_segment): _STACK_GROWS_UP case added.
706 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
708         * linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h: New file.
710 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
712         * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: New file.
714 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
716         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
717         changes.
718         (SAVE_OLDTYPE_0): Fix a typo.
720 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
722         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
723         correct offset.
725 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
727         * Makefile (tests): Add tst-cancel8.
728         * tst-cancel8.c: New test.
730 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
732         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
733         restoring of the old cancellation type.
735 2003-09-10  Chris Demetriou  <cgd@broadcom.com>
737         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: New file.
739 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
741         * sysdeps/pthread/malloc-machine.h [!__libc_maybe_call2] (mutex_init,
742         mutex_lock, mutex_trylock, mutex_unlock): Remove.
744 2003-09-27  Wolfram Gloger  <wg@malloc.de>
746         * sysdeps/pthread/malloc-machine.h: New file.
748 2003-09-18  H.J. Lu  <hongjiu.lu@intel.com>
750         * attr.c (__pthread_attr_init_2_1): Double __guardsize size
751         if NEED_SEPARATE_REGISTER_STACK is defined.
753 2003-09-22  Philip Blundell  <philb@gnu.org>
755         * forward.c: Add _pthread_cleanup_push, _pthread_cleanup_pop.
756         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
757         Likewise.
758         * pthread.c (__pthread_elements): Initialise these new elements.
759         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Use
760         __libc_maybe_call.
761         (__libc_cleanup_pop): Likewise.
763 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
765         * attr.c: Include stdlib.h.
767 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
769         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
771         * tst-attr1.c: New test.
772         * Makefile (tests): Add tst-attr1.
774 2003-09-17  Philip Blundell  <philb@gnu.org>
776         * sysdeps/unix/sysv/linux/arm/vfork.S: Branch to fork if
777         libpthread is loaded.  Elide backwards compatibility code when not
778         required.
780 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
782         * descr.h (manager_thread): Rename to...
783         (__pthread_manager_threadp): ... this.
784         * pthread.c (manager_thread): Define to __pthread_manager_threadp.
785         (__pthread_manager_threadp): New variable.
786         * internals.h (__manager_thread): Define to
787         __pthread_manager_threadp if USE_TLS.
789 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
791         * sysdeps/i386/Makefile (CFLAGS-cancel.c, CFLAGS-manager.c,
792         CFLAGS-pthread.c, CFLAGS-sighandler.c): Add
793         -mpreferred-stack-boundary=4.
795 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
797         * attr.c (pthread_getattr_np): Correctly fill in the stack-related
798         values for the initial thread.
800 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
802         * pthread.c (manager_thread): Remove static, add attribute_hidden.
803         (thread_self_stack): Rename to...
804         (__pthread_self_stack): ... this.  Remove static.
805         (pthread_handle_sigcancel): Use check_thread_self ().
806         (pthread_handle_sigrestart): Likewise.
807         * sighandler.c (__pthread_sighandler, __pthread_sighandler_rt):
808         Likewise.
809         * descr.h (manager_thread): Declare.
810         * internals.h (__pthread_self_stack): New prototype.
811         (__manager_thread): Define.
812         (check_thread_self): New function.
814 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
816         * Makefile (CFLAGS-mutex.c): Add $(uses-callbacks).
817         (CFLAGS-sighandler.c): Change $(exceptions) into $(uses-callbacks).
819 2003-09-12  Jakub Jelinek  <jakub@redhat.com>
821         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New.
822         (__SSIZE_T_TYPE): Define to __SWORD_TYPE for gcc 2.95.x and
823         __SLONGWORD_TYPE otherwise.
825 2003-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
827         * sysdeps/powerpc/powerpc64/pt-machine.h [MEMORY_BARRIER]: Use lwsync.
828         [READ_MEMORY_BARRIER]: Define.
829         [WRITE_MEMORY_BARRIER]: Define.
831 2003-09-10  Jakub Jelinek  <jakub@redhat.com>
833         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Move
834         ptr___pthread_cond_timedwait to the end of the structure to avoid
835         breaking Wine unnecessarily.
837 2003-09-08  Jakub Jelinek  <jakub@redhat.com>
839         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Remove.
841 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
843         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
844         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
845         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
846         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
847         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
848         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
849         * attr.c (__old_pthread_attr_setstacksize,
850         __old_pthread_attr_setstack): New functions.
851         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
852         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
853         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
854         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
855         * tststack.c: Include limits.h and sys/param.h.
856         (main): Set size to MAX (70 * 1024, PTHREAD_STACK_MIN).
858         * barrier.c (__pthread_barrierattr_getpshared): Always
859         return PTHREAD_PROCESS_PRIVATE.
860         (pthread_barrierattr_setpshared): Return EINVAL if pshared
861         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
863 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
865         * sysdeps/sparc/tls.h (TLS_TCB_SIZE): If in ld.so and NPTL struct
866         pthread is bigger than struct _pthread_descr_struct, use NPTL struct
867         pthread size.
869 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
871         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
872         (DL_SYSINFO_IMPLEMENTATION): Add CFI and make sure the code ends
873         up in .text.
875         * barrier.c (pthread_barrierattr_setpshared): We don't handle
876         inter-process barriers.
878 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
880         * Makefile (tests): Add tst-tls1.
881         (module-names): Add tst-tls1mod{,a,b,c,d,e,f}.
882         ($(objpfx)tst-tls1mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
883         ($(objpfx)tst-tls1): New.
884         ($(objpfx)tst-tls2.out): Likewise.
885         (tests): Depend on $(objpfx)tst-tls2.out.
886         * tst-tls1.c: New test.
887         * tst-tls1.h: New.
888         * tst-tls1mod.c: New.
889         * tst-tls1moda.c: New.
890         * tst-tls1modb.c: New.
891         * tst-tls1modc.c: New.
892         * tst-tls1modd.c: New.
893         * tst-tls1mode.c: New.
894         * tst-tls1modf.c: New.
895         * tst-tls2.sh: New test.
897         * internals.h (__pthread_cond_timedwait): New prototype.
898         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
899         ptr___pthread_cond_timedwait.
900         * pthread.c (__pthread_functions): Initialize them.
901         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
902         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
903         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
904         pthread_cond_timedwait@@GLIBC_2.3.2.
906 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
908         * sysdeps/pthread/pthread.h: Don't mark pthread_exit,
909         pthread_join, pthread_cond_wait, and pthread_cond_timedwait with
910         __THROW to match NPTL.
912 2003-08-13  Ulrich Drepper  <drepper@redhat.com>
914         * sysdeps/pthread/Makefile [subdir=rt] (CPPFLAGS): Add
915         -DBROKEN_THREAD_SIGNALS.
917 2003-08-11  Steven Munroe  <sjmunroe@us.ibm.com>
919         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
920         Correct spelling of per thread resolver state.
922 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
924         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
925         (__rtld_lock_default_lock_recursive,
926         __rtld_lock_default_unlock_recursive): Define.
927         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
928         __rtld_lock_unlock_recursive): Define using
929         GL(_dl_rtld_*lock_recursive).
930         * pthread.c (pthread_initialize): Initialize _dl_rtld_lock_recursive
931         and _dl_rtld_unlock_recursive.  Lock GL(_dl_load_lock) the same
932         number of times as GL(_dl_load_lock) using non-mt implementation was
933         nested.
935 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
937         * sysdeps/pthread/bits/typesizes.h (__SSIZE_T_TYPE): Define.
938         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__SSIZE_T_TYPE):
939         Likewise.
940         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h (__SSIZE_T_TYPE):
941         Likewise.
942         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New file.
944         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
945         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
946         PTHREAD_STACK_MIN in comments.
948         * sysdeps/alpha/pt-machine.h (PT_EI): Add
949         __attribute__((always_inline)).
950         * sysdeps/arm/pt-machine.h (PT_EI): Likewise.
951         * sysdeps/cris/pt-machine.h (PT_EI): Likewise.
952         * sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
953         * sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
954         * sysdeps/i386/pt-machine.h (PT_EI): Likewise.
955         * sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
956         * sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
957         * sysdeps/mips/pt-machine.h (PT_EI): Likewise.
958         * sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
959         * sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
960         * sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
961         * sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
962         * sysdeps/sh/pt-machine.h (PT_EI): Likewise.
963         * sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
964         * sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
965         * sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
966         * spinlock.h (__pthread_set_own_extricate_if): Likewise.
967         * sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
968         (__thread_self).
969         * Examples/ex13.c (main): Change res type to void * to avoid
970         warnings.
971         * tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
973 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
975         * pthread.c (init_one_static_tls, __pthread_init_static_tls): New
976         functions.
977         (pthread_initialize): Initialize GL(dl_init_static_tls).
979 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
981         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
982         before __timer_dealloc.
983         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
984         Don't call list_unlink.
986 2003-07-29  Roland McGrath  <roland@redhat.com>
988         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
990 2003-07-25  Roland McGrath  <roland@redhat.com>
992         * manager.c (pthread_start_thread): Fix typo in last change.
994 2003-07-14  Guido Guenther  <agx@sigxcpu.org>
996         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Add IS_IN_librt,
997         use L() for local labels.
999 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
1001         * sysdeps/alpha/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Change to 0.
1002         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Alignment of struct
1003         _pthread_descr_struct.
1004         (TLS_PRE_TCB_SIZE): Add sizeof (tcbhead_t) and pad to align.
1005         If in ld.so and NPTL struct pthread is bigger than struct
1006         _pthread_descr_struct, use NPTL struct pthread size.
1007         (TLS_TCB_OFFSET): Define.
1008         (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV,
1009         THREAD_SELF, INIT_THREAD_SELF): Changed to match NPTL tls.h
1010         definitions.
1011         * sysdeps/i386/tls.h (TLS_TCB_SIZE): If in ld.so and NPTL struct
1012         pthread is bigger than struct _pthread_descr_struct, use NPTL struct
1013         pthread size.
1014         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Likewise.
1015         * sysdeps/powerpc/tls.h (TLS_PRE_TCB_SIZE): Likewise.
1016         * sysdeps/s390/tls.h (TLS_TCB_SIZE): Likewise.
1017         * sysdeps/sh/tls.h (TLS_PRE_TCB_SIZE): Likewise.
1018         * sysdeps/x86_64/tls.h (TLS_TCB_SIZE): Likewise.
1019         * sysdeps/pthread/Makefile (gen-as-const-headers): Add
1020         nptl-struct-pthread.sym if nptl tree is present.
1021         (before-compile): Add $(common-objpfx)nptl-struct-pthread.h
1022         if nptl tree is not present.
1023         (common-generated): Add nptl-struct-pthread.h.
1024         ($(common-objpfx)nptl-struct-pthread.h): New rule.
1025         * sysdeps/pthread/nptl-struct-pthread.sym: New file.
1027 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
1029         * descr.h (struct _pthread_descr_struct): Provide p_res member
1030         even if USE_TLS && HAVE___THREAD.
1031         * sysdeps/pthread/res-state.c (__res_state): Return __resp
1032         if USE___THREAD.
1033         * manager.c: Include resolv.h.
1034         (pthread_start_thread): Initialize __resp.
1035         * libc-tls-loc.c (__res_state): Return __resp.
1036         * Makefile (tests): Add tst-_res1.
1037         (modules-names, extra-objs, test-extras, test-modules): Add support
1038         for test modules.
1039         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
1040         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
1041         -lpthread.
1042         * tst-_res1.c: New test.
1043         * tst-_res1mod1.c: New test.
1044         * tst-_res1mod2.c: New test.
1046 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
1048         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_push and
1049         __libc_cleanup_pop.
1051         * tst-cancel-wrappers.sh: lseek and llseek are no cancellation points.
1053 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
1055         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Fix typo
1056         in test for compilation in libc.
1058 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
1060         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
1061         different symbol for the cancellation syscall wrapper and
1062         non-cancellation syscall wrapper.
1063         (PSEUDO_END): Define.
1065 2003-07-05  Richard Henderson  <rth@redhat.com>
1067         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
1069 2003-06-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1071         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Support cancellation
1072         in librt.
1074 2003-06-21  Andreas Schwab  <schwab@suse.de>
1076         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Support cancellation
1077         in librt.
1079 2003-06-20  Richard Henderson  <rth@redhat.com>
1081         * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines):
1082         Remove ptw-osf_sigprocmask.
1084 2003-06-18  Jakub Jelinek  <jakub@redhat.com>
1086         * internals.h (__librt_multiple_threads, __librt_enable_asynccancel,
1087         __librt_disable_asynccancel): Declare.
1088         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, LIBC_CANCEL_HANDLED): Define
1089         for IS_IN_librt.
1090         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Support cancellation
1091         in librt.
1092         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1093         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1094         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1095         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1096         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1097         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1098         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1099         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1100         * sysdeps/x86_64/tcb-offsets.sym: New file.
1101         * sysdeps/x86_64/Makefile: New file.
1102         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
1103         * Versions (libc): Export __librt_enable_asynccancel,
1104         __librt_disable_asynccancel and __librt_multiple_threads as
1105         GLIBC_PRIVATE.
1106         * libc-cancellation.c (__librt_multiple_threads,
1107         __librt_enable_asynccancel, __librt_disable_asynccancel): New aliases.
1109 2003-06-12  Steven Munroe  <sjmunroe@us.ibm.com>
1111         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1112         (SINGLE_THREAD_P): Replace @ got notation with @toc.
1114 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
1116         * sysdeps/powerpc/pspinlock.c (__pthread_spin_init): Fix
1117         initializer [PR libc/5052].
1119 2003-06-09  Andreas Schwab  <schwab@suse.de>
1121         * Makefile: Move inclusion of ../Rules down after extra-objs is
1122         fully known.
1124 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
1126         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New sequences for
1127         5+ arg syscalls only needed for PIC.
1128         Patch by Ralph Siemsen <ralphs@netwinder.org>.
1130 2003-06-05  Richard Henderson  <rth@redhat.com>
1132         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1133         and require CFI assembler directives.
1134         * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise.
1136 2003-05-30  Andreas Jaeger  <aj@suse.de>
1138         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
1139         (SAVESTK_0): Add CFI directives.
1140         (SAVESTK_3): Likewise.
1141         (SAVESTK_5): Likewise.
1142         (RESTSTK_0): Likewise.
1143         (RESTSTK_3): Likewise.
1144         (RESTSTK_5): Likewise.
1146 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
1148         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add \n to error
1149         messages.
1151 2003-05-04  Roland McGrath  <roland@redhat.com>
1153         * Makefile ($(objpfx)../libc.so): New target.
1155 2003-04-26  Ulrich Drepper  <drepper@redhat.com>
1157         * pthread.c (__pthread_initialize_manager): Remove one last
1158         p_multiple_threads call.
1160 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
1162         * pthread.c (__pthread_initialize_manager): Subtract
1163         TLS_PRE_TCB_SIZE bytes from tcbp to get to descr.
1164         * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE
1165         instead of sizeof (pthread_descr).
1166         (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr).
1167         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
1168         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
1169         pthread_descr.
1170         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
1171         to TLS_TCB_ALIGN.
1172         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
1173         tcbp.
1174         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
1175         unneccessarily.
1176         (NO_TLS_OFFSET): Define.
1178 2003-04-22  Roland McGrath  <roland@redhat.com>
1180         * Makeconfig (shared-thread-library): Reverse link order to work
1181         around linker bug.
1183 2003-04-20  Ulrich Drepper  <drepper@redhat.com>
1185         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Make sure the
1186         compiler knows we use the ldt_entry variable and that the syscall
1187         modifies the memory.
1189         * internals.h: Split pthread_functions definition into...
1190         * sysdeps/pthread/pthread-functions.h: ...new file.
1192         * sysdeps/i386/useldt.h: Include <sysdep.h>.
1194 2003-04-13  Jakub Jelinek  <jakub@redhat.com>
1196         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Rename macros to
1197         match changes in NPTL sysdep-cancel.h.
1199 2003-04-11  Roland McGrath  <roland@redhat.com>
1201         * Makefile (multidir): Don't set the variable here with $(shell ...).
1202         ($(objpfx)multidir.mk): New target, generated makefile; include that.
1203         (generated): Append it.
1205 2003-04-10  Jakub Jelinek  <jakub@redhat.com>
1207         * Makefile (multidir, crti-objs, crtn-objs): New variables.
1208         (generated-dirs): Add pathname component of multidir.
1209         (omit-deps, extra-objs): Include $(multidir)/crt? as well.
1210         ($(objpfx)libpthread.so): Depend on $(multidir)/crt?.o as well.
1211         ($(objpfx)$(multidir), $(objpfx)$(multidir)/crti.o,
1212         $(objpfx)$(multidir)/crtn.o): New.
1213         * sysdeps/unix/sysv/linux/sparc/Makefile: Removed.
1214         * sysdeps/unix/sysv/linux/x86_64/Makefile (LDFLAGS-pthread.so,
1215         before-compile, generated): Don't generate and use specs.
1216         ($(objpfx)specs): Remove.
1218 2003-04-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1220         * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints.
1222 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
1224         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Add
1225         missing ; after ENTRY use [PR libc/4997].
1227 2003-04-03  Jakub Jelinek  <jakub@redhat.com>
1229         * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel
1230         in case the parent blocked it.
1232 2003-04-02  Jakub Jelinek  <jakub@redhat.com>
1234         * Makefile (libpthread-routines): Add pthread_atfork.
1235         (libpthread-static-only-routines): Add pthread_atfork.
1237 2003-04-01  Jakub Jelinek  <jakub@redhat.com>
1239         * pthread.c (__pthread_wait_for_restart_signal): Use
1240         __pthread_sigsuspend instead of sigsuspend.
1241         * internals.h (__pthread_sigsuspend): New prototype.
1242         * Makefile (libpthread-routines): Add pt-sigsuspend.
1243         (tests): Add tst-cancel7.
1244         * sysdeps/unix/sysv/linux/pt-sigsuspend.c: New file.
1245         * sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S: New file.
1246         * sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c: New file.
1247         * sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c: New file.
1248         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c: New file.
1249         * sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c: New file.
1250         * tst-cancel7.c: New test.
1252 2003-03-31  Alexandre Oliva  <aoliva@redhat.com>
1254         * alloca_cutoff.c: Include internals.h.
1255         * sysdeps/pthread/errno-loc.c: Include linuxthreads/internals.h.
1256         * sysdeps/pthread/herrno-loc.c: Likewise.
1257         * sysdeps/pthread/res-state.c: Likewise.
1259 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
1261         * sysdeps/pthread/bits/typesizes.h: New file.
1262         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
1263         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
1265 2003-03-24  Daniel Jacobowitz  <drow@mvista.com>
1267         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1268         (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
1270 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
1272         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
1274 2003-03-21  Daniel Jacobowitz  <drow@mvista.com>
1276         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1277         (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
1279 2003-03-21  Jakub Jelinek  <jakub@redhat.com>
1281         * sysdeps/i386/tls.h [__ASSUME_SET_THREAD_AREA_SYSCALL]
1282         (TLS_SETUP_GS_SEGMENT): Fix a typo.
1284 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
1286         * sysdeps/pthread/Makefile: Fix cut&paste error.
1288 2003-03-18  Roland McGrath  <roland@redhat.com>
1290         * Versions (libpthread: GLIBC_2.2): Remove
1291         pthread_barrierattr_getpshared, never really existed.
1292         (libpthread: GLIBC_2.0): Move __pthread_initialize to ...
1293         (libpthread: GLIBC_PRIVATE): ... here.
1295 2003-03-14  Jakub Jelinek  <jakub@redhat.com>
1297         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1298         * sysdeps/unix/sysv/linux/sparc/Makefile ($(objpfx)specs): Use full
1299         path for crt[in].o.
1301 2003-03-14  Alexandre Oliva  <aoliva@redhat.com>
1303         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't .set
1304         mips2 on new abi.
1305         * sysdeps/mips/pt-machine.h (__compare_and_swap): Likewise.
1306         Handle 64-bit longs on n64.
1308 2003-03-07  Jakub Jelinek  <jakub@redhat.com>
1310         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock,
1311         __pthread_spin_trylock): Rewritten.
1313 2003-03-06  Ulrich Drepper  <drepper@redhat.com>
1315         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1316         recent kernels.
1318 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
1320         * sysdeps/pthread/timer_create.c (timer_create): Return correct
1321         error for CPU clocks.
1323         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1324         _POSIX_MONOTONIC_CLOCK.
1325         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1327 2003-03-01  Roland McGrath  <roland@redhat.com>
1329         * sysdeps/powerpc/powerpc64/pt-machine.h
1330         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1331         New macros.
1332         * sysdeps/powerpc/tls.h: Don't define those here.
1334         * sysdeps/powerpc/tls.h [! USE_TLS && !__powerpc64__]: Define
1335         tcbhead_t with multiple_threads member.
1336         [USE_TLS] (tcbhead_t): Define minimal one-word version.
1337         [USE_TLS && !__powerpc64__] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1338         * sysdeps/powerpc/tcb-offsets.sym [USE_TLS]: Use tls.h macros to
1339         derive thread register offset of p_multiple_threads member.
1341         * descr.h (struct _pthread_descr_struct) [!USE_TLS || !TLS_DTV_AT_TP]:
1342         Conditionalize p_header member on this.
1343         [TLS_MULTIPLE_THREADS_IN_TCB]: Add p_multiple_threads alternatively.
1344         * sysdeps/ia64/tls.h [USE_TLS] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1345         * sysdeps/sh/tls.h: Likewise.
1346         * sysdeps/ia64/tcb-offsets.sym [USE_TLS]: Use p_multiple_threads.
1347         * sysdeps/sh/tcb-offsets.sym: Likewise.
1348         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1349         (SINGLE_THREAD_P): Likewise.
1350         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1351         (SINGLE_THREAD_P): Likewise.
1352         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1353         (SINGLE_THREAD_P): Likewise.
1354         * pthread.c (__pthread_initialize_manager): Likewise.
1355         * manager.c (pthread_handle_create): Likewise.
1357         * sysdeps/powerpc/tls.h [HAVE_TLS_SUPPORT]: Define USE_TLS and all
1358         related macros.
1360 2003-01-31  Steven Munroe  <sjmunroe@us.ibm.com>
1362         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S [SHARED]:
1363         Conditionalize .toc section magic on this.
1365 2003-02-21  Roland McGrath  <roland@redhat.com>
1367         * cancel.c (__pthread_perform_cleanup): Call __libc_thread_freeres
1368         instead of __rpc_thread_destroy.
1370 2003-02-21  Jakub Jelinek  <jakub@redhat.com>
1372         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Call
1373         __fork instead of branching to it if BROKEN_SPARC_WDISP22.
1374         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1375         Fix typo.
1376         * sysdeps/unix/sysv/linux/sparc/Makefile (specs): Add ./ prefix
1377         to crti.o and crtn.o.
1378         * sysdeps/unix/sysv/linux/x86_64/Makefile (specs): Likewise.
1380 2003-02-21  Roland McGrath  <roland@redhat.com>
1382         * Makefile (install-lib-ldscripts): New variable.
1384 2003-02-20  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1386         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short
1387         interprocedure branches.
1389 2003-02-19  Ulrich Drepper  <drepper@redhat.com>
1391         * specific.c (pthread_key_delete_helper): Don't use GETMEM, we
1392         need the target thread's lock.
1394 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
1396         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1397         and LOGIN_NAME_MAX.
1399 2003-02-17  Kevin B. Hendricks  <kevin.hendricks@sympatico.ca>
1400             Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1402         * sysdeps/powerpc/Makefile: Handle tcb-offsets.sym.
1403         * sysdeps/powerpc/tcb-offsets.sym: New file.
1404         * sysdeps/powerpc/tls.h: New file.
1405         * sysdeps/powerpc/powerpc32/pt-machine.h (FLOATING_STACKS): Define.
1406         (ARCH_STACK_MAX_SIZE): Define.
1407         (THREAD_SELF): Define.
1408         (INIT_THREAD_SELF): Define.
1409         (THREAD_GETMEM): Define.
1410         (THREAD_GETMEM_NC): Define.
1411         (THREAD_SETMEM): Define.
1412         (THREAD_SETMEM_NC): Define.
1413         (__thread_self): Declare.
1414         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Adjust
1415         for thread register.
1417 2003-02-14  Steven Munroe  <sjmunroe@us.ibm.com>
1419         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1420         Check pthread_create existance, not __pthread_fork.
1422 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
1424         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1426 2003-02-10  Jakub Jelinek  <jakub@redhat.com>
1428         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Check
1429         pthread_create existance, not __pthread_fork.
1430         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1431         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1432         * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): Likewise.
1433         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1434         Likewise.
1435         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1436         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1437         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Likewise.
1438         Add .weak pthread_create.
1439         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Fix a typo.
1440         Check pthread_create existance, not __pthread_fork.
1441         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1442         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Branch to
1443         __fork whenever libpthread.so is loaded.
1445 2003-02-09  Andreas Jaeger  <aj@suse.de>
1447         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h:
1448         Rework: %r9 is destroyed by functions so don't use it as
1449         temporary, align stack correctly, fix parameter for CDISABLE.
1451 2003-02-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1453         * sysdeps/sh/Makefile: New file.
1454         * sysdeps/sh/tcb-offsets.sym: Likewise.
1455         * sysdeps/sh/tls.h: Don't include sysdep.h. Move include
1456         of linuxthreads/descr.h after the definition of THREAD_SELF.
1457         (tcbhead_t): Use IA64 type tcbhead_t for TLS case.
1458         (TLS_TCB_SIZE): Set size of tcbhead_t.
1459         (TLS_PRE_TCB_SIZE): Define.
1460         (INSTALL_NEW_DTV): Set dtv of tcbhead_t structure instead of
1461         a member of thread structure.
1462         (THREAD_DTV): Likewise.
1463         (TLS_INIT_TP_EXPENSIVE): Remove.
1464         (TLS_INIT_TP): Set gbr register only.
1465         (THREAD_SELF): New.
1466         (INIT_THREAD_SELF): Likewise.
1467         (NONTLS_INIT_TP): New.
1468         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (__fpscr_values):
1469         Remove.
1470         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Add
1471         SYSCALL_INST_PAD macro after DO_CALL.
1472         (SINGLE_THREAD_P): Fix non-PIC and TLS case so to read the
1473         correct variable.
1474         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Branch to __fork
1475         whenever libpthread.so is loaded.
1477 2003-02-08  Andreas Schwab  <schwab@suse.de>
1479         * sysdeps/unix/sysv/linux/m68k/vfork.S: Branch to __fork whenever
1480         libpthread.so is loaded.
1482 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
1484         * sysdeps/unix/sysv/linux/i386/vfork.S: Make sure
1485         __ASSUME_VFORK_SYSCALL is not defined if the kernel headers have
1486         no __NR_vfork definition.
1488 2003-02-07  Jakub Jelinek  <jakub@redhat.com>
1490         * tst-popen2.c: New test.
1491         * Makefile (tests): Add tst-popen2.
1492         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Branch to __fork
1493         whenever libpthread.so is loaded.
1494         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1495         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1496         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1497         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1498         Likewise.
1499         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1500         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1501         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1503 2003-02-05  Ulrich Drepper  <drepper@redhat.com>
1505         * sysdeps/pthread/bits/libc-lock.h (__libc_once): Set control
1506         variable for non-libpthread case to the same value the
1507         pthread_once function would use.
1509 2003-02-03  Jakub Jelinek  <jakub@redhat.com>
1511         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
1512         BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
1514 2003-02-04  Andreas Jaeger  <aj@suse.de>
1516         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
1517         multi-line strings.
1519 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1521         * sysdeps/s390/tls.h (TLS_INIT_TP): Return NULL, not 0.
1523 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1525         * sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1526         THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
1527         variable.
1528         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1529         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1530         * sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1531         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1532         * sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1533         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1534         * sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1535         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1536         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1537         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1538         * sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1539         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1541 2003-01-27  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1543         * sysdeps/s390/s390-32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1544         Define TLS versions.
1545         * sysdeps/s390/s390-64/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1546         Likewise.
1547         * sysdeps/s390/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1548         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1549         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1550         Define.
1551         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Use
1552         branch with 32 bit offset.
1553         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
1555 2003-01-24  Jakub Jelinek  <jakub@redhat.com>
1557         * sysdeps/sparc/sparc32/pt-machine.h (__thread_self): Change to %g7,
1558         as required by TLS ABI.
1559         * sysdeps/sparc/sparc64/pt-machine.h (__thread_self): Likewise.
1560         * sysdeps/sparc/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1561         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1562         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1563         Define.
1564         [HAVE_TLS_SUPPORT]: Include descr.h and sysdep.h.
1565         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Use %g7
1566         instead of %g6 for thread pointer.
1567         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
1568         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1569         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
1571 2003-01-25  Guido Guenther  <agx@sigxcpu.org>
1573         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1574         * sysdeps/unix/sysv/linux/mips/Makefile: New file.
1576 2003-01-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1578         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative
1579         reference to __fork.
1581 2003-01-17  Richard Henderson  <rth@redhat.com>
1583         * sysdeps/alpha/tls.h (tcbhead_t): Clarify second member.
1584         (TLS_TCB_SIZE, TLS_TCB_ALIGN): Set for tcbhead_t.
1585         (TLS_PRE_TCB_SIZE): New.
1586         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Update for
1587         new ia64-style thread pointer layout.
1588         (THREAD_GETMEM, THREAD_GETMEM_NC): New.
1589         (THREAD_SETMEM, THREAD_SETMEM_NC): New.
1590         * sysdeps/unix/sysv/linux/alpha/vfork.S: Don't tail-call to __fork
1591         if !SHARED.
1593 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1595         * sysdeps/ia64/tls.h (tcbhead_t): Use the TLS ABI required layout
1596         if USE_TLS only.
1597         (NONTLS_INIT_TP): Revert last change.
1598         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define to
1599         offsetof (tcbhead_t, multiple_threads) if USE_TLS not defined.
1601 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1603         * pthread.c (_pthread_initialize_minimal): Use
1604         GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
1605         been already initialized.
1607 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1609         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
1610         if not SHARED.
1612 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1614         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
1615         __libc_lock_init_recursive): Initialize fields directly.
1617 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1619         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Allow
1620         __fork to be far away from __vfork ifndef SHARED.
1621         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1622         Likewise.
1623         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1624         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1625         Add a missing instruction.
1626         * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Conditionally
1627         branch to __fork even if __NR_vfork is not defined.
1629 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
1631         * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
1632         as well.
1634 2003-01-14  Steven Munroe  <sjmunroe@us.ibm.com>
1636         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1638 2003-01-14  Jakub Jelinek  <jakub@redhat.com>
1640         * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
1642 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1644         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
1645         unterminated string literals.
1646         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
1648 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1650         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1651         (PSEUDO): Code reordering.  Move CENABLE and CDISABLE literals from
1652         PSEUDO_END to PSEUDO.
1653         (PSEUDO_END): Remove.
1654         (SINGLE_THREAD_P): Save an instruction.
1655         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
1656         parameter to SINGLE_THREAD_P call.
1657         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1658         Code reordering.
1660 2003-01-10  Andreas Schwab  <schwab@suse.de>
1662         * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
1664 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1666         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
1667         backchain in pseudo_cancel.  Minor code improvements.
1668         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1669         Likewise.
1671 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1673         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1674         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1676 2002-01-12  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1678         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1680 2002-01-09  Richard Henderson  <rth@redhat.com>
1682         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
1683         ret follows pseudo, and thus avoid branch-to-branch in cancel
1684         case.  Use SYSCALL_ERROR_LABEL.
1686 2003-01-11  Philip Blundell  <philb@gnu.org>
1688         * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
1689         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
1690         Correctly unstack lr.
1691         (UNDOARGS_5): Fix ordering of pushes and pops.
1692         (SINGLE_THREAD_P_PIC): New.
1693         (SINGLE_THREAD_P_INT): New.
1694         (SINGLE_THREAD_P): Implement in terms of above.  Restore lr if it
1695         was stacked.
1696         (PSEUDO): Use SINGLE_THREAD_P_INT.
1698 2003-01-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1700         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1702 2003-01-11  Jakub Jelinek  <jakub@redhat.com>
1704         * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
1705         [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
1706         TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
1707         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
1708         INIT_THREAD_SELF): Define.
1709         [HAVE_TLS_SUPPORT]: Include descr.h.
1710         (NONTLS_INIT_TP): Point __thread_self at the end of dummy
1711         struct _pthread_descr_struct.
1712         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1713         THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
1714         not __thread_self.
1715         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
1716         computation.
1717         * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
1718         for TCB pointer.
1719         (__pthread_initialize_manager): Rename tcb to mgr.
1720         Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
1721         _pthread_descr) below tcbp, otherwise to tcbp.
1722         * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
1723         new_thread to be below _dl_allocate_tls ().  Adjust new_thread back
1724         before freeing.  Fix clone arguments if report_events and USE_TLS.
1725         (pthread_free): Adjust th back before freeing.
1727 2003-01-10  Steven Munroe  <sjmunroe@us.ibm.com>
1729         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
1730         * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
1731         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
1733 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1735         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1736         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1737         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1738         [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
1739         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1740         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1741         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1742         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1743         * tst-popen.c: New test.
1744         * Makefile (tests): Add tst-popen.
1746 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1748         * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
1749         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1751 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1753         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1754         PSEUDO_PREPARE_ARGS.  Fix branch condition after SINGLE_THREAD_P.
1756 2003-01-06  Philip Blundell  <philb@gnu.org>
1758         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
1760 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1762         * internals.h (LIBC_CANCEL_HANDLED): Define.
1763         * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
1764         * signals.c (LIBC_CANCEL_HANDLED): Add.
1765         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1766         * tst-cancel-wrappers.sh: Remove all exceptions.
1768         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1770 2003-01-05  Andreas Schwab  <schwab@suse.de>
1772         * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
1773         objects.
1775         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
1776         Fix for PIC.
1777         (CENABLE): Likewise.
1778         (CDISABLE): Likewise.
1780 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
1782         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1783         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
1785         * Makefile (libc.so-no-z-defs): Define to yes.
1787 2003-01-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1789         * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
1790         (tcbhead_t): Add multiple_threads member.
1791         (TLS_INIT_TP_EXPENSIVE): Define.
1792         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
1793         strings.  Remove unused code.
1794         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1796 2003-01-04  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1798         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1799         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
1801 2003-01-04  Jakub Jelinek  <jakub@redhat.com>
1803         * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
1804         even if NOT_IN_libc is defined.
1806 2003-01-05  Jakub Jelinek  <jakub@redhat.com>
1808         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1809         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1810         * sysdeps/s390/Makefile: New file.
1811         * sysdeps/s390/tcb-offsets.sym: New file.
1812         * sysdeps/s390/tls.h: New file.
1814 2003-01-03  Richard Henderson  <rth@redhat.com>
1816         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
1818 2003-01-03  Andreas Jaeger  <aj@suse.de>
1820         * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
1822 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
1824         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1826 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
1828         * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
1829         cancellation tests.
1831 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
1833         * internals.h (struct pthread_functions): Rename
1834         ptr_pthread_cond_* fields to ptr___pthread_cond_*.
1835         * pthread.c (pthread_functions): Adjust.
1836         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1837         pthread_cond_*@GLIBC_2.0 compatibility symbols.
1838         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1839         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1840         and pthread_cond_wait.
1842         * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
1843         type.
1844         (pthread_cond_t): Add __align member, shorten __padding.
1845         * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
1846         __padding and __align too.
1848         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
1849         __builtin_expect.
1850         * sysdeps/pthread/sigaction.c: New file.
1851         * sysdeps/unix/sysv/linux/raise.c: New file.
1852         * sysdeps/unix/sysv/linux/sigwait.c: New file.
1853         * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
1854         weak_extern with #ifndef SHARED.
1855         * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
1856         Likewise.
1857         * signals.c (__sigaction): Renamed to...
1858         (__pthread_sigaction): ... this.
1859         (__sigaction): New strong alias, #ifdef SHARED only.
1860         (sigaction): Protect with #ifdef SHARED.
1861         (sigwait): Renamed to...
1862         (__pthread_sigwait): ... this.
1863         (sigwait): New strong alias, #ifdef SHARED only.
1864         (raise): Renamed to...
1865         (__pthread_raise): ... this.
1866         (raise): New strong alias, #ifdef SHARED only.
1867         * internals.h (__pthread_sigaction, __pthread_sigwait,
1868         __pthread_raise): New prototypes.
1869         (struct pthread_functions): Add ptr_pthread_sigaction,
1870         ptr_pthread_sigwait, ptr_pthread_raise.
1871         * pthread.c (pthread_functions): Renamed to...
1872         (__pthread_functions): ... this.  No longer static, no longer
1873         SHARED only.  Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
1874         and ptr_pthread_raise.
1875         [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
1876         * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
1877         * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
1878         * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
1880         * Makefile (tests, tests-static): Add tst-cancel-static.
1881         * tst-cancel-static.c: New test.
1883 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
1885         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1887 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
1889         * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
1890         * condvar.c: Add symbol versioning.  The compatibility versions
1891         are the same as the change in the interface does not effect this
1892         implementation.
1893         * Versions [libpthread]: Add definitions for new pthread_cond_*
1894         interfaces for version GLIBC_2.3.2.
1896 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
1898         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1899         __register_atfork.
1900         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1901         for __register_atfork.
1903 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
1905         * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
1906         ASSEMBLER test macro.
1907         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
1908         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1909         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
1910         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1911         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1912         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1914         * sysdeps/pthread/errno-loc.c (__errno_location): Add
1915         libc_hidden_def.
1916         * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
1917         * sysdeps/pthread/res-state.c (__res_state): Likewise.
1918         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1919         __libc_current_sigrtmax): Likewise.
1920         * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1921         __libc_internal_tsd_set, __libc_internal_tsd_address,
1922         __libc_alloca_cutoff.
1923         [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1924         __libc_internal_tsd_set, __libc_internal_tsd_address.
1926         * sysdeps/pthread/list.h: Remove assert.h include.
1927         * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
1929         * sysdeps/pthread/list.h: New file.
1930         * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
1931         * sysdeps/unix/sysv/linux/fork.c: New file.
1932         * sysdeps/unix/sysv/linux/fork.h: New file.
1933         * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
1934         * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
1935         * sysdeps/unix/sysv/linux/register-atfork.c: New file.
1936         * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
1937         * sysdeps/unix/sysv/linux/Makefile: New file.
1938         * sysdeps/unix/sysv/linux/Versions: New file.
1939         * ptlongjmp.c (pthread_cleanup_upto): Rename to...
1940         (__pthread_cleanup_upto): ...this. Add targetframe argument,
1941         use it instead of currentframe.  No longer static.
1942         (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
1943         * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
1944         (struct pthread_functions): Add ptr_pthread_fork,
1945         ptr_pthread_cleanup_upto.
1946         * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
1947         ptr_pthread_cleanup_upto.
1948         * ptfork.c: Include fork.h.
1949         (struct handler_list, struct handler_list_block): Remove.
1950         (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
1951         pthread_atfork_child): Remove.
1952         (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
1953         (__pthread_fork): New function.
1954         (__fork, __vfork): Call __libc_fork.
1955         * Makefile (libpthread-routines): Add old_pthread_atfork.
1956         (libpthread-nonshared): Add pthread_atfork.
1957         (others): Depend on $(objpfx)libpthread_nonshared.a.
1958         ($(objpfx)libpthread_nonshared.a): New rule.
1959         (install): Depend on $(inst_libdir)/libpthread.so.
1960         ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
1961         New rules.
1962         (tests): Depend on libpthread_nonshared.a too.
1963         * old_pthread_atfork.c: New file.
1964         * pthread_atfork.c: New file.
1965         * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
1966         too.
1968 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
1970         * forward.c: Make all functions available by default again.  It
1971         caused too much trouble.
1972         * internals.h (struct pthread_functions): Rename ptr_pthread_exit
1973         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1974         ptr___pthread_attr_init_2_*.
1975         * pthread.c (pthread_functions): Adjust.
1977 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
1979         * libc_pthread_init.c (__libc_pthread_init): Remove
1980         MULTIPLE_THREADS_OFFSET check.
1981         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1982         (SYSINFO_OFFSET): Remove.
1983         * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
1984         tcb-offsets.sym.
1985         * sysdeps/i386/tcb-offsets.sym: New file.
1986         * sysdeps/pthread/tcb-offsets.h: New file.
1987         * sysdeps/sparc/sparc32/tls.h: Removed.
1988         * sysdeps/sparc/sparc64/tls.h: Move...
1989         * sysdeps/sparc/tls.h: ...here.  Include tcb-offsets.h in assembler.
1990         * sysdeps/sparc/Makefile: New file.
1991         * sysdeps/sparc/tcb-offsets.sym: New file.
1992         * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
1993         * sysdeps/ia64/Makefile: New file.
1994         * sysdeps/ia64/tcb-offsets.sym: New file.
1995         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1996         (MULTIPLE_THREADS_OFFSET): Remove.
1997         Replace defined MULTIPLE_THREADS_OFFSET
1998         with defined FLOATING_STACKS && USE___THREAD.
1999         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
2000         (MULTIPLE_THREADS_OFFSET): Remove.
2001         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2002         (MULTIPLE_THREADS_OFFSET): Remove.
2003         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2004         (MULTIPLE_THREADS_OFFSET): Remove.
2005         * pthread.c (__pthread_initialize_manager): Remove
2006         MULTIPLE_THREADS_OFFSET cbeck.
2008         * tst-cancel-wrappers.sh: Add line continuations.
2010 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
2012         * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
2013         and bits/libc-lock.h.
2014         (__libc_internal_tsd_get, __libc_internal_tsd_set,
2015         __libc_internal_tsd_address): Remove.
2016         (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
2017         __pthread_internal_tsd_set): New weak_externs.
2018         (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
2019         using __libc_maybe_call2.
2020         (__libc_tsd_key_t): Move to ...
2021         * descr.h (__libc_tsd_key_t): ...here.
2022         Remove bits/libc-tsd.h include.
2023         * sysdeps/pthread/errno-loc.c: New file.
2024         * sysdeps/pthread/herrno-loc.c: New file.
2025         * sysdeps/pthread/res-state.c: New file.
2026         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
2027         (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
2028         thread_self unconditionally.  Use LIBC_THREAD_[SG]ETMEM instead
2029         of THREAD_[SG]ETMEM.
2030         * specific.c (libc_internal_tsd_set): Renamed to...
2031         __pthread_internal_tsd_set.  Remove static.
2032         (libc_internal_tsd_get): Renamed to...
2033         __pthread_internal_tsd_get.  Remove static.
2034         (libc_internal_tsd_address): Renamed to...
2035         __pthread_internal_tsd_address.  Remove static.
2036         (__libc_internal_tsd_set, __libc_internal_tsd_get,
2037         __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
2038         * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
2039         Define.
2040         (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
2041         __pthread_internal_tsd_address): New prototypes.
2042         (struct pthread_functions): Add
2043         ptr_pthread_internal_tsd_([sg]et|address) fields.
2044         [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
2045         * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
2046         Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
2047         * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
2048         * alloca_cutoff.c: New file.
2049         * no-tsd.c: Removed.
2050         * Makefile (routines): Remove no-tsd.  Add alloca_cutoff.
2051         * pt-system.c (system): Remove cancellation handling.
2052         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
2053         cancellation routines.
2055         * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
2056         (tcbhead_t): Add sysinfo field.
2057         (SYSINFO_OFFSET, INIT_SYSINFO): Define.
2058         (TLS_INIT_TP): Use INIT_SYSINFO.
2059         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
2060         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
2061         (MULTIPLE_THREADS_OFFSET): Adjust.
2062         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
2063         (MULTIPLE_THREADS_OFFSET): Likewise.
2064         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2065         (MULTIPLE_THREADS_OFFSET): Likewise.
2066         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2067         (MULTIPLE_THREADS_OFFSET): Likewise.
2068         * descr.h: Include stdint.h.
2069         (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
2071 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
2073         * libc_pthread_init.c: Include stdlib.h.
2074         * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
2075         (TLS_INIT_TP_EXPENSIVE): Define.
2076         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
2077         __libc_maybe_call2): In _LIBC check SHARED define.
2078         * sysdeps/ia64/tls.h: New file.
2079         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
2080         * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
2081         * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
2082         * sysdeps/sparc/sparc32/tls.h: New file.
2083         * sysdeps/sparc/sparc64/tls.h: New file.
2084         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
2085         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
2086         * Makefile (tests): Add tst-cancel[1-6].
2087         (tests-reverse): Add tst-cancel5.
2088         Link libc.so before libpthread.so for tests-reverse.
2089         * tst-cancel1.c: New file.
2090         * tst-cancel2.c: New file.
2091         * tst-cancel3.c: New file.
2092         * tst-cancel4.c: New file.
2093         * tst-cancel5.c: New file.
2094         * tst-cancel6.c: New file.
2096 2002-12-27  Andreas Schwab  <schwab@suse.de>
2098         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
2100 2002-12-22  Roland McGrath  <roland@redhat.com>
2102         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
2104 2002-12-21  Ulrich Drepper  <drepper@redhat.com>
2106         * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
2107         Reported by Art Hass <ahaas@airmail.net>.
2109 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
2111         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
2112         Use return 0 as 6th argument to FORWARD4.
2114 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
2116         * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
2117         define if __ASSUME_LDT_WORKS > 0.
2118         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
2119         struct member access if !FLOATING_STACKS.
2120         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
2122 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
2124         * internals.h (__pthread_thread_self): New prototype.
2125         (struct pthread_functions): Add ptr_pthread_thread_self field.
2126         * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
2127         (__pthread_thread_self): New function.
2128         * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
2129         (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
2130         use thread_self() directly if not FLOATING_STACKS.
2132 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
2134         * sysdeps/x86_64/pt-machine.h: Guard most of the header
2135         with #ifndef __ASSEMBLER__.
2136         * pthread.c (pthread_functions): Use SHLIB_COMPAT around
2137         pthread_attr_init_2_0 use.
2139 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
2141         * wrapsyscall.c: Removed.
2142         * weaks.c: Removed.
2143         * Makefile (distribute): Add tst-cancel-wrappers.sh.
2144         (routines): Remove weaks.  Add forward,
2145         libc_pthread_init, libc-cancellation.
2146         (shared-only-routines): Remove weaks.  Add forward.
2147         (libpthread-routines): Remove wrapsyscall.
2148         Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
2149         ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
2150         ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
2151         ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
2152         ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
2153         ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
2154         (libpthread-shared-only-routines): Add pt-allocrtsig.
2155         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
2156         ($(objpfx)tst-cancel-wrappers.out): New rule.
2157         * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
2158         if in libc.
2159         (__libc_maybe_call): In libpthread.* don't check for existance
2160         of the function.
2161         (__libc_maybe_call2): Define.
2162         (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
2163         __libc_lock_trylock, __libc_lock_unlock): Use it.
2164         * sysdeps/pthread/flockfile.c: New file.
2165         * sysdeps/pthread/ftrylockfile.c: New file.
2166         * sysdeps/pthread/funlockfile.c: New file.
2167         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
2168         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2169         * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
2170         * libc-cancellation.c: New file.
2171         * forward.c: New file.
2172         * libc_pthread_init.c: New file.
2173         * pt-system.c: New file.
2174         * pthread.c: Remove locale.h.
2175         (__pthread_manager_thread): Initialize multiple_threads.
2176         (__pthread_multiple_threads): Declare.
2177         (pthread_functions): New variable.
2178         (__pthread_initialize_minimal): Remove __uselocale call.
2179         Call __libc_pthread_init.
2180         (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
2181         initial thread's multiple_threads and __libc_multiple_threads.
2182         Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
2183         multiple_threads.
2184         (pthread_setschedparam, pthread_getschedparam): Rename to __
2185         prefixed variants.  Add strong_alias.
2186         (current_rtmin, current_rtmax, __libc_current_sigrtmin,
2187         __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
2188         (init_rtsigs): Use __libc_current_sigrtmin_private.
2189         (pthread_initialize): Only call init_rtsigs if
2190         !__ASSUME_REALTIME_SIGNALS.
2191         (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
2192         * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
2193         __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
2194         __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
2195         __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
2196         __pthread_attr_getinheritsched, __pthread_attr_setscope,
2197         __pthread_attr_getscope, __pthread_cond_init,
2198         __pthread_cond_destroy, __pthread_cond_wait,
2199         __pthread_cond_signal, __pthread_cond_broadcast,
2200         __pthread_condattr_init, __pthread_condattr_destroy,
2201         __pthread_equal, __pthread_getschedparam,
2202         __pthread_setschedparam, __pthread_setcancelstate,
2203         __pthread_setcanceltype, __pthread_enable_asynccancel,
2204         __libc_enable_asynccancel, __libc_pthread_init): New prototype.
2205         (__pthread_mutex_init, __pthread_mutex_destroy,
2206         __pthread_mutex_lock, __pthread_mutex_unlock,
2207         __pthread_mutex_trylock): Likewise.
2208         Add hidden_proto.
2209         (struct pthread_functions): New type.
2210         (__libc_pthread_functions): New variable.
2211         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
2212         * descr.h (struct _pthread_descr_struct): Add
2213         p_header.data.multiple_threads field.
2214         * manager.c (pthread_handle_create): Initialize multiple_threads.
2215         * cancel.c (__pthread_enable_asynccancel,
2216         __pthread_disable_asynccancel): New functions.
2217         (__pthread_provide_wrappers): Remove.
2218         (pthread_setcancelstate, pthread_setcanceltype): Rename to __
2219         prefixed variants.  Add strong_alias.
2220         * condvar.c (pthread_cond_init, pthread_cond_destroy,
2221         pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
2222         pthread_condattr_init, pthread_condattr_destroy): Likewise.
2223         * join.c (pthread_exit): Likewise.
2224         * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
2225         pthread_attr_getdetachstate, pthread_attr_setschedparam,
2226         pthread_attr_getschedparam, pthread_attr_setschedpolicy,
2227         pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
2228         pthread_attr_getinheritsched, pthread_attr_setscope,
2229         pthread_attr_getscope): Likewise.
2230         * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
2231         __pthread_mutex_lock, __pthread_mutex_unlock,
2232         __pthread_mutex_trylock): Add hidden_def.
2233         * Versions (libc): Add __libc_pthread_init,
2234         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
2235         __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
2236         * lockfile.c: Remove some USE_IN_LIBIO guards.
2237         (__pthread_provide_lockfile): Remove.
2238         * pt-allocrtsig.c: New file.
2239         * tst-cancel-wrappers.sh: New test.
2241 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
2243         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
2244         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
2245         * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
2246         sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
2248 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
2250         * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
2251         weak.  There is no reason for that.
2252         (CANCELABLE_SYSCALL_VA): Likewise.
2254 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
2256         * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
2257         sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
2258         * Versions: Export creat, poll, pselect, readv, select, sigpause,
2259         __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
2260         libpthread in version GLIBC_2.3.2.
2262 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
2264         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
2266 2002-12-05  Roland McGrath  <roland@redhat.com>
2268         * pthread.c (__pthread_initialize_minimal)
2269         [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
2270         TCB if the dynamic linker didn't do it at startup.
2272         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
2273         string.
2274         (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
2275         Submacros updated.
2276         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
2277         * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
2279 2002-12-03  Roland McGrath  <roland@redhat.com>
2281         * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
2282         from dynamic linker internal cell to new libc cell.
2284 2002-11-28  Roland McGrath  <roland@redhat.com>
2286         * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
2287         before other headers, so FLOATING_STACKS is not defined wrongly.
2289         * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
2290         even if [! FLOATING_STACKS].
2291         (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
2292         If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
2293         dl_osversion >= 2.3.99 and fatal if not.
2294         (TLS_DO_MODIFY_LDT): Use it.
2296 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
2298         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
2299         require it to 200112L.  Remove _POSIX_POLL and _POSIX_SELECT.
2300         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2302 2002-11-19  Ulrich Drepper  <drepper@redhat.com>
2304         * Versions (libc: GLIBC_2.0): Remove names of functions which are
2305         not defined in libc.
2306         * Makefile (shared-only-routines): Add weaks.
2307         * weaks.c: Remove functions which are not exported from libc.so.
2309 2002-11-14  Roland McGrath  <roland@redhat.com>
2311         * libc-tsd.c: New file.
2312         * Makefile (distribute): Add it.
2313         (libc-link.so): New variable.
2314         ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
2315         (libc-ok-for-link): New variable.
2316         [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
2317         libc-ok-for-link to $(use-thread).
2318         [$(libc-ok-for-link) = no]
2319         (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
2320         ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
2321         New targets.
2322         (generated): Append them.
2323         (extra-objs): Append libc-tsd.os.
2325         * libc-tls-loc.c: New file.
2326         * Makefile (libpthread-routines): Add it.
2328 2002-11-14  Andreas Schwab  <schwab@suse.de>
2330         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
2331         string.
2333 2002-11-13  Roland McGrath  <roland@redhat.com>
2335         * Examples/ex6.c (main): Improve error reporting.
2337 2002-11-04  Ulrich Drepper  <drepper@redhat.com>
2339         * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
2340         -fno-omit-frame-pointer.  Patch by Andreas Steinmetz <ast@domdv.de>.
2342         * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
2343         register number.
2344         (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
2346 2002-10-22  Jakub Jelinek  <jakub@redhat.com>
2348         * manager.c (pthread_start_thread): Call __uselocale even
2349         if [! SHARED].  Patch by Leon Kanter <leon@geon.donetsk.ua>.
2351 2002-10-17  Roland McGrath  <roland@redhat.com>
2353         * Makefile (unload): Don't link in libpthread.so.
2354         ($(objpfx)unload.out): Do depend on it.
2355         * unload.c (main): Improve error reporting.
2357 2002-10-09  Roland McGrath  <roland@redhat.com>
2359         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2360         Under [__PIC__], call the function via the pointer fetched for
2361         comparison rather than a call by name that uses the PLT.
2362         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2363         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2364         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2365         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2366         (__libc_key_create, __libc_getspecific, __libc_setspecific)
2367         (__libc_atfork): Use it.
2369         * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
2370         (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
2371         * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
2372         (ld: GLIBC_PRIVATE): Set removed.
2374 2002-10-11  Ulrich Drepper  <drepper@redhat.com>
2376         * sysdeps/unix/sysv/linux/execve.c: New file.
2378 2002-10-09  Jakub Jelinek  <jakub@redhat.com>
2380         * no-tsd.c: Include stdlib.h.
2382 2002-10-07  Jakub Jelinek  <jakub@redhat.com>
2384         * sysdeps/unix/sysv/linux/allocalim.h: New file.
2385         * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
2386         field.
2387         * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
2388         Pass stack size to caller.
2389         (pthread_handle_create): Set p_alloca_cutoff.
2390         * pthread.c (__pthread_initial_thread): Use C99 designated
2391         initializers.  Set p_alloca_cutoff.
2392         (__pthread_manager_thread): Likewise.
2393         (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
2394         for initial thread.
2395         (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
2396         for initial thread.
2397         (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
2398         for manager thread.
2399         * specific.c (__libc_alloca_cutoff): New function.
2400         * no-tsd.c (__libc_alloca_cutoff): New function.
2401         * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
2402         and libpthread.
2404 2002-10-02  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2406         * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
2407         * sysdeps/sh/tls.h: Likewise.
2408         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2410 2002-09-29  Jakub Jelinek  <jakub@redhat.com>
2412         * sysdeps/pthread/tst-timer.c (main): Clear
2413         SIGEV2.sigev_notify_attributes.
2415 2002-09-29  Ulrich Drepper  <drepper@redhat.com>
2417         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
2418         INLINE_SYSCALL for set_thread_area syscall.
2420 2002-09-28  Roland McGrath  <roland@redhat.com>
2422         * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
2423         Don't call setrlimit, since we did no prior bogon we need to undo.
2425 2002-09-27  Roland McGrath  <roland@redhat.com>
2427         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
2429 2002-09-24  Roland McGrath  <roland@redhat.com>
2431         * sysdeps/x86_64/tls.h: New file.
2433 2002-09-23  Roland McGrath  <roland@redhat.com>
2435         * Examples/ex13.c (dump_mut): int -> size_t for counter.
2437 2002-09-18  Bruno Haible  <bruno@clisp.org>
2439         * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
2440         an unexpected error code.
2442         * internals.h (__pthread_message): Add const to first parameter type.
2443         * pthread.c (__pthread_message): Likewise.
2445         * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
2447 2002-09-17  Roland McGrath  <roland@redhat.com>
2449         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
2450         Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
2451         offset (positive or negative) relative to the thread struct.
2452         * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
2454 2002-09-12  Jakub Jelinek  <jakub@redhat.com>
2456         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
2457         * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
2458         Replace /usr/lib/crt[in].o with crt[in].o too.
2460 2002-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
2462         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2464 2002-09-04  Bruno Haible  <bruno@clisp.org>
2466         * pthread.c: Include <sys/time.h>.
2467         (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
2468         * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
2469         * Makefile (distribute): Add smp.h to the list.
2471 2002-09-04  Bruno Haible  <bruno@clisp.org>
2473         * sysdeps/alpha/pt-machine.h: Choose different include file location
2474         on non-Linux platforms.
2476         * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
2477         (open, open64): Change va_arg argument type to the integral type to
2478         which mode_t promotes.
2480         * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
2481         the structure of 'struct sigevent'.
2483         * errno.c (__errno_location, __h_errno_location, __res_state):
2484         Use prototype function definitions.
2486 2002-07-29  Steven Munroe  <sjmunroe@us.ibm.com>
2488         * shlib-versions: Set libpthread version to 2.3 for powerpc64.
2489         * sysdeps/powerpc/pt-machine.h: moved to...
2490         * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
2491         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2493 2002-09-02  Roland McGrath  <roland@redhat.com>
2495         * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
2497 2002-09-01  Roland McGrath  <roland@redhat.com>
2499         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
2500         CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
2502         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
2503         (__libc_internal_tsd_address): Declare it.
2504         * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
2505         __libc_internal_tsd_address.
2506         * specific.c (libc_internal_tsd_address): New function.
2507         (__libc_internal_tsd_address): New variable.
2508         * no-tsd.c (__libc_internal_tsd_address): New variable.
2510 2002-08-31  Ulrich Drepper  <drepper@redhat.com>
2512         * Makefile: Don't use rule for crt%.o, spell it out as rules for
2513         crti.o and crtn.o.
2515 2002-08-30  Roland McGrath  <roland@redhat.com>
2517         * Makefile (extra-objs, omit-deps): Add crtn.
2518         ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
2519         ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
2520         ($(objpfx)crtn.S): New target.
2521         ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
2522         (generated): Add crtn.S.
2524         * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
2525         crtn.o pathname too.
2527 2002-08-30  Jakub Jelinek  <jakub@redhat.com>
2529         * pthread.c (__pthread_initialize_minimal): Call __uselocale even
2530         if [! SHARED].
2532 2002-08-30  Roland McGrath  <roland@redhat.com>
2534         * tst-static-locale.c: New file.
2535         * Makefile (tests, tests-static): Add it.
2537 2002-04-24  Steven Munroe  <sjmunroe@us.ibm.com>
2539         * spinlock.c (__pthread_lock): Fix spurious wakeup
2540         handling.  Don't clear lowest bit of list pointer as sign the thread
2541         is still on the wait list.  Don't restart after spurious wakeup
2542         with spinning to get the lock.
2543         (__pthread_unlock): Take set lowest bit into account when handling
2544         pointer to list elements.
2545         Patch by Steve Munroe <sjmunroe@us.ibm.com>.
2547 2002-08-28  Roland McGrath  <roland@redhat.com>
2549         * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
2551 2002-08-28  Jakub Jelinek  <jakub@redhat.com>
2553         * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
2554         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2555         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2557 2002-08-28  Ulrich Drepper  <drepper@redhat.com>
2559         * sysdeps/pthread/timer_routines.c (thread_func): Change return
2560         type to void and add casts in use to avoid warnings with all gcc
2561         versions.
2563 2002-08-08  Jakub Jelinek  <jakub@redhat.com>
2565         * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
2566         Bump to 16384.
2567         * manager.c (__pthread_handles): Remove.
2568         * pthandles.c: New file.
2569         * pthread.c (__pthread_initialize_minimal): Initialize
2570         __pthread_handles[0] and __pthread_handles[1].
2571         * Makefile (libpthread-routines): Add pthandles (must be last).
2573 2002-08-26  Brian Youmans  <3diff@gnu.org>
2575         * Examples/ex10.c: Corrected version number in Lesser GPL copying
2576         permission notice from 2 to 2.1.
2577         * Examples/ex11.c: Likewise.
2578         * Examples/ex13.c: Likewise.
2579         * Examples/ex8.c: Likewise.
2580         * Examples/ex9.c: Likewise.
2581         * barrier.c: Likewise.
2582         * events.c: Likewise.
2583         * lockfile.c: Likewise.
2584         * no-tsd.c: Likewise.
2585         * pt-machine.c: Likewise.
2586         * ptclock_gettime.c: Likewise.
2587         * ptclock_settime.c: Likewise.
2588         * rwlock.c: Likewise.
2589         * sysdeps/alpha/pspinlock.c: Likewise.
2590         * sysdeps/alpha/pt-machine.h: Likewise.
2591         * sysdeps/arm/pspinlock.c: Likewise.
2592         * sysdeps/arm/pt-machine.h: Likewise.
2593         * sysdeps/cris/pspinlock.c: Likewise.
2594         * sysdeps/cris/pt-machine.h: Likewise.
2595         * sysdeps/hppa/pspinlock.c: Likewise.
2596         * sysdeps/hppa/pt-machine.h: Likewise.
2597         * sysdeps/i386/i686/pt-machine.h: Likewise.
2598         * sysdeps/i386/pspinlock.c: Likewise.
2599         * sysdeps/i386/pt-machine.h: Likewise.
2600         * sysdeps/i386/useldt.h: Likewise.
2601         * sysdeps/ia64/pspinlock.c: Likewise.
2602         * sysdeps/ia64/pt-machine.h: Likewise.
2603         * sysdeps/m68k/pspinlock.c: Likewise.
2604         * sysdeps/m68k/pt-machine.h: Likewise.
2605         * sysdeps/mips/pspinlock.c: Likewise.
2606         * sysdeps/mips/pt-machine.h: Likewise.
2607         * sysdeps/powerpc/pspinlock.c: Likewise.
2608         * sysdeps/powerpc/pt-machine.h: Likewise.
2609         * sysdeps/pthread/bits/initspin.h: Likewise.
2610         * sysdeps/pthread/bits/libc-lock.h: Likewise.
2611         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2612         * sysdeps/pthread/getcpuclockid.c: Likewise.
2613         * sysdeps/pthread/posix-timer.h: Likewise.
2614         * sysdeps/pthread/timer_create.c: Likewise.
2615         * sysdeps/pthread/timer_delete.c: Likewise.
2616         * sysdeps/pthread/timer_getoverr.c: Likewise.
2617         * sysdeps/pthread/timer_gettime.c: Likewise.
2618         * sysdeps/pthread/timer_routines.c: Likewise.
2619         * sysdeps/pthread/timer_settime.c: Likewise.
2620         * sysdeps/pthread/tst-timer.c: Likewise.
2621         * sysdeps/s390/pspinlock.c: Likewise.
2622         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2623         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2624         * sysdeps/sh/pspinlock.c: Likewise.
2625         * sysdeps/sh/pt-machine.h: Likewise.
2626         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2627         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2628         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2629         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2630         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2631         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
2632         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2633         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2634         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2635         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2636         * tststack.c: Likewise.
2637         * unload.c: Likewise.
2638         * weaks.c: Likewise.
2639         * wrapsyscall.c: Likewise.
2641         * sysdeps/pthread/pt-initfini.c: Changed copying
2642         permission notice to Lesser GPL from Library GPL, including the
2643         references in the special exception.
2644         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
2645         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
2646         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
2647         Likewise.
2648         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
2649         Likewise.
2650         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
2652 2002-08-26  Ulrich Drepper  <drepper@redhat.com>
2654         * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
2655         overflow [PR libc/4244].
2657 2002-08-25  Ulrich Drepper  <drepper@redhat.com>
2659         * sysdeps/pthread/timer_routines.c (thread_func): Make the
2660         compiler happy by adding a return statement which will never be
2661         reached.
2663         * tst-context.c (main): Cast to long before casting to pointer.
2665         * Examples/ex17.c (main): Use correct format string.
2667         * Examples/ex9.c (thread): Remove incorrect return statement.
2669 2002-08-23  Ulrich Drepper  <drepper@redhat.com>
2671         * pthread.c (__linuxthreads_version): New global constant.
2673 2002-08-23  Andreas Jaeger  <aj@suse.de>
2675         * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
2676         as thread specific register.
2677         (testandset): Fix inline asm.
2678         (THREAD_GETMEM): Fix inline asm.
2680 2002-08-22  Roland McGrath  <roland@redhat.com>
2682         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
2683         conditional.
2684         (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
2685         (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
2686         macro.  That chooses whether to reuse %gs value or let kernel set it.
2687         [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
2688         [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
2689         not constant 0.
2691 2002-08-21  Ulrich Drepper  <drepper@redhat.com>
2693         * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
2694         also to the third definition of this macro.
2696 2002-06-17  Andreas Jaeger  <aj@suse.de>
2698         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2699         Set it.
2701 2002-08-20  Ulrich Drepper  <drepper@redhat.com>
2703         * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
2704         loading/reading segment registers.  Some old hardware doesn't
2705         handle the 32-bit instructions as expected.
2706         * sysdeps/i386/tls.h: Likewise.
2708         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
2709         renamed to secondcall and use is negated.
2710         (TLS_SETUP_GS_SEGMENT): Likewise.
2711         (TLS_INIT_TP): Likewise.
2712         * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
2713         secondcall.
2715         * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
2716         registers.  No need to mask upper 16 bits in this case.
2717         * sysdeps/i386/useldt.h: Likewise.
2718         (DO_SET_THREAD_AREA): We have to load %gs again even if the value
2719         is the same since the GDT content changed.
2721         * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
2722         to TLS_SETUP_GS_SEGMENT.
2723         (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
2724         TLS_DO_SET_THREAD_AREA.
2725         (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
2726         entry number from %gs value.
2727         * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
2728         ignore it.
2730         * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
2731         Pass true to _dl_deallocate_tls.
2732         (pthread_free): Likewise.
2733         * pthread.c (__pthread_initialize_manager): Likewise.
2735 2002-08-19  Ulrich Drepper  <drepper@redhat.com>
2737         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
2738         computing index from %gs value.
2740 2002-08-16  Roland McGrath  <roland@redhat.com>
2742         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
2743         register value from entry number properly.
2745         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
2746         optimally conditional on [__PIC__].
2747         (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
2748         without touching errno, and use latest modify_ldt-like interface.
2749         (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
2750         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
2751         (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
2752         existing %gs value as the segment to set.
2753         (INIT_THREAD_SELF): Rewritten using those.  Use set_thread_area only
2754         under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
2755         by the first thread's early TLS setup.
2757 2002-08-15  Roland McGrath  <roland@redhat.com>
2759         * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
2760         return a value as callers now expect.
2762 2002-08-11  Roland McGrath  <roland@redhat.com>
2764         * pthread.c (__pthread_initialize_manager): Initialize
2765         p_header.data.tcb field of manager thread's descriptor.
2766         (__pthread_initialize_minimal): Don't initialize p_header.data.self
2767         field, already done by TLS_INIT_TP.
2769         * manager.c (pthread_handle_create): Move p_header field initializers
2770         together.
2772 2002-08-08  Ulrich Drepper  <drepper@redhat.com>
2774         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
2776 2002-08-07  Ulrich Drepper  <drepper@redhat.com>
2778         * pthread.c (__linuxthreads_initial_report_events): New variable.
2779         (__pthread_initialize_manager): Use it to initialize p_report_events
2780         of initial thread.
2781         [TLS]: Store pointer to descriptor of manager in __pthread_handles.
2783 2002-08-07  Roland McGrath  <roland@redhat.com>
2785         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
2786         an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
2788 2002-08-02  Roland McGrath  <roland@redhat.com>
2790         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
2791         Add _LIBC_TSD_KEY_LOCALE.
2792         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
2793         Call __uselocale to initialize our per-thread locale pointer to
2794         the global one.
2795         * pthread.c (__pthread_initialize_minimal): Likewise.
2797         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
2799 2002-08-02  Ulrich Drepper  <drepper@redhat.com>
2801         * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
2802         internally.
2804         * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
2805         Don't use p_libc_specific element in thread descriptor.
2807 2002-07-30  Roland McGrath  <roland@redhat.com>
2809         * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
2810         [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
2811         which does the right thing when __thread support is available.
2812         * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
2813         Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
2814         `p_h_errno', `p_resp', and `p_res' members.
2815         * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
2816         Don't initialize `p_errnop' and `p_h_errnop' members.
2817         (__pthread_reset_main_thread): Likewise.
2818         (__pthread_initialize_manager): Likewise.
2819         * manager.c (__pthread_manager, pthread_handle_create): Likewise.
2820         * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
2821         Don't initialize `p_resp' member.
2822         (__pthread_reset_main_thread): Likewise.
2823         * manager.c (pthread_handle_create): Likewise.
2824         * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
2825         Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
2826         * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
2827         * errno.c [USE_TLS && HAVE___THREAD]
2828         (__h_errno_location, __res_state): Don't define these at all.
2830         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
2831         (INSTALL_NEW_DTV, GET_DTV): Likewise.
2832         * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
2834         * weaks.c: Don't include <errno.h> here.
2836 2002-08-01  Roland McGrath  <roland@redhat.com>
2838         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
2839         TLS_INIT_TP.
2840         (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
2841         (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
2842         (TLS_INIT_TP): Use that.
2844 2002-08-02  Jakub Jelinek  <jakub@redhat.com>
2846         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
2847         (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
2848         (FREE_THREAD): Avoid modify_ldt if using GDT.
2849         * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
2851 2002-07-25  Jakub Jelinek  <jakub@redhat.com>
2853         * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
2854         * sysdeps/i386/pt-machine.h: Likewise.
2855         * sysdeps/i386/useldt.h: Likewise.
2857 2002-07-22  Ulrich Drepper  <drepper@redhat.com>
2859         * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
2860         call __libc_setup_tls first.
2861         * Makefile: Actually create tst-signal.out file when running the test.
2862         (tests): Add tststatic.
2863         * Examples/tststatic.c: New file.
2865 2002-07-19  Ulrich Drepper  <drepper@redhat.com>
2867         * errno.c (__errno_location): Don't define unless !USE_TLS
2868         || !HAVE___THREAD.
2869         * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
2870         * sysdeps/i386/tls.h: Likewise.
2871         * sysdeps/i386/useldt.h: Likewise.
2872         * sysdeps/i386/i686/pt-machine.h: Likewise.
2874 2002-07-02  H.J. Lu  <hjl@gnu.org>
2876         * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>.  Always
2877         use ll/sc.
2878         * sysdeps/mips/pt-machine.h: Likewise.
2880 2002-07-14  Ulrich Drepper  <drepper@redhat.com>
2882         * manager.c (pthread_handle_create): Initialize self-reference in
2883         descriptor.
2885 2002-07-01  Jakub Jelinek  <jakub@redhat.com>
2887         * Examples/ex9.c (main): Remove unused th variable.
2889 2002-07-10  Ulrich Drepper  <drepper@redhat.com>
2891         * wrapsyscall.c: Add __nanosleep alias.
2892         * Versions (GLIBC_2.2.6): Add __nanosleep.
2893         * bug-sleep.c: New file.
2894         * Makefile (tests): Add bug-sleep.
2896 2002-06-19  Steven Munroe  <sjmunroe@vnet.ibm.com>
2898         * Examples/ex9.c (main):  Use list of children and join them.
2899         (thread): Do not call exit.
2901 2002-06-20  Ulrich Drepper  <drepper@redhat.com>
2903         * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
2904         Unconditionally use the code using spinlock.  Use __pthread_release
2905         to free a spinlock.
2906         (wait_node_free): Likewise.
2907         (__pthread_acquire, __pthread_release): Unconditionally define.
2909 2002-06-07  Jakub Jelinek  <jakub@redhat.com>
2911         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
2913 2002-05-24  Ulrich Drepper  <drepper@redhat.com>
2915         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
2917 2002-05-21  Ulrich Drepper  <drepper@redhat.com>
2919         * sysdeps/pthread/pthread.h (pthread_create): Rename first
2920         parameter.
2921         (pthread_cancel): Likewise.
2922         * internals.h (__pthread_create_2_1): Likewise.
2923         * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
2925 2002-05-20  Ulrich Drepper  <drepper@redhat.com>
2927         * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
2928         Patch by Glen Nakamura <gen@flex.com>.
2930 2002-05-03  Ulrich Drepper  <drepper@redhat.com>
2932         * signals.c: Move sighandler functions to...
2933         * sighandler.c: ...here.  New file.
2934         * signals.c: Move signal handler related type definitions to...
2935         * internals.h: ...here.  Add prototypes for signal handlers.
2936         * Makefile (libpthread-routines): Add sighandler.
2937         (CFLAGS-sighandler.c): Add $(exceptions).
2939 2002-04-30  Jakub Jelinek  <jakub@redhat.com>
2941         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
2943 2002-04-08  Ulrich Drepper  <drepper@redhat.com>
2945         * sysdeps/pthread/timer_getoverr.c: Return real overrun.
2946         * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
2947         * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
2948         based on previous one and not on current time.  Count overruns.
2949         Patch by Eric F. Sorton <eric@cctcorp.com>.
2951         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
2953 2002-04-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
2955         * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
2956         if it isn't defined yet.
2957         (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
2958         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2959         Likewise.
2960         * sysdeps/sh/tls.h: New file.
2962 2002-04-08  Jakub Jelinek  <jakub@redhat.com>
2964         * manager.c (__pthread_manager_event): Use self instead of arg
2965         for INIT_THREAD_SELF.
2966         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
2967         _pthread_descr_struct) instead of sizeof (*descr).
2969 2002-04-05  Ulrich Drepper  <drepper@redhat.com>
2971         * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
2972         * sysdeps/alpha/pt-machine.h: Likewise.
2973         * sysdeps/arm/pt-machine.h: Likewise.
2974         * sysdeps/cris/pt-machine.h: Likewise.
2975         * sysdeps/hppa/pt-machine.h: Likewise.
2976         * sysdeps/m68k/pt-machine.h: Likewise.
2977         * sysdeps/mips/pt-machine.h: Likewise.
2978         * sysdeps/powerpc/pt-machine.h: Likewise.
2979         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2980         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2981         * sysdeps/sh/pt-machine.h: Likewise.
2982         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2983         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2984         * sysdeps/x86_64/pt-machine.h: Likewise.
2986 2002-04-05  Jakub Jelinek  <jakub@redhat.com>
2988         * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
2989         instead of pthread_mutexattr_setkind_np.
2990         (pthread_mutexattr_gettype): Similarly.
2991         * man/pthread_mutexattr_setkind_np.man: New.
2992         * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
2994 2002-04-02  Ulrich Drepper  <drepper@redhat.com>
2996         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
2998 2002-03-22  Jakub Jelinek  <jakub@redhat.com>
3000         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
3002 2002-03-22  Ulrich Drepper  <drepper@redhat.com>
3004         * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
3006 2002-03-17  Andreas Jaeger  <aj@suse.de>
3008         * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
3009         prototpyes.
3010         * sysdeps/alpha/pt-machine.h: Likewise.
3011         * sysdeps/arm/pt-machine.h: Likewise.
3012         * sysdeps/cris/pt-machine.h: Likewise.
3013         * sysdeps/hppa/pt-machine.h: Likewise.
3014         * sysdeps/i386/i686/pt-machine.h: Likewise.
3015         * sysdeps/ia64/pt-machine.h: Likewise.
3016         * sysdeps/m68k/pt-machine.h: Likewise.
3017         * sysdeps/mips/pt-machine.h: Likewise.
3018         * sysdeps/powerpc/pt-machine.h: Likewise.
3019         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
3020         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
3021         * sysdeps/sh/pt-machine.h: Likewise.
3022         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3023         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3024         * sysdeps/x86_64/pt-machine.h: Likewise.
3026         * internals.h: Move testandset and __compare_and_swap prototypes
3027         to pt-machine.h.
3029 2002-03-03  Andreas Jaeger  <aj@suse.de>
3031         * errno.c: Include resolv.h to avoid warning.
3033 2002-02-27  Ulrich Drepper  <drepper@redhat.com>
3035         * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
3036         stack limit.
3038 2002-02-23  Ulrich Drepper  <drepper@redhat.com>
3040         * attr.c (pthread_getattr_np): Don't take thread descriptor size
3041         into account if USE_TLS.
3042         * manager.c (pthread_handle_create): Free TLS data structures if call
3043         failed.  Pass correct stack to clone if USE_TLS.
3044         * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
3045         * sysdeps/i386/i686/pt-machine.h: Likewise.
3046         * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
3048         * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
3049         Add p_stackaddr element #if USE_TLS.
3050         * internals.c: Include <tls.h>.
3051         * manager.c: Integrate creating and handling of thread descriptor
3052         for TLS.
3053         * pthread.c: Likewise.
3054         * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
3055         Include <linuxthreads/descr.h> only if TLS is really used.
3056         (GET_DTV): New macro.
3057         (TLS_INIT_TP): Initialize self pointer.
3059 2002-02-17  Andreas Schwab  <schwab@suse.de>
3061         * signals.c (sigwait): Check for old sighandler being SIG_ERR,
3062         not NULL.
3064 2002-02-12  Ulrich Drepper  <drepper@redhat.com>
3066         * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
3067         (INSTALL_DTV): Adjust for being passed pointer to element with length.
3069 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
3071         * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
3073 2002-02-08  Richard Henderson  <rth@redhat.com>
3075         * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
3077 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
3079         * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
3080         after all.
3082 2002-02-07  H.J. Lu  <hjl@gnu.org>
3084         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
3085         gcc warning.
3086         (__pthread_spin_lock): Remove ".set noreorder".
3087         * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
3089 2002-02-05  H.J. Lu  <hjl@gnu.org>
3091         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
3092         branch likely.
3093         * sysdeps/mips/pt-machine.h (testandset): Likewise.
3094         (__compare_and_swap): Likewise.
3096 2002-02-07  Ulrich Drepper  <drepper@redhat.com>
3098         * internals.h: Move declarations/definitions of
3099         __pthread_initial_thread_bos, __pthread_initial_thread,
3100         __pthread_manager_thread_bos, __pthread_manager_thread_tos,
3101         __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
3102         CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
3103         * descr.h: ...here.
3104         * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
3105         Define THREAD_GETMEM accordingly.
3107 2002-02-06  Ulrich Drepper  <drepper@redhat.com>
3109         * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
3111         * sysdeps/i386/tls.h: Define THREAD_DTV.
3113 2002-02-04  Ulrich Drepper  <drepper@redhat.com>
3115         * internals.h: Move thread descriptor definition...
3116         * descr.h.: ...here.  New file.
3117         * sysdeps/i386/tls.h: New file.
3119 2002-02-01  H.J. Lu  <hjl@gnu.org>
3121         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
3122         different register in the delayed slot.  Use branch likely.
3124         * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
3125         (__compare_and_swap): Return 0 only when failed to compare. Use
3126         branch likely.
3128 2002-02-01  Jakub Jelinek  <jakub@redhat.com>
3130         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
3131         __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
3132         * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
3133         * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
3134         * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
3135         * sysdeps/sparc/sparc64/Versions: New file.
3136         * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
3138 2002-01-31  Ulrich Drepper  <drepper@redhat.com>
3140         * pthread.c: _dl_cpuclock_offset is not any longer a global variable
3141         in SHARED code, use GL(dl_cpuclock_offset).
3143 2002-01-28  Andreas Jaeger  <aj@suse.de>
3145         * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
3146         0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
3148 2002-01-16  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3150         * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
3151         (CURRENT_STACK_FRAME): Remove duplicate definition.
3152         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
3154 2002-01-14  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3156         * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
3157         automatic inline.
3159 2002-01-12  Andreas Schwab  <schwab@suse.de>
3161         * Makefile (test-srcs): Add tst-signal.
3162         (tests): Run tst-signal.
3163         (distribute): Add tst-signal.sh.
3164         * tst-signal.c, tst-signal.sh: New files.
3166 2002-01-14  Andreas Jaeger  <aj@suse.de>
3168         * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
3170 2002-01-11  Andreas Schwab  <schwab@suse.de>
3172         * signals.c (sighandler): Initialize all elements to SIG_ERR.
3173         (__sigaction): Don't use value from sighandler if it is SIG_ERR.
3175 2002-01-06  Richard Henderson  <rth@redhat.com>
3177         * sysdeps/alpha/elf/pt-initfini.c: New file.
3179 2001-12-29  Andreas Jaeger  <aj@suse.de>
3181         * Examples/ex9.c: Add noreturn attribute for thread.
3182         * Examples/ex10.c: Likewise.
3183         * Examples/ex13.c (thread_start): Likewise.
3184         * Examples/ex15.c (worker): Likewise.
3186         * Examples/ex18.c: Include unistd.h for prototype of sleep.
3188 2001-12-14  Ulrich Drepper  <drepper@redhat.com>
3190         * man/pthread_atfork.man: Adjust description of mutex handling
3191         after fork for current implementation.
3192         * linuxthreads.texi: Likewise [PR libc/2519].
3194 2001-12-13  Andreas Schwab  <schwab@suse.de>
3196         * specific.c (pthread_key_delete): Don't contact the thread
3197         manager if no threads have been created yet.
3199 2001-12-12  NIIBE Yutaka  <gniibe@m17n.org>
3201         * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
3202         qualifier to be safe.
3204 2001-11-30  Andreas Schwab  <schwab@suse.de>
3206         * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
3207         that self is the manager thread, and initialize the thread
3208         register if not.
3209         (thread_self_stack) [THREAD_SELF]: New function to find self via
3210         stack pointer.
3211         * manager.c (pthread_handle_create): Don't block cancel signal any
3212         more.
3214 2001-11-29  Andreas Jaeger  <aj@suse.de>
3216         * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
3217         (THREAD_SELF): New.
3218         (INIT_THREAD_SELF): New.
3219         (THREAD_GETMEM): New.
3220         (THREAD_GETMEM_NC):
3221         (THREAD_SETMEM): New.
3222         (THREAD_SETMEM_NC): New.
3223         (FLOATING_STACKS): Define.
3224         (ARCH_STACK_MAX_SIZE): Define.
3226 2001-11-28  Kaz Kylheku  <kaz@ashi.footprints.net>
3228         Bugfix to pthread_key_delete. It was iterating over the thread
3229         manager's linked list of threads, behind the thread manager's
3230         back causing a race. The fix is to have the manager iterate over
3231         the threads instead, using a new request type for doing so.
3232         * internals.h (struct pthread_request): New manager request type
3233         REQ_FOR_EACH_THREAD.
3234         * manager.c (pthread_for_each_thread): New function.
3235         (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
3236         * specific.c (struct pthread_key_delete_helper_args): New type.
3237         (pthread_key_delete_helper): New static function.
3238         (pthread_key_delete): Use the new thread manager
3239         REQ_FOR_EACH_THREAD function to iterate over the threads and set
3240         the delete key slot to a null value in each thread.
3241         * Examples/ex18.c: New test.
3242         * Makefile (tests): Add ex18.
3244 2001-11-22  Wolfram Gloger  <wg@malloc.de>
3246         * pthread.c (pthread_onexit_process): Don't call free
3247         after threads have been asynchronously terminated.
3249         * manager.c (pthread_handle_exit): Surround cancellation
3250         of threads with __flockfilelist()/__funlockfilelist().
3252 2001-11-26  Andreas Schwab  <schwab@suse.de>
3254         * manager.c (pthread_handle_create): Start the child thread with
3255         the cancel signal blocked, so that it does not handle it before
3256         the thread register is set up.  Save errno from failed clone call.
3258 2001-11-15  Ulrich Drepper  <drepper@redhat.com>
3260         * sysdeps/i386/i686/Implies: Removed.
3261         * sysdeps/i386/i686/Versions: New file.
3263 2001-10-31  Andreas Jaeger  <aj@suse.de>
3265         * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
3267 2001-10-05  Kevin Buettner  <kevinb@cygnus.com>
3269         * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
3270         to __linuxthreads_pthread_sizeof_descr to match name used by
3271         symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
3272         linuxthreads_db/td_symbol_list.c.
3274 2001-09-22  Andreas Jaeger  <aj@suse.de>
3276         * linuxthreads/tst-context.c: Avoid compile warning.
3278 2001-09-20  Andreas Jaeger  <aj@suse.de>
3280         * shlib-versions: Add x86-64.
3282 2001-09-19  Andreas Jaeger  <aj@suse.de>
3284         * sysdeps/x86_64/Makefile: New file.
3285         * sysdeps/x86_64/pspinlock.c: New file.
3286         * sysdeps/x86_64/pt-machine.h: New file.
3288 2001-09-12  Jakub Jelinek  <jakub@redhat.com>
3290         * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
3291         for SIGEV_NONE.
3292         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
3294 2001-09-11  Ulrich Drepper  <drepper@redhat.com>
3295             Wolfram Gloger <wg@malloc.de>
3297         * join.c: Protect all communications from and to manager with
3298         TEMP_FAILURE_RETRY.
3299         * manager.c: Likewise.
3300         * pthread.c: Likewise.
3301         * smeaphore.c: Likewise.
3303 2001-08-29  Ulrich Drepper  <drepper@redhat.com>
3305         * spinlock.c (__pthread_lock): Top max_count value with
3306         MAX_ADAPTIVE_SPIN_COUNT.
3307         * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
3309         * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
3310         help P4.
3312 2001-08-27  Jakub Jelinek  <jakub@redhat.com>
3314         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
3315         non-opaque type if __USE_UNIX98.
3317 2001-08-26  Jakub Jelinek  <jakub@redhat.com>
3319         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
3320         non-opaque lock types also if _IO_MTSAFE_IO is defined.
3322 2001-08-23  Roland McGrath  <roland@frob.com>
3324         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
3325         new first argument, skip the cleanup handler if it's zero.
3326         (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
3327         (__libc_lock_define_initialized_recursive): Use it.
3328         * sysdeps/pthread/bits/stdio-lock.h: File removed.
3329         The sysdeps/generic file from the main tree now suffices.
3331 2001-08-22  Roland McGrath  <roland@frob.com>
3333         * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
3334         instead of <pthread.h>.
3335         (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
3336         (_IO_lock_initializer): Add braces.
3337         (_IO_lock_lock): Use __libc_lock_lock_recursive.
3338         (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
3340         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
3341         (__libc_lock_define_initialized_recursive): Use it.
3342         (__libc_lock_init_recursive): Likewise.
3343         (__libc_lock_fini_recursive): Likewise.
3344         (__libc_lock_lock_recursive): Likewise.
3345         (__libc_lock_trylock_recursive): Likewise.
3346         (__libc_lock_unlock_recursive): Likewise.
3347         (__libc_lock_define_recursive): New macro.
3349 2001-08-14  Jakub Jelinek  <jakub@redhat.com>
3351         * lockfile.c (__pthread_provide_lockfile): New variable.
3352         * pthread.c (__pthread_require_lockfile): New variable.
3353         * cancel.c (__pthread_require_lockfile): New variable.
3355 2001-07-31  Ulrich Drepper  <drepper@redhat.com>
3357         * tst-context.c (threadfct): Initialize context before calling
3358         makecontext.
3360         * Examples/ex17.c: Make sure test thread is around long enough.
3362 2001-07-26  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3364         * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
3366 2001-07-24  Ulrich Drepper  <drepper@redhat.com>
3368         * tst-context.c (main): Print explanation before bailing out
3369         because context handling is not supported.
3371 2001-07-23  Ulrich Drepper  <drepper@redhat.com>
3373         * Makefile (tests): Add tst-context.
3374         * tst-context.c: New file.
3376         * sysdeps/pthread/bits/stdio-lock.h: Define
3377         _IO_cleanup_region_start_noarg.
3379 2001-07-23  Jakub Jelinek  <jakub@redhat.com>
3381         * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
3382         (ARCH_STACK_MAX_SIZE): Define.
3383         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3384         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3386 2001-07-19  Jakub Jelinek  <jakub@redhat.com>
3388         * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
3390         * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
3391         (ARCH_STACK_MAX_SIZE): Define.
3392         * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
3393         NEED_SEPARATE_REGISTER_STACK.
3395 2001-07-16  Andreas Schwab  <schwab@suse.de>
3397         * Makefile (before-compile): Don't add $(objpfx)crti.o.
3398         (omit-deps): Add crti.
3399         ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
3400         it is filtered out of the link command.
3402 2001-07-16  Ulrich Drepper  <drepper@redhat.com>
3404         * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
3405         to find the right value for __pthread_initial_thread_bos, it's not
3406         used.  If not FLOATING_STACKS first run
3407         __pthread_init_max_stacksize.
3409 2001-06-16  H.J. Lu  <hjl@gnu.org>
3411         * internals.h: Include <stackinfo.h>.
3413         * attr.c: Don't include <stackinfo.h> here.
3414         * cancel.c: Likewise.
3415         * manager.c: Likewise.
3416         * pthread.c: Likewise.
3417         * ptlongjmp.c: Likewise.
3419 2001-03-23  Matthew Wilcox  <willy@ldl.fc.hp.com>
3421         * attr.c: Make _STACK_GROWS_UP work.
3422         * internals.h: Likewise.
3423         * manager.c: Likewise.
3424         * pthread.c: Likewise.
3426 2001-06-15  H.J. Lu  <hjl@gnu.org>
3428         * pthread.c (__pthread_reset_main_thread): Fix a typo.
3430 2001-02-02  John S. Marvin  <jsm@udlkern.fc.hp.com>
3432         * semaphore.h: Use struct _pthread_fastlock as an element of
3433         sem_t instead of an identical struct.
3434         * rwlock.c: Remove casts.
3435         * semaphore.c: Likewise.
3437 2001-04-30  Alan Modra  <amodra@one.net.au>
3439         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
3441 2001-05-25  Bruce Mitchener  <bruce@cubik.org>
3443         * linuxthreads.texi: Spelling corrections.
3445 2001-05-25  Ulrich Drepper  <drepper@redhat.com>
3447         * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
3448         returning successfully.
3449         Patch by Gene Cooperman <gene@ccs.neu.edu>.
3451 2001-05-24  Ulrich Drepper  <drepper@redhat.com>
3453         * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
3454         serious work try once whether the lock is uncontested.
3455         Remove duplicate reading of __status before loop.
3456         Change suggested by Hans Boehm <hans_boehm@hp.com>.
3458         * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
3459         (__pthread_alt_trylock): Likewise.
3461 2001-05-01  Kaz Kylheku  <kaz@ashi.footprints.net>
3463         Memory barrier overhaul following line by line inspection.
3464         * mutex.c (pthread_once): Missing memory barriers added.
3465         * pthread.c (__pthread_wait_for_restart_signal,
3466         __pthread_timedsuspend_new, __pthread_restart_new): Added
3467         memory barriers ``just in case'' and for documentary value.
3468         * spinlock.c (__pthread_release): New inline function for releasing
3469         spinlock, to complement __pthread_acquire.  Includes memory
3470         barrier prior to assignment to spinlock, and __asm __volatile
3471         dance to prevent reordering or optimization of the spinlock access.
3472         * spinlock.c (__pthread_unlock, __pthread_alt_lock,
3473         __pthread_alt_timedlock, __pthread_alt_unlock,
3474         __pthread_compare_and_swap): Updated to use new __pthread_release
3475         instead of updating spinlock directly.
3476         * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
3477         wait_node_free, wait_node_dequeue, __pthread_alt_lock,
3478         __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
3479         Memory barrier overhaul.  Lots of missing memory barriers added,
3480         a couple needless ones removed.
3481         * spinlock.c (__pthread_compare_and_swap): testandset optimization
3482         removed, just calls __pthread_acquire, which has the new read
3483         barrier in it before its testandset.
3485 2001-05-20  Roland McGrath  <roland@frob.com>
3487         * Makeconfig: New file, variables used to be in main libc Makeconfig.
3489 2001-05-09  Geoff Keating  <geoffk@redhat.com>
3491         * sysdeps/powerpc/pt-machine.h
3492         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
3493         (__compare_and_swap): Remove memory barriers.
3494         (__compare_and_swap_with_release_semantics): New function.
3496 2001-04-24  Andreas Jaeger  <aj@suse.de>
3498         * wrapsyscall.c: send* and recv* return ssize_t.
3500         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
3501         mutex instead of double locking it.
3502         Reported by Pierre Artaud <partaud@sodatec.com>.
3504 2001-04-23  Ulrich Drepper  <drepper@redhat.com>
3506         * sysdeps/pthread/getcpuclockid.c: Make function generic, test
3507         using #ifdef whether the clock is available.
3508         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
3510         * sysdeps/ia64/Versions: New file.
3512         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
3513         have to call __gmon_start__ in the libpthread DSO.
3514         * sysdeps/pthread/pt-initfini.c (_init): Likewise.
3516         * Makefile (libpthread-routines): Add ptclock_gettime and
3517         ptclock_settime.
3518         * internals.h: Don't use cpuclock-init.h definitions, use
3519         hp-timing.h definitions.
3520         * pthread.c: Likewise.
3521         * manager.c: Likewise.
3522         * ptclock_gettime.c: New file.
3523         * ptclock_settime.c: New file.
3524         * internals.h: Fix parameter type for __pthread_clock_gettime and
3525         __pthread_clock_settime.
3527         * sysdeps/i386/i586/ptclock_gettime.c: Removed.
3528         * sysdeps/i386/i586/ptclock_settime.c: Removed.
3529         * sysdeps/i386/i586/Makefile: Removed.
3531 2001-04-22  Ulrich Drepper  <drepper@redhat.com>
3533         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
3534         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3536 2001-04-21  Andreas Jaeger  <aj@suse.de>
3538         * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
3539         attribute, remove statements that will never be executed.
3540         (thread_func): Remove mutex_unlock call since it's never executed.
3541         (thread_func): Fix comment as suggested by Jakub Jelinek.
3543         * manager.c (__pthread_manager): Add noreturn
3544         attribute.
3545         (pthread_start_thread): Likewise, remove return statement.
3546         (pthread_start_thread_event): Likewise.
3547         Add noreturn attribute for pthread_handle_exit.
3548         * weaks.c: Add noreturn attribute for pthread_exit.
3550         * internals.h: Add __pthread_clock_gettime and
3551         __pthread_clock_settime prototypes.
3553 2001-04-21  Ulrich Drepper  <drepper@redhat.com>
3555         * internals.h: Include <cpuclock-init.h>.
3556         (struct _pthread_descr_struct): Add p_cpuclock_offset field if
3557         CPUCLOCK_VARDEF is defined.
3558         * pthread.c (__pthread_initialize_minimal): Initialize
3559         p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
3560         * manager.c (pthread_start_thread): Set p_cpuclock_offset field
3561         for new thread to current CPU clock value.
3563         * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
3565         * sysdeps/i386/i586/Makefile: New file.
3566         * sysdeps/i386/i586/Versions: New file.
3567         * sysdeps/i386/i586/ptclock_gettime.c: New file.
3568         * sysdeps/i386/i586/ptclock_settime.c: New file.
3569         * sysdeps/i386/i686/Implies: New file.
3571 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3573         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
3574         $generated, not $postclean-generated.
3576 2001-04-18  Andreas Jaeger  <aj@suse.de>
3578         * Makefile (otherlibs): Added.
3580 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3582         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3584 2001-04-16  Ulrich Drepper  <drepper@redhat.com>
3586         * signals.c (sigwait): NSIG is no signal number.  Block all
3587         signals while in signal handler for signals in SET.
3588         Patch by Manfred Spraul <manfred@colorfullife.com>.
3590 2001-04-12  Ulrich Drepper  <drepper@redhat.com>
3592         * tst-cancel.c: Disable most tests.  Add new test where all
3593         cleanup handlers must run.
3594         * Makefile (tests): Add tst-cancel again.
3596         * cancel.c (__pthread_perform_cleanup): Correct condition for
3597         leaving cleanup loop early.
3599         * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
3600         all the files which use CURRENT_STACK_FRAME.
3601         * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
3602         __builtin_frame_address.
3603         * sysdeps/i386/i686/pt-machine.h: Likewise.
3605 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3607         * Makefile (tests): Comment out tst-cancel for now.
3609         * tst-cancel.c (main): Cleanup 4 is supposed to run.  Create
3610         temporary file in object directory.
3611         * Makefile: Don't allow inlining when compiling tst-cancel.c.
3612         Pass $(objpfx) to tst-cancel.
3614 2001-04-11  David S. Miller  <davem@redhat.com>
3616         * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
3617         up closer to user local variables so that new cleanup heuristics work.
3618         * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
3620 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3622         * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
3623         and remove it.
3624         (_pthread_cleanup_push_defer): Likewise.
3626         * tst-cancel.c (main): Fix loop printing cleanup output.
3628 2001-04-10  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3630         * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
3631         test.
3632         (__pthread_spin_trylock): Likewise.
3633         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3635 2001-04-10  Ulrich Drepper  <drepper@redhat.com>
3637         * join.c (pthread_exit): Move code to new function __pthread_do_exit
3638         which takes an extra parameter with the current frame pointer.
3639         Call new function with CURRENT_STACK_FRAME.
3640         (__pthread_do_exit): New function.  Call __pthread_perform_cleanup
3641         with the new parameter.
3642         (pthread_join): Call __pthread_do_exit instead of pthread_exit.
3643         * cancel.c (__pthread_perform_cleanup): Takes extra parameter.  Use
3644         this parameter as the initial value the cleanup handler records are
3645         compared against.  No active cleanup handler record must have an
3646         address lower than the previous one and the initial record must be
3647         above (below on PA) the frame address passed in.
3648         (pthread_setcancelstate): Call __pthread_do_exit instead of
3649         pthread_exit.
3650         (pthread_setcanceltype): Likewise.
3651         (pthread_testcancel): Likewise.
3652         (_pthread_cleanup_pop_restore): Likewise.
3653         * condvar.c (pthread_cond_wait): Likewise.
3654         (pthread_cond_timedwait_relative): Likewise.
3655         * manager.c (pthread_start_thread): Likewise.
3656         * oldsemaphore.c (__old_sem_wait): Likewise.
3657         * pthread.c (pthread_handle_sigcancel): Likewise.
3658         * semaphore.c (__new_sem_wait): Likewise.
3659         (sem_timedwait): Likewise.
3660         * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
3661         to limit the cleanup handlers which get run.
3662         * internals.h: Add prototype for __pthread_do_exit.  Adjust prototype
3663         for __pthread_perform_cleanup.
3665         * Makefile (tests): Add tst-cancel.
3666         * tst-cancel.c: New file.
3668 2001-04-08  Hans-Peter Nilsson  <hp@axis.com>
3670         * sysdeps/cris/pt-machine.h: New file.
3671         * sysdeps/cris/pspinlock.c: New file.
3673 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
3675         * shlib-versions: Add case for Linux on CRIS.
3677 2001-03-26  Ulrich Drepper  <drepper@redhat.com>
3679         * attr.c (pthread_getattr_np): Correct computation of stack size
3680         for machiens with register stack.
3682         * Examples/ex17.c (main): Correct detection of failed mmap call.
3684 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3686         * pthread.c (__pthread_initialize_manager): Fix a typo.
3688 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3690         * attr.c (__pthread_attr_setstack): Fix alignment check.
3691         (pthread_getattr_np): __stackaddr is top of stack, not bottom.
3692         * Makefile (tests): Add ex17 test.
3693         * Examples/ex17.c: New test.
3695 2001-03-20  Ulrich Drepper  <drepper@redhat.com>
3697         * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
3698         * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
3699         * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
3701 2001-03-18  Ulrich Drepper  <drepper@redhat.com>
3703         * Makefile: When generating DSO link with libc_nonshared.a.
3705 2001-02-26  Jakub Jelinek  <jakub@redhat.com>
3707         * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
3709 2001-02-23  Jakub Jelinek  <jakub@redhat.com>
3711         * internals.h (__pthread_init_max_stacksize): New prototype.
3712         * attr.c (__pthread_attr_setstacksize): Call
3713         __pthread_init_max_stacksize if not yet initialized.
3714         * pthread.c (__pthread_init_max_stacksize): New function.
3715         (__pthread_initialize_manager): Call it.
3716         Patch by <dtc@cmucl.cons.org>.
3718 2001-03-16  Ulrich Drepper  <drepper@redhat.com>
3720         * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
3722 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3724         * shlib-versions: Add rule for Linux on 64 bit S/390.
3725         * sysdeps/s390/s390-64/pt-machine.h: New file.
3726         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3728 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3730         * sysdeps/s390/pt-machine.h: Move to...
3731         * sysdeps/s390/s390-32/pt-machine.h: ...here.
3732         Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
3734 2001-03-15  Ulrich Drepper  <drepper@redhat.com>
3736         * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
3737         * attr.c: Implement pthread_getattr_np.
3738         * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
3739         * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
3740         * manager.c (pthread_handle_create): Initialize p_inheritsched.
3742 2001-03-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3744         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
3745         code alignment.
3747 2001-02-20  Hans Boehm  <hans_boehm@hp.com>
3749         * manager.c (manager_mask): Removed static vesion.  Now always local
3750         to __pthread_manager().
3751         (manager_mask_all): Removed completely.
3752         (__pthread_manager): Remove manager_mask_all initialization.
3753         (pthread_handle_create): Remove code to set and reset signal mask
3754         around __clone2() calls.
3756 2001-02-17  Jakub Jelinek  <jakub@redhat.com>
3758         * spinlock.c (__pthread_lock): Force lock->__status to be read from
3759         memory on every spin.
3761 2001-02-10  Andreas Jaeger  <aj@suse.de>
3763         * Makefile (extra-objs): New.
3765 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
3767         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
3768         __pthread_initialize_minimal prototype.
3770 2001-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3772         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3774 2001-02-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3776         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
3778 2001-02-06  Ulrich Drepper  <drepper@redhat.com>
3780         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
3781         broken code.  Patch by Jes Sorensen.
3783 2001-02-06  Andreas Jaeger  <aj@suse.de>
3785         * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
3786         to...
3787         * internals.h: ...here.
3789 2001-02-05  Jes Sorensen  <jes@linuxcare.com>
3791         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
3793 2001-02-02  Ulrich Drepper  <drepper@redhat.com>
3795         * Versions: Remove __pthread_initialize_minimal.
3797 2001-02-01  Ulrich Drepper  <drepper@redhat.com>
3799         * Makefile: Add rules to build crti.o and make it being used in
3800         building libpthread.so.
3801         * sysdeps/i386/Makefile: New file.
3802         * sysdeps/pthread/pt-initfini.c: New file.
3804         * pthread.c: Cleanups.
3806 2001-01-28  Andreas Jaeger  <aj@suse.de>
3808         * oldsemaphore.c (__old_sem_init): Adjust for last change.
3809         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3810         * spinlock.c: Likewise.
3812 2001-01-28  Ulrich Drepper  <drepper@redhat.com>
3814         * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
3815         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
3816         * manager.c: Adjust for namespace cleanup in bits/initspin.h.
3817         * pthread.c: Likewise.
3818         * spinlock.h: Likewise.
3819         * sysdeps/pthread/pthread.h: Likewise.
3821 2001-01-26  Ulrich Drepper  <drepper@redhat.com>
3823         * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
3824         as struct __pthread_attr_s.
3826         * semaphore.h (sem_t): Cleanup namespace, rename status and
3827         spinlock elements.
3829 2001-01-13  Jakub Jelinek  <jakub@redhat.com>
3831         * pthread.c (pthread_onexit_process): Clear
3832         __pthread_manager_thread_bos after freeing it.
3833         * Makefile (tests): Add ex16.
3834         * Examples/ex16.c: New file.
3836 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
3838         * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
3839         -z nodelete.
3840         * pthread.c (pthread_exit_process): Rename to...
3841         (pthread_onexit_process): ...this.
3842         (pthread_atexit_process, pthread_atexit_retcode): New.
3843         (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
3844         and only if HAVE_Z_NODELETE is not defined.
3845         (__pthread_initialize_manager): Register pthread_atexit_retcode
3846         with __cxa_atexit.
3848 2001-01-11  Ulrich Drepper  <drepper@redhat.com>
3850         * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
3852 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
3854         * Makefile (tests): Add ex15.
3855         * Examples/ex15.c: New test.
3857 2001-01-08  Ulrich Drepper  <drepper@redhat.com>
3859         * pthread.c (pthread_exit_process): Free memory allocated for
3860         manager stack.
3862 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
3864         * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
3865         (pthread_free): Always unmap the stack.  It's safe now that we don't
3866         use MAP_FIXED to allocate stacks.
3868 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
3870         * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
3872         * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
3874 2000-11-15  Wolfram Gloger  <wg@malloc.de>
3876         * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
3877         stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
3879 2000-12-27  Andreas Jaeger  <aj@suse.de>
3881         * Examples/ex13.c: Make local functions static.
3882         * ecmutex.c: Likewise.
3883         * joinrace.c: Likewise.
3884         * Examples/ex14.c: Likewise.
3886         * Examples/ex2.c: Make local functions static; reformat.
3887         * Examples/ex1.c: Likewise.
3888         * Examples/ex4.c: Likewise.
3889         * Examples/ex5.c: Likewise.
3890         * Examples/ex7.c: Likewise.
3892         * oldsemaphore.c: Add prototypes to shut up GCC.
3893         * pt-machine.c: Likewise.
3895         * weaks.c: Add prototype for pthread_exit.
3897         * internals.h: Add some prototypes, format prototypes and add
3898         missing externs.
3899         Move __libc_waitpid prototype to include/sys/wait.h.
3901         * rwlock.c: Include <bits/libc-lock.h> for prototypes.
3902         * mutex.c: Likewise.
3903         * specific.c: Likewise.
3904         * ptfork.c: Likewise.
3906         * lockfile.c: Include internals.h to get prototypes.
3907         * events.c: Likewise.
3908         * sysdeps/alpha/pspinlock.c: Likewise.
3909         * sysdeps/arm/pspinlock.c: Likewise.
3910         * sysdeps/hppa/pspinlock.c: Likewise.
3911         * sysdeps/i386/pspinlock.c: Likewise.
3912         * sysdeps/ia64/pspinlock.c: Likewise.
3913         * sysdeps/m68k/pspinlock.c: Likewise.
3914         * sysdeps/mips/pspinlock.c: Likewise.
3915         * sysdeps/powerpc/pspinlock.c: Likewise.
3916         * sysdeps/s390/pspinlock.c: Likewise.
3917         * sysdeps/sh/pspinlock.c: Likewise.
3918         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
3919         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
3920         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
3922 2000-12-27  Ulrich Drepper  <drepper@redhat.com>
3924         * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
3925         (__pthread_attr_getstack): Return correct address.
3926         Add warnings for using pthread_attr_getstackaddr and
3927         pthread_attr_setstackaddr.
3929 2000-12-26  Ulrich Drepper  <drepper@redhat.com>
3931         * Examples/ex6.c (test_thread): Make static.
3932         * Examples/ex12.c (test_thread): Make static and add noreturn
3933         attribute.
3935 2000-12-18  Jes Sorensen  <jes@linuxcare.com>
3937         * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
3938         and compare_and_swap_with_release_semantics returns int not long.
3940 2000-12-17  Andreas Jaeger  <aj@suse.de>
3942         * sysdeps/s390/pt-machine.h (testandset): Use long int as return
3943         value.
3944         * sysdeps/arm/pt-machine.h (testandset): Likewise.
3945         * sysdeps/hppa/pt-machine.h (testandset): Likewise.
3946         * sysdeps/m68k/pt-machine.h (testandset): Likewise.
3947         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3948         * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
3949         * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
3951 2000-12-17  Ulrich Drepper  <drepper@redhat.com>
3953         * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
3954         * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
3956 2000-12-17  Andreas Jaeger  <aj@suse.de>
3958         * internals.h: Add prototypes for testandset and
3959         __compare_and_swap to shut up gcc warnings.
3961 2000-12-06  Wolfram Gloger  <wg@malloc.de>
3963         * join.c (pthread_detach): Allow case where the thread has already
3964         terminated.
3966 2000-12-05  Andreas Jaeger  <aj@suse.de>
3968         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
3969         * sysdeps/mips/pt-machine.h (testandset): Likewise.
3970         (__compare_and_swap): Likewise.
3971         Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
3973 2000-11-20  Jakub Jelinek  <jakub@redhat.com>
3975         * Examples/ex3.c (main): Cast int to long before casting to void *.
3976         (search): Cast void * to long, not int.
3977         * Examples/ex8.c (main, thread): Similarly.
3978         * Examples/ex11.c (main): Similarly.
3979         * Examples/ex14.c (worker, do_test): Similarly.
3980         * ecmutex.c (worker, do_test): Similarly.
3981         (nlocks): Cast to int.
3983 2000-11-08  Bruce Mitchener  <bruce@cubik.org>
3985         * linuxthreads.texi:  Add documentation for pthreads attributes
3986         guardsize, stackaddr, stacksize, and stack.  Fix typo in previous
3987         patch.  Document pthread_[sg]etconcurrency().  Mark
3988         pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
3990 2000-11-07  Ulrich Drepper  <drepper@redhat.com>
3992         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3993         Don't define it.
3994         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3995         Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
3997 2000-11-06  Ulrich Drepper  <drepper@redhat.com>
3999         * cancel.c (pthread_cancel): Always set p_canceled, even if we are
4000         not doing it right now.
4001         Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
4003 2000-10-30  Ulrich Drepper  <drepper@redhat.com>
4005         * Examples/ex4.c (main): Don't use exit() to avoid warning with
4006         broken compilers.
4008 2000-10-29  Ulrich Drepper  <drepper@redhat.com>
4010         * attr.c (__pthread_attr_setguardsize): Don't round guardsize
4011         here.  Reported by Bruce Mitchener <bruce@cubik.org>.
4013         * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
4014         discussing mutexes. (As per the Unix98 name for the API.)
4015         Changes documentation for pthread_mutexattr_setkind_np() and
4016         pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
4017         same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
4018         Changes references to PTHREAD_MUTEXATTR_FAST_NP to
4019         PTHREAD_MUTEXATTR_ADAPTIVE_NP.
4020         Begins to introduce discussion of the ``timed'' mutex type.  This
4021         discussion is currently incomplete.
4022         Patch by Bruce Mitchener <bruce@cubik.org>.
4024 2000-10-26  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
4025             Yutaka Niibe  <gniibe@chroot.org>
4027         * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
4028         has restrictions, use register.
4030 2000-10-23  Andreas Schwab  <schwab@suse.de>
4032         * Examples/ex14.c (TIMEOUT): Override default timeout.
4034 2000-10-16  Ulrich Drepper  <drepper@redhat.com>
4036         * specific.c: Protect tsd array modification in thread data
4037         structures by getting the thread lock in pthread_key_delete and
4038         __pthread_destroy_specifics.
4039         Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
4041 2000-10-12  Alan Modra <alan@linuxcare.com.au>
4043         * sysdeps/pthread/bits/initspin.h: New file.
4044         * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
4045         (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
4046         (__pthread_alt_init_lock): Likewise.
4047         (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
4049 2000-10-12  David Huggins-Daines  <dhd@linuxcare.com>
4051         * oldsemaphore.c (__old_sem_init): Release lock with
4052         LT_SPINLOCK_INIT, not zero.
4053         * spinlock.c (__pthread_unlock): Likewise.
4054         (__pthread_alt_lock): Likewise.
4055         (__pthread_alt_timedlock): Likewise.
4056         (__pthread_alt_unlock): Likewise.
4057         * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
4058         LT_SPINLOCK_INIT if it is non-zero.  Likewise for init-once flags.
4059         * sysdeps/pthread/pthread.h: Include bits/initspin.h.  Use
4060         LT_SPINLOCK_INIT do initialize spinlocks not 0.
4062 2000-10-12  David Huggins-Daines <dhd@linuxcare.com>
4064         * shlib-versions: Add version definitions for hppa-linux.
4066 2000-10-12  Alan Modra <alan@linuxcare.com.au>
4068         * sysdeps/hppa/pspinlock.c: New file.
4069         * sysdeps/hppa/pt-machine.h: New file.
4070         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
4072 2000-10-05  Jakub Jelinek  <jakub@redhat.com>
4074         * mutex.c (__pthread_mutex_destroy): Correct test of
4075         busy mutex for mutexes using alternate fastlocks.
4076         Patch by dtc@cmucl.cons.org.
4078 2000-09-28  Martin Schwidefsksy    <schwidefsky@de.ibm.com>
4080         * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
4082 2000-09-28  Ulrich Drepper  <drepper@redhat.com>
4084         * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
4085         test for owner first.
4086         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4088         * cancel.c (pthread_cancel): Don't do anything if cancelation is
4089         disabled.
4091 2000-09-26  Ulrich Drepper  <drepper@redhat.com>
4093         * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
4094         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4096         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
4097         _POSIX_MONOTONIC_CLOCK.
4099         * spinlock.h (__pthread_set_own_extricate_if): Add back locking
4100         and explain why.
4102 2000-09-20  Andreas Jaeger  <aj@suse.de>
4104         * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
4105         "testrtsig.h" conditional.
4107 2000-09-11  Ulrich Drepper  <drepper@redhat.com>
4109         * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
4110         pthread_attr_setstack.
4111         * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
4112         pthread_attr_setstack.
4113         * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
4115 2000-09-05  Ulrich Drepper  <drepper@redhat.com>
4117         * Examples/ex14.c: New file.
4118         * Makefile (tests): Add ex14.
4120         * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
4121         mutex.  Patch by dtc@cmucl.cons.org.
4123         * ecmutex.c: New file.
4124         * Makefile (tests): Add ecmutex.
4126 2000-09-04  H.J. Lu  <hjl@gnu.org>
4128         * attr.c (__pthread_attr_setguardsize): Use page_roundup
4129         instead of roundup to round up to the page size.
4131 2000-09-03  Mark Kettenis  <kettenis@gnu.org>
4133         * manager.c (pthread_exited): Correctly report event as TD_REAP
4134         instead of TD_DEATH.  Fix comments.
4136 2000-09-03  Ulrich Drepper  <drepper@redhat.com>
4138         * spinlock.h (testandset): Add cast to avoid warning.
4139         Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
4141 2000-09-02  Andreas Jaeger  <aj@suse.de>
4143         * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
4144         prototype.
4146 2000-09-01  Ulrich Drepper  <drepper@redhat.com>
4148         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
4149         Fix typo in last patch (_mode -> _flags).
4151         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
4152         Provide definition which respects _IO_USER_LOCK flag.
4154 2000-08-30  Ulrich Drepper  <drepper@redhat.com>
4156         * manager.c (pthread_allocate_stack): Clear descriptor only if not
4157         mmaped.
4159 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
4161         * Makefile: Add rules to build and run unload.
4162         * unload.c: New file.
4164         * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
4166         * sysdeps/pthread/pthread.h
4167         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
4168         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
4170 2000-08-24  Andreas Jaeger  <aj@suse.de>
4172         * Examples/ex13.c: Include <string.h> for strerror prototype and
4173         <stdlib.h> for abort prototype.
4174         (pthr_cond_signal_mutex): Rewrite to silence GCC.
4175         (thread_start): Remove unused variable err.
4176         (main): Silence GCC warnings.
4178 2000-08-22  Andreas Jaeger  <aj@suse.de>
4180         * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
4182         * Makefile (tests): Add ex13.
4184 2000-08-20  Ulrich Drepper  <drepper@redhat.com>
4186         * semaphore.h: Add restrict where required by AGd4.
4187         * sysdeps/pthread/pthread.h: Likewise.
4188         * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
4190 2000-08-15  Ulrich Drepper  <drepper@redhat.com>
4192         * Makefile (tests): Add ex12.  Add rule to build it.
4193         * Examples/ex12.c: New file.
4195 2000-08-13  Ulrich Drepper  <drepper@redhat.com>
4197         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
4198         even though the implementation is not quite complete (but it reports
4199         it).  Define _POSIX_MESSAGE_PASSING to -1.
4200         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4202 2000-08-12  Andreas Jaeger  <aj@suse.de>
4204         * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
4205         assembler.
4206         (__compare_and_swap): Likewise.
4207         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
4209 2000-08-10  Ulrich Drepper  <drepper@redhat.com>
4211         * pthread.c (__pthread_initial_thread): Initialize p_errnop and
4212         p_h_errnop correctly and not to NULL.
4214 2000-08-05  Ulrich Drepper  <drepper@redhat.com>
4216         * Banner: Bump version number to 0.9.
4218 2000-08-04  Ulrich Drepper  <drepper@redhat.com>
4220         * Makefile (tests): Add tststack.  Add rule to build the program.
4221         * tststack.c: New file.
4223         * internals.h: Declare __pthread_max_stacksize.
4224         * pthread.c (__pthread_max_stacksize): New variable.
4225         (__pthread_initialize_manager): Determine __pthread_initialize_manager
4226         value.
4227         * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
4228         (pthread_allocate_stack): Allow kernel to choose stack address if
4229         FLOATING_STACKS.  This also handles variable-sized stacks.
4230         Always allocate stack and guardpage together.  Use mprotect to
4231         change guardpage access.
4232         * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
4233         ARCH_STACK_MAX_SIZE.
4235         * attr.c (__pthread_attr_setstacksize): Also test value against
4236         upper limit.
4238         * manager.c (__pthread_nonstandard_stacks): Define only if
4239         THREAD_SELF is not defined.
4240         (pthread_allocate_stack): Always initialize gardaddr to a correct
4241         value.
4242         (pthread_handle_create): Unmap thread with one call.
4243         (pthread_free): Remove test for initial thread before removing stack.
4244         Unmap stack with one call.
4246         * pthread.c (__pthread_initial_thread): Initialize p_userstack to
4247         1 to avoid removing the stack.
4249 2000-07-27  Jes Sorensen  <jes@linuxcare.com>
4251         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
4252         load of spin lock to prime the cache before the atomic compare and
4253         exchange operation (cmpxchg4). This avoids the spinning on the
4254         cmpxchg4 instruction and reduces movement of the cache line back
4255         and forth between the processors (explanation by Asis K. Mallick
4256         from Intel). This basically makes the implementation operate the
4257         same as the Linux kernel implementation.
4259         * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
4260         * sysdeps/ia64/pspinlock.c: New file.
4262 2000-08-03  Ulrich Drepper  <drepper@redhat.com>
4264         * pthread.c: Move definition of __pthread_set_own_extricate_if...
4265         * spinlock.h: ...here.  Remove locking.
4266         * internals.h: Remove __pthread_set_own_extricate_if prototype.
4268         * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
4269         (rwlock_rd_extricate_func): Don't determine self, let
4270         __pthread_lock do it.
4271         (rwlock_wr_extricate_func): Likewise.
4272         (rwlock_have_already): Optimize *pself handling a bit.
4274         * mutex.c: Use __builtin_expect.
4275         * pthread.c: Likewise.
4277 2000-08-02  Andreas Jaeger  <aj@suse.de>
4279         * sysdeps/s390/pspinlock.c: New file.
4280         * sysdeps/s390/pt-machine.h: New file.
4281         Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
4283 2000-07-12  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
4285         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
4286         R3K.
4287         * sysdeps/mips/pt-machine.h (testandset): Likewise.
4289 2000-07-26  Andreas Jaeger  <aj@suse.de>
4291         * pthread.c: Initialize p_sem_avail.
4293 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
4295         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
4296         * semaphore.c: Handle spurious wakeups.
4298         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
4299         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
4301         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
4302         (__pthread_wait_for_restart): Likewise.
4304         * condvar.c (pthread_cond_wait): Also check whether thread is
4305         cancelable before aborting loop.
4306         (pthread_cond_timedwait): Likewise.
4308         * signals.c (pthread_sighandler): Remove special code to restrore
4309         %gs on x86.
4310         (pthread_sighandler_t): Likewise.
4312 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
4314         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
4315         * pthread.c: Include <resolv.h>.
4316         (_res): Undefine.  Add extern declaration.
4318 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
4320         * pthread.c (__pthread_initial_thread): Update initializer.
4321         (__pthread_manager_thread): Likewise.
4322         (pthread_initialize): Move setrlimit call to...
4323         (__pthread_initialize_manager): ...here.
4324         (__pthread_reset_main_thread): Reset also soft limit on stack size.
4326         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
4327         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
4329 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
4331         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
4332         __compare_and_swap to define testandset.
4333         * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
4334         Define IMPLEMENT_TAS_WITH_CAS.
4336 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
4338         * Makefile: Pass -z nodelete to linker for libpthread.so
4339         generation if it understand this option.
4341 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
4343         * manager.c (pthread_handle_create): Remove initialization of
4344         new_thread->p_res._sock.
4346 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
4348         Bugfixes to the variant of the code for machines with no compare
4349         and swap.
4351         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
4352         node was not being properly enqueued, due to failing to update
4353         the lock->__status field.
4355         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
4356         being set inappropriately, causing the suspend function to be called
4357         with a null self pointer and crash.
4359 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
4361         * spinlock.h (__pthread_alt_trylock): Fix code used if no
4362         compare&swap is available.
4364         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
4365         compare_and_swap.
4367         * pthread.c (pthread_initialize): Don't use sysconf to determine
4368         whether the machine has more than one processor.
4370         * spinlock.c (__pthread_alt_timedlock): Add back one of the
4371         removed thread_self calls.
4373 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4375         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
4376         __compare_and_swap to compare_and_swap in code which assumes
4377         compare swap is available.
4379 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4381         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
4382         bug whereby thr field of waitnode structure would not be correctly
4383         set unless a null self pointer is passed to the functions.
4384         Eliminated redundant calls to thread_self().
4386 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
4388         * pthread.c (__pthread_initialize_manager): Lock
4389         __pthread_manager_thread.p_lock before calling clone.
4391 2000-05-05  H.J. Lu  <hjl@gnu.org>
4393         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
4394         have acquire semantics.
4395         (__compare_and_swap_with_release_semantics): New inline
4396         function.
4397         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
4399 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
4401         * manager.c: Fix the problem with signals at startup.
4402         Change the way that thread stacks are allocated on IA64.
4403         Clean up some of the guard page allocation stuff.
4405 1999-12-19  H.J. Lu  <hjl@gnu.org>
4407         * internals.h (page_roundup): New.
4408         * attr.c (__pthread_attr_setguardsize); Use page_roundup
4409         instead of roundup.
4410         * manager.c (pthread_allocate_stack): Make sure guardaddr is
4411         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
4412         is define.
4414 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
4416         * manager.c (pthread_allocate_stack): Unmap the stack top
4417         if failed to map the stack bottom.
4418         Fix the guard page.
4419         (pthread_free): Fix the guard page.
4421         * pthread.c (pthread_initialize): Set rlimit correctly for
4422         NEED_SEPARATE_REGISTER_STACK.
4424 1999-12-16  H.J. Lu  <hjl@gnu.org>
4426         * pthread.c (__pthread_initialize_manager): Pass
4427         __pthread_manager_thread_bos instead of
4428         __pthread_manager_thread_tos to __clone2.
4430 1999-12-16  H.J. Lu  <hjl@gnu.org>
4432         * manager.c (pthread_allocate_stack): Correct the calculation
4433         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
4434         stack bottom.
4436 1999-12-13  H.J. Lu  <hjl@gnu.org>
4438         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
4439         bit after setting ar.ccv.
4441 1999-12-12  H.J. Lu  <hjl@gnu.org>
4443         * manager.c (pthread_allocate_stack): Make the starting
4444         address of the stack bottom page aligned. FIXME: it may
4445         need changes in other places.
4446         (pthread_handle_create): Likewise.
4448 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
4450         * manager.c (pthread_allocate_stack): Handle
4451         NEED_SEPARATE_REGISTER_STACK.
4452         (pthread_handle_create): Likewise.
4453         * pthread.c (__pthread_initialize_manager): Likewise.
4455         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
4457 1999-12-02  H.J. Lu  <hjl@gnu.org>
4459         * sysdeps/ia64/pt-machine.h: New.
4461 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
4463         * wrapsyscall.c: Mark non-__ protected names as weak.
4464         PR libc/1466.
4466 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
4468         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
4470 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
4472         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
4473         Add tests also to new alternative spinlock implementation.
4474         * spinlock.h: Likewise.
4475         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4477 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
4479         * Version: Export __sigaction.
4480         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
4481         of __sigaction.
4482         * pthread.c: Use __libc_sigaction instead of __sigaction.
4484         * condvar.c: Implement pthread_condattr_getpshared and
4485         pthread_condattr_setpshared.
4486         * mutex.c: Implement pthread_mutexattr_getpshared and
4487          pthread_mutexattr_setpshared.
4488         * Versions: Export new functions.
4489         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4491         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
4492         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
4493         is not selected.
4495 2000-07-04  Greg McGary  <greg@mcgary.org>
4497         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
4498         pragmas.  Include bp-sym.h only if _LIBC.
4500 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
4502         * spinlock.c (__pthread_unlock): Properly place write barrier.
4503         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4505 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
4507         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
4508         faster on SMP systems.  No more emulation of compare&swap for adaptive
4509         spinlocks.
4510         * spinlock.h: Likewise.
4511         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
4512         Replace fast with adaptive mutex.
4513         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
4514         * condvar.c: Likewise.
4515         * pthread.c: Define and initialize __pthread_smp_kernel variable.
4516         * internals.h: Declare __pthread_smp_kernel.
4517         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
4518         _pthread_fastlock structure.
4519         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4521         * pthread.c: Remove initialization to zero from global variables.
4523 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
4525         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
4527 2000-06-28  Greg McGary  <greg@mcgary.org>
4529         * weaks.c: Wrap BP_SYM () around weak extern declarations of
4530         pthread functions that have pointers in their return+arg signatures.
4532 2000-06-27  Greg McGary  <greg@mcgary.org>
4534         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
4535         extern declarations of pthread functions that have pointers in
4536         their return+arg signatures.
4538 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
4540         * Makefile (tests): Add ex11.  Add rules to build it.
4541         * Examples/ex11.c: New file.
4542         * rwlock.c: Fix complete braindamaged previous try to implement
4543         timedout functions.
4545         * spinlock.c: Pretty print.
4547 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
4549         * Makefile (tests): Add ex10.  Add rules to build it.
4550         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
4551         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
4552         * condvar.c (pthread_cond_wait): Allow mutex of kind
4553         PTHREAD_MUTEX_TIMED_NP.
4554         (pthread_cond_timedwait_relative): Likewise.
4555         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
4556         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
4557         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4558         (__pthread_mutex_lock): Use __pthread_alt_lock for
4559         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4560         (__pthread_mutex_timedlock): New function.
4561         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
4562         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4563         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
4564         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
4565         * spinlock.c: Implement alternate fastlocks.
4566         * spinlock.h: Add prototypes.
4567         * Examples/ex10.c: New file.
4568         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4569         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4571         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
4572         (__pthread_rwlock_timedrdlock): New function.
4573         (__pthread_rwlock_timedwrlock): New function.
4574         Use laternate fastlock function everywhere.
4576 2000-06-21  Andreas Jaeger  <aj@suse.de>
4578         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
4579         prototype.
4581         * join.c: Include <stdlib.h> for exit prototype.
4583 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
4585         * sysdeps/i386/useldt.h: Include <stdlib.h>.
4587         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
4588         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4590         * Makefile (libpthread-routines): Add barrier.
4591         (tests): Add ex9.  Add rule to build ex9.
4592         * Versions: Export barrier functions.
4593         * barrier.c: New file.
4594         * Examples/ex9.c: New file.
4595         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
4596         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
4597         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4599 2000-06-19  H.J. Lu  <hjl@gnu.org>
4601         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
4602         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
4603         (compare_and_swap_with_release_semantics): New. Default to
4604         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
4605         is not defined.
4607         * spinlock.c (__pthread_unlock): Call
4608         compare_and_swap_with_release_semantics () instead of
4609         compare_and_swap ().
4611 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
4613         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
4614         to errno directly.
4615         * sysdeps/pthread/timer_delete.c: Likewise.
4616         * sysdeps/pthread/timer_getoverr.c: Likewise.
4617         * sysdeps/pthread/timer_gettime.c: Likewise.
4618         * sysdeps/pthread/timer_settime.c: Likewise.
4620 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4622         Timer nodes are now reference counted, and can be marked
4623         as deleted. This allows for the safe release of the global mutex
4624         in the middle without losing the timer being operated on.
4626         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
4627         member is now an enum with three values, so that an intermediate
4628         state can be represented (deleted but not free for reuse yet).
4629         New refcount member added.
4630         * sysdeps/pthread/timer_routines.c: Likewise.
4632         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
4633         timer_valid): New inline functions added.
4635         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
4636         restructured, recursive deadlock bug fixed.
4638         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
4639         timer_addref to ensure that timer won't be deleted while mutex is not
4640         held. Also uses timer_invalid to perform validation of timer handle.
4641         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
4642         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
4644 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
4646         * shlib-versions: Add entry for SH.
4647         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
4649 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4651         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
4652         tightened up some critical regions and micro-optimized some list
4653         manipulation code.
4655         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4656         Returns int value now to indicate whether timer was queued at head.
4657         * sysdeps/pthread/posix-timer.h: Likewise.
4658         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
4659         new return value from __timer_thread_queue_timer to avoid waking
4660         up timer thread unnecessarily.
4662         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
4663         inuse flag, because this requires mutex to be held.  Callers updated
4664         to do the check when they have the mutex.
4665         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
4667         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
4668         regions: avoids making system calls while holding timer mutex, and
4669         a few computations were moved outside of the mutex as well.
4670         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
4672         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
4673         to list_unlink_ip, meaning idempotent.  Pointer manipulation
4674         changed to get better better code out of gcc.
4675         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
4676         version of list_unlink added here.
4677         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
4678         function in all places: idempotent one for timers, non-idempotent
4679         one for thread nodes.
4680         * sysdeps/pthread/timer_settime: Likewise.
4681         * sysdeps/pthread/timer_routines.c: Likewise.
4683 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
4685         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
4686         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4688         * sysdeps/pthread/Makefile: Remove tests definition.
4690 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
4691             Yutaka Niibe  <gniibe@chroot.org>
4693         * sysdeps/sh/pspinlock.c: New file.
4694         * sysdeps/sh/pt-machine.h: New file.
4696 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
4698         * Makefile (tests): Add joinrace.
4700         * Examples/ex6.c: Test return value of pthread_join.
4702 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
4704         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
4705         (__pthread_spin_trylock): Implement.
4706         (__pthread_spin_unlock): Implement.
4707         (__pthread_spin_init): Implement.
4708         (__pthread_spin_destroy): Implement.
4710 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4712         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
4713         really append the entry.
4715 2000-06-10  Andreas Jaeger  <aj@suse.de>
4717         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
4719 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
4721         * sysdeps/pthread/timer_create.c: Thread matching now done on
4722         clock type as well as thread attributes.
4723         There are individual global signal-delivering threads for
4724         different clock types.
4725         * sysdeps/pthread/posix-timer.h: Likewise.
4726         * sysdeps/pthread/timer_routines.c: Likewise.
4728         * sysdeps/pthread/timer_routines.c: Thread allocation and
4729         deallocation function now remembers to put thread on active
4730         list and remove from active list.
4731         Thus now the feature of binding multiple timers
4732         to a single thread actually works.
4734 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4736         * pthread.c (__pthread_create_2_1): Optimize a bit.
4738         * internals.h (invalid_handle): Also test for p_terminated != 0.
4739         (nonexisting_handle): New function.  Same as old invalid_handle.
4740         * join.c (pthread_join): Use nonexisting_handle instead of
4741         invalid_handle to test for acceptable thread handle.
4742         * manager.c (pthread_handle_free): Likewise.
4743         * joinrace.c: New file.
4744         Reported by Permaine Cheung <pcheung@cygnus.com>.
4746 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4748         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4749         Correct handling of matching variable.
4751         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
4752         avoid warnings.
4754         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4755         Be prepared for empty timer list.
4757         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
4758         CPUTIME clock ID.  Add support for thread clocks.
4760         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
4761         subtraction were switched.
4763         * sysdeps/pthread/timer_routines.c (init_module): Use
4764         THREAD_MAXNODES threads.
4766         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
4767         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
4768         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
4769         with sigqueueinfo is this system call is available.
4771         * sysdeps/pthread/timer_create.c (timer_create): Allow
4772         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
4774         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
4775         functionality.
4776         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
4778 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4780         * sysdeps/pthread/posix-timer.h: New file.
4781         * sysdeps/pthread/timer_create.c: New file.
4782         * sysdeps/pthread/timer_delete.c: New file.
4783         * sysdeps/pthread/timer_getoverr.c: New file.
4784         * sysdeps/pthread/timer_gettime.c: New file.
4785         * sysdeps/pthread/timer_routines.c: New file.
4786         * sysdeps/pthread/timer_settime.c: New file.
4787         * sysdeps/pthread/tst-timer.c: New file.
4789 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4791         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
4792         LINK_MAX definitions if necessary.
4794 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4796         Added missing fork time handling of global libio lock.
4798         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
4799         not just the individual stream locks. Rewritten to use new
4800         iterator interface provided by libio rather than accessing
4801         global variable.
4803         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
4804         which lock and unlock the stream list using the new interface
4805         provied by libio.
4806         * internals.h: Likewise.
4808         * ptfork.c (__fork): Now calls __flockfilelist before fork,
4809         and __funlockfilelist in the parent after the fork.
4810         Child still calls __fresetlockfiles as before.
4812         * linuxthreads.texi: Now explains what happens to streams at
4813         fork time. Also whole new section on forking and thread added.
4814         Definition of pthread_atfork moved out of Miscellaneous Functions
4815         to this new section.
4817 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
4819         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
4820         Add missing register.
4821         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
4823 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
4825         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
4826         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
4827         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
4829 2000-05-31  Andreas Jaeger  <aj@suse.de>
4831         * sysdeps/mips/pspinlock.c: Implement spinlocks.
4833 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
4835         * spinlock.c (__pthread_lock): Remove ASSERT.
4837         * Makefile (tests): Add ex8.
4838         * Examples/ex8.c: New file.
4840 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
4842         Bugfix: The pthread_atfork mechanism now takes care of its
4843         own internal mutex at fork time.
4845         * ptfork.c (__fork): Revised so that the mutex is held across
4846         the fork operation and while the handlers are called, and so that
4847         the child resets the mutex.
4849         * linuxthreads.texi: Updated pthread_atfork documentation to make
4850         it clear that fork and pthread_atfork can't be reentered from
4851         atfork handlers, that pthread_atfork and fork are mutually atomic,
4852         and that the handlers are inherited by the child process.
4854 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
4856         * Makefile (libpthread-routines): Add pspinlock.
4857         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
4858         Use struct _pthread_fastlock instead of pthread_spinlock_t.
4859         * condvar.c: Likewise.
4860         * internals.h: Likewise.
4861         * join.c: Likewise.
4862         * manager.c: Likewise.
4863         * mutex.c: Likewise.
4864         * pthread.c: Likewise.
4865         * rwlock.c: Likewise.
4866         * semaphore.c: Likewise.
4867         * signals.c: Likewise.
4868         * spinlock.h: Likewise.
4869         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
4870         * sysdeps/alpha/pspinlock.c: New file.
4871         * sysdeps/arm/pspinlock.c: New file.
4872         * sysdeps/i386/pspinlock.c: New file.
4873         * sysdeps/m68k/pspinlock.c: New file.
4874         * sysdeps/mips/pspinlock.c: New file.
4875         * sysdeps/powerpc/pspinlock.c: New file.
4876         * sysdeps/sparc/sparc32/pspinlock.c: New file.
4877         * sysdeps/sparc/sparc64/pspinlock.c: New file.
4878         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
4879         back to _pthread_fastlock.  Define new pthread_spinlock_t.
4881 2000-05-24  Andreas Jaeger  <aj@suse.de>
4883         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
4885 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
4887         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
4889 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
4891         * internals.h (__RES_PTHREAD_INTERNAL): Define.
4893 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
4895         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
4896         object state is represented with additional bits which distinguish
4897         whether that state was set up in the current process, or
4898         in an ancestor process. If that state was set in an ancestor,
4899         it means that a fork happened while thread was executing the init
4900         function. In that case, the state is reset to NEVER.
4901         * mutex.c (__pthread_once_fork_prepare): New function.
4902         (__pthread_once_fork_child): Likewise
4903         (__pthread_once_fork_parent): Likewise
4904         (__pthread_reset_pthread_once): Removed.
4905         * ptfork.c (__fork): Call new handlers in mutex.c.
4906         * internals.h: Declarations of new mutex.c functions added.
4907         Declaration of removed function deleted.
4908         * linuxthreads.texi: Updated documentation about pthread_once
4909         to clarify what happens under cancellation and forking.
4911 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
4913         * internals.h: New thread manager request type, REQ_KICK.
4914         * join.c (pthread_exit): main thread now calls exit() instead
4915         of _exit() in order to proper process cleanup.
4916         * manager.c (__pthread_manager): Do not terminate manager
4917         after unblocking main thread; wait for main thread's
4918         REQ_PROCESS_EXIT request instead.
4919         Also, added REQ_KICK case to handle new request; this just does
4920         nothing.
4921         * manager.c (pthread_exited): Do not terminate manager after
4922         unblocking main thread.
4923         * manager.c (__pthread_manager_sighandler): If the main thread
4924         is waiting for all other threads to die, send a REQ_KICK into
4925         the thread manager request pipe to get it to clean out the threads
4926         and unblock the main thread as soon as possible. This fixes
4927         the 2000 millisecond hang on shutdown bug.
4928         * Examples/ex7.c: New file, tests shutdown behavior when all threads
4929         including the main one call pthread_exit(), or implicitly do so.
4930         * Makefile (tests): Add ex7.
4932 2000-05-05  Andreas Jaeger  <aj@suse.de>
4934         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4935         (pthread_getcpuclockid): Correct test for ourselves.
4937 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
4939         * internals.h (struct _pthread_descr_struct): Reorganization.
4940         Allocate room for 16 pointers at head of the structure for future
4941         thread-local data handling.  Move p_self member in this area.
4942         * manager.c (pthread_handle_create): Adjust use of p_self.
4943         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
4944         * pthread.c (__pthread_initial_thread): Adjust initialization.
4945         (__pthread_manager_thread): Likewise.
4947 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
4949         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
4950         for eventmask larger than 1 word.
4952 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
4954         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
4955         * pthread.c (__pthread_initialize_minimal): New function.  Perform
4956         minimal initialization.
4957         (pthread_initialize): Remove this code here.
4958         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
4959         are working around the problem in glibc.
4961 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
4963         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
4964         now.  First gcc must be fixed (more concrete: libgcc).
4966 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
4968         * pthread.c: Remove special treatement for interrupt handlers on x86.
4969         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
4970         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
4971         necessary.
4972         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
4974 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
4976         * join.c (pthread_exit): Set p_terminated after reporting the
4977         termination event instead of before.
4979 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
4981         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
4982         if __USE_UNIX98.
4984 2000-04-18  Andreas Jaeger  <aj@suse.de>
4986         * Versions: Use ld instead of ld.so.
4988 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
4990         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
4991         Remove the typedef keyword.
4993 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
4995         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
4996         not stbar.
4997         (READ_MEMORY_BARRIER): Define.
4998         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
4999         MEMORY_BARRIER.
5000         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
5001         headers.
5003 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
5005         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
5006         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
5007         use thread_handle().
5009 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
5011         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
5012         if fast mutex is used.  Don't initialize `already_canceled' twice.
5013         Correctly test for return value of timedsuspend.
5015         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
5016         therefore don't need the _rt versions of the signal handlers.
5018 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
5020         * pthread.c (pthread_yield): New function.
5021         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
5022         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
5023         * internals.h: Declare __pthread_yield.
5025         * pthread.c (pthread_initialize): Avoid a bit more code if
5026         realtime signals are known to exist.
5028         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
5029         to dynamically detect RT signals and avoid generating compatibility
5030         functions with old kernel.
5031         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
5032         __pthread_restart_new directly.
5033         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
5034         __pthread_wait_for_restart_signal directly.
5035         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
5036         __pthread_timedsuspend_new directly.
5038 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
5040         * condvar.c: Remove all the special code to handle cond_timedwait.
5041         Use timedsuspend instead.
5042         * internals.h: Declare __pthread_timedsuspend_old,
5043         __pthread_timedsuspend_new, and __pthread_timedsuspend.
5044         Remove declaration of __pthread_init_condvar.
5045         * pthread.c: Define __pthread_timedsuspend variable.
5046         (__pthread_timedsuspend_old): New function.  Timed suspension
5047         implementation for old Linux kernels.
5048         (__pthread_timedsuspend_new): New function.  Timed suspension
5049         implementation for new Linux kernels.
5050         * restart.h (timedsuspend): New function.  Call appropriate
5051         suspension function through __pthread_timedsuspend.
5052         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
5053         the code.
5054         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5056         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
5057         undefined.
5058         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
5059         where possible.
5060         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
5061         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5063         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
5064         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5066 2000-04-14  Andreas Jaeger  <aj@suse.de>
5068         * weaks.c: Fix typo.
5070         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
5071         2.2 for linuxthreads.
5073 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
5075         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
5076         (pthread_getcpuclockid): Fix typo.
5078 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
5080         * Makefile (libpthread-routines): Add getcpuclockid.
5081         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
5082         * sysdeps/pthread/getcpuclockid.c: New file.
5083         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
5084         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
5086         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
5087         Defined.
5088         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5090         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
5091         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
5092         and pthread_spin_unlock.
5093         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
5094         into pthread_spinlock_t.  Change all uses.
5095         * spinlock.c: Implement pthread_spin_lock.
5096         Rename __pthread_unlock to __pthread_spin_unlock and define weak
5097         alias for real name.
5098         Define pthread_spin_trylock, pthread_spin_init, and
5099         pthread_spin_destroy.
5100         Change all uses of _pthread_fastlock to pthread_spinlock_t.
5101         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
5102         Change all uses of _pthread_fastlock to pthread_spinlock_t.
5103         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
5104         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
5105         and pthread_spin_unlock.
5106         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
5107         Change all uses of _pthread_fastlock to pthread_spinlock_t.
5108         * condvar.c: Likewise.
5109         * internals.h: Likewise.
5110         * join.c: Likewise.
5111         * manager.c: Likewise.
5112         * mutex.c: Likewise.
5113         * pthread.c: Likewise.
5114         * rwlock.c: Likewise.
5115         * semaphore.c: Likewise.
5116         * signals.c: Likewise.
5118         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
5119         macros.
5120         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
5122 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
5124         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
5125         _POSIX_SHARED_MEMORY_OBJECTS.
5127 2000-04-11  Andreas Jaeger  <aj@suse.de>
5129         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
5130         (__compare_and_swap): Mark as modifying memory.
5132 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
5134         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
5135         __volatile__.
5136         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
5137         Don't have the 'asm' __volatile__.
5139 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
5141         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
5142         * spinlock.c (__pthread_lock): Add memory barriers.
5143         (__pthread_unlock): Likewise.
5144         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
5145         instruction.
5146         (RELEASE): Not needed anymore.
5147         (__compare_and_swap): Mark asm as modifying memory.
5148         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
5149         of MEMORY_BARRIER.
5150         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
5151         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
5152         (MEMORY_BARRIER): Define using stbar.
5153         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
5154         stbar.
5155         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
5156         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
5157         Mike Burrows <m3b@pa.dec.com>.
5159 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
5161         * signals.c (sigaction): Fix return value for the case SIG is one
5162         of the signals the implementation uses.
5163         Patch by Xavier.Leroy@inria.fr.
5165 2000-04-01  Andreas Jaeger  <aj@suse.de>
5167         * attr.c: Use shlib-compat macros.
5168         * oldsemaphore.c: Likewise.
5169         * pthread.c: Likewise.
5170         * weaks.c: Likewise.
5172 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
5174         * semaphore.c (sem_timedwait): New function.
5175         Patch by Carl Mailloux <carlm@oricom.ca>.
5176         * semaphore.h: Declare sem_timedwait.
5177         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
5179 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
5181         * sysdeps/pthread/Makefile: File removed.
5183 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
5185         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
5186         * internals.h (__pthread_reset_pthread_once): Add prototype.
5187         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
5189         * manager.c (pthread_handle_create): Store ID of new thread before
5190         clone call.
5192 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
5194         * attr.c: Use new macros from shlib-compat.h to define versions.
5195         * oldsemaphore.c: Likewise.
5196         * semaphore.c: Likewise.
5197         * weaks.c: Likewise.
5199         * pthread.c: Update for new SHLIB_COMPAT definition.
5201         * manager.c (__pthread_manager): Unmask debug signal.
5203         * pthread.c (pthread_initialize): Test for address of __dso_handle
5204         being NULL, not value.  Use __on_exit, not on_exit.
5205         Patch by Andreas Jaeger <aj@suse.de>.
5207         * pthread.c: Use new macros from shlib-compat.h to define versions.
5209 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
5211         * pthread.c (pthread_initialize): Instead of on_exit use
5212         __cxa_atexit if __dso_label is available to allow unloading the
5213         libpthread shared library.
5215 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
5217         * condvar.c: Make tests for ownership of mutex less strict.
5219 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
5221         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
5222         current thread and return error if not.
5223         (pthread_cond_timedwait_relative_old): Likewise.
5224         (pthread_cond_timedwait_relative_new): Likewise.
5226         * mutex.c (__pthread_once): Handle cancelled init function correctly.
5227         (pthread_once_cancelhandler): New function.
5228         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5230 2000-03-14  Andreas Jaeger  <aj@suse.de>
5232         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
5233         REG_GS.
5234         (pthread_handle_sigrestart_rt): Likewise.
5235         * signals.c (pthread_sighandler_rt): Likewise.
5237 2000-03-02  Andreas Jaeger  <aj@suse.de>
5239         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
5240         Reported by Sean Chen <sean.chen@turbolinux.com>.
5242 2000-02-28  Andreas Jaeger  <aj@suse.de>
5244         * rwlock.c: Fix typo.
5246 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
5248         * rwlock.c: Define __* variants of the functions and make old names
5249         aliases.
5250         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
5251         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
5253 2000-02-25  Andreas Jaeger  <aj@suse.de>
5255         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5256         pwrite64, lseek64, open64, and __open64 with version 2.2.
5258 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
5260         * semaphore.h (SEM_FAILED): Use 0 not NULL.
5262 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
5264         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
5265         nanosleep does not work either.  Get absolute time inside the
5266         loop.
5267         (pthread_cond_timedwait_relative_new): Likewise.
5268         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5270 2000-02-13  Andreas Jaeger  <aj@suse.de>
5272         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
5273         (pthread_cond_timedwait_relative_old): Likewise.
5275 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
5277         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
5278         but keep the code around.  A bug in the kernel prevent us from
5279         using the code.
5280         (pthread_cond_timedwait_relative_new): Likewise.
5281         (PR libc/1597 and libc/1598).
5283 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
5285         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
5286         loop around nanosleep calls instead of around most of the function
5287         (pthread_cond_timedwait_relative_new): Likewise.
5288         body.  Got rid of backwards goto and one local.
5290 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
5292         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
5293         before every nanosleep call to account for time spent in the rest
5294         of the function.
5295         (pthread_cond_timedwait_relative_new): Likewise.
5296         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
5298 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
5300         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
5301         from nanosleep call so that in case we restart we only wait for the
5302         remaining time.
5303         (pthread_cond_timedwait_relative_new): Likewise.
5304         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
5306 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
5308         * manager.c (pthread_allocate_stack): Compute guard page address
5309         correctly.  Patch by HJ Lu.
5311         * sysdeps/pthread/pthread.h: Define
5312         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
5314 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
5316         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
5317         preference handling.
5318         (pthread_rwlockattr_setkind_np): Allow
5319         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
5320         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5322 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
5324         * internals.h (pthread_readlock_info): New structure.
5325         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
5326         p_untracked_readlock_count.
5327         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5328         Add initializers for new fields.
5329         * manager.c (pthread_free): Free read/write lock lists.
5330         * queue.h (queue_is_empty): New function.
5331         * rwlock.c: Implement requirements about when readers should get
5332         locks assigned.
5333         * sysdeps/pthread/pthread.h
5334         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
5335         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
5336         Define this name as well.
5337         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5339 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
5341         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5342         Adjust initializers for struct _pthread_descr_struct change.
5343         * internals.h (struct _pthread_descr_struct): Move new elements to
5344         the end.
5346 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
5348         Redesigned how cancellation unblocks a thread from internal
5349         cancellation points (sem_wait, pthread_join,
5350         pthread_cond_{wait,timedwait}).
5351         Cancellation won't eat a signal in any of these functions
5352         (*required* by POSIX and Single Unix Spec!).
5353         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
5354         simultaneous condition variable signal (not required by POSIX
5355         or Single Unix Spec, but nice).
5356         * spinlock.c: __pthread_lock queues back any received restarts
5357         that don't belong to it instead of assuming ownership of lock
5358         upon any restart; fastlock can no longer be acquired by two threads
5359         simultaneously.
5360         * restart.h: Restarts queue even on kernels that don't have
5361         queued real time signals (2.0, early 2.1), thanks to atomic counter,
5362         avoiding a rare race condition in pthread_cond_timedwait.
5364 1999-12-31  Andreas Jaeger  <aj@suse.de>
5366         * internals.h: Remove duplicate prototype declarations.
5368         * weaks.c: Remove __THROW from prototypes since the file is not
5369         compiled by a C++ compiler.
5370         * internals.h: Likewise.
5372 1999-12-30  Andreas Jaeger  <aj@suse.de>
5374         * sysdeps/pthread/pthread.h: Move internal functions to...
5375         * sysdeps/pthread/bits/libc-lock.h: ...here.
5377 1999-12-29  Andreas Jaeger  <aj@suse.de>
5379         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
5381 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
5383         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
5384         beginning.
5386         * manager.c (__pthread_start): Add one more cast to prevent
5387         warning on 64bit machines.
5389 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
5391         * manager.c (pthread_handle_create): Set p_pid of new thread
5392         before calling the callback function to report a new thread.
5394 1999-12-20  Andreas Jaeger  <aj@suse.de>
5396         * pthread.c (pthread_initialize): Move getrlimit call after
5397         setting of errno.
5399 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
5401         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5402         pwrite64, lseek64, open64, and __open64.
5403         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
5404         pwrite64, lseek64, open64, and __open64.
5406         * manager.c (pthread_allocate_stack): Correct computation of
5407         new_thread_bottom.  Correct handling of stack size and when the
5408         rlimit method to guard for stack growth is used.
5409         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
5410         minus one pagesize (not two).
5412 1999-12-03  Andreas Jaeger  <aj@suse.de>
5414         * Versions: Add __res_state with version GLIBC_2.2.
5416         * errno.c (__res_state): New function to return thread specific
5417         resolver state.
5419         * pthread.c (pthread_initialize): Initialize p_resp.
5420         (__pthread_reset_main_thread): Also set p_resp.
5422         * manager.c (pthread_handle_create): Initialize p_resp.
5424         * internals.h: Add thread specific resolver state.
5425         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
5427 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
5429         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
5430         beginning.
5431         * sysdeps/i386/i686/pt-machine.h: Likewise.
5432         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
5434 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
5436         * manager.c (pthread_start_thread_event): Initialize p_pid already
5437         here.
5439 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
5441         * internals.h: Add prototype for __pthread_manager_event.
5442         * manager.c (__pthread_manager_event): New function.
5443         (pthread_start_thread_event): Correct computation of self.
5444         Use INIT_THREAD_SELF.
5445         * pthread.c (__pthread_manager_thread): Initialize p_lock.
5446         (__pthread_initialize_manager): Respect event flags also for creation
5447         of the manager thread.
5449 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
5451         * pthread.c (__pthread_initialize_manager): Initialize
5452         __pthread_manager_thread.p_tid.
5454 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
5456         * internals.h: Declare __pthread_last_event.
5457         * manager.c: Define __pthread_last_event.
5458         (pthread_handle_create): Set __pthread_last_event.
5459         (pthread_exited): Likewise.
5460         * join.c (pthread_exit): Likewise.
5462         * Makefile (libpthread-routines): Add events.
5463         * events.c: New file.
5464         * internals.h: Protect against multiple inclusion.
5465         Include thread_dbP.h header.
5466         (struct _pthread_descr_struct): Add new fields p_report_events and
5467         p_eventbuf.
5468         Declare event reporting functions.
5469         * join.c (pthread_exit): Signal event if this is wanted.
5470         * manager.c (__pthread_threads_events): New variable.
5471         (pthread_handle_create): Take new parameters with event information.
5472         Signal TD_CREATE event if wanted.
5473         (__pthread_manager): Adjust pthread_handle_create call.
5474         (pthread_start_thread_event): New function.  Block until manager is
5475         finished and then call pthread_start_thread.
5476         (pthread_exited): Signal TD_REAP event if wanted.
5478 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
5480         * restart.h (suspend_with_cancellation): Rewrite as a macro.
5482         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
5484 1999-10-25  Andreas Jaeger  <aj@suse.de>
5486         * internals.h: Remove K&R compatibility.
5487         * no-tsd.c: Likewise.
5488         * semaphore.h: Likewise.
5489         * signals.c: Likewise.
5490         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
5491         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
5492         * weaks.c: Likewise.
5494 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
5496         * pthread.c: For i386, wrap pthread_handle_sigrestart and
5497         pthread_handle_sigcancel with functions that restore %gs from the
5498         signal context.  For each signal handling function, two wrappers
5499         are required, one for a non-RT signal and one for a RT signal.
5500         * signal.c: For i386, add code to restore %gs from the signal
5501         context in pthread_sighandler and pthread_sighandler_rt.
5503 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
5505         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
5507 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
5509         * pthread.c (__pthread_initial_thread): Pass argument to
5510         PTHREAD_START_ARGS_INITIALIZER.
5511         (__pthread_manager_thread): Likewise.
5513         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
5514         initialize function.
5516         * manager.c (pthread_handle_create): Remove p_startfct initialization.
5518         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
5520 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
5522         * internals.h: Correct return types for __libc_read and __libc_write.
5524 1999-10-09  Andreas Jaeger  <aj@suse.de>
5526         * internals.h: Add __new_sem_post to get prototype in
5527         manager.c; include semaphore.h for needed types.
5529 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
5531         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
5532         directly instead of calling sem_post which should not be necessary
5533         but is faster and might help in some case to work around problems.
5534         Patch by khendricks@ivey.uwo.ca [libc/1382].
5536 1999-10-08  Andreas Schwab  <schwab@suse.de>
5538         * sysdeps/pthread/Subdirs: New file.
5539         * Implies: Removed.
5541 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
5543         * Implies: New file.
5544         * internals.h (struct _pthread_descr_struct): Add p_startfct.
5545         * manager.c (pthread_handle_create): Initialize p_startfct.
5546         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
5548 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
5550         * manager.c (__linuxthreads_pthread_threads_max): New variable.
5551         * specific.c (__linuxthreads_pthread_keys_max): New variable.
5552         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
5554         * condvar.c (pthread_cond_timedwait_relative): Never return with
5555         EINTR.  Patch by Andreas Schwab.
5557 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
5559         * signals.c (sigaction): Correct last patch.  Don't select
5560         pthread_sighandler_rt based on the signal number but instead of
5561         the SA_SIGINFO flag.
5563 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
5565         * specific.c: Move definitions of struct pthread_key_struct and
5566         destr_function to ...
5567         * internals.h: ...here.
5569 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
5571         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
5572         this instead of pthread_handle_sigrestart if the signal is an RT
5573         signal.
5575         * signals.c: Handle passing through of sighandler arguments also
5576         for real-time signals.
5578 1999-09-03  Andreas Schwab  <schwab@suse.de>
5580         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
5581         fork as weak alias.
5582         (__vfork): New function, alias vfork.
5583         * Versions: Export __fork, vfork, and __vfork in libpthread.
5585 1999-08-23  Andreas Schwab  <schwab@suse.de>
5587         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
5588         call to signal handler.
5590 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
5592         * pthread.c (__pthread_reset_main_thread): Undo last change.
5593         (__pthread_kill_other_threads_np): Reset signal handlers for the
5594         signals we used in the thread implementation here.
5596 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
5598         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
5599         for the signals we used in the thread implementation [PR libc/1234].
5601         * Versions: Export __pthread_kill_other_threads_np from libpthread
5602         for GLIBC_2.1.2.
5604         * signals.c: Pass sigcontext through wrapper to the user function.
5606 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
5608         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
5609         __libc_internal_tsd_set.
5611 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5613         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
5614         needed anymore.
5616 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5618         * internals.h: Align _pthread_descr_struct to 32 bytes.
5619         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
5620         libc/1206.
5622 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5624         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
5625         swap function.
5627 1999-07-09  Cristian Gafton  <gafton@redhat.com>
5629         * Makefile (libpthread-routines): Add oldsemaphore routine.
5630         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
5631         sem_trywait, and sem_wait to GLIBC_2.1.
5632         * oldsemaphore.c: New file.
5633         * semaphore.c: Add default_symbol_versions for the changed functions.
5634         (__new_sem_init): Rename from sem_init.
5635         (__new_sem_post): Rename from sem_post.
5636         (__new_sem_wait): Rename from sem_wait.
5637         (__new_sem_trywait): Rename from sem_trywait.
5638         (__new_sem_getvalue): Rename from sem_getvalue.
5639         (__new_sem_destroy): Rename from sem_destroy.
5641 1999-06-23  Robey Pointer  <robey@netscape.com>
5643         * internals.h: Added p_nextlock entry to separate queueing for a
5644         lock from queueing for a CV (sometimes a thread queues on a lock
5645         to serialize removing itself from a CV queue).
5646         * pthread.c: Added p_nextlock to initializers.
5647         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
5649 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5651         * manager.c (pthread_handle_create): Free mmap region after stack
5652         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
5654 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5656         * man/pthread_cond_init.man: Correct example.
5657         Reported by Tomas Berndtsson <tomas@nocrew.org>.
5659         * linuxthreads.texi (Condition Variables): Likewise.
5661 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
5663         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
5664         casx not cas, also successful casx returns the old value in rd
5665         and not the new value.
5667 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
5669         * manager.c: If pthread_create() is given a NULL attribute
5670         and the thread manager runs with a realtime policy, set the
5671         scheduling policy of the newly created thread back to SCHED_OTHER.
5672         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
5673         initialize the schedpolicy field of new_thread->p_start_args
5674         to that of the calling thread.
5676 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
5678         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
5679         instruction does not allow memory element to use offset.
5681 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
5683         * manager.c (pthread_allocate_stack): Optimize initialization of new
5684         thread descriptor.
5686         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
5687         Don't use initializer since it is all zeroes.
5688         (__libc_once_define): Likewise.
5690 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5692         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
5693         doesn't exist anymore.
5694         * sysdeps/i386/Implies: Likewise.
5695         * sysdeps/m68k/Implies: Likewise.
5696         * sysdeps/mips/Implies: Likewise.
5697         * sysdeps/powerpc/Implies: Likewise.
5698         * sysdeps/sparc/sparc32/Implies: Likewise.
5699         * sysdeps/sparc/sparc64/Implies: Likewise.
5701 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
5703         * sysdeps/alpha/bits/semaphore.h: Removed.
5704         * sysdeps/powerpc/bits/semaphore.h: Removed.
5705         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
5706         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
5707         * Makefile (headers): Remove bits/semaphore.h.
5709         * semaphore.h: Define _pthread_descr if necessary.
5710         Don't include limits.h.  Define SEM_VALUE_MAX directly.
5711         Define SEM_FAILED.
5712         (sem_t): Protect element names with leading __.
5713         Add declarations for sem_close, sem_open, and sem_unlink.
5714         * semaphore.c: Adjust all functions for new element names.
5715         Define sem_close, sem_open, and sem_unlink.
5716         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
5717         GLIBC_2.1.1.
5718         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
5719         necessary.
5721 1999-03-16  H.J. Lu  <hjl@gnu.org>
5723         * specific.c (pthread_key_delete): Check th->p_terminated to see
5724         if the thread is running.
5726         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
5727         Added to GLIBC_2.0 for libc.so.
5729 1999-02-12  H.J. Lu  <hjl@gnu.org>
5731         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
5732         __libc_allocate_rtsig): Added to GLIBC_2.1.
5734         * internals.h (DEFAULT_SIG_RESTART): Removed.
5735         (DEFAULT_SIG_CANCEL): Removed.
5737         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
5738         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
5739         (__pthread_sig_restart, __pthread_sig_cancel,
5740         __pthread_sig_debug): Initialized.
5741         (pthread_initialize): Call init_rtsigs () to initialize
5742         real-time signals.
5744 1999-02-03  H.J. Lu  <hjl@gnu.org>
5746         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
5747         Don't restart the thread which sent REQ_DEBUG.
5748         (pthread_start_thread): Check if __pthread_sig_debug > 0
5749         before debugging.
5751         * pthread.c (__pthread_initialize_manager): Suspend ourself
5752         after sending __pthread_sig_debug to gdb instead of
5753         __pthread_sig_cancel.
5755 1999-01-24  H.J. Lu  <hjl@gnu.org>
5757         * manager.c (__pthread_manager): Delete __pthread_sig_debug
5758         from mask if __pthread_sig_debug > 0.
5759         (pthread_handle_create): Increment __pthread_handles_num.
5761         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
5762         * pthread.c (__pthread_initialize_manager): Likewise.
5764         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
5765         instead of __libc_allocate_rtsig (2).
5766         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
5767         instead of __pthread_sig_cancel.
5768         (pthread_handle_sigdebug): Fix comments.
5770 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
5772         * manager.c (pthread_allocate_stack): Set
5773         __pthread_nonstandard_stacks if user-specified stack is used.
5775 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
5777         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
5778         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
5780 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
5782         * pthread.c: Use a third signal __pthread_sig_debug distinct
5783         from __pthread_sig_cancel to notify gdb when a thread is
5784         created
5785         * manager.c: Likewise.
5786         * internals.h: Likewise.
5787         * signals.c: The implementation of sigwait(s) assumed that
5788         all signals in s have signal handlers already attached.
5789         This is not required by the standard, so make it work
5790         also if some of the signals have no handlers.
5792 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5794         * linuxthreads.texi: Remove pointers from first @node.  Move old
5795         @node spec inside comment.
5797 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
5799         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
5800         _IO_lock_unlock.
5802 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
5804         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
5805         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
5807 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
5809         * manager.c: Threads now send __pthread_sig_cancel on termination.
5810         Change clone call and signal masks.
5811         * thread.c (pthread_handle_sigrestart): Remove special code for
5812         manager.
5813         (pthread_handle_sigcancel): In manager thread call
5814         __pthread_manager_sighandler.
5815         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
5816         * sysdeps/i386/i686/pt-machine.h: Likewise.
5817         Patches by Xavier Leroy.
5819 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
5821         * spinlock.c (__pthread_unlock): Don't crash if called for an
5822         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
5824         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
5825         overall runtime.
5827 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
5829         * Examples/ex3.c: Wait until all threads are started before
5830         searching for the number to avoid race condition on very fast
5831         systems.
5833 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5835         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
5836         declaration since it's not needed.
5838         * sysdeps/pthread/pthread.h: Move internal functions to ...
5839         * internals.h: ...here.
5841 1998-12-02  H.J. Lu  <hjl@gnu.org>
5843         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
5844         SIGRTMIN is defined.
5845         (__pthread_sig_cancel): Likewise.
5847 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5849         * wrapsyscall.c: Include <sys/mman.h> for msync,
5850         <stdlib.h> for system and <termios.h> for tcdrain prototype.
5851         Correct msync declaration.
5853 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
5855         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
5856         __libc_tsd_set): New macros for new interface.
5857         * no-tsd.c: New file, provide uninitialized defns of
5858         __libc_internal_tsd_get and __libc_internal_tsd_set.
5859         * Makefile (routines): Add no-tsd.
5861 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
5863         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
5864         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5865         __libc_internal_tsd_set): Move decls to ...
5866         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
5867         declarations.
5869         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5870         __libc_internal_tsd_set): Make these pointers to functions, not
5871         functions; remove #pragma weak decls for them.
5872         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
5873         Define static functions and initialized pointers to them.
5875 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
5877         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
5878         (CFLAGS-specific.c): Likewise.
5879         (CFLAGS-pthread.c): Likewise.
5880         (CFLAGS-ptfork.c): Likewise.
5881         (CFLAGS-cancel.c): Likewise.
5882         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
5883         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
5885         * mutex.c (pthread_mutex_init): Define as strong symbol.
5886         (pthread_mutex_destroy): Likewise.
5887         (pthread_mutex_trylock): Likewise.
5888         (pthread_mutex_lock): Likewise.
5889         (pthread_mutex_unlock): Likewise.
5890         (pthread_mutexattr_init): Likewise.
5891         (pthread_mutexattr_destroy): Likewise.
5892         (pthread_once): Likewise.
5893         * ptfork.c (pthread_atfork): Likewise.
5894         * specific.c (pthread_key_create): Likewise.
5895         (pthread_setspecific): Likewise.
5896         (pthread_getspecific): Likewise.
5898 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5900         * linuxthreads.texi: Fix punctuation after xref.
5902 1998-11-10  H.J. Lu  <hjl@gnu.org>
5904         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
5905         if it is defined in <linux/limits.h>.
5907 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
5909         * spinlock.h (__pthread_trylock): Define inline.
5910         (__pthread_lock): Add extra parameter to declaration.  Declare
5911         using internal_function.
5912         (__pthread_unlock): Declare using internal_function.
5913         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
5914         of local variable self.  Avoid recomputing self.  Define using
5915         internal_function.
5916         (__pthread_trylock): Remove.
5917         (__pthread_unlock): Define using internal_function.
5918         * cancel.c: Adjust for __pthread_lock interface change.  Use already
5919         computed self value is possible.
5920         * condvar.c: Likewise.
5921         * join.c: Likewise.
5922         * manager.c: Likewise.
5923         * mutex.c: Likewise.
5924         * pthread.c: Likewise.
5925         * rwlock.c: Likewise.
5926         * semaphore.c: Likewise.
5927         * signals.c: Likewise.
5929 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
5931         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
5932         __ to field names of the struct.
5933         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
5934         Likewise.
5935         (pthread_attr_t): Likewise.
5936         (pthread_cond_t): Likewise.
5937         (pthread_condattr_t): Likewise.
5938         (pthread_mutex_t): Likewise.
5939         (pthread_mutexattr_t): Likewise.
5940         (pthread_rwlock_t): Likewise.
5941         (pthread_rwlockattr_t): Likewise.
5942         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
5943         * cancel.c: Likewise.
5944         * condvar.c: Likewise.
5945         * manager.c: Likewise.
5946         * mutex.c: Likewise.
5947         * pthread.c: Likewise.
5948         * ptlongjmp.c: Likewise.
5949         * rwlock.c: Likewise.
5950         * spinlock.c: Likewise.
5952 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
5954         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
5955         also with PT_EI.
5957         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
5958         definitions.
5960         * Makefile (libpthread-routines): Add pt-machine.
5961         * pt-machine.c: New file.
5962         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
5963         yet defined.  Use PT_EI in extern inline definitions.
5964         * sysdeps/arm/pt-machine.h: Likewise.
5965         * sysdeps/i386/pt-machine.h: Likewise.
5966         * sysdeps/i386/i686/pt-machine.h: Likewise.
5967         * sysdeps/m68k/pt-machine.h: Likewise.
5968         * sysdeps/mips/pt-machine.h: Likewise.
5969         * sysdeps/powerpc/pt-machine.h: Likewise.
5970         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
5971         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5973 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5975         * semaphore.h: Include <sys/types.h> so that _pthread_descr
5976         is declared.
5978 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
5980         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
5981         argument.
5982         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
5984 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5986         * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
5987         guard.
5989 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5991         * signals.c (sigaction): Check that sig is less than NSIG to avoid
5992         array index overflow.
5994 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
5996         * sysdeps/pthread/semaphore.h: New file.
5998 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
6000         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
6001         _LIBC_TSD_KEY_DL_ERROR.
6003 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
6005         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
6006         * sysdeps/i386/pt-machine.h: Likewise.
6007         Suggested by Roland McGrath.
6009 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
6011         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
6012         access thread data with non-constant offsets.
6013         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
6014         necessary.
6016         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
6017         THREAD_SETMEM_NC definitions.
6019         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
6020         THREAD_SETMEM_NC.
6021         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6023 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
6025         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
6026         not already defined.
6027         (struct _pthread_descr_struct): Add p_self and p_nr field.
6028         * manager.c (__pthread_handles): Define second element to point
6029         to manager thread.
6030         (__pthread_handles_num): Initialize to 2.
6031         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
6032         (pthread_start_thread): Likewise.
6033         (pthread_handle_create): Start search for free slot at entry 2.
6034         Initialize new fields p_self and p_nr.
6035         Call __clone with CLONE_PTRACE if available.
6036         (pthread_free): Call FREE_THREAD_SELF if available.
6037         * pthread.c (__pthread_initial_thread): Initialize new fields.
6038         (__pthread_manager_thread): Likewise.
6039         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
6041         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
6042         elements of the thread descriptor.
6043         * condvar.c: Likewise.
6044         * errno.c: Likewise.
6045         * join.c: Likewise.
6046         * manager.c: Likewise.
6047         * pthread.c: Likewise.
6048         * ptlongjmp.c: Likewise.
6049         * semaphore.c: Likewise.
6050         * signals.c: Likewise.
6051         * specific.c: Likewise.
6052         * spinlock.c: Likewise.
6054         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
6056         * sysdeps/i386/useldt.h: New file.
6057         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
6059         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
6060         THREAD_SETMEM using __thread_self.
6061         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6063 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
6065         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
6066         turned out that we didn't need to queue after all.
6068 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
6070         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
6071         and wastes space; correct types.
6073 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
6075         * signals.c (sigaction): Handle NULL argument.
6077 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
6079         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
6080         of sigset_t.
6082 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6084         * Makefile (linuxthreads-version): Extract correct number from
6085         Banner.
6087 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
6089         * Banner: Bump version number to 0.8
6090         * FAQ.html: Many updates, in particular w.r.t. debugging.
6091         * manager.c: Support for non-default stacksize for
6092         LinuxThreads-allocated stacks;
6093         don't use guard pages for stacks with default size, rely on
6094         rlimit(RLIMIT_STACK) instead (it's cheaper).
6095         * attr.c: Likewise.
6096         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
6097         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
6098         * condvar.c: Likewise.
6099         * internals.h: Likewise.
6100         * restart.h: Likewise.
6101         * signals.c: Likewise.
6102         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
6104 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6106         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
6107         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
6108         * Versions: Put __pthread_mutexattr_settype under version
6109         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
6110         __pthread_mutexattr_gettype.
6112 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6114         * sysdeps/pthread/bits/libc-lock.h: Make
6115         __pthread_mutexattr_settype weak.  Don't make
6116         __pthread_mutexattr_setkind_np weak.
6118 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
6120         * manager.c (pthread_handle_create): Check whether sched_setscheduler
6121         call can succeed here.
6123         * mutex.c: Define __pthread_mutexattr_settype and make
6124         __pthread_mutexattr_setkind_np an alias.
6125         Likewise for __pthread_mutexattr_gettype.
6127 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6129         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
6130         is root.
6132 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
6134         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
6136 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6138         * Examples/ex6.c: Include <unistd.h> for usleep.
6140 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6142         * Examples/ex4.c (main): Use exit, not pthread_exit.
6144 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
6146         * Versions: Add __pthread_mutexattr_gettype and
6147         __pthread_mutexattr_settype.
6148         * lockfile.c: Use __pthread_mutexattr_settype instead of
6149         __pthread_mutexattr_setkind_np.
6150         * mutex.c: Define __pthread_mutexattr_gettype and
6151         __pthread_mutexattr_settype.
6152         * weak.c: Likewise.
6153         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
6154         __pthread_mutexattr_settype.
6155         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
6156         Use __pthread_mutexattr_settype.
6158 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
6160         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
6161         * mutex.c: Define weak alias pthread_mutexattr_gettype and
6162         pthread_mutexattr_settype.
6163         * sysdeps/pthread/pthread.h: Declare these functions.
6164         Move pthread_sigmask and pthread_kill declaration in separate header.
6165         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
6167 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
6169         * Makefile: Add rules to compile and run tests.
6170         * Examples/ex1.c: Little changes to fix warnings.
6171         * Examples/ex2.c: Likewise.
6172         * Examples/ex3.c: Likewise.
6173         * Examples/ex4.c: Likewise.
6174         * Examples/ex5.c: Likewise.
6175         * Examples/ex6.c: New file.
6177 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
6179         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
6181 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6183         * attr.c: Include <string.h>.
6185 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
6187         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
6188         * internals.h: Include limits.h.
6189         * manager.c: Use memcpy to copy sched_param.
6190         * ptfork.c: Include errno.h.
6191         * pthread.c: Likewise.
6192         * semaphore.c: Likewise.
6193         * specific.c: Likewise.
6194         * spinlock.h: Likewise.
6195         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
6196         type definition to ...
6197         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
6199 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
6201         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
6203         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
6204         as macros as demanded in POSIX.1, Annex C.
6206 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
6208         * internals.h (struct pthread_request): For free use pthread_t
6209         instead of pthread_descr.
6210         * join.c (pthread_join): Pass thread_id, not th to manager.
6211         (pthread_detach): Likewise.
6212         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
6213         (pthread_exited): Remove detached queue code.
6214         (pthread_handle_free): Expect thread ID parameter and use it to
6215         validate the thread decsriptor.  Don't use detached queue.
6216         Patches by Xavier Leroy.
6218 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6220         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
6221         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
6222         __pthread_atfork, __pthread_key_create, __pthread_once.
6223         * internals.h: Doc fix.
6224         * pthread.c (__pthread_initialize): Define again.
6226 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
6228         * manager.c (pthread_exited): If thread is not detached put it on
6229         special list.
6230         (pthread_handle_free): If thread is not on list with living threads
6231         search on list with detached threads.
6233         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
6234         for new definition of pthread_rwlock_t.
6236         * spinlock.c: Correct test whether to compile
6237         __pthread_compare_and_swap or not.
6239 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
6241         * attr.c: Finish user stack support.  Change locking code to be safe
6242         in situations with different priorities.
6243         * cancel.c: Likewise.
6244         * condvar.c: Likewise.
6245         * internals.h: Likewise.
6246         * join.c: Likewise.
6247         * manager.c: Likewise.
6248         * mutex.c: Likewise.
6249         * pthread.c: Likewise.
6250         * ptlongjmp.c: Likewise.
6251         * queue.h: Likewise.
6252         * rwlock.c: Likewise.
6253         * semaphore.c: Likewise.
6254         * semaphore.h: Likewise.
6255         * signals.c: Likewise.
6256         * spinlock.c: Likewise.
6257         * spinlock.h: Likewise.
6258         * sysdeps/pthread/pthread.h: Likewise.
6259         Patches by Xavier Leroy.
6261         * sysdeps/i386/i686/pt-machine.h: New file.
6263 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
6265         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
6266         [sg]et_stackaddr prototypes always available.
6268         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6269         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
6271 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
6273         * manager.c (pthread_free): Undo patch from 980430.
6274         Reported by David Wragg <dpw@doc.ic.ac.uk>.
6276 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
6278         * manager.c: Define __pthread_manager_adjust_prio and use it to
6279         increase priority when needed.
6280         * internals.h: Add prototype for __pthread_manager_adjust_prio.
6281         * mutex.c: Optimize mutexes to wake up only one thread.
6282         * pthread.c: Move PID of manager for global variable in structure
6283         element.
6284         Patches by Xavier Leroy.
6286 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
6288         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
6290 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6292         * attr.c: Correct typo.
6294 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
6296         * manager.c (pthread_free): Unmap guard before the stack.
6297         Patch by Matthias Urlichs.
6299 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
6301         * manager.c (pthread_free): Detect already free child.
6302         Patch by Xavier Leroy, reported by Matthias Urlichs.
6304 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6306         * Makefile (linuxthreads-version): Renamed back from
6307         libpthread-version.
6309 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
6311         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
6312         __libc_longjmp.
6314 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
6316         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
6317         * internals.h: Add definitions for new spinlock implementation.
6318         * ptlongjmp.c: New file.
6319         * spinlock.c: New file.
6320         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
6321         new function __pthread_acquire to prevent deadlocks with thread
6322         with different priorities.
6323         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
6325 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6327         * manager.c (__pthread_manager): Reduce first argument to select
6328         to include just the needed file descriptor.
6330 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
6332         * manager.c: Fix last patch which caused core dumps.
6334         * pthread.c: Correctly handle missing SIGRTMIN.
6336 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6338         * libpthread.map: Add __libc_internal_tsd_get and
6339         __libc_internal_tsd_set.  Add missing cancelable functions. Export
6340         libc internal versions of the cancelable functions.
6342 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
6344         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
6346 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
6348         * attr.c: Implement pthread_attr_[gs]etguardsize,
6349         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
6350         Change pthread_attr_init to have two interfaces.
6351         * internals.h (struct _pthread_descr_struct): Add new fields for
6352         above functions.
6353         * libpthread.map: Add names in GLIBC_2.1 section.
6354         * manager.c (pthread_handle_create): Implement guardsize and
6355         user stack.
6356         (pthread_free): Likewise.
6357         * pthread.c (pthread_create): Add new interface for changed
6358         pthread_attr_t.
6359         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
6360         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
6361         PTHREAD_STACK_MIN.
6363 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
6365         * manager.c: Enable resetting of the thread scheduling policy
6366         to SCHED_OTHER when the parent thread has a different one.
6368 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
6370         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6371         _POSIX_ASYNCHRONOUS_IO.
6373         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
6374         mutexes.
6375         * mutex.c: Implement new mutex types.
6377         * internals.h: Include <signal.h>.
6379         * libpthread.map: Add __erno_location and __h_errno_location.
6381         * errno.c: Return pointer to variable actually in use.  This might
6382         not be the one in the thread structure.
6383         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
6384         and p_h_errnop.
6385         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
6386         of manager thread structure.
6387         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
6388         thread.
6389         * pthread.c: Adapt initializer for thread structures.
6390         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
6391         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
6392         current thread to global variables.
6394 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
6396         * rwlock.c: New file.
6397         * Makefile (libpthread-routines): Add rwlock.
6398         * sysdeps/pthread/pthread.h: Define data structures and declare
6399         functions.
6400         * libpthread.map: Add new functions.
6402 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
6404         * sysdeps/arm/pt-machine.h: New file; add ARM support.
6405         * sysdeps/arm/Implies: likewise.
6406         * README: Document it.
6408 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6410         * signals.c: Remove unneeded initializer for sigwaited, saving a
6411         warning.
6413 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6415         * semaphore.c (sem_init): Set sem_spinlock only if available.
6417 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
6419         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
6420         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
6422         * Makefile: Update from LinuxThreads 0.7.
6423         * internals.h. Likewise.
6424         * manager.c: Likewise.
6425         * mutex.c: Likewise.
6426         * pthread.c: Likewise.
6427         * signals.c: Likewise.
6428         * specific.c: Likewise.
6429         * Examples/ex3.c: Likewise.
6431 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
6433         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
6434         open.
6436 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
6438         * wrapsyscall.c: Add socket functions which are also cancelation
6439         points.
6441 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
6443         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
6444         New functions for fast thread specific data within libc.
6446         * internals.h: Add new array p_libc_specific to struct
6447         _pthread_descr_struct.
6449         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
6451 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
6453         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
6454         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
6456 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
6458         * internals.h (struct _pthread_descr_struct): Add definitions for
6459         two-level specific key handling.
6460         * manager.c (pthread_handle_create): Initialize specific memory array.
6461         * specific.c: Implement two-level key handling.
6462         * weaks.c: Don't provide dummy key handling.
6463         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
6464         Add definition of __libc_key_t.
6465         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
6466         as 1024.
6467         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
6468         PTHREAD_DESTRUCTOR_ITERATIONS.
6470         * manager.c (pthread_handle_create): Compare mmap result with
6471         MAP_FAILED.
6473         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
6474         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
6476 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
6478         sysdeps/sparc -> sysdeps/sparc/sparc32
6479         sysdeps/sparc64 -> sysdeps/sparc/sparc64
6481         * internals.h: Change definition of THREAD_SELF to be an expression,
6482         not a statement that did a return.
6483         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
6484         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
6485         Follow Solaris and use a "system reserved" register (%g6) to hold
6486         the thread descriptor.
6487         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6489 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
6491         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
6492         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
6493         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
6495         * semaphore.c: Include spinlock.h only when needed.
6497         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
6498         keys for entries not in use.
6500         * weaks.c: Implement key handling functions for real.
6502 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
6504         Initial sparc64-linux support:
6505         * sysdeps/sparc64/Implies: New file.
6506         * sysdeps/sparc64/pt-machine.h: Likewise.
6508 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
6510         * semaphore.c: Include spinlock.h at correct place.
6511         Patch by HJ Lu.
6513 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
6515         The Great Bit File Move:
6516         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
6517         * sysdeps/powerpc/semaphorebits.h: Likewise.
6518         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
6519         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
6520         * sysdeps/pthread/libc-lock.h: -> bits/
6521         * sysdeps/pthread/stdio-lock.h: Likewise.
6522         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
6523         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
6524         * semaphore.h: Likewise.
6525         * sysdeps/pthread/pthread.h: Likewise.
6527         * lockfile.c: <foo.h> -> <bits/foo.h>.
6528         * semaphore.h: Likewise.
6530         * Makefile: (headers): foo.h -> bits/foo.h.
6531         * sysdeps/pthread/Makefile: Likewise.
6533 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6535         * semaphore.c (sem_init): Set sem_spinlock only if available.
6537         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
6538         asm constraints.
6540 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
6542         Update from LinuxThreads 0.6.
6544         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
6545         and __sched_get_priority_min instead of names without `__'.
6547         * manager.c: Rewrite large parts to implement opaque pthread_t.
6549         * cancel.c: Adapt for opaque pthread_t type.
6550         * condvar.c: Likewise.
6551         * errno.c: Likewise.
6552         * join.c: Likewise.
6553         * mutex.c: Likewise.
6554         * pthread.c: Likewise.
6555         * signals.c: Likewise.
6556         * specific.c: Likewise.
6557         * restart.h: Likewise.
6558         * queue.h: Likewise.
6559         * Examples/ex3.c: Likewise.
6560         * Examples/ex4.c: Likewise.
6561         * sysdeps/pthread/pthread.h: Likewise.
6563         * pthread.c: Accumulate time for all threads in thread manager.
6565         * semaphore.c: Implement fallback implementation for architectures
6566         sometimes missing compare-exchange operations.
6568         * cancel.c (pthread_cancel): Validate handle argument.
6569         * join.c (pthread_join): Likewise.
6570         (pthread_detach): Likewise.
6571         * signals.c (pthread_kill): Likewise.
6573         * spinlock.h (acquire): Use __sched_yield not sched_yield.
6575         * queue.h (enqueue): Enqueue thread according to priority.
6577         * internals.c (struct pthread_start_args): New struct for passing
6578         args to cloning function.
6579         (struct _pthread): Rename to _pthread_descr_struct and adapt for
6580         opaque pthread_t.
6582         * Examples/Makefile (clean): Pass -f option to rm.
6584         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
6585         and define TEST_FOR_COMPARE_AND_SWAP.
6586         * sysdeps/i386/i486/pt-machine.h: Removed.
6588         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
6589         to 1024.
6591 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
6593         * restart.h (suspend): Clear p_signal before suspending.
6594         (suspend_with_cancellation): Likewise.
6595         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
6597         * weaks.c: Make __pthread_key_create return 1.
6598         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
6599         __libc_getspecific, __libc_setspecific, and __libc_key_t.
6600         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
6601         using libio.
6603 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
6605         * sysdeps/sparc/pt-machine (RELEASE): Fix.
6607 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
6609         * sysdeps/powerpc/Implies: Added.
6610         * sysdeps/powerpc/pt-machine.h: Added.
6611         * sysdeps/powerpc/semaphorebits.h: Added.
6613 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
6615         * pthread.c (__pthread_initial_thread): Correct
6616         initializer.
6617         (__pthread_manager_thread): Likewise.
6618         Reported by Andreas Jaeger.
6620 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
6622         Since sigset_t no longer fits in a register, we can't pass in the
6623         thread's initial mask so easily.  Take this opportunity to simplify
6624         the clone implementation by only accepting a single void* argument.
6626         * manager.c (__pthread_manager): Put thread vitals in the thread
6627         struct instead of as arguments through clone.
6628         (pthread_start_thread): Look for them there.
6629         * internals.h (struct _pthread): Add p_initial_fn,
6630         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
6631         * pthread.c (pthread_initialize_manager): Revise clone invocation.