2.3.5-9
[glibc.git] / linuxthreads / ChangeLog
blob2b024191ed7e408a619e3961f55d5e4265d9ac34
1 2005-05-23  Roland McGrath  <roland@redhat.com>
3         * sysdeps/arm, sysdeps/unix/sysv/linux/arm: Subdirectories moved to
4         ports repository.
6 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
8         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
9         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
10         __librt_*_asynccancel@local.
12 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
14         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
15         all occurrences of JUMPTARGET.  Instead append @local to labels.
16         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Likewise.
18 2005-05-19  Richard Henderson  <rth@redhat.com>
20         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Use
21         __sync_val_compare_and_swap, not explicit _si variant.
22         (__pthread_spin_trylock): Likewise.
24 2005-05-05  Daniel Jacobowitz  <dan@codesourcery.com>
26         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
27         .eh_frame section, use cfi_* directives.
29 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
31         * sysdeps/pthread/getcpuclockid.c: Include spinlock.h.
32         Fix a typo in kernel-posix-cpy-timers.h include name, use <> instead
33         of "" includes.
34         (pthread_getcpuclockid): Fix 2 typos.
36 2005-04-27  Roland McGrath  <roland@redhat.com>
38         * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid)
39         [__NR_clock_getres]: Use kernel-supplied CPU clocks if available.
41 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
43         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Use
44         functionally equivalent, but shorter instructions.
46 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
48         * sysdeps/mips/tls.h: New file.
49         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
51 2005-03-21  GOTO Masanori  <gotom@debian.or.jp>
53         * linuxthreads/sysdeps/m68k/Makefile: Remove to delete
54         unneeded o-iterator thing.
56 2005-02-21  H.J. Lu  <hongjiu.lu@intel.com>
58         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Add local _init
59         and _fini labels.
61 2005-03-05  Ulrich Drepper  <drepper@redhat.com>
63         * sysdeps/i386/Makefile (CFLAGS-pt-initfini.s): Unconditionally
64         use -mtune.
66 2005-03-05  Roland McGrath  <roland@redhat.com>
68         * sysdeps/i386/Makefile (CFLAGS-pt-initfini.s): Use $(cc-mtune).
70 2005-03-05  Jakub Jelinek  <jakub@redhat.com>
72         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Rework for GCC 4.
74 2005-02-09  Daniel Jacobowitz  <dan@codesourcery.com>
76         [BZ #740]
77         * descr.h (__pthread_find_self, thread_self): Mark as pure
78         instead of const.
80 2005-02-07  Jakub Jelinek  <jakub@redhat.com>
82         [BZ #739]
83         * specific.c (pthread_key_delete): If pthread_create has not been
84         called yet, clear p_specific for the current thread.
85         * Makefile (tests): Add tst-tsd1.
86         * tst-tsd1.c: New test.
88 2005-01-08  Andreas Jaeger  <aj@suse.de>
90         * pthread.c (init_one_static_tls): Adjust initialization of DTV
91         entry for static tls deallocation fix.
93         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
94         also contains information whether the memory pointed to is static
95         TLS or not, include <stdbool.h>.
96         * sysdeps/i386/tls.h: Likewise.
97         * sysdeps/ia64/tls.h: Likewise.
98         * sysdeps/powerpc/tls.h: Likewise.
99         * sysdeps/s390/tls.h: Likewise.
100         * sysdeps/sh/tls.h: Likewise.
101         * sysdeps/sparc/tls.h: Likewise.
102         * sysdeps/x86_64/tls.h: Likewise.
104 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
106         * Makefile (tests): Add tst-align.
107         * tst-align.c: New test.
108         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Add
109         -mpreferred-stack-boundary=4.
111 2004-12-12  Ulrich Drepper  <drepper@redhat.com>
113         * internals.h: Include <stdbool.h> to match includes used in nptl.
115 2004-12-01  Jakub Jelinek  <jakub@redhat.coM.
117         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
118         _POSIX_THREAD_CPUTIME): Define to 0.
119         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
120         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
121         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
122         __timer_signal_thread_tclk): Remove.
123         (init_module): Remove their initialization.
124         (thread_cleanup): Remove their cleanup assertions.
125         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
126         __timer_signal_thread_tclk): Remove.
127         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
128         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
129         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
130         * tst-clock1.c (do_test): Check for availability of CPU clock.
132 2004-11-18  Daniel Jacobowitz  <dan@codesourcery.com>
134         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Update RETINSTR use.
135         * sysdeps/unix/sysv/linux/arm/vfork.S: Likewise.
137 2004-12-02  Roland McGrath  <roland@redhat.com>
139         * Makefile (libpthread-nonshared): Variable removed.
140         ($(objpfx)libpthread_nonshared.a): Target removed.
141         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
142         These are now handled by generic magic from
143         libpthread-static-only-routines being set.
145 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
147         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
148         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
149         _POSIX_THREAD_PRIO_PROTECT): Define.
150         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
151         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
152         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
154 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
156         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
157         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
158         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
159         _POSIX_TYPED_MEMORY_OBJECTS): Define.
160         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
161         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
162         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
164 2004-11-05  Maciej W. Rozycki  <macro@mips.com>
166         * sysdeps/mips/pspinlock.c: Include <sgidefs.h>.  Use _ABIO32,
167         _ABIN32 and _ABI64 for ABI selection throughout.
168         * sysdeps/mips/pt-machine.h: Use _ABIO32, _ABIN32 and _ABI64 for
169         ABI selection throughout.
171 2004-10-18  Roland McGrath  <roland@redhat.com>
173         [BZ #406]
174         * Makefile (linuxthreads-CPPFLAGS): New variable;
175         adds -DIS_IN_linuxthreads=1.
176         * sysdeps/i386/tls.h: Protect "useldt.h" with
177         [!IS_IN_linuxthreads && !DO_MODIFY_LDT].
178         * sysdeps/i386/i686/pt-machine.h: Revert last change.
180 2004-10-14  Jakub Jelinek  <jakub@redhat.com>
182         * sysdeps/pthread/errno-loc.c: Don't undef #errno
183         if RTLD_PRIVATE_ERRNO.
185 2004-10-05  Dwayne Grant McConnell  <dgm69@us.ibm.com>
187         * pthread.c: Mask restart signal during cancel signal handler.
189 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
191         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
192         _POSIX_THREAD_CPUTIME): Define to 0.
194 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
196         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Set _POSIX_CPUTIME
197         and _POSIX_THREAD_CPUTIME to zero.
198         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
200         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
201         _POSIX_THREAD_PROCESS_SHARED and _POSIX_CLOCK_SELECTION as -1.
202         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
203         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
204         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
206 2004-09-25  Roland McGrath  <roland@redhat.com>
208         [BZ #406]
209         * sysdeps/i386/i686/pt-machine.h: Don't #include "../useldt.h" if
210         [_TLS_H], since sysdeps/i386/tls.h includes it after including us.
212 2004-09-24  Roland McGrath  <roland@redhat.com>
214         [BZ #406]
215         * sysdeps/i386/tls.h: Move #include "useldt.h" outside
216         of [__ASSUME_LDT_WORKS > 0] test.
217         Reported by Carlos Velasco <carlos.velasco@newipnet.com>.
219 2004-09-21  Roland McGrath  <roland@redhat.com>
221         * Versions: Add comment about linuxthreads' frozen ABI.
223 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
225         * Versions: Remove exports for pthread_set*id_np functions.
226         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
227         for now.
228         * Makefile: Don't build pthread_set*id code for now.
230 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
232         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
233         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
234         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
235         and pthread_setresuid_np.
236         * pthread_setgid_np.c: New file.
237         * pthread_setuid_np.c: New file.
238         * pthread_setegid_np.c: New file.
239         * pthread_seteuid_np.c: New file.
240         * pthread_setregid_np.c: New file.
241         * pthread_setreuid_np.c: New file.
242         * pthread_setresgid_np.c: New file.
243         * pthread_setresuid_np.c: New file.
244         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
245         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
246         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
247         and pthread_setresuid_np.
248         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
249         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
250         pthread_setregid, and pthread_setresgid.
252 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
254         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
255         for __USE_XOPEN2K.
256         * sysdeps/pthread/bits/pthreadtypes.h: Define rwlock types also
257         for __USE_XOPEN2K.  [BZ #320]
259 2004-09-04  Jakub Jelinek  <jakub@redhat.com>
261         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
263 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
265         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
266         the initialization function might throw.
268 2004-08-30  Roland McGrath  <roland@frob.com>
270         * Makefile (libpthread-abi-frozen): New variable.
272 2004-08-26  Roland McGrath  <roland@redhat.com>
274         * configure.in: New file.  If nptl add-on is also selected, barf if
275         explicit and elide ourselves if implicit.
276         * configure: Now generated.
278 2004-08-25  Richard Sandiford  <rsandifo@redhat.com>
280         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (CENABLE, CDISABLE,
281         __local_multiple_threads): Fix definitions for IS_IN_librt.
282         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
284 2004-08-22  Andreas Schwab  <schwab@suse.de>
286         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO) [IS_IN_librt]:
287         Save gp around CENABLE/CDISABLE calls.
289 2004-08-15  Roland McGrath  <roland@frob.com>
291         * pthread_atfork.c: Update copyright terms including special exception
292         for these trivial files, which are statically linked into executables
293         that use dynamic linking for the significant library code.
295 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
297         * libc-tsd.c: Move resolv.h include before the #if.
298         (__res_maybe_init): New function.  Add libc_hidden_def.
300 2004-08-02  Ulrich Drepper  <drepper@redhat.com>
302         * linuxthreads.texi (Cleanup Handlers): Fix typo.
303         Reported by Bjoern Engelmann <bjengelmann@gmx.de>.
305 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
307         [BZ #284]
308         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
309         instead of clockid_t.
311 2004-07-21  Roland McGrath  <roland@redhat.com>
313         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
315 2004-07-02  Roland McGrath  <roland@redhat.com>
317         * configure: Don't exit.
319 2004-07-20  Alexandre Oliva  <aoliva@redhat.com>
321         * sysdeps/mips/pt-machine.h: Use standard names for ABI macros,
322         include sgidefs.h.
323         * sysdeps/mips/atomicity.h: Likewise.
325 2004-07-19  Alexandre Oliva  <aoliva@redhat.com>
327         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
328         Remove redundant override that missed -g0.
330 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
332         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
333         (__local_multiple_threads): Define for librt.
334         (SINGLE_THREAD_P): Likewise.
336 2004-07-07  Jakub Jelinek  <jakub@redhat.com>
338         * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid): Allow
339         using other thread's clock.
340         * ptclock_gettime.c (__pthread_clock_gettime): Likewise.
341         * ptclock_settime.c (__pthread_clock_settime): Likewise.
342         * internals.h (__pthread_clock_gettime, __pthread_clock_settime):
343         Remove prototypes.
344         Reported by Bernd Schmidt <bernds@redhat.com>.
345         * Makefile (librt-tests): Add tst-clock1.
346         * tst-clock1.c: New test.
348         * sysdeps/x86_64/Versions: New file.
349         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
350         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
352 2004-04-16  Andreas Schwab  <schwab@suse.de>
354         * sysdeps/ia64/tls.h (INIT_SYSINFO): Cast dl_sysinfo to void*.
356 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
358         * sysdeps/s390/pspinlock.c (__pthread_spin_lock,
359         __pthread_spin_trylock): Use constraint "m" instead of "0" for
360         futex.
361         * sysdeps/ia64/pt-machine.h (__compare_and_swap,
362         __compare_and_swap_with_release_semantic, testandset): Use
363         constraint "m" instead of "0" for futex.
365 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
367         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Fix
368         branch offset for a PLT entry.
369         (CDISABLE): Likewise.
371 2004-05-31  Andreas Jaeger  <aj@suse.de>
373         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
374         Set to -fno-unit-at-a-time.
375         Patch by Dan Kegel <dank@kegel.com>.
377 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
379         * tst-stack1.c: Don't include mcheck.h.
380         (do_test): Make sure user defined stacks aren't reused,
381         don't free them at the end.  [BZ #110]
383 2004-05-02  Jakub Jelinek  <jakub@redhat.com>
385         * manager.c: Include not-cancel.h.
386         (__pthread_manager): Use read_not_cancel instead of __libc_read.
387         (pthread_start_thread, __pthread_manager_sighandler): Use
388         write_not_cancel instead of __libc_write.
389         (pthread_reap_children): Use waitpid_not_cancel instead of
390         __libc_waitpid.
391         * pthread.c: Include not-cancel.h.
392         (__pthread_initialize_minimal, __pthread_create_2_1,
393         pthread_onexit_process, __pthread_message): Use
394         write_not_cancel instead of __libc_write.
395         (__pthread_initialize_manager): Likewise.  Use close_not_cancel
396         instead of __libc_close.
397         (__pthread_reset_main_thread): Use close_not_cancel instead of
398         __libc_close.
399         * join.c: Include not-cancel.h.
400         (__pthread_do_exit, pthread_join, pthread_detach): Use
401         write_not_cancel instead of __libc_write.
402         * semaphore.c: Include not-cancel.h.
403         (__new_sem_post): Use write_not_cancel instead of __libc_write.
404         * specific.c: Include not-cancel.h.
405         (pthread_key_delete): Use write_not_cancel instead of __libc_write.
407 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
409         * Versions (libc): Add __on_exit and __libc_sigaction.
411 2004-04-28  Jakub Jelinek  <jakub@redhat.com>
413         * semaphore.c (sem_timedwait): Return -1 and set errno instead of
414         returning error number [BZ #133].  Patch by <rmhaddad@yahoo.com>.
416 2004-04-22  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
418         * sysdeps/unix/sysv/linux/sh/vfork.S: Fix wrong function pointer
419         reference in PIC case.
421 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
423         * oldsemaphore.c (SEM_VALUE_MAX): Remove.
425 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
427         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
428         for librt.  Save the return value to a safe register.
429         (CDISABLE): Define for librt.  Set the function argument correctly.
431 2004-04-18  Jakub Jelinek  <jakub@redhat.com>
433         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
434         (PSEUDO_CANCEL): Define.
435         (PSEUDO): Use it.
436         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
437         CDISABLE): For librt, append @PLT.
439 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
441         * sysdeps/x86_64/tls.h [!__ASSEMBLER__]: Include tcb-offsets.h.
443         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
444         return it_value { 0, 0 }.
445         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
446         like SIGEV_SIGNAL.
447         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
448         assertion for SIGEV_NONE.
449         (thread_attr_compare): Compare all attributes, not just a partial
450         subset.
452         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
454 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
456         * semaphore.h (SEM_VALUE_MAX): Just use a plain number.
458 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
460         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix last patch.
462 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
464         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
466 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
468         * sysdeps/unix/sysv/linux/mq_notify.c: New file.
470         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE): Define
471         for librt.
472         (CDISABLE): Likewise.
474 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
476         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
477         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
478         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
479         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
480         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
481         Define.
482         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
483         (_POSIX_MESSAGE_PASSING): Define.
485 2004-04-10  Andreas Jaeger  <aj@suse.de>
487         * sysdeps/x86_64/pt-machine.h: Add used attribute to stack_pointer
488         to avoid warnings with GCC 3.5.
490 2004-04-09  Steven Munroe  <sjmunroe@us.ibm.com>
492         * sysdeps/powerpc/tls.h (TLS_INIT_TP): Eliminate lvalue cast from
493         __thread_self assignment.
494         (THREAD_DTV): Replace __thread_register with __thread_self.
495         (INIT_THREAD_SELF): Eliminate lvalue cast from __thread_self
496         assignment.
498 2004-04-08  Alexandre Oliva  <aoliva@redhat.com>
500         * signals.c (pthread_sigmask): Don't ever block or mask
501         __pthread_sig_debug.
503 2004-03-11  Steven Munroe  <sjmunroe@us.ibm.com>
505         * sysdeps/powerpc/tls.h: Remove __powerpc64__ conditional.
507 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
509         * sysdeps/ia64/pt-machine.h (BUSY_WAIT_NOP): Define.
510         * sysdeps/x86_64/pt-machine.h (BUSY_WAIT_NOP): Likewise.
512 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
514         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add HOST_NAME_MAX.
515         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
516         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
517         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
519 2004-03-08  Andreas Jaeger  <aj@suse.de>
521         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT_KERNEL_CHECK):
522         dl_osversion is readonly.
524 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
526         * sysdeps/i386/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
527         _rtlf_global_ro.
528         * sysdeps/ia64/tls.h (INIT_SYSINFO): Likewise.
530 2004-02-20  Steven Munroe  <sjmunroe@us.ibm.com>
532         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c [SHARED]: Code only
533         valid for SHARED case.  Correct spelling of __vmx_longjmp.
535         * sysdeps/powerpc/pspinlock.c: Move from here.
536         * sysdeps/powerpc/powerpc32/pspinlock.c: To here.
537         * sysdeps/powerpc/powerpc64/pspinlock.c: New file.
538         * sysdeps/powerpc/powerpc64/pt-machine.h: Define __compare_and_swap32
539         and __compare_and_swap32_with_release_semantics.
541 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
543         * Makefile (generated): Remove tst-stack1.mtrace and tst-stack1-mem.
544         (tests): Remove $(objpfx)tst-stack1-mem.
545         (tst-stack1-ENV): Remove.
546         ($(objpfx)tst-stack1-mem): Remove.
548         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
549         (__syscall_error_handler2): Call CDISABLE.
550         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
551         (__syscall_error_handler2): Call CDISABLE.
553         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
555 2004-02-10  Steven Munroe  <sjmunroe@us.ibm.com>
557         * Makefile (libpthread-routines): Add ptcleanup.
558         * ptlongjmp.c: Removed.
559         * ptcleanup.c: Copied __pthread_cleanup_upto to here. New file.
560         * sysdeps/pthread/ptlongjmp.c: Copied longjmp to here. New file.
561         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
562         Version longjmp, siglongjmp for GLIBC_2.3.4.
563         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c: New File.
565 2004-01-22  Andreas Jaeger  <aj@suse.de>
567         * spinlock.c (__pthread_lock): Fix contraint to avoid warning.
568         (__pthread_release): Likewise.
570 2004-01-16  Richard Henderson  <rth@redhat.com>
572         * attr.c: Include ldsodefs.h.
573         (pthread_getattr_np): Don't declare __libc_stack_end.
575 2004-01-09  Steven Munroe  <sjmunroe@us.ibm.com>
577         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
578         [!HAVE_TLS_SUPPORT]: Define SINGLE_THREAD_P using static
579         __lib*_multiple_threads.
580         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
581         [!HAVE_TLS_SUPPORT]: Likewise.
583 2004-01-13  Roland McGrath  <roland@redhat.com>
585         * sysdeps/powerpc/tcb-offsets.sym: Put -- separator line before any
586         conditionals.
588 2004-01-10  Andreas Jaeger  <aj@suse.de>
590         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Add cfi directives.
592 2004-01-01  Andreas Jaeger  <aj@suse.de>
594         * Makefile (generated): Add missing files.
596 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
598         * attr.c (pthread_getattr_np): Make sure stack info returned for
599         main thread does not overlap with any other VMA.
600         Patch by Jakub Jelinek.
602 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
604         * sysdeps/ia64/tls.h: Include dl-sysdep.h.
605         (INIT_SYSINFO): Define.
606         (TLS_INIT_TP): Use it.
608 2003-12-28  Carlos O'Donell  <carlos@baldric.uwo.ca>
610         * attr.c (pthread_getattr_np): Add _STACK_GROWS_UP case.
612 2003-12-26  Jakub Jelinek  <jakub@redhat.com>
614         * sysdeps/pthread/pthread.h (pthread_setcancelstate,
615         pthread_setcanceltype, pthread_cancel, pthread_testcancel): Remove
616         __THROW.
617         * semaphore.h (sem_wait, sem_timedwait): Likewise.
619 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
621         * manager.c (pthread_free): Call _dl_deallocate_tls even for
622         p_userstack threads.
623         * pthread.c (__pthread_initialize_manager): Call _dl_deallocate_tls
624         on error.
625         (pthread_onexit_process): Update comment.
626         * Makefile (tests): Add tst-stack1.  Depend on $(objpfx)tst-stack1-mem.
627         (generated): Add tst-stack1.mtrace and tst-stack1-mem.
628         (tst-stack1-ENV): Set.
629         ($(objpfx)tst-stack1-mem): New.
630         * tst-stack1.c: New test.
632 2003-12-16  Steven Munroe  <sjmunroe@us.ibm.com>
634         * sysdeps/powerpc/tcb-offsets.sym [!__powerpc64__]: Remove
635         conditional so MULTIPLE_THREADS_OFFSET is generated for both.
636         * sysdeps/powerpc/tls.h [!__powerpc64__]: Remove conditional
637         so TLS_MULTIPLE_THREADS_IN_TCB is generated for both.
638         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h:
639         Include tls.h.
641 2003-12-04  Steven Munroe  <sjmunroe@us.ibm.com>
643         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
644         (SINGLE_THREAD_P): Test using thread local p_multiple_threads field.
646 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
648         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Update copyright
649         message.  Add include of <stddef.h>.
650         (INIT_NEW_WAY): New macro.
651         (INIT_OLD_WAY): Likewise.
652         (_init): Add unwind directives.  Invoke
653         __pthread_initialize_minimal() via INIT_NEW_WAY or INIT_OLD_WAY,
654         respectively.
655         (_init_EPILOG_BEGINS): Add unwind-directives.  Drop unused .regstk
656         directive.
657         (_fini): Add unwind directives.  Drop unnecessary .align 16
658         directive (bundles are always 16-byte aligned).
659         (_fini_EPILOG_BEGINS): Add unwind-directives.
661 2003-11-19  David Mosberger  <davidm@hpl.hp.com>
663         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
665 2003-12-10  Andreas Jaeger  <aj@suse.de>
666             Ruediger Oertel  <ro@suse.de>
668         * sysdeps/alpha/elf/pt-initfini.c (__asm__): Remove extra .prologue.
670 2003-11-30  Andreas Jaeger  <aj@suse.de>
672         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
673         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
674         Likewise.
676 2003-11-04  Jakub Jelinek  <jakub@redhat.com>
678         * signals.c (__pthread_sigaction): Set __sighandler[sig].old before
679         __libc_sigaction if it has been one of the special values before.
681 2003-10-06  Carlos O'Donell <carlos@baldric.uwo.ca>
683         * pthread.c (__pthread_self_stack): _STACK_GROWS_UP case added.
684         (__pthread_find_self): Likewise.
685         * manager.c (thread_segment): _STACK_GROWS_UP case added.
687 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
689         * linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h: New file.
691 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
693         * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: New file.
695 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
697         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
698         changes.
699         (SAVE_OLDTYPE_0): Fix a typo.
701 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
703         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
704         correct offset.
706 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
708         * Makefile (tests): Add tst-cancel8.
709         * tst-cancel8.c: New test.
711 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
713         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
714         restoring of the old cancellation type.
716 2003-09-10  Chris Demetriou  <cgd@broadcom.com>
718         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: New file.
720 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
722         * sysdeps/pthread/malloc-machine.h [!__libc_maybe_call2] (mutex_init,
723         mutex_lock, mutex_trylock, mutex_unlock): Remove.
725 2003-09-27  Wolfram Gloger  <wg@malloc.de>
727         * sysdeps/pthread/malloc-machine.h: New file.
729 2003-09-18  H.J. Lu  <hongjiu.lu@intel.com>
731         * attr.c (__pthread_attr_init_2_1): Double __guardsize size
732         if NEED_SEPARATE_REGISTER_STACK is defined.
734 2003-09-22  Philip Blundell  <philb@gnu.org>
736         * forward.c: Add _pthread_cleanup_push, _pthread_cleanup_pop.
737         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
738         Likewise.
739         * pthread.c (__pthread_elements): Initialise these new elements.
740         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Use
741         __libc_maybe_call.
742         (__libc_cleanup_pop): Likewise.
744 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
746         * attr.c: Include stdlib.h.
748 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
750         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
752         * tst-attr1.c: New test.
753         * Makefile (tests): Add tst-attr1.
755 2003-09-17  Philip Blundell  <philb@gnu.org>
757         * sysdeps/unix/sysv/linux/arm/vfork.S: Branch to fork if
758         libpthread is loaded.  Elide backwards compatibility code when not
759         required.
761 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
763         * descr.h (manager_thread): Rename to...
764         (__pthread_manager_threadp): ... this.
765         * pthread.c (manager_thread): Define to __pthread_manager_threadp.
766         (__pthread_manager_threadp): New variable.
767         * internals.h (__manager_thread): Define to
768         __pthread_manager_threadp if USE_TLS.
770 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
772         * sysdeps/i386/Makefile (CFLAGS-cancel.c, CFLAGS-manager.c,
773         CFLAGS-pthread.c, CFLAGS-sighandler.c): Add
774         -mpreferred-stack-boundary=4.
776 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
778         * attr.c (pthread_getattr_np): Correctly fill in the stack-related
779         values for the initial thread.
781 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
783         * pthread.c (manager_thread): Remove static, add attribute_hidden.
784         (thread_self_stack): Rename to...
785         (__pthread_self_stack): ... this.  Remove static.
786         (pthread_handle_sigcancel): Use check_thread_self ().
787         (pthread_handle_sigrestart): Likewise.
788         * sighandler.c (__pthread_sighandler, __pthread_sighandler_rt):
789         Likewise.
790         * descr.h (manager_thread): Declare.
791         * internals.h (__pthread_self_stack): New prototype.
792         (__manager_thread): Define.
793         (check_thread_self): New function.
795 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
797         * Makefile (CFLAGS-mutex.c): Add $(uses-callbacks).
798         (CFLAGS-sighandler.c): Change $(exceptions) into $(uses-callbacks).
800 2003-09-12  Jakub Jelinek  <jakub@redhat.com>
802         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New.
803         (__SSIZE_T_TYPE): Define to __SWORD_TYPE for gcc 2.95.x and
804         __SLONGWORD_TYPE otherwise.
806 2003-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
808         * sysdeps/powerpc/powerpc64/pt-machine.h [MEMORY_BARRIER]: Use lwsync.
809         [READ_MEMORY_BARRIER]: Define.
810         [WRITE_MEMORY_BARRIER]: Define.
812 2003-09-10  Jakub Jelinek  <jakub@redhat.com>
814         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Move
815         ptr___pthread_cond_timedwait to the end of the structure to avoid
816         breaking Wine unnecessarily.
818 2003-09-08  Jakub Jelinek  <jakub@redhat.com>
820         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Remove.
822 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
824         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
825         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
826         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
827         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
828         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
829         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
830         * attr.c (__old_pthread_attr_setstacksize,
831         __old_pthread_attr_setstack): New functions.
832         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
833         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
834         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
835         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
836         * tststack.c: Include limits.h and sys/param.h.
837         (main): Set size to MAX (70 * 1024, PTHREAD_STACK_MIN).
839         * barrier.c (__pthread_barrierattr_getpshared): Always
840         return PTHREAD_PROCESS_PRIVATE.
841         (pthread_barrierattr_setpshared): Return EINVAL if pshared
842         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
844 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
846         * sysdeps/sparc/tls.h (TLS_TCB_SIZE): If in ld.so and NPTL struct
847         pthread is bigger than struct _pthread_descr_struct, use NPTL struct
848         pthread size.
850 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
852         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
853         (DL_SYSINFO_IMPLEMENTATION): Add CFI and make sure the code ends
854         up in .text.
856         * barrier.c (pthread_barrierattr_setpshared): We don't handle
857         inter-process barriers.
859 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
861         * Makefile (tests): Add tst-tls1.
862         (module-names): Add tst-tls1mod{,a,b,c,d,e,f}.
863         ($(objpfx)tst-tls1mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
864         ($(objpfx)tst-tls1): New.
865         ($(objpfx)tst-tls2.out): Likewise.
866         (tests): Depend on $(objpfx)tst-tls2.out.
867         * tst-tls1.c: New test.
868         * tst-tls1.h: New.
869         * tst-tls1mod.c: New.
870         * tst-tls1moda.c: New.
871         * tst-tls1modb.c: New.
872         * tst-tls1modc.c: New.
873         * tst-tls1modd.c: New.
874         * tst-tls1mode.c: New.
875         * tst-tls1modf.c: New.
876         * tst-tls2.sh: New test.
878         * internals.h (__pthread_cond_timedwait): New prototype.
879         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
880         ptr___pthread_cond_timedwait.
881         * pthread.c (__pthread_functions): Initialize them.
882         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
883         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
884         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
885         pthread_cond_timedwait@@GLIBC_2.3.2.
887 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
889         * sysdeps/pthread/pthread.h: Don't mark pthread_exit,
890         pthread_join, pthread_cond_wait, and pthread_cond_timedwait with
891         __THROW to match NPTL.
893 2003-08-13  Ulrich Drepper  <drepper@redhat.com>
895         * sysdeps/pthread/Makefile [subdir=rt] (CPPFLAGS): Add
896         -DBROKEN_THREAD_SIGNALS.
898 2003-08-11  Steven Munroe  <sjmunroe@us.ibm.com>
900         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
901         Correct spelling of per thread resolver state.
903 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
905         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
906         (__rtld_lock_default_lock_recursive,
907         __rtld_lock_default_unlock_recursive): Define.
908         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
909         __rtld_lock_unlock_recursive): Define using
910         GL(_dl_rtld_*lock_recursive).
911         * pthread.c (pthread_initialize): Initialize _dl_rtld_lock_recursive
912         and _dl_rtld_unlock_recursive.  Lock GL(_dl_load_lock) the same
913         number of times as GL(_dl_load_lock) using non-mt implementation was
914         nested.
916 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
918         * sysdeps/pthread/bits/typesizes.h (__SSIZE_T_TYPE): Define.
919         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__SSIZE_T_TYPE):
920         Likewise.
921         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h (__SSIZE_T_TYPE):
922         Likewise.
923         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New file.
925         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
926         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
927         PTHREAD_STACK_MIN in comments.
929         * sysdeps/alpha/pt-machine.h (PT_EI): Add
930         __attribute__((always_inline)).
931         * sysdeps/arm/pt-machine.h (PT_EI): Likewise.
932         * sysdeps/cris/pt-machine.h (PT_EI): Likewise.
933         * sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
934         * sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
935         * sysdeps/i386/pt-machine.h (PT_EI): Likewise.
936         * sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
937         * sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
938         * sysdeps/mips/pt-machine.h (PT_EI): Likewise.
939         * sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
940         * sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
941         * sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
942         * sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
943         * sysdeps/sh/pt-machine.h (PT_EI): Likewise.
944         * sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
945         * sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
946         * sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
947         * spinlock.h (__pthread_set_own_extricate_if): Likewise.
948         * sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
949         (__thread_self).
950         * Examples/ex13.c (main): Change res type to void * to avoid
951         warnings.
952         * tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
954 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
956         * pthread.c (init_one_static_tls, __pthread_init_static_tls): New
957         functions.
958         (pthread_initialize): Initialize GL(dl_init_static_tls).
960 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
962         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
963         before __timer_dealloc.
964         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
965         Don't call list_unlink.
967 2003-07-29  Roland McGrath  <roland@redhat.com>
969         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
971 2003-07-25  Roland McGrath  <roland@redhat.com>
973         * manager.c (pthread_start_thread): Fix typo in last change.
975 2003-07-14  Guido Guenther  <agx@sigxcpu.org>
977         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Add IS_IN_librt,
978         use L() for local labels.
980 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
982         * sysdeps/alpha/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Change to 0.
983         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Alignment of struct
984         _pthread_descr_struct.
985         (TLS_PRE_TCB_SIZE): Add sizeof (tcbhead_t) and pad to align.
986         If in ld.so and NPTL struct pthread is bigger than struct
987         _pthread_descr_struct, use NPTL struct pthread size.
988         (TLS_TCB_OFFSET): Define.
989         (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV,
990         THREAD_SELF, INIT_THREAD_SELF): Changed to match NPTL tls.h
991         definitions.
992         * sysdeps/i386/tls.h (TLS_TCB_SIZE): If in ld.so and NPTL struct
993         pthread is bigger than struct _pthread_descr_struct, use NPTL struct
994         pthread size.
995         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Likewise.
996         * sysdeps/powerpc/tls.h (TLS_PRE_TCB_SIZE): Likewise.
997         * sysdeps/s390/tls.h (TLS_TCB_SIZE): Likewise.
998         * sysdeps/sh/tls.h (TLS_PRE_TCB_SIZE): Likewise.
999         * sysdeps/x86_64/tls.h (TLS_TCB_SIZE): Likewise.
1000         * sysdeps/pthread/Makefile (gen-as-const-headers): Add
1001         nptl-struct-pthread.sym if nptl tree is present.
1002         (before-compile): Add $(common-objpfx)nptl-struct-pthread.h
1003         if nptl tree is not present.
1004         (common-generated): Add nptl-struct-pthread.h.
1005         ($(common-objpfx)nptl-struct-pthread.h): New rule.
1006         * sysdeps/pthread/nptl-struct-pthread.sym: New file.
1008 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
1010         * descr.h (struct _pthread_descr_struct): Provide p_res member
1011         even if USE_TLS && HAVE___THREAD.
1012         * sysdeps/pthread/res-state.c (__res_state): Return __resp
1013         if USE___THREAD.
1014         * manager.c: Include resolv.h.
1015         (pthread_start_thread): Initialize __resp.
1016         * libc-tls-loc.c (__res_state): Return __resp.
1017         * Makefile (tests): Add tst-_res1.
1018         (modules-names, extra-objs, test-extras, test-modules): Add support
1019         for test modules.
1020         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
1021         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
1022         -lpthread.
1023         * tst-_res1.c: New test.
1024         * tst-_res1mod1.c: New test.
1025         * tst-_res1mod2.c: New test.
1027 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
1029         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_push and
1030         __libc_cleanup_pop.
1032         * tst-cancel-wrappers.sh: lseek and llseek are no cancellation points.
1034 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
1036         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Fix typo
1037         in test for compilation in libc.
1039 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
1041         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
1042         different symbol for the cancellation syscall wrapper and
1043         non-cancellation syscall wrapper.
1044         (PSEUDO_END): Define.
1046 2003-07-05  Richard Henderson  <rth@redhat.com>
1048         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
1050 2003-06-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1052         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Support cancellation
1053         in librt.
1055 2003-06-21  Andreas Schwab  <schwab@suse.de>
1057         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Support cancellation
1058         in librt.
1060 2003-06-20  Richard Henderson  <rth@redhat.com>
1062         * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines):
1063         Remove ptw-osf_sigprocmask.
1065 2003-06-18  Jakub Jelinek  <jakub@redhat.com>
1067         * internals.h (__librt_multiple_threads, __librt_enable_asynccancel,
1068         __librt_disable_asynccancel): Declare.
1069         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, LIBC_CANCEL_HANDLED): Define
1070         for IS_IN_librt.
1071         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Support cancellation
1072         in librt.
1073         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1074         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1075         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1076         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1077         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1078         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1079         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1080         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1081         * sysdeps/x86_64/tcb-offsets.sym: New file.
1082         * sysdeps/x86_64/Makefile: New file.
1083         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
1084         * Versions (libc): Export __librt_enable_asynccancel,
1085         __librt_disable_asynccancel and __librt_multiple_threads as
1086         GLIBC_PRIVATE.
1087         * libc-cancellation.c (__librt_multiple_threads,
1088         __librt_enable_asynccancel, __librt_disable_asynccancel): New aliases.
1090 2003-06-12  Steven Munroe  <sjmunroe@us.ibm.com>
1092         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1093         (SINGLE_THREAD_P): Replace @ got notation with @toc.
1095 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
1097         * sysdeps/powerpc/pspinlock.c (__pthread_spin_init): Fix
1098         initializer [PR libc/5052].
1100 2003-06-09  Andreas Schwab  <schwab@suse.de>
1102         * Makefile: Move inclusion of ../Rules down after extra-objs is
1103         fully known.
1105 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
1107         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New sequences for
1108         5+ arg syscalls only needed for PIC.
1109         Patch by Ralph Siemsen <ralphs@netwinder.org>.
1111 2003-06-05  Richard Henderson  <rth@redhat.com>
1113         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1114         and require CFI assembler directives.
1115         * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise.
1117 2003-05-30  Andreas Jaeger  <aj@suse.de>
1119         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
1120         (SAVESTK_0): Add CFI directives.
1121         (SAVESTK_3): Likewise.
1122         (SAVESTK_5): Likewise.
1123         (RESTSTK_0): Likewise.
1124         (RESTSTK_3): Likewise.
1125         (RESTSTK_5): Likewise.
1127 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
1129         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add \n to error
1130         messages.
1132 2003-05-04  Roland McGrath  <roland@redhat.com>
1134         * Makefile ($(objpfx)../libc.so): New target.
1136 2003-04-26  Ulrich Drepper  <drepper@redhat.com>
1138         * pthread.c (__pthread_initialize_manager): Remove one last
1139         p_multiple_threads call.
1141 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
1143         * pthread.c (__pthread_initialize_manager): Subtract
1144         TLS_PRE_TCB_SIZE bytes from tcbp to get to descr.
1145         * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE
1146         instead of sizeof (pthread_descr).
1147         (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr).
1148         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
1149         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
1150         pthread_descr.
1151         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
1152         to TLS_TCB_ALIGN.
1153         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
1154         tcbp.
1155         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
1156         unneccessarily.
1157         (NO_TLS_OFFSET): Define.
1159 2003-04-22  Roland McGrath  <roland@redhat.com>
1161         * Makeconfig (shared-thread-library): Reverse link order to work
1162         around linker bug.
1164 2003-04-20  Ulrich Drepper  <drepper@redhat.com>
1166         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Make sure the
1167         compiler knows we use the ldt_entry variable and that the syscall
1168         modifies the memory.
1170         * internals.h: Split pthread_functions definition into...
1171         * sysdeps/pthread/pthread-functions.h: ...new file.
1173         * sysdeps/i386/useldt.h: Include <sysdep.h>.
1175 2003-04-13  Jakub Jelinek  <jakub@redhat.com>
1177         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Rename macros to
1178         match changes in NPTL sysdep-cancel.h.
1180 2003-04-11  Roland McGrath  <roland@redhat.com>
1182         * Makefile (multidir): Don't set the variable here with $(shell ...).
1183         ($(objpfx)multidir.mk): New target, generated makefile; include that.
1184         (generated): Append it.
1186 2003-04-10  Jakub Jelinek  <jakub@redhat.com>
1188         * Makefile (multidir, crti-objs, crtn-objs): New variables.
1189         (generated-dirs): Add pathname component of multidir.
1190         (omit-deps, extra-objs): Include $(multidir)/crt? as well.
1191         ($(objpfx)libpthread.so): Depend on $(multidir)/crt?.o as well.
1192         ($(objpfx)$(multidir), $(objpfx)$(multidir)/crti.o,
1193         $(objpfx)$(multidir)/crtn.o): New.
1194         * sysdeps/unix/sysv/linux/sparc/Makefile: Removed.
1195         * sysdeps/unix/sysv/linux/x86_64/Makefile (LDFLAGS-pthread.so,
1196         before-compile, generated): Don't generate and use specs.
1197         ($(objpfx)specs): Remove.
1199 2003-04-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1201         * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints.
1203 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
1205         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Add
1206         missing ; after ENTRY use [PR libc/4997].
1208 2003-04-03  Jakub Jelinek  <jakub@redhat.com>
1210         * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel
1211         in case the parent blocked it.
1213 2003-04-02  Jakub Jelinek  <jakub@redhat.com>
1215         * Makefile (libpthread-routines): Add pthread_atfork.
1216         (libpthread-static-only-routines): Add pthread_atfork.
1218 2003-04-01  Jakub Jelinek  <jakub@redhat.com>
1220         * pthread.c (__pthread_wait_for_restart_signal): Use
1221         __pthread_sigsuspend instead of sigsuspend.
1222         * internals.h (__pthread_sigsuspend): New prototype.
1223         * Makefile (libpthread-routines): Add pt-sigsuspend.
1224         (tests): Add tst-cancel7.
1225         * sysdeps/unix/sysv/linux/pt-sigsuspend.c: New file.
1226         * sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S: New file.
1227         * sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c: New file.
1228         * sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c: New file.
1229         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c: New file.
1230         * sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c: New file.
1231         * tst-cancel7.c: New test.
1233 2003-03-31  Alexandre Oliva  <aoliva@redhat.com>
1235         * alloca_cutoff.c: Include internals.h.
1236         * sysdeps/pthread/errno-loc.c: Include linuxthreads/internals.h.
1237         * sysdeps/pthread/herrno-loc.c: Likewise.
1238         * sysdeps/pthread/res-state.c: Likewise.
1240 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
1242         * sysdeps/pthread/bits/typesizes.h: New file.
1243         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
1244         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
1246 2003-03-24  Daniel Jacobowitz  <drow@mvista.com>
1248         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1249         (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
1251 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
1253         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
1255 2003-03-21  Daniel Jacobowitz  <drow@mvista.com>
1257         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1258         (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
1260 2003-03-21  Jakub Jelinek  <jakub@redhat.com>
1262         * sysdeps/i386/tls.h [__ASSUME_SET_THREAD_AREA_SYSCALL]
1263         (TLS_SETUP_GS_SEGMENT): Fix a typo.
1265 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
1267         * sysdeps/pthread/Makefile: Fix cut&paste error.
1269 2003-03-18  Roland McGrath  <roland@redhat.com>
1271         * Versions (libpthread: GLIBC_2.2): Remove
1272         pthread_barrierattr_getpshared, never really existed.
1273         (libpthread: GLIBC_2.0): Move __pthread_initialize to ...
1274         (libpthread: GLIBC_PRIVATE): ... here.
1276 2003-03-14  Jakub Jelinek  <jakub@redhat.com>
1278         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1279         * sysdeps/unix/sysv/linux/sparc/Makefile ($(objpfx)specs): Use full
1280         path for crt[in].o.
1282 2003-03-14  Alexandre Oliva  <aoliva@redhat.com>
1284         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't .set
1285         mips2 on new abi.
1286         * sysdeps/mips/pt-machine.h (__compare_and_swap): Likewise.
1287         Handle 64-bit longs on n64.
1289 2003-03-07  Jakub Jelinek  <jakub@redhat.com>
1291         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock,
1292         __pthread_spin_trylock): Rewritten.
1294 2003-03-06  Ulrich Drepper  <drepper@redhat.com>
1296         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1297         recent kernels.
1299 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
1301         * sysdeps/pthread/timer_create.c (timer_create): Return correct
1302         error for CPU clocks.
1304         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1305         _POSIX_MONOTONIC_CLOCK.
1306         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1308 2003-03-01  Roland McGrath  <roland@redhat.com>
1310         * sysdeps/powerpc/powerpc64/pt-machine.h
1311         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1312         New macros.
1313         * sysdeps/powerpc/tls.h: Don't define those here.
1315         * sysdeps/powerpc/tls.h [! USE_TLS && !__powerpc64__]: Define
1316         tcbhead_t with multiple_threads member.
1317         [USE_TLS] (tcbhead_t): Define minimal one-word version.
1318         [USE_TLS && !__powerpc64__] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1319         * sysdeps/powerpc/tcb-offsets.sym [USE_TLS]: Use tls.h macros to
1320         derive thread register offset of p_multiple_threads member.
1322         * descr.h (struct _pthread_descr_struct) [!USE_TLS || !TLS_DTV_AT_TP]:
1323         Conditionalize p_header member on this.
1324         [TLS_MULTIPLE_THREADS_IN_TCB]: Add p_multiple_threads alternatively.
1325         * sysdeps/ia64/tls.h [USE_TLS] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1326         * sysdeps/sh/tls.h: Likewise.
1327         * sysdeps/ia64/tcb-offsets.sym [USE_TLS]: Use p_multiple_threads.
1328         * sysdeps/sh/tcb-offsets.sym: Likewise.
1329         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1330         (SINGLE_THREAD_P): Likewise.
1331         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1332         (SINGLE_THREAD_P): Likewise.
1333         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1334         (SINGLE_THREAD_P): Likewise.
1335         * pthread.c (__pthread_initialize_manager): Likewise.
1336         * manager.c (pthread_handle_create): Likewise.
1338         * sysdeps/powerpc/tls.h [HAVE_TLS_SUPPORT]: Define USE_TLS and all
1339         related macros.
1341 2003-01-31  Steven Munroe  <sjmunroe@us.ibm.com>
1343         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S [SHARED]:
1344         Conditionalize .toc section magic on this.
1346 2003-02-21  Roland McGrath  <roland@redhat.com>
1348         * cancel.c (__pthread_perform_cleanup): Call __libc_thread_freeres
1349         instead of __rpc_thread_destroy.
1351 2003-02-21  Jakub Jelinek  <jakub@redhat.com>
1353         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Call
1354         __fork instead of branching to it if BROKEN_SPARC_WDISP22.
1355         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1356         Fix typo.
1357         * sysdeps/unix/sysv/linux/sparc/Makefile (specs): Add ./ prefix
1358         to crti.o and crtn.o.
1359         * sysdeps/unix/sysv/linux/x86_64/Makefile (specs): Likewise.
1361 2003-02-21  Roland McGrath  <roland@redhat.com>
1363         * Makefile (install-lib-ldscripts): New variable.
1365 2003-02-20  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1367         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short
1368         interprocedure branches.
1370 2003-02-19  Ulrich Drepper  <drepper@redhat.com>
1372         * specific.c (pthread_key_delete_helper): Don't use GETMEM, we
1373         need the target thread's lock.
1375 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
1377         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1378         and LOGIN_NAME_MAX.
1380 2003-02-17  Kevin B. Hendricks  <kevin.hendricks@sympatico.ca>
1381             Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1383         * sysdeps/powerpc/Makefile: Handle tcb-offsets.sym.
1384         * sysdeps/powerpc/tcb-offsets.sym: New file.
1385         * sysdeps/powerpc/tls.h: New file.
1386         * sysdeps/powerpc/powerpc32/pt-machine.h (FLOATING_STACKS): Define.
1387         (ARCH_STACK_MAX_SIZE): Define.
1388         (THREAD_SELF): Define.
1389         (INIT_THREAD_SELF): Define.
1390         (THREAD_GETMEM): Define.
1391         (THREAD_GETMEM_NC): Define.
1392         (THREAD_SETMEM): Define.
1393         (THREAD_SETMEM_NC): Define.
1394         (__thread_self): Declare.
1395         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Adjust
1396         for thread register.
1398 2003-02-14  Steven Munroe  <sjmunroe@us.ibm.com>
1400         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1401         Check pthread_create existance, not __pthread_fork.
1403 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
1405         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1407 2003-02-10  Jakub Jelinek  <jakub@redhat.com>
1409         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Check
1410         pthread_create existance, not __pthread_fork.
1411         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1412         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1413         * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): Likewise.
1414         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1415         Likewise.
1416         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1417         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1418         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Likewise.
1419         Add .weak pthread_create.
1420         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Fix a typo.
1421         Check pthread_create existance, not __pthread_fork.
1422         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1423         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Branch to
1424         __fork whenever libpthread.so is loaded.
1426 2003-02-09  Andreas Jaeger  <aj@suse.de>
1428         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h:
1429         Rework: %r9 is destroyed by functions so don't use it as
1430         temporary, align stack correctly, fix parameter for CDISABLE.
1432 2003-02-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1434         * sysdeps/sh/Makefile: New file.
1435         * sysdeps/sh/tcb-offsets.sym: Likewise.
1436         * sysdeps/sh/tls.h: Don't include sysdep.h. Move include
1437         of linuxthreads/descr.h after the definition of THREAD_SELF.
1438         (tcbhead_t): Use IA64 type tcbhead_t for TLS case.
1439         (TLS_TCB_SIZE): Set size of tcbhead_t.
1440         (TLS_PRE_TCB_SIZE): Define.
1441         (INSTALL_NEW_DTV): Set dtv of tcbhead_t structure instead of
1442         a member of thread structure.
1443         (THREAD_DTV): Likewise.
1444         (TLS_INIT_TP_EXPENSIVE): Remove.
1445         (TLS_INIT_TP): Set gbr register only.
1446         (THREAD_SELF): New.
1447         (INIT_THREAD_SELF): Likewise.
1448         (NONTLS_INIT_TP): New.
1449         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (__fpscr_values):
1450         Remove.
1451         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Add
1452         SYSCALL_INST_PAD macro after DO_CALL.
1453         (SINGLE_THREAD_P): Fix non-PIC and TLS case so to read the
1454         correct variable.
1455         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Branch to __fork
1456         whenever libpthread.so is loaded.
1458 2003-02-08  Andreas Schwab  <schwab@suse.de>
1460         * sysdeps/unix/sysv/linux/m68k/vfork.S: Branch to __fork whenever
1461         libpthread.so is loaded.
1463 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
1465         * sysdeps/unix/sysv/linux/i386/vfork.S: Make sure
1466         __ASSUME_VFORK_SYSCALL is not defined if the kernel headers have
1467         no __NR_vfork definition.
1469 2003-02-07  Jakub Jelinek  <jakub@redhat.com>
1471         * tst-popen2.c: New test.
1472         * Makefile (tests): Add tst-popen2.
1473         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Branch to __fork
1474         whenever libpthread.so is loaded.
1475         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1476         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1477         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1478         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1479         Likewise.
1480         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1481         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1482         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1484 2003-02-05  Ulrich Drepper  <drepper@redhat.com>
1486         * sysdeps/pthread/bits/libc-lock.h (__libc_once): Set control
1487         variable for non-libpthread case to the same value the
1488         pthread_once function would use.
1490 2003-02-03  Jakub Jelinek  <jakub@redhat.com>
1492         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
1493         BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
1495 2003-02-04  Andreas Jaeger  <aj@suse.de>
1497         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
1498         multi-line strings.
1500 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1502         * sysdeps/s390/tls.h (TLS_INIT_TP): Return NULL, not 0.
1504 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1506         * sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1507         THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
1508         variable.
1509         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1510         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1511         * sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1512         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1513         * sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1514         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1515         * sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1516         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1517         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1518         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1519         * sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1520         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1522 2003-01-27  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1524         * sysdeps/s390/s390-32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1525         Define TLS versions.
1526         * sysdeps/s390/s390-64/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1527         Likewise.
1528         * sysdeps/s390/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1529         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1530         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1531         Define.
1532         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Use
1533         branch with 32 bit offset.
1534         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
1536 2003-01-24  Jakub Jelinek  <jakub@redhat.com>
1538         * sysdeps/sparc/sparc32/pt-machine.h (__thread_self): Change to %g7,
1539         as required by TLS ABI.
1540         * sysdeps/sparc/sparc64/pt-machine.h (__thread_self): Likewise.
1541         * sysdeps/sparc/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1542         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1543         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1544         Define.
1545         [HAVE_TLS_SUPPORT]: Include descr.h and sysdep.h.
1546         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Use %g7
1547         instead of %g6 for thread pointer.
1548         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
1549         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1550         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
1552 2003-01-25  Guido Guenther  <agx@sigxcpu.org>
1554         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1555         * sysdeps/unix/sysv/linux/mips/Makefile: New file.
1557 2003-01-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1559         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative
1560         reference to __fork.
1562 2003-01-17  Richard Henderson  <rth@redhat.com>
1564         * sysdeps/alpha/tls.h (tcbhead_t): Clarify second member.
1565         (TLS_TCB_SIZE, TLS_TCB_ALIGN): Set for tcbhead_t.
1566         (TLS_PRE_TCB_SIZE): New.
1567         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Update for
1568         new ia64-style thread pointer layout.
1569         (THREAD_GETMEM, THREAD_GETMEM_NC): New.
1570         (THREAD_SETMEM, THREAD_SETMEM_NC): New.
1571         * sysdeps/unix/sysv/linux/alpha/vfork.S: Don't tail-call to __fork
1572         if !SHARED.
1574 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1576         * sysdeps/ia64/tls.h (tcbhead_t): Use the TLS ABI required layout
1577         if USE_TLS only.
1578         (NONTLS_INIT_TP): Revert last change.
1579         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define to
1580         offsetof (tcbhead_t, multiple_threads) if USE_TLS not defined.
1582 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1584         * pthread.c (_pthread_initialize_minimal): Use
1585         GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
1586         been already initialized.
1588 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1590         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
1591         if not SHARED.
1593 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1595         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
1596         __libc_lock_init_recursive): Initialize fields directly.
1598 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1600         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Allow
1601         __fork to be far away from __vfork ifndef SHARED.
1602         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1603         Likewise.
1604         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1605         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1606         Add a missing instruction.
1607         * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Conditionally
1608         branch to __fork even if __NR_vfork is not defined.
1610 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
1612         * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
1613         as well.
1615 2003-01-14  Steven Munroe  <sjmunroe@us.ibm.com>
1617         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1619 2003-01-14  Jakub Jelinek  <jakub@redhat.com>
1621         * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
1623 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1625         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
1626         unterminated string literals.
1627         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
1629 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1631         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1632         (PSEUDO): Code reordering.  Move CENABLE and CDISABLE literals from
1633         PSEUDO_END to PSEUDO.
1634         (PSEUDO_END): Remove.
1635         (SINGLE_THREAD_P): Save an instruction.
1636         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
1637         parameter to SINGLE_THREAD_P call.
1638         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1639         Code reordering.
1641 2003-01-10  Andreas Schwab  <schwab@suse.de>
1643         * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
1645 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1647         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
1648         backchain in pseudo_cancel.  Minor code improvements.
1649         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1650         Likewise.
1652 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1654         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1655         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1657 2002-01-12  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1659         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1661 2002-01-09  Richard Henderson  <rth@redhat.com>
1663         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
1664         ret follows pseudo, and thus avoid branch-to-branch in cancel
1665         case.  Use SYSCALL_ERROR_LABEL.
1667 2003-01-11  Philip Blundell  <philb@gnu.org>
1669         * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
1670         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
1671         Correctly unstack lr.
1672         (UNDOARGS_5): Fix ordering of pushes and pops.
1673         (SINGLE_THREAD_P_PIC): New.
1674         (SINGLE_THREAD_P_INT): New.
1675         (SINGLE_THREAD_P): Implement in terms of above.  Restore lr if it
1676         was stacked.
1677         (PSEUDO): Use SINGLE_THREAD_P_INT.
1679 2003-01-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1681         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1683 2003-01-11  Jakub Jelinek  <jakub@redhat.com>
1685         * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
1686         [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
1687         TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
1688         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
1689         INIT_THREAD_SELF): Define.
1690         [HAVE_TLS_SUPPORT]: Include descr.h.
1691         (NONTLS_INIT_TP): Point __thread_self at the end of dummy
1692         struct _pthread_descr_struct.
1693         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1694         THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
1695         not __thread_self.
1696         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
1697         computation.
1698         * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
1699         for TCB pointer.
1700         (__pthread_initialize_manager): Rename tcb to mgr.
1701         Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
1702         _pthread_descr) below tcbp, otherwise to tcbp.
1703         * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
1704         new_thread to be below _dl_allocate_tls ().  Adjust new_thread back
1705         before freeing.  Fix clone arguments if report_events and USE_TLS.
1706         (pthread_free): Adjust th back before freeing.
1708 2003-01-10  Steven Munroe  <sjmunroe@us.ibm.com>
1710         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
1711         * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
1712         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
1714 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1716         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1717         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1718         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1719         [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
1720         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1721         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1722         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1723         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1724         * tst-popen.c: New test.
1725         * Makefile (tests): Add tst-popen.
1727 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1729         * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
1730         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1732 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1734         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1735         PSEUDO_PREPARE_ARGS.  Fix branch condition after SINGLE_THREAD_P.
1737 2003-01-06  Philip Blundell  <philb@gnu.org>
1739         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
1741 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1743         * internals.h (LIBC_CANCEL_HANDLED): Define.
1744         * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
1745         * signals.c (LIBC_CANCEL_HANDLED): Add.
1746         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1747         * tst-cancel-wrappers.sh: Remove all exceptions.
1749         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1751 2003-01-05  Andreas Schwab  <schwab@suse.de>
1753         * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
1754         objects.
1756         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
1757         Fix for PIC.
1758         (CENABLE): Likewise.
1759         (CDISABLE): Likewise.
1761 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
1763         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1764         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
1766         * Makefile (libc.so-no-z-defs): Define to yes.
1768 2003-01-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1770         * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
1771         (tcbhead_t): Add multiple_threads member.
1772         (TLS_INIT_TP_EXPENSIVE): Define.
1773         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
1774         strings.  Remove unused code.
1775         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1777 2003-01-04  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1779         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1780         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
1782 2003-01-04  Jakub Jelinek  <jakub@redhat.com>
1784         * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
1785         even if NOT_IN_libc is defined.
1787 2003-01-05  Jakub Jelinek  <jakub@redhat.com>
1789         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1790         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1791         * sysdeps/s390/Makefile: New file.
1792         * sysdeps/s390/tcb-offsets.sym: New file.
1793         * sysdeps/s390/tls.h: New file.
1795 2003-01-03  Richard Henderson  <rth@redhat.com>
1797         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
1799 2003-01-03  Andreas Jaeger  <aj@suse.de>
1801         * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
1803 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
1805         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1807 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
1809         * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
1810         cancellation tests.
1812 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
1814         * internals.h (struct pthread_functions): Rename
1815         ptr_pthread_cond_* fields to ptr___pthread_cond_*.
1816         * pthread.c (pthread_functions): Adjust.
1817         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1818         pthread_cond_*@GLIBC_2.0 compatibility symbols.
1819         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1820         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1821         and pthread_cond_wait.
1823         * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
1824         type.
1825         (pthread_cond_t): Add __align member, shorten __padding.
1826         * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
1827         __padding and __align too.
1829         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
1830         __builtin_expect.
1831         * sysdeps/pthread/sigaction.c: New file.
1832         * sysdeps/unix/sysv/linux/raise.c: New file.
1833         * sysdeps/unix/sysv/linux/sigwait.c: New file.
1834         * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
1835         weak_extern with #ifndef SHARED.
1836         * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
1837         Likewise.
1838         * signals.c (__sigaction): Renamed to...
1839         (__pthread_sigaction): ... this.
1840         (__sigaction): New strong alias, #ifdef SHARED only.
1841         (sigaction): Protect with #ifdef SHARED.
1842         (sigwait): Renamed to...
1843         (__pthread_sigwait): ... this.
1844         (sigwait): New strong alias, #ifdef SHARED only.
1845         (raise): Renamed to...
1846         (__pthread_raise): ... this.
1847         (raise): New strong alias, #ifdef SHARED only.
1848         * internals.h (__pthread_sigaction, __pthread_sigwait,
1849         __pthread_raise): New prototypes.
1850         (struct pthread_functions): Add ptr_pthread_sigaction,
1851         ptr_pthread_sigwait, ptr_pthread_raise.
1852         * pthread.c (pthread_functions): Renamed to...
1853         (__pthread_functions): ... this.  No longer static, no longer
1854         SHARED only.  Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
1855         and ptr_pthread_raise.
1856         [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
1857         * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
1858         * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
1859         * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
1861         * Makefile (tests, tests-static): Add tst-cancel-static.
1862         * tst-cancel-static.c: New test.
1864 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
1866         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1868 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
1870         * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
1871         * condvar.c: Add symbol versioning.  The compatibility versions
1872         are the same as the change in the interface does not effect this
1873         implementation.
1874         * Versions [libpthread]: Add definitions for new pthread_cond_*
1875         interfaces for version GLIBC_2.3.2.
1877 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
1879         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1880         __register_atfork.
1881         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1882         for __register_atfork.
1884 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
1886         * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
1887         ASSEMBLER test macro.
1888         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
1889         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1890         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
1891         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1892         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1893         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1895         * sysdeps/pthread/errno-loc.c (__errno_location): Add
1896         libc_hidden_def.
1897         * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
1898         * sysdeps/pthread/res-state.c (__res_state): Likewise.
1899         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1900         __libc_current_sigrtmax): Likewise.
1901         * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1902         __libc_internal_tsd_set, __libc_internal_tsd_address,
1903         __libc_alloca_cutoff.
1904         [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1905         __libc_internal_tsd_set, __libc_internal_tsd_address.
1907         * sysdeps/pthread/list.h: Remove assert.h include.
1908         * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
1910         * sysdeps/pthread/list.h: New file.
1911         * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
1912         * sysdeps/unix/sysv/linux/fork.c: New file.
1913         * sysdeps/unix/sysv/linux/fork.h: New file.
1914         * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
1915         * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
1916         * sysdeps/unix/sysv/linux/register-atfork.c: New file.
1917         * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
1918         * sysdeps/unix/sysv/linux/Makefile: New file.
1919         * sysdeps/unix/sysv/linux/Versions: New file.
1920         * ptlongjmp.c (pthread_cleanup_upto): Rename to...
1921         (__pthread_cleanup_upto): ...this. Add targetframe argument,
1922         use it instead of currentframe.  No longer static.
1923         (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
1924         * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
1925         (struct pthread_functions): Add ptr_pthread_fork,
1926         ptr_pthread_cleanup_upto.
1927         * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
1928         ptr_pthread_cleanup_upto.
1929         * ptfork.c: Include fork.h.
1930         (struct handler_list, struct handler_list_block): Remove.
1931         (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
1932         pthread_atfork_child): Remove.
1933         (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
1934         (__pthread_fork): New function.
1935         (__fork, __vfork): Call __libc_fork.
1936         * Makefile (libpthread-routines): Add old_pthread_atfork.
1937         (libpthread-nonshared): Add pthread_atfork.
1938         (others): Depend on $(objpfx)libpthread_nonshared.a.
1939         ($(objpfx)libpthread_nonshared.a): New rule.
1940         (install): Depend on $(inst_libdir)/libpthread.so.
1941         ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
1942         New rules.
1943         (tests): Depend on libpthread_nonshared.a too.
1944         * old_pthread_atfork.c: New file.
1945         * pthread_atfork.c: New file.
1946         * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
1947         too.
1949 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
1951         * forward.c: Make all functions available by default again.  It
1952         caused too much trouble.
1953         * internals.h (struct pthread_functions): Rename ptr_pthread_exit
1954         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1955         ptr___pthread_attr_init_2_*.
1956         * pthread.c (pthread_functions): Adjust.
1958 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
1960         * libc_pthread_init.c (__libc_pthread_init): Remove
1961         MULTIPLE_THREADS_OFFSET check.
1962         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1963         (SYSINFO_OFFSET): Remove.
1964         * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
1965         tcb-offsets.sym.
1966         * sysdeps/i386/tcb-offsets.sym: New file.
1967         * sysdeps/pthread/tcb-offsets.h: New file.
1968         * sysdeps/sparc/sparc32/tls.h: Removed.
1969         * sysdeps/sparc/sparc64/tls.h: Move...
1970         * sysdeps/sparc/tls.h: ...here.  Include tcb-offsets.h in assembler.
1971         * sysdeps/sparc/Makefile: New file.
1972         * sysdeps/sparc/tcb-offsets.sym: New file.
1973         * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
1974         * sysdeps/ia64/Makefile: New file.
1975         * sysdeps/ia64/tcb-offsets.sym: New file.
1976         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1977         (MULTIPLE_THREADS_OFFSET): Remove.
1978         Replace defined MULTIPLE_THREADS_OFFSET
1979         with defined FLOATING_STACKS && USE___THREAD.
1980         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1981         (MULTIPLE_THREADS_OFFSET): Remove.
1982         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1983         (MULTIPLE_THREADS_OFFSET): Remove.
1984         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1985         (MULTIPLE_THREADS_OFFSET): Remove.
1986         * pthread.c (__pthread_initialize_manager): Remove
1987         MULTIPLE_THREADS_OFFSET cbeck.
1989         * tst-cancel-wrappers.sh: Add line continuations.
1991 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
1993         * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
1994         and bits/libc-lock.h.
1995         (__libc_internal_tsd_get, __libc_internal_tsd_set,
1996         __libc_internal_tsd_address): Remove.
1997         (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
1998         __pthread_internal_tsd_set): New weak_externs.
1999         (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
2000         using __libc_maybe_call2.
2001         (__libc_tsd_key_t): Move to ...
2002         * descr.h (__libc_tsd_key_t): ...here.
2003         Remove bits/libc-tsd.h include.
2004         * sysdeps/pthread/errno-loc.c: New file.
2005         * sysdeps/pthread/herrno-loc.c: New file.
2006         * sysdeps/pthread/res-state.c: New file.
2007         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
2008         (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
2009         thread_self unconditionally.  Use LIBC_THREAD_[SG]ETMEM instead
2010         of THREAD_[SG]ETMEM.
2011         * specific.c (libc_internal_tsd_set): Renamed to...
2012         __pthread_internal_tsd_set.  Remove static.
2013         (libc_internal_tsd_get): Renamed to...
2014         __pthread_internal_tsd_get.  Remove static.
2015         (libc_internal_tsd_address): Renamed to...
2016         __pthread_internal_tsd_address.  Remove static.
2017         (__libc_internal_tsd_set, __libc_internal_tsd_get,
2018         __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
2019         * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
2020         Define.
2021         (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
2022         __pthread_internal_tsd_address): New prototypes.
2023         (struct pthread_functions): Add
2024         ptr_pthread_internal_tsd_([sg]et|address) fields.
2025         [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
2026         * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
2027         Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
2028         * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
2029         * alloca_cutoff.c: New file.
2030         * no-tsd.c: Removed.
2031         * Makefile (routines): Remove no-tsd.  Add alloca_cutoff.
2032         * pt-system.c (system): Remove cancellation handling.
2033         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
2034         cancellation routines.
2036         * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
2037         (tcbhead_t): Add sysinfo field.
2038         (SYSINFO_OFFSET, INIT_SYSINFO): Define.
2039         (TLS_INIT_TP): Use INIT_SYSINFO.
2040         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
2041         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
2042         (MULTIPLE_THREADS_OFFSET): Adjust.
2043         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
2044         (MULTIPLE_THREADS_OFFSET): Likewise.
2045         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2046         (MULTIPLE_THREADS_OFFSET): Likewise.
2047         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2048         (MULTIPLE_THREADS_OFFSET): Likewise.
2049         * descr.h: Include stdint.h.
2050         (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
2052 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
2054         * libc_pthread_init.c: Include stdlib.h.
2055         * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
2056         (TLS_INIT_TP_EXPENSIVE): Define.
2057         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
2058         __libc_maybe_call2): In _LIBC check SHARED define.
2059         * sysdeps/ia64/tls.h: New file.
2060         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
2061         * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
2062         * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
2063         * sysdeps/sparc/sparc32/tls.h: New file.
2064         * sysdeps/sparc/sparc64/tls.h: New file.
2065         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
2066         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
2067         * Makefile (tests): Add tst-cancel[1-6].
2068         (tests-reverse): Add tst-cancel5.
2069         Link libc.so before libpthread.so for tests-reverse.
2070         * tst-cancel1.c: New file.
2071         * tst-cancel2.c: New file.
2072         * tst-cancel3.c: New file.
2073         * tst-cancel4.c: New file.
2074         * tst-cancel5.c: New file.
2075         * tst-cancel6.c: New file.
2077 2002-12-27  Andreas Schwab  <schwab@suse.de>
2079         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
2081 2002-12-22  Roland McGrath  <roland@redhat.com>
2083         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
2085 2002-12-21  Ulrich Drepper  <drepper@redhat.com>
2087         * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
2088         Reported by Art Hass <ahaas@airmail.net>.
2090 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
2092         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
2093         Use return 0 as 6th argument to FORWARD4.
2095 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
2097         * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
2098         define if __ASSUME_LDT_WORKS > 0.
2099         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
2100         struct member access if !FLOATING_STACKS.
2101         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
2103 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
2105         * internals.h (__pthread_thread_self): New prototype.
2106         (struct pthread_functions): Add ptr_pthread_thread_self field.
2107         * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
2108         (__pthread_thread_self): New function.
2109         * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
2110         (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
2111         use thread_self() directly if not FLOATING_STACKS.
2113 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
2115         * sysdeps/x86_64/pt-machine.h: Guard most of the header
2116         with #ifndef __ASSEMBLER__.
2117         * pthread.c (pthread_functions): Use SHLIB_COMPAT around
2118         pthread_attr_init_2_0 use.
2120 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
2122         * wrapsyscall.c: Removed.
2123         * weaks.c: Removed.
2124         * Makefile (distribute): Add tst-cancel-wrappers.sh.
2125         (routines): Remove weaks.  Add forward,
2126         libc_pthread_init, libc-cancellation.
2127         (shared-only-routines): Remove weaks.  Add forward.
2128         (libpthread-routines): Remove wrapsyscall.
2129         Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
2130         ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
2131         ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
2132         ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
2133         ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
2134         ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
2135         (libpthread-shared-only-routines): Add pt-allocrtsig.
2136         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
2137         ($(objpfx)tst-cancel-wrappers.out): New rule.
2138         * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
2139         if in libc.
2140         (__libc_maybe_call): In libpthread.* don't check for existance
2141         of the function.
2142         (__libc_maybe_call2): Define.
2143         (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
2144         __libc_lock_trylock, __libc_lock_unlock): Use it.
2145         * sysdeps/pthread/flockfile.c: New file.
2146         * sysdeps/pthread/ftrylockfile.c: New file.
2147         * sysdeps/pthread/funlockfile.c: New file.
2148         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
2149         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2150         * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
2151         * libc-cancellation.c: New file.
2152         * forward.c: New file.
2153         * libc_pthread_init.c: New file.
2154         * pt-system.c: New file.
2155         * pthread.c: Remove locale.h.
2156         (__pthread_manager_thread): Initialize multiple_threads.
2157         (__pthread_multiple_threads): Declare.
2158         (pthread_functions): New variable.
2159         (__pthread_initialize_minimal): Remove __uselocale call.
2160         Call __libc_pthread_init.
2161         (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
2162         initial thread's multiple_threads and __libc_multiple_threads.
2163         Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
2164         multiple_threads.
2165         (pthread_setschedparam, pthread_getschedparam): Rename to __
2166         prefixed variants.  Add strong_alias.
2167         (current_rtmin, current_rtmax, __libc_current_sigrtmin,
2168         __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
2169         (init_rtsigs): Use __libc_current_sigrtmin_private.
2170         (pthread_initialize): Only call init_rtsigs if
2171         !__ASSUME_REALTIME_SIGNALS.
2172         (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
2173         * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
2174         __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
2175         __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
2176         __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
2177         __pthread_attr_getinheritsched, __pthread_attr_setscope,
2178         __pthread_attr_getscope, __pthread_cond_init,
2179         __pthread_cond_destroy, __pthread_cond_wait,
2180         __pthread_cond_signal, __pthread_cond_broadcast,
2181         __pthread_condattr_init, __pthread_condattr_destroy,
2182         __pthread_equal, __pthread_getschedparam,
2183         __pthread_setschedparam, __pthread_setcancelstate,
2184         __pthread_setcanceltype, __pthread_enable_asynccancel,
2185         __libc_enable_asynccancel, __libc_pthread_init): New prototype.
2186         (__pthread_mutex_init, __pthread_mutex_destroy,
2187         __pthread_mutex_lock, __pthread_mutex_unlock,
2188         __pthread_mutex_trylock): Likewise.
2189         Add hidden_proto.
2190         (struct pthread_functions): New type.
2191         (__libc_pthread_functions): New variable.
2192         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
2193         * descr.h (struct _pthread_descr_struct): Add
2194         p_header.data.multiple_threads field.
2195         * manager.c (pthread_handle_create): Initialize multiple_threads.
2196         * cancel.c (__pthread_enable_asynccancel,
2197         __pthread_disable_asynccancel): New functions.
2198         (__pthread_provide_wrappers): Remove.
2199         (pthread_setcancelstate, pthread_setcanceltype): Rename to __
2200         prefixed variants.  Add strong_alias.
2201         * condvar.c (pthread_cond_init, pthread_cond_destroy,
2202         pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
2203         pthread_condattr_init, pthread_condattr_destroy): Likewise.
2204         * join.c (pthread_exit): Likewise.
2205         * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
2206         pthread_attr_getdetachstate, pthread_attr_setschedparam,
2207         pthread_attr_getschedparam, pthread_attr_setschedpolicy,
2208         pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
2209         pthread_attr_getinheritsched, pthread_attr_setscope,
2210         pthread_attr_getscope): Likewise.
2211         * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
2212         __pthread_mutex_lock, __pthread_mutex_unlock,
2213         __pthread_mutex_trylock): Add hidden_def.
2214         * Versions (libc): Add __libc_pthread_init,
2215         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
2216         __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
2217         * lockfile.c: Remove some USE_IN_LIBIO guards.
2218         (__pthread_provide_lockfile): Remove.
2219         * pt-allocrtsig.c: New file.
2220         * tst-cancel-wrappers.sh: New test.
2222 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
2224         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
2225         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
2226         * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
2227         sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
2229 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
2231         * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
2232         weak.  There is no reason for that.
2233         (CANCELABLE_SYSCALL_VA): Likewise.
2235 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
2237         * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
2238         sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
2239         * Versions: Export creat, poll, pselect, readv, select, sigpause,
2240         __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
2241         libpthread in version GLIBC_2.3.2.
2243 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
2245         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
2247 2002-12-05  Roland McGrath  <roland@redhat.com>
2249         * pthread.c (__pthread_initialize_minimal)
2250         [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
2251         TCB if the dynamic linker didn't do it at startup.
2253         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
2254         string.
2255         (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
2256         Submacros updated.
2257         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
2258         * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
2260 2002-12-03  Roland McGrath  <roland@redhat.com>
2262         * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
2263         from dynamic linker internal cell to new libc cell.
2265 2002-11-28  Roland McGrath  <roland@redhat.com>
2267         * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
2268         before other headers, so FLOATING_STACKS is not defined wrongly.
2270         * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
2271         even if [! FLOATING_STACKS].
2272         (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
2273         If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
2274         dl_osversion >= 2.3.99 and fatal if not.
2275         (TLS_DO_MODIFY_LDT): Use it.
2277 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
2279         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
2280         require it to 200112L.  Remove _POSIX_POLL and _POSIX_SELECT.
2281         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2283 2002-11-19  Ulrich Drepper  <drepper@redhat.com>
2285         * Versions (libc: GLIBC_2.0): Remove names of functions which are
2286         not defined in libc.
2287         * Makefile (shared-only-routines): Add weaks.
2288         * weaks.c: Remove functions which are not exported from libc.so.
2290 2002-11-14  Roland McGrath  <roland@redhat.com>
2292         * libc-tsd.c: New file.
2293         * Makefile (distribute): Add it.
2294         (libc-link.so): New variable.
2295         ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
2296         (libc-ok-for-link): New variable.
2297         [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
2298         libc-ok-for-link to $(use-thread).
2299         [$(libc-ok-for-link) = no]
2300         (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
2301         ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
2302         New targets.
2303         (generated): Append them.
2304         (extra-objs): Append libc-tsd.os.
2306         * libc-tls-loc.c: New file.
2307         * Makefile (libpthread-routines): Add it.
2309 2002-11-14  Andreas Schwab  <schwab@suse.de>
2311         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
2312         string.
2314 2002-11-13  Roland McGrath  <roland@redhat.com>
2316         * Examples/ex6.c (main): Improve error reporting.
2318 2002-11-04  Ulrich Drepper  <drepper@redhat.com>
2320         * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
2321         -fno-omit-frame-pointer.  Patch by Andreas Steinmetz <ast@domdv.de>.
2323         * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
2324         register number.
2325         (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
2327 2002-10-22  Jakub Jelinek  <jakub@redhat.com>
2329         * manager.c (pthread_start_thread): Call __uselocale even
2330         if [! SHARED].  Patch by Leon Kanter <leon@geon.donetsk.ua>.
2332 2002-10-17  Roland McGrath  <roland@redhat.com>
2334         * Makefile (unload): Don't link in libpthread.so.
2335         ($(objpfx)unload.out): Do depend on it.
2336         * unload.c (main): Improve error reporting.
2338 2002-10-09  Roland McGrath  <roland@redhat.com>
2340         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2341         Under [__PIC__], call the function via the pointer fetched for
2342         comparison rather than a call by name that uses the PLT.
2343         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2344         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2345         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2346         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2347         (__libc_key_create, __libc_getspecific, __libc_setspecific)
2348         (__libc_atfork): Use it.
2350         * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
2351         (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
2352         * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
2353         (ld: GLIBC_PRIVATE): Set removed.
2355 2002-10-11  Ulrich Drepper  <drepper@redhat.com>
2357         * sysdeps/unix/sysv/linux/execve.c: New file.
2359 2002-10-09  Jakub Jelinek  <jakub@redhat.com>
2361         * no-tsd.c: Include stdlib.h.
2363 2002-10-07  Jakub Jelinek  <jakub@redhat.com>
2365         * sysdeps/unix/sysv/linux/allocalim.h: New file.
2366         * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
2367         field.
2368         * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
2369         Pass stack size to caller.
2370         (pthread_handle_create): Set p_alloca_cutoff.
2371         * pthread.c (__pthread_initial_thread): Use C99 designated
2372         initializers.  Set p_alloca_cutoff.
2373         (__pthread_manager_thread): Likewise.
2374         (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
2375         for initial thread.
2376         (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
2377         for initial thread.
2378         (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
2379         for manager thread.
2380         * specific.c (__libc_alloca_cutoff): New function.
2381         * no-tsd.c (__libc_alloca_cutoff): New function.
2382         * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
2383         and libpthread.
2385 2002-10-02  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2387         * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
2388         * sysdeps/sh/tls.h: Likewise.
2389         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2391 2002-09-29  Jakub Jelinek  <jakub@redhat.com>
2393         * sysdeps/pthread/tst-timer.c (main): Clear
2394         SIGEV2.sigev_notify_attributes.
2396 2002-09-29  Ulrich Drepper  <drepper@redhat.com>
2398         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
2399         INLINE_SYSCALL for set_thread_area syscall.
2401 2002-09-28  Roland McGrath  <roland@redhat.com>
2403         * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
2404         Don't call setrlimit, since we did no prior bogon we need to undo.
2406 2002-09-27  Roland McGrath  <roland@redhat.com>
2408         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
2410 2002-09-24  Roland McGrath  <roland@redhat.com>
2412         * sysdeps/x86_64/tls.h: New file.
2414 2002-09-23  Roland McGrath  <roland@redhat.com>
2416         * Examples/ex13.c (dump_mut): int -> size_t for counter.
2418 2002-09-18  Bruno Haible  <bruno@clisp.org>
2420         * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
2421         an unexpected error code.
2423         * internals.h (__pthread_message): Add const to first parameter type.
2424         * pthread.c (__pthread_message): Likewise.
2426         * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
2428 2002-09-17  Roland McGrath  <roland@redhat.com>
2430         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
2431         Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
2432         offset (positive or negative) relative to the thread struct.
2433         * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
2435 2002-09-12  Jakub Jelinek  <jakub@redhat.com>
2437         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
2438         * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
2439         Replace /usr/lib/crt[in].o with crt[in].o too.
2441 2002-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
2443         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2445 2002-09-04  Bruno Haible  <bruno@clisp.org>
2447         * pthread.c: Include <sys/time.h>.
2448         (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
2449         * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
2450         * Makefile (distribute): Add smp.h to the list.
2452 2002-09-04  Bruno Haible  <bruno@clisp.org>
2454         * sysdeps/alpha/pt-machine.h: Choose different include file location
2455         on non-Linux platforms.
2457         * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
2458         (open, open64): Change va_arg argument type to the integral type to
2459         which mode_t promotes.
2461         * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
2462         the structure of 'struct sigevent'.
2464         * errno.c (__errno_location, __h_errno_location, __res_state):
2465         Use prototype function definitions.
2467 2002-07-29  Steven Munroe  <sjmunroe@us.ibm.com>
2469         * shlib-versions: Set libpthread version to 2.3 for powerpc64.
2470         * sysdeps/powerpc/pt-machine.h: moved to...
2471         * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
2472         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2474 2002-09-02  Roland McGrath  <roland@redhat.com>
2476         * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
2478 2002-09-01  Roland McGrath  <roland@redhat.com>
2480         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
2481         CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
2483         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
2484         (__libc_internal_tsd_address): Declare it.
2485         * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
2486         __libc_internal_tsd_address.
2487         * specific.c (libc_internal_tsd_address): New function.
2488         (__libc_internal_tsd_address): New variable.
2489         * no-tsd.c (__libc_internal_tsd_address): New variable.
2491 2002-08-31  Ulrich Drepper  <drepper@redhat.com>
2493         * Makefile: Don't use rule for crt%.o, spell it out as rules for
2494         crti.o and crtn.o.
2496 2002-08-30  Roland McGrath  <roland@redhat.com>
2498         * Makefile (extra-objs, omit-deps): Add crtn.
2499         ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
2500         ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
2501         ($(objpfx)crtn.S): New target.
2502         ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
2503         (generated): Add crtn.S.
2505         * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
2506         crtn.o pathname too.
2508 2002-08-30  Jakub Jelinek  <jakub@redhat.com>
2510         * pthread.c (__pthread_initialize_minimal): Call __uselocale even
2511         if [! SHARED].
2513 2002-08-30  Roland McGrath  <roland@redhat.com>
2515         * tst-static-locale.c: New file.
2516         * Makefile (tests, tests-static): Add it.
2518 2002-04-24  Steven Munroe  <sjmunroe@us.ibm.com>
2520         * spinlock.c (__pthread_lock): Fix spurious wakeup
2521         handling.  Don't clear lowest bit of list pointer as sign the thread
2522         is still on the wait list.  Don't restart after spurious wakeup
2523         with spinning to get the lock.
2524         (__pthread_unlock): Take set lowest bit into account when handling
2525         pointer to list elements.
2526         Patch by Steve Munroe <sjmunroe@us.ibm.com>.
2528 2002-08-28  Roland McGrath  <roland@redhat.com>
2530         * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
2532 2002-08-28  Jakub Jelinek  <jakub@redhat.com>
2534         * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
2535         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2536         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2538 2002-08-28  Ulrich Drepper  <drepper@redhat.com>
2540         * sysdeps/pthread/timer_routines.c (thread_func): Change return
2541         type to void and add casts in use to avoid warnings with all gcc
2542         versions.
2544 2002-08-08  Jakub Jelinek  <jakub@redhat.com>
2546         * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
2547         Bump to 16384.
2548         * manager.c (__pthread_handles): Remove.
2549         * pthandles.c: New file.
2550         * pthread.c (__pthread_initialize_minimal): Initialize
2551         __pthread_handles[0] and __pthread_handles[1].
2552         * Makefile (libpthread-routines): Add pthandles (must be last).
2554 2002-08-26  Brian Youmans  <3diff@gnu.org>
2556         * Examples/ex10.c: Corrected version number in Lesser GPL copying
2557         permission notice from 2 to 2.1.
2558         * Examples/ex11.c: Likewise.
2559         * Examples/ex13.c: Likewise.
2560         * Examples/ex8.c: Likewise.
2561         * Examples/ex9.c: Likewise.
2562         * barrier.c: Likewise.
2563         * events.c: Likewise.
2564         * lockfile.c: Likewise.
2565         * no-tsd.c: Likewise.
2566         * pt-machine.c: Likewise.
2567         * ptclock_gettime.c: Likewise.
2568         * ptclock_settime.c: Likewise.
2569         * rwlock.c: Likewise.
2570         * sysdeps/alpha/pspinlock.c: Likewise.
2571         * sysdeps/alpha/pt-machine.h: Likewise.
2572         * sysdeps/arm/pspinlock.c: Likewise.
2573         * sysdeps/arm/pt-machine.h: Likewise.
2574         * sysdeps/cris/pspinlock.c: Likewise.
2575         * sysdeps/cris/pt-machine.h: Likewise.
2576         * sysdeps/hppa/pspinlock.c: Likewise.
2577         * sysdeps/hppa/pt-machine.h: Likewise.
2578         * sysdeps/i386/i686/pt-machine.h: Likewise.
2579         * sysdeps/i386/pspinlock.c: Likewise.
2580         * sysdeps/i386/pt-machine.h: Likewise.
2581         * sysdeps/i386/useldt.h: Likewise.
2582         * sysdeps/ia64/pspinlock.c: Likewise.
2583         * sysdeps/ia64/pt-machine.h: Likewise.
2584         * sysdeps/m68k/pspinlock.c: Likewise.
2585         * sysdeps/m68k/pt-machine.h: Likewise.
2586         * sysdeps/mips/pspinlock.c: Likewise.
2587         * sysdeps/mips/pt-machine.h: Likewise.
2588         * sysdeps/powerpc/pspinlock.c: Likewise.
2589         * sysdeps/powerpc/pt-machine.h: Likewise.
2590         * sysdeps/pthread/bits/initspin.h: Likewise.
2591         * sysdeps/pthread/bits/libc-lock.h: Likewise.
2592         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2593         * sysdeps/pthread/getcpuclockid.c: Likewise.
2594         * sysdeps/pthread/posix-timer.h: Likewise.
2595         * sysdeps/pthread/timer_create.c: Likewise.
2596         * sysdeps/pthread/timer_delete.c: Likewise.
2597         * sysdeps/pthread/timer_getoverr.c: Likewise.
2598         * sysdeps/pthread/timer_gettime.c: Likewise.
2599         * sysdeps/pthread/timer_routines.c: Likewise.
2600         * sysdeps/pthread/timer_settime.c: Likewise.
2601         * sysdeps/pthread/tst-timer.c: Likewise.
2602         * sysdeps/s390/pspinlock.c: Likewise.
2603         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2604         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2605         * sysdeps/sh/pspinlock.c: Likewise.
2606         * sysdeps/sh/pt-machine.h: Likewise.
2607         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2608         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2609         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2610         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2611         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2612         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
2613         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2614         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2615         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2616         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2617         * tststack.c: Likewise.
2618         * unload.c: Likewise.
2619         * weaks.c: Likewise.
2620         * wrapsyscall.c: Likewise.
2622         * sysdeps/pthread/pt-initfini.c: Changed copying
2623         permission notice to Lesser GPL from Library GPL, including the
2624         references in the special exception.
2625         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
2626         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
2627         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
2628         Likewise.
2629         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
2630         Likewise.
2631         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
2633 2002-08-26  Ulrich Drepper  <drepper@redhat.com>
2635         * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
2636         overflow [PR libc/4244].
2638 2002-08-25  Ulrich Drepper  <drepper@redhat.com>
2640         * sysdeps/pthread/timer_routines.c (thread_func): Make the
2641         compiler happy by adding a return statement which will never be
2642         reached.
2644         * tst-context.c (main): Cast to long before casting to pointer.
2646         * Examples/ex17.c (main): Use correct format string.
2648         * Examples/ex9.c (thread): Remove incorrect return statement.
2650 2002-08-23  Ulrich Drepper  <drepper@redhat.com>
2652         * pthread.c (__linuxthreads_version): New global constant.
2654 2002-08-23  Andreas Jaeger  <aj@suse.de>
2656         * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
2657         as thread specific register.
2658         (testandset): Fix inline asm.
2659         (THREAD_GETMEM): Fix inline asm.
2661 2002-08-22  Roland McGrath  <roland@redhat.com>
2663         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
2664         conditional.
2665         (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
2666         (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
2667         macro.  That chooses whether to reuse %gs value or let kernel set it.
2668         [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
2669         [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
2670         not constant 0.
2672 2002-08-21  Ulrich Drepper  <drepper@redhat.com>
2674         * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
2675         also to the third definition of this macro.
2677 2002-06-17  Andreas Jaeger  <aj@suse.de>
2679         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2680         Set it.
2682 2002-08-20  Ulrich Drepper  <drepper@redhat.com>
2684         * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
2685         loading/reading segment registers.  Some old hardware doesn't
2686         handle the 32-bit instructions as expected.
2687         * sysdeps/i386/tls.h: Likewise.
2689         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
2690         renamed to secondcall and use is negated.
2691         (TLS_SETUP_GS_SEGMENT): Likewise.
2692         (TLS_INIT_TP): Likewise.
2693         * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
2694         secondcall.
2696         * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
2697         registers.  No need to mask upper 16 bits in this case.
2698         * sysdeps/i386/useldt.h: Likewise.
2699         (DO_SET_THREAD_AREA): We have to load %gs again even if the value
2700         is the same since the GDT content changed.
2702         * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
2703         to TLS_SETUP_GS_SEGMENT.
2704         (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
2705         TLS_DO_SET_THREAD_AREA.
2706         (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
2707         entry number from %gs value.
2708         * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
2709         ignore it.
2711         * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
2712         Pass true to _dl_deallocate_tls.
2713         (pthread_free): Likewise.
2714         * pthread.c (__pthread_initialize_manager): Likewise.
2716 2002-08-19  Ulrich Drepper  <drepper@redhat.com>
2718         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
2719         computing index from %gs value.
2721 2002-08-16  Roland McGrath  <roland@redhat.com>
2723         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
2724         register value from entry number properly.
2726         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
2727         optimally conditional on [__PIC__].
2728         (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
2729         without touching errno, and use latest modify_ldt-like interface.
2730         (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
2731         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
2732         (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
2733         existing %gs value as the segment to set.
2734         (INIT_THREAD_SELF): Rewritten using those.  Use set_thread_area only
2735         under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
2736         by the first thread's early TLS setup.
2738 2002-08-15  Roland McGrath  <roland@redhat.com>
2740         * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
2741         return a value as callers now expect.
2743 2002-08-11  Roland McGrath  <roland@redhat.com>
2745         * pthread.c (__pthread_initialize_manager): Initialize
2746         p_header.data.tcb field of manager thread's descriptor.
2747         (__pthread_initialize_minimal): Don't initialize p_header.data.self
2748         field, already done by TLS_INIT_TP.
2750         * manager.c (pthread_handle_create): Move p_header field initializers
2751         together.
2753 2002-08-08  Ulrich Drepper  <drepper@redhat.com>
2755         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
2757 2002-08-07  Ulrich Drepper  <drepper@redhat.com>
2759         * pthread.c (__linuxthreads_initial_report_events): New variable.
2760         (__pthread_initialize_manager): Use it to initialize p_report_events
2761         of initial thread.
2762         [TLS]: Store pointer to descriptor of manager in __pthread_handles.
2764 2002-08-07  Roland McGrath  <roland@redhat.com>
2766         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
2767         an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
2769 2002-08-02  Roland McGrath  <roland@redhat.com>
2771         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
2772         Add _LIBC_TSD_KEY_LOCALE.
2773         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
2774         Call __uselocale to initialize our per-thread locale pointer to
2775         the global one.
2776         * pthread.c (__pthread_initialize_minimal): Likewise.
2778         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
2780 2002-08-02  Ulrich Drepper  <drepper@redhat.com>
2782         * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
2783         internally.
2785         * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
2786         Don't use p_libc_specific element in thread descriptor.
2788 2002-07-30  Roland McGrath  <roland@redhat.com>
2790         * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
2791         [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
2792         which does the right thing when __thread support is available.
2793         * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
2794         Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
2795         `p_h_errno', `p_resp', and `p_res' members.
2796         * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
2797         Don't initialize `p_errnop' and `p_h_errnop' members.
2798         (__pthread_reset_main_thread): Likewise.
2799         (__pthread_initialize_manager): Likewise.
2800         * manager.c (__pthread_manager, pthread_handle_create): Likewise.
2801         * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
2802         Don't initialize `p_resp' member.
2803         (__pthread_reset_main_thread): Likewise.
2804         * manager.c (pthread_handle_create): Likewise.
2805         * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
2806         Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
2807         * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
2808         * errno.c [USE_TLS && HAVE___THREAD]
2809         (__h_errno_location, __res_state): Don't define these at all.
2811         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
2812         (INSTALL_NEW_DTV, GET_DTV): Likewise.
2813         * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
2815         * weaks.c: Don't include <errno.h> here.
2817 2002-08-01  Roland McGrath  <roland@redhat.com>
2819         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
2820         TLS_INIT_TP.
2821         (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
2822         (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
2823         (TLS_INIT_TP): Use that.
2825 2002-08-02  Jakub Jelinek  <jakub@redhat.com>
2827         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
2828         (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
2829         (FREE_THREAD): Avoid modify_ldt if using GDT.
2830         * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
2832 2002-07-25  Jakub Jelinek  <jakub@redhat.com>
2834         * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
2835         * sysdeps/i386/pt-machine.h: Likewise.
2836         * sysdeps/i386/useldt.h: Likewise.
2838 2002-07-22  Ulrich Drepper  <drepper@redhat.com>
2840         * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
2841         call __libc_setup_tls first.
2842         * Makefile: Actually create tst-signal.out file when running the test.
2843         (tests): Add tststatic.
2844         * Examples/tststatic.c: New file.
2846 2002-07-19  Ulrich Drepper  <drepper@redhat.com>
2848         * errno.c (__errno_location): Don't define unless !USE_TLS
2849         || !HAVE___THREAD.
2850         * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
2851         * sysdeps/i386/tls.h: Likewise.
2852         * sysdeps/i386/useldt.h: Likewise.
2853         * sysdeps/i386/i686/pt-machine.h: Likewise.
2855 2002-07-02  H.J. Lu  <hjl@gnu.org>
2857         * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>.  Always
2858         use ll/sc.
2859         * sysdeps/mips/pt-machine.h: Likewise.
2861 2002-07-14  Ulrich Drepper  <drepper@redhat.com>
2863         * manager.c (pthread_handle_create): Initialize self-reference in
2864         descriptor.
2866 2002-07-01  Jakub Jelinek  <jakub@redhat.com>
2868         * Examples/ex9.c (main): Remove unused th variable.
2870 2002-07-10  Ulrich Drepper  <drepper@redhat.com>
2872         * wrapsyscall.c: Add __nanosleep alias.
2873         * Versions (GLIBC_2.2.6): Add __nanosleep.
2874         * bug-sleep.c: New file.
2875         * Makefile (tests): Add bug-sleep.
2877 2002-06-19  Steven Munroe  <sjmunroe@vnet.ibm.com>
2879         * Examples/ex9.c (main):  Use list of children and join them.
2880         (thread): Do not call exit.
2882 2002-06-20  Ulrich Drepper  <drepper@redhat.com>
2884         * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
2885         Unconditionally use the code using spinlock.  Use __pthread_release
2886         to free a spinlock.
2887         (wait_node_free): Likewise.
2888         (__pthread_acquire, __pthread_release): Unconditionally define.
2890 2002-06-07  Jakub Jelinek  <jakub@redhat.com>
2892         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
2894 2002-05-24  Ulrich Drepper  <drepper@redhat.com>
2896         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
2898 2002-05-21  Ulrich Drepper  <drepper@redhat.com>
2900         * sysdeps/pthread/pthread.h (pthread_create): Rename first
2901         parameter.
2902         (pthread_cancel): Likewise.
2903         * internals.h (__pthread_create_2_1): Likewise.
2904         * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
2906 2002-05-20  Ulrich Drepper  <drepper@redhat.com>
2908         * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
2909         Patch by Glen Nakamura <gen@flex.com>.
2911 2002-05-03  Ulrich Drepper  <drepper@redhat.com>
2913         * signals.c: Move sighandler functions to...
2914         * sighandler.c: ...here.  New file.
2915         * signals.c: Move signal handler related type definitions to...
2916         * internals.h: ...here.  Add prototypes for signal handlers.
2917         * Makefile (libpthread-routines): Add sighandler.
2918         (CFLAGS-sighandler.c): Add $(exceptions).
2920 2002-04-30  Jakub Jelinek  <jakub@redhat.com>
2922         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
2924 2002-04-08  Ulrich Drepper  <drepper@redhat.com>
2926         * sysdeps/pthread/timer_getoverr.c: Return real overrun.
2927         * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
2928         * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
2929         based on previous one and not on current time.  Count overruns.
2930         Patch by Eric F. Sorton <eric@cctcorp.com>.
2932         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
2934 2002-04-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
2936         * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
2937         if it isn't defined yet.
2938         (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
2939         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2940         Likewise.
2941         * sysdeps/sh/tls.h: New file.
2943 2002-04-08  Jakub Jelinek  <jakub@redhat.com>
2945         * manager.c (__pthread_manager_event): Use self instead of arg
2946         for INIT_THREAD_SELF.
2947         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
2948         _pthread_descr_struct) instead of sizeof (*descr).
2950 2002-04-05  Ulrich Drepper  <drepper@redhat.com>
2952         * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
2953         * sysdeps/alpha/pt-machine.h: Likewise.
2954         * sysdeps/arm/pt-machine.h: Likewise.
2955         * sysdeps/cris/pt-machine.h: Likewise.
2956         * sysdeps/hppa/pt-machine.h: Likewise.
2957         * sysdeps/m68k/pt-machine.h: Likewise.
2958         * sysdeps/mips/pt-machine.h: Likewise.
2959         * sysdeps/powerpc/pt-machine.h: Likewise.
2960         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2961         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2962         * sysdeps/sh/pt-machine.h: Likewise.
2963         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2964         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2965         * sysdeps/x86_64/pt-machine.h: Likewise.
2967 2002-04-05  Jakub Jelinek  <jakub@redhat.com>
2969         * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
2970         instead of pthread_mutexattr_setkind_np.
2971         (pthread_mutexattr_gettype): Similarly.
2972         * man/pthread_mutexattr_setkind_np.man: New.
2973         * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
2975 2002-04-02  Ulrich Drepper  <drepper@redhat.com>
2977         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
2979 2002-03-22  Jakub Jelinek  <jakub@redhat.com>
2981         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
2983 2002-03-22  Ulrich Drepper  <drepper@redhat.com>
2985         * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
2987 2002-03-17  Andreas Jaeger  <aj@suse.de>
2989         * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
2990         prototpyes.
2991         * sysdeps/alpha/pt-machine.h: Likewise.
2992         * sysdeps/arm/pt-machine.h: Likewise.
2993         * sysdeps/cris/pt-machine.h: Likewise.
2994         * sysdeps/hppa/pt-machine.h: Likewise.
2995         * sysdeps/i386/i686/pt-machine.h: Likewise.
2996         * sysdeps/ia64/pt-machine.h: Likewise.
2997         * sysdeps/m68k/pt-machine.h: Likewise.
2998         * sysdeps/mips/pt-machine.h: Likewise.
2999         * sysdeps/powerpc/pt-machine.h: Likewise.
3000         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
3001         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
3002         * sysdeps/sh/pt-machine.h: Likewise.
3003         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3004         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3005         * sysdeps/x86_64/pt-machine.h: Likewise.
3007         * internals.h: Move testandset and __compare_and_swap prototypes
3008         to pt-machine.h.
3010 2002-03-03  Andreas Jaeger  <aj@suse.de>
3012         * errno.c: Include resolv.h to avoid warning.
3014 2002-02-27  Ulrich Drepper  <drepper@redhat.com>
3016         * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
3017         stack limit.
3019 2002-02-23  Ulrich Drepper  <drepper@redhat.com>
3021         * attr.c (pthread_getattr_np): Don't take thread descriptor size
3022         into account if USE_TLS.
3023         * manager.c (pthread_handle_create): Free TLS data structures if call
3024         failed.  Pass correct stack to clone if USE_TLS.
3025         * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
3026         * sysdeps/i386/i686/pt-machine.h: Likewise.
3027         * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
3029         * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
3030         Add p_stackaddr element #if USE_TLS.
3031         * internals.c: Include <tls.h>.
3032         * manager.c: Integrate creating and handling of thread descriptor
3033         for TLS.
3034         * pthread.c: Likewise.
3035         * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
3036         Include <linuxthreads/descr.h> only if TLS is really used.
3037         (GET_DTV): New macro.
3038         (TLS_INIT_TP): Initialize self pointer.
3040 2002-02-17  Andreas Schwab  <schwab@suse.de>
3042         * signals.c (sigwait): Check for old sighandler being SIG_ERR,
3043         not NULL.
3045 2002-02-12  Ulrich Drepper  <drepper@redhat.com>
3047         * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
3048         (INSTALL_DTV): Adjust for being passed pointer to element with length.
3050 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
3052         * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
3054 2002-02-08  Richard Henderson  <rth@redhat.com>
3056         * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
3058 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
3060         * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
3061         after all.
3063 2002-02-07  H.J. Lu  <hjl@gnu.org>
3065         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
3066         gcc warning.
3067         (__pthread_spin_lock): Remove ".set noreorder".
3068         * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
3070 2002-02-05  H.J. Lu  <hjl@gnu.org>
3072         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
3073         branch likely.
3074         * sysdeps/mips/pt-machine.h (testandset): Likewise.
3075         (__compare_and_swap): Likewise.
3077 2002-02-07  Ulrich Drepper  <drepper@redhat.com>
3079         * internals.h: Move declarations/definitions of
3080         __pthread_initial_thread_bos, __pthread_initial_thread,
3081         __pthread_manager_thread_bos, __pthread_manager_thread_tos,
3082         __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
3083         CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
3084         * descr.h: ...here.
3085         * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
3086         Define THREAD_GETMEM accordingly.
3088 2002-02-06  Ulrich Drepper  <drepper@redhat.com>
3090         * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
3092         * sysdeps/i386/tls.h: Define THREAD_DTV.
3094 2002-02-04  Ulrich Drepper  <drepper@redhat.com>
3096         * internals.h: Move thread descriptor definition...
3097         * descr.h.: ...here.  New file.
3098         * sysdeps/i386/tls.h: New file.
3100 2002-02-01  H.J. Lu  <hjl@gnu.org>
3102         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
3103         different register in the delayed slot.  Use branch likely.
3105         * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
3106         (__compare_and_swap): Return 0 only when failed to compare. Use
3107         branch likely.
3109 2002-02-01  Jakub Jelinek  <jakub@redhat.com>
3111         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
3112         __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
3113         * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
3114         * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
3115         * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
3116         * sysdeps/sparc/sparc64/Versions: New file.
3117         * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
3119 2002-01-31  Ulrich Drepper  <drepper@redhat.com>
3121         * pthread.c: _dl_cpuclock_offset is not any longer a global variable
3122         in SHARED code, use GL(dl_cpuclock_offset).
3124 2002-01-28  Andreas Jaeger  <aj@suse.de>
3126         * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
3127         0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
3129 2002-01-16  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3131         * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
3132         (CURRENT_STACK_FRAME): Remove duplicate definition.
3133         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
3135 2002-01-14  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3137         * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
3138         automatic inline.
3140 2002-01-12  Andreas Schwab  <schwab@suse.de>
3142         * Makefile (test-srcs): Add tst-signal.
3143         (tests): Run tst-signal.
3144         (distribute): Add tst-signal.sh.
3145         * tst-signal.c, tst-signal.sh: New files.
3147 2002-01-14  Andreas Jaeger  <aj@suse.de>
3149         * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
3151 2002-01-11  Andreas Schwab  <schwab@suse.de>
3153         * signals.c (sighandler): Initialize all elements to SIG_ERR.
3154         (__sigaction): Don't use value from sighandler if it is SIG_ERR.
3156 2002-01-06  Richard Henderson  <rth@redhat.com>
3158         * sysdeps/alpha/elf/pt-initfini.c: New file.
3160 2001-12-29  Andreas Jaeger  <aj@suse.de>
3162         * Examples/ex9.c: Add noreturn attribute for thread.
3163         * Examples/ex10.c: Likewise.
3164         * Examples/ex13.c (thread_start): Likewise.
3165         * Examples/ex15.c (worker): Likewise.
3167         * Examples/ex18.c: Include unistd.h for prototype of sleep.
3169 2001-12-14  Ulrich Drepper  <drepper@redhat.com>
3171         * man/pthread_atfork.man: Adjust description of mutex handling
3172         after fork for current implementation.
3173         * linuxthreads.texi: Likewise [PR libc/2519].
3175 2001-12-13  Andreas Schwab  <schwab@suse.de>
3177         * specific.c (pthread_key_delete): Don't contact the thread
3178         manager if no threads have been created yet.
3180 2001-12-12  NIIBE Yutaka  <gniibe@m17n.org>
3182         * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
3183         qualifier to be safe.
3185 2001-11-30  Andreas Schwab  <schwab@suse.de>
3187         * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
3188         that self is the manager thread, and initialize the thread
3189         register if not.
3190         (thread_self_stack) [THREAD_SELF]: New function to find self via
3191         stack pointer.
3192         * manager.c (pthread_handle_create): Don't block cancel signal any
3193         more.
3195 2001-11-29  Andreas Jaeger  <aj@suse.de>
3197         * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
3198         (THREAD_SELF): New.
3199         (INIT_THREAD_SELF): New.
3200         (THREAD_GETMEM): New.
3201         (THREAD_GETMEM_NC):
3202         (THREAD_SETMEM): New.
3203         (THREAD_SETMEM_NC): New.
3204         (FLOATING_STACKS): Define.
3205         (ARCH_STACK_MAX_SIZE): Define.
3207 2001-11-28  Kaz Kylheku  <kaz@ashi.footprints.net>
3209         Bugfix to pthread_key_delete. It was iterating over the thread
3210         manager's linked list of threads, behind the thread manager's
3211         back causing a race. The fix is to have the manager iterate over
3212         the threads instead, using a new request type for doing so.
3213         * internals.h (struct pthread_request): New manager request type
3214         REQ_FOR_EACH_THREAD.
3215         * manager.c (pthread_for_each_thread): New function.
3216         (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
3217         * specific.c (struct pthread_key_delete_helper_args): New type.
3218         (pthread_key_delete_helper): New static function.
3219         (pthread_key_delete): Use the new thread manager
3220         REQ_FOR_EACH_THREAD function to iterate over the threads and set
3221         the delete key slot to a null value in each thread.
3222         * Examples/ex18.c: New test.
3223         * Makefile (tests): Add ex18.
3225 2001-11-22  Wolfram Gloger  <wg@malloc.de>
3227         * pthread.c (pthread_onexit_process): Don't call free
3228         after threads have been asynchronously terminated.
3230         * manager.c (pthread_handle_exit): Surround cancellation
3231         of threads with __flockfilelist()/__funlockfilelist().
3233 2001-11-26  Andreas Schwab  <schwab@suse.de>
3235         * manager.c (pthread_handle_create): Start the child thread with
3236         the cancel signal blocked, so that it does not handle it before
3237         the thread register is set up.  Save errno from failed clone call.
3239 2001-11-15  Ulrich Drepper  <drepper@redhat.com>
3241         * sysdeps/i386/i686/Implies: Removed.
3242         * sysdeps/i386/i686/Versions: New file.
3244 2001-10-31  Andreas Jaeger  <aj@suse.de>
3246         * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
3248 2001-10-05  Kevin Buettner  <kevinb@cygnus.com>
3250         * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
3251         to __linuxthreads_pthread_sizeof_descr to match name used by
3252         symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
3253         linuxthreads_db/td_symbol_list.c.
3255 2001-09-22  Andreas Jaeger  <aj@suse.de>
3257         * linuxthreads/tst-context.c: Avoid compile warning.
3259 2001-09-20  Andreas Jaeger  <aj@suse.de>
3261         * shlib-versions: Add x86-64.
3263 2001-09-19  Andreas Jaeger  <aj@suse.de>
3265         * sysdeps/x86_64/Makefile: New file.
3266         * sysdeps/x86_64/pspinlock.c: New file.
3267         * sysdeps/x86_64/pt-machine.h: New file.
3269 2001-09-12  Jakub Jelinek  <jakub@redhat.com>
3271         * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
3272         for SIGEV_NONE.
3273         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
3275 2001-09-11  Ulrich Drepper  <drepper@redhat.com>
3276             Wolfram Gloger <wg@malloc.de>
3278         * join.c: Protect all communications from and to manager with
3279         TEMP_FAILURE_RETRY.
3280         * manager.c: Likewise.
3281         * pthread.c: Likewise.
3282         * smeaphore.c: Likewise.
3284 2001-08-29  Ulrich Drepper  <drepper@redhat.com>
3286         * spinlock.c (__pthread_lock): Top max_count value with
3287         MAX_ADAPTIVE_SPIN_COUNT.
3288         * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
3290         * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
3291         help P4.
3293 2001-08-27  Jakub Jelinek  <jakub@redhat.com>
3295         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
3296         non-opaque type if __USE_UNIX98.
3298 2001-08-26  Jakub Jelinek  <jakub@redhat.com>
3300         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
3301         non-opaque lock types also if _IO_MTSAFE_IO is defined.
3303 2001-08-23  Roland McGrath  <roland@frob.com>
3305         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
3306         new first argument, skip the cleanup handler if it's zero.
3307         (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
3308         (__libc_lock_define_initialized_recursive): Use it.
3309         * sysdeps/pthread/bits/stdio-lock.h: File removed.
3310         The sysdeps/generic file from the main tree now suffices.
3312 2001-08-22  Roland McGrath  <roland@frob.com>
3314         * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
3315         instead of <pthread.h>.
3316         (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
3317         (_IO_lock_initializer): Add braces.
3318         (_IO_lock_lock): Use __libc_lock_lock_recursive.
3319         (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
3321         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
3322         (__libc_lock_define_initialized_recursive): Use it.
3323         (__libc_lock_init_recursive): Likewise.
3324         (__libc_lock_fini_recursive): Likewise.
3325         (__libc_lock_lock_recursive): Likewise.
3326         (__libc_lock_trylock_recursive): Likewise.
3327         (__libc_lock_unlock_recursive): Likewise.
3328         (__libc_lock_define_recursive): New macro.
3330 2001-08-14  Jakub Jelinek  <jakub@redhat.com>
3332         * lockfile.c (__pthread_provide_lockfile): New variable.
3333         * pthread.c (__pthread_require_lockfile): New variable.
3334         * cancel.c (__pthread_require_lockfile): New variable.
3336 2001-07-31  Ulrich Drepper  <drepper@redhat.com>
3338         * tst-context.c (threadfct): Initialize context before calling
3339         makecontext.
3341         * Examples/ex17.c: Make sure test thread is around long enough.
3343 2001-07-26  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3345         * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
3347 2001-07-24  Ulrich Drepper  <drepper@redhat.com>
3349         * tst-context.c (main): Print explanation before bailing out
3350         because context handling is not supported.
3352 2001-07-23  Ulrich Drepper  <drepper@redhat.com>
3354         * Makefile (tests): Add tst-context.
3355         * tst-context.c: New file.
3357         * sysdeps/pthread/bits/stdio-lock.h: Define
3358         _IO_cleanup_region_start_noarg.
3360 2001-07-23  Jakub Jelinek  <jakub@redhat.com>
3362         * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
3363         (ARCH_STACK_MAX_SIZE): Define.
3364         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3365         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3367 2001-07-19  Jakub Jelinek  <jakub@redhat.com>
3369         * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
3371         * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
3372         (ARCH_STACK_MAX_SIZE): Define.
3373         * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
3374         NEED_SEPARATE_REGISTER_STACK.
3376 2001-07-16  Andreas Schwab  <schwab@suse.de>
3378         * Makefile (before-compile): Don't add $(objpfx)crti.o.
3379         (omit-deps): Add crti.
3380         ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
3381         it is filtered out of the link command.
3383 2001-07-16  Ulrich Drepper  <drepper@redhat.com>
3385         * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
3386         to find the right value for __pthread_initial_thread_bos, it's not
3387         used.  If not FLOATING_STACKS first run
3388         __pthread_init_max_stacksize.
3390 2001-06-16  H.J. Lu  <hjl@gnu.org>
3392         * internals.h: Include <stackinfo.h>.
3394         * attr.c: Don't include <stackinfo.h> here.
3395         * cancel.c: Likewise.
3396         * manager.c: Likewise.
3397         * pthread.c: Likewise.
3398         * ptlongjmp.c: Likewise.
3400 2001-03-23  Matthew Wilcox  <willy@ldl.fc.hp.com>
3402         * attr.c: Make _STACK_GROWS_UP work.
3403         * internals.h: Likewise.
3404         * manager.c: Likewise.
3405         * pthread.c: Likewise.
3407 2001-06-15  H.J. Lu  <hjl@gnu.org>
3409         * pthread.c (__pthread_reset_main_thread): Fix a typo.
3411 2001-02-02  John S. Marvin  <jsm@udlkern.fc.hp.com>
3413         * semaphore.h: Use struct _pthread_fastlock as an element of
3414         sem_t instead of an identical struct.
3415         * rwlock.c: Remove casts.
3416         * semaphore.c: Likewise.
3418 2001-04-30  Alan Modra  <amodra@one.net.au>
3420         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
3422 2001-05-25  Bruce Mitchener  <bruce@cubik.org>
3424         * linuxthreads.texi: Spelling corrections.
3426 2001-05-25  Ulrich Drepper  <drepper@redhat.com>
3428         * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
3429         returning successfully.
3430         Patch by Gene Cooperman <gene@ccs.neu.edu>.
3432 2001-05-24  Ulrich Drepper  <drepper@redhat.com>
3434         * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
3435         serious work try once whether the lock is uncontested.
3436         Remove duplicate reading of __status before loop.
3437         Change suggested by Hans Boehm <hans_boehm@hp.com>.
3439         * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
3440         (__pthread_alt_trylock): Likewise.
3442 2001-05-01  Kaz Kylheku  <kaz@ashi.footprints.net>
3444         Memory barrier overhaul following line by line inspection.
3445         * mutex.c (pthread_once): Missing memory barriers added.
3446         * pthread.c (__pthread_wait_for_restart_signal,
3447         __pthread_timedsuspend_new, __pthread_restart_new): Added
3448         memory barriers ``just in case'' and for documentary value.
3449         * spinlock.c (__pthread_release): New inline function for releasing
3450         spinlock, to complement __pthread_acquire.  Includes memory
3451         barrier prior to assignment to spinlock, and __asm __volatile
3452         dance to prevent reordering or optimization of the spinlock access.
3453         * spinlock.c (__pthread_unlock, __pthread_alt_lock,
3454         __pthread_alt_timedlock, __pthread_alt_unlock,
3455         __pthread_compare_and_swap): Updated to use new __pthread_release
3456         instead of updating spinlock directly.
3457         * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
3458         wait_node_free, wait_node_dequeue, __pthread_alt_lock,
3459         __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
3460         Memory barrier overhaul.  Lots of missing memory barriers added,
3461         a couple needless ones removed.
3462         * spinlock.c (__pthread_compare_and_swap): testandset optimization
3463         removed, just calls __pthread_acquire, which has the new read
3464         barrier in it before its testandset.
3466 2001-05-20  Roland McGrath  <roland@frob.com>
3468         * Makeconfig: New file, variables used to be in main libc Makeconfig.
3470 2001-05-09  Geoff Keating  <geoffk@redhat.com>
3472         * sysdeps/powerpc/pt-machine.h
3473         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
3474         (__compare_and_swap): Remove memory barriers.
3475         (__compare_and_swap_with_release_semantics): New function.
3477 2001-04-24  Andreas Jaeger  <aj@suse.de>
3479         * wrapsyscall.c: send* and recv* return ssize_t.
3481         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
3482         mutex instead of double locking it.
3483         Reported by Pierre Artaud <partaud@sodatec.com>.
3485 2001-04-23  Ulrich Drepper  <drepper@redhat.com>
3487         * sysdeps/pthread/getcpuclockid.c: Make function generic, test
3488         using #ifdef whether the clock is available.
3489         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
3491         * sysdeps/ia64/Versions: New file.
3493         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
3494         have to call __gmon_start__ in the libpthread DSO.
3495         * sysdeps/pthread/pt-initfini.c (_init): Likewise.
3497         * Makefile (libpthread-routines): Add ptclock_gettime and
3498         ptclock_settime.
3499         * internals.h: Don't use cpuclock-init.h definitions, use
3500         hp-timing.h definitions.
3501         * pthread.c: Likewise.
3502         * manager.c: Likewise.
3503         * ptclock_gettime.c: New file.
3504         * ptclock_settime.c: New file.
3505         * internals.h: Fix parameter type for __pthread_clock_gettime and
3506         __pthread_clock_settime.
3508         * sysdeps/i386/i586/ptclock_gettime.c: Removed.
3509         * sysdeps/i386/i586/ptclock_settime.c: Removed.
3510         * sysdeps/i386/i586/Makefile: Removed.
3512 2001-04-22  Ulrich Drepper  <drepper@redhat.com>
3514         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
3515         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3517 2001-04-21  Andreas Jaeger  <aj@suse.de>
3519         * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
3520         attribute, remove statements that will never be executed.
3521         (thread_func): Remove mutex_unlock call since it's never executed.
3522         (thread_func): Fix comment as suggested by Jakub Jelinek.
3524         * manager.c (__pthread_manager): Add noreturn
3525         attribute.
3526         (pthread_start_thread): Likewise, remove return statement.
3527         (pthread_start_thread_event): Likewise.
3528         Add noreturn attribute for pthread_handle_exit.
3529         * weaks.c: Add noreturn attribute for pthread_exit.
3531         * internals.h: Add __pthread_clock_gettime and
3532         __pthread_clock_settime prototypes.
3534 2001-04-21  Ulrich Drepper  <drepper@redhat.com>
3536         * internals.h: Include <cpuclock-init.h>.
3537         (struct _pthread_descr_struct): Add p_cpuclock_offset field if
3538         CPUCLOCK_VARDEF is defined.
3539         * pthread.c (__pthread_initialize_minimal): Initialize
3540         p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
3541         * manager.c (pthread_start_thread): Set p_cpuclock_offset field
3542         for new thread to current CPU clock value.
3544         * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
3546         * sysdeps/i386/i586/Makefile: New file.
3547         * sysdeps/i386/i586/Versions: New file.
3548         * sysdeps/i386/i586/ptclock_gettime.c: New file.
3549         * sysdeps/i386/i586/ptclock_settime.c: New file.
3550         * sysdeps/i386/i686/Implies: New file.
3552 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3554         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
3555         $generated, not $postclean-generated.
3557 2001-04-18  Andreas Jaeger  <aj@suse.de>
3559         * Makefile (otherlibs): Added.
3561 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3563         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3565 2001-04-16  Ulrich Drepper  <drepper@redhat.com>
3567         * signals.c (sigwait): NSIG is no signal number.  Block all
3568         signals while in signal handler for signals in SET.
3569         Patch by Manfred Spraul <manfred@colorfullife.com>.
3571 2001-04-12  Ulrich Drepper  <drepper@redhat.com>
3573         * tst-cancel.c: Disable most tests.  Add new test where all
3574         cleanup handlers must run.
3575         * Makefile (tests): Add tst-cancel again.
3577         * cancel.c (__pthread_perform_cleanup): Correct condition for
3578         leaving cleanup loop early.
3580         * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
3581         all the files which use CURRENT_STACK_FRAME.
3582         * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
3583         __builtin_frame_address.
3584         * sysdeps/i386/i686/pt-machine.h: Likewise.
3586 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3588         * Makefile (tests): Comment out tst-cancel for now.
3590         * tst-cancel.c (main): Cleanup 4 is supposed to run.  Create
3591         temporary file in object directory.
3592         * Makefile: Don't allow inlining when compiling tst-cancel.c.
3593         Pass $(objpfx) to tst-cancel.
3595 2001-04-11  David S. Miller  <davem@redhat.com>
3597         * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
3598         up closer to user local variables so that new cleanup heuristics work.
3599         * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
3601 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3603         * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
3604         and remove it.
3605         (_pthread_cleanup_push_defer): Likewise.
3607         * tst-cancel.c (main): Fix loop printing cleanup output.
3609 2001-04-10  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3611         * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
3612         test.
3613         (__pthread_spin_trylock): Likewise.
3614         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3616 2001-04-10  Ulrich Drepper  <drepper@redhat.com>
3618         * join.c (pthread_exit): Move code to new function __pthread_do_exit
3619         which takes an extra parameter with the current frame pointer.
3620         Call new function with CURRENT_STACK_FRAME.
3621         (__pthread_do_exit): New function.  Call __pthread_perform_cleanup
3622         with the new parameter.
3623         (pthread_join): Call __pthread_do_exit instead of pthread_exit.
3624         * cancel.c (__pthread_perform_cleanup): Takes extra parameter.  Use
3625         this parameter as the initial value the cleanup handler records are
3626         compared against.  No active cleanup handler record must have an
3627         address lower than the previous one and the initial record must be
3628         above (below on PA) the frame address passed in.
3629         (pthread_setcancelstate): Call __pthread_do_exit instead of
3630         pthread_exit.
3631         (pthread_setcanceltype): Likewise.
3632         (pthread_testcancel): Likewise.
3633         (_pthread_cleanup_pop_restore): Likewise.
3634         * condvar.c (pthread_cond_wait): Likewise.
3635         (pthread_cond_timedwait_relative): Likewise.
3636         * manager.c (pthread_start_thread): Likewise.
3637         * oldsemaphore.c (__old_sem_wait): Likewise.
3638         * pthread.c (pthread_handle_sigcancel): Likewise.
3639         * semaphore.c (__new_sem_wait): Likewise.
3640         (sem_timedwait): Likewise.
3641         * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
3642         to limit the cleanup handlers which get run.
3643         * internals.h: Add prototype for __pthread_do_exit.  Adjust prototype
3644         for __pthread_perform_cleanup.
3646         * Makefile (tests): Add tst-cancel.
3647         * tst-cancel.c: New file.
3649 2001-04-08  Hans-Peter Nilsson  <hp@axis.com>
3651         * sysdeps/cris/pt-machine.h: New file.
3652         * sysdeps/cris/pspinlock.c: New file.
3654 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
3656         * shlib-versions: Add case for Linux on CRIS.
3658 2001-03-26  Ulrich Drepper  <drepper@redhat.com>
3660         * attr.c (pthread_getattr_np): Correct computation of stack size
3661         for machiens with register stack.
3663         * Examples/ex17.c (main): Correct detection of failed mmap call.
3665 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3667         * pthread.c (__pthread_initialize_manager): Fix a typo.
3669 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3671         * attr.c (__pthread_attr_setstack): Fix alignment check.
3672         (pthread_getattr_np): __stackaddr is top of stack, not bottom.
3673         * Makefile (tests): Add ex17 test.
3674         * Examples/ex17.c: New test.
3676 2001-03-20  Ulrich Drepper  <drepper@redhat.com>
3678         * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
3679         * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
3680         * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
3682 2001-03-18  Ulrich Drepper  <drepper@redhat.com>
3684         * Makefile: When generating DSO link with libc_nonshared.a.
3686 2001-02-26  Jakub Jelinek  <jakub@redhat.com>
3688         * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
3690 2001-02-23  Jakub Jelinek  <jakub@redhat.com>
3692         * internals.h (__pthread_init_max_stacksize): New prototype.
3693         * attr.c (__pthread_attr_setstacksize): Call
3694         __pthread_init_max_stacksize if not yet initialized.
3695         * pthread.c (__pthread_init_max_stacksize): New function.
3696         (__pthread_initialize_manager): Call it.
3697         Patch by <dtc@cmucl.cons.org>.
3699 2001-03-16  Ulrich Drepper  <drepper@redhat.com>
3701         * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
3703 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3705         * shlib-versions: Add rule for Linux on 64 bit S/390.
3706         * sysdeps/s390/s390-64/pt-machine.h: New file.
3707         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3709 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3711         * sysdeps/s390/pt-machine.h: Move to...
3712         * sysdeps/s390/s390-32/pt-machine.h: ...here.
3713         Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
3715 2001-03-15  Ulrich Drepper  <drepper@redhat.com>
3717         * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
3718         * attr.c: Implement pthread_getattr_np.
3719         * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
3720         * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
3721         * manager.c (pthread_handle_create): Initialize p_inheritsched.
3723 2001-03-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3725         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
3726         code alignment.
3728 2001-02-20  Hans Boehm  <hans_boehm@hp.com>
3730         * manager.c (manager_mask): Removed static vesion.  Now always local
3731         to __pthread_manager().
3732         (manager_mask_all): Removed completely.
3733         (__pthread_manager): Remove manager_mask_all initialization.
3734         (pthread_handle_create): Remove code to set and reset signal mask
3735         around __clone2() calls.
3737 2001-02-17  Jakub Jelinek  <jakub@redhat.com>
3739         * spinlock.c (__pthread_lock): Force lock->__status to be read from
3740         memory on every spin.
3742 2001-02-10  Andreas Jaeger  <aj@suse.de>
3744         * Makefile (extra-objs): New.
3746 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
3748         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
3749         __pthread_initialize_minimal prototype.
3751 2001-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3753         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3755 2001-02-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3757         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
3759 2001-02-06  Ulrich Drepper  <drepper@redhat.com>
3761         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
3762         broken code.  Patch by Jes Sorensen.
3764 2001-02-06  Andreas Jaeger  <aj@suse.de>
3766         * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
3767         to...
3768         * internals.h: ...here.
3770 2001-02-05  Jes Sorensen  <jes@linuxcare.com>
3772         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
3774 2001-02-02  Ulrich Drepper  <drepper@redhat.com>
3776         * Versions: Remove __pthread_initialize_minimal.
3778 2001-02-01  Ulrich Drepper  <drepper@redhat.com>
3780         * Makefile: Add rules to build crti.o and make it being used in
3781         building libpthread.so.
3782         * sysdeps/i386/Makefile: New file.
3783         * sysdeps/pthread/pt-initfini.c: New file.
3785         * pthread.c: Cleanups.
3787 2001-01-28  Andreas Jaeger  <aj@suse.de>
3789         * oldsemaphore.c (__old_sem_init): Adjust for last change.
3790         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3791         * spinlock.c: Likewise.
3793 2001-01-28  Ulrich Drepper  <drepper@redhat.com>
3795         * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
3796         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
3797         * manager.c: Adjust for namespace cleanup in bits/initspin.h.
3798         * pthread.c: Likewise.
3799         * spinlock.h: Likewise.
3800         * sysdeps/pthread/pthread.h: Likewise.
3802 2001-01-26  Ulrich Drepper  <drepper@redhat.com>
3804         * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
3805         as struct __pthread_attr_s.
3807         * semaphore.h (sem_t): Cleanup namespace, rename status and
3808         spinlock elements.
3810 2001-01-13  Jakub Jelinek  <jakub@redhat.com>
3812         * pthread.c (pthread_onexit_process): Clear
3813         __pthread_manager_thread_bos after freeing it.
3814         * Makefile (tests): Add ex16.
3815         * Examples/ex16.c: New file.
3817 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
3819         * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
3820         -z nodelete.
3821         * pthread.c (pthread_exit_process): Rename to...
3822         (pthread_onexit_process): ...this.
3823         (pthread_atexit_process, pthread_atexit_retcode): New.
3824         (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
3825         and only if HAVE_Z_NODELETE is not defined.
3826         (__pthread_initialize_manager): Register pthread_atexit_retcode
3827         with __cxa_atexit.
3829 2001-01-11  Ulrich Drepper  <drepper@redhat.com>
3831         * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
3833 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
3835         * Makefile (tests): Add ex15.
3836         * Examples/ex15.c: New test.
3838 2001-01-08  Ulrich Drepper  <drepper@redhat.com>
3840         * pthread.c (pthread_exit_process): Free memory allocated for
3841         manager stack.
3843 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
3845         * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
3846         (pthread_free): Always unmap the stack.  It's safe now that we don't
3847         use MAP_FIXED to allocate stacks.
3849 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
3851         * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
3853         * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
3855 2000-11-15  Wolfram Gloger  <wg@malloc.de>
3857         * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
3858         stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
3860 2000-12-27  Andreas Jaeger  <aj@suse.de>
3862         * Examples/ex13.c: Make local functions static.
3863         * ecmutex.c: Likewise.
3864         * joinrace.c: Likewise.
3865         * Examples/ex14.c: Likewise.
3867         * Examples/ex2.c: Make local functions static; reformat.
3868         * Examples/ex1.c: Likewise.
3869         * Examples/ex4.c: Likewise.
3870         * Examples/ex5.c: Likewise.
3871         * Examples/ex7.c: Likewise.
3873         * oldsemaphore.c: Add prototypes to shut up GCC.
3874         * pt-machine.c: Likewise.
3876         * weaks.c: Add prototype for pthread_exit.
3878         * internals.h: Add some prototypes, format prototypes and add
3879         missing externs.
3880         Move __libc_waitpid prototype to include/sys/wait.h.
3882         * rwlock.c: Include <bits/libc-lock.h> for prototypes.
3883         * mutex.c: Likewise.
3884         * specific.c: Likewise.
3885         * ptfork.c: Likewise.
3887         * lockfile.c: Include internals.h to get prototypes.
3888         * events.c: Likewise.
3889         * sysdeps/alpha/pspinlock.c: Likewise.
3890         * sysdeps/arm/pspinlock.c: Likewise.
3891         * sysdeps/hppa/pspinlock.c: Likewise.
3892         * sysdeps/i386/pspinlock.c: Likewise.
3893         * sysdeps/ia64/pspinlock.c: Likewise.
3894         * sysdeps/m68k/pspinlock.c: Likewise.
3895         * sysdeps/mips/pspinlock.c: Likewise.
3896         * sysdeps/powerpc/pspinlock.c: Likewise.
3897         * sysdeps/s390/pspinlock.c: Likewise.
3898         * sysdeps/sh/pspinlock.c: Likewise.
3899         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
3900         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
3901         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
3903 2000-12-27  Ulrich Drepper  <drepper@redhat.com>
3905         * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
3906         (__pthread_attr_getstack): Return correct address.
3907         Add warnings for using pthread_attr_getstackaddr and
3908         pthread_attr_setstackaddr.
3910 2000-12-26  Ulrich Drepper  <drepper@redhat.com>
3912         * Examples/ex6.c (test_thread): Make static.
3913         * Examples/ex12.c (test_thread): Make static and add noreturn
3914         attribute.
3916 2000-12-18  Jes Sorensen  <jes@linuxcare.com>
3918         * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
3919         and compare_and_swap_with_release_semantics returns int not long.
3921 2000-12-17  Andreas Jaeger  <aj@suse.de>
3923         * sysdeps/s390/pt-machine.h (testandset): Use long int as return
3924         value.
3925         * sysdeps/arm/pt-machine.h (testandset): Likewise.
3926         * sysdeps/hppa/pt-machine.h (testandset): Likewise.
3927         * sysdeps/m68k/pt-machine.h (testandset): Likewise.
3928         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3929         * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
3930         * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
3932 2000-12-17  Ulrich Drepper  <drepper@redhat.com>
3934         * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
3935         * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
3937 2000-12-17  Andreas Jaeger  <aj@suse.de>
3939         * internals.h: Add prototypes for testandset and
3940         __compare_and_swap to shut up gcc warnings.
3942 2000-12-06  Wolfram Gloger  <wg@malloc.de>
3944         * join.c (pthread_detach): Allow case where the thread has already
3945         terminated.
3947 2000-12-05  Andreas Jaeger  <aj@suse.de>
3949         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
3950         * sysdeps/mips/pt-machine.h (testandset): Likewise.
3951         (__compare_and_swap): Likewise.
3952         Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
3954 2000-11-20  Jakub Jelinek  <jakub@redhat.com>
3956         * Examples/ex3.c (main): Cast int to long before casting to void *.
3957         (search): Cast void * to long, not int.
3958         * Examples/ex8.c (main, thread): Similarly.
3959         * Examples/ex11.c (main): Similarly.
3960         * Examples/ex14.c (worker, do_test): Similarly.
3961         * ecmutex.c (worker, do_test): Similarly.
3962         (nlocks): Cast to int.
3964 2000-11-08  Bruce Mitchener  <bruce@cubik.org>
3966         * linuxthreads.texi:  Add documentation for pthreads attributes
3967         guardsize, stackaddr, stacksize, and stack.  Fix typo in previous
3968         patch.  Document pthread_[sg]etconcurrency().  Mark
3969         pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
3971 2000-11-07  Ulrich Drepper  <drepper@redhat.com>
3973         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3974         Don't define it.
3975         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3976         Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
3978 2000-11-06  Ulrich Drepper  <drepper@redhat.com>
3980         * cancel.c (pthread_cancel): Always set p_canceled, even if we are
3981         not doing it right now.
3982         Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
3984 2000-10-30  Ulrich Drepper  <drepper@redhat.com>
3986         * Examples/ex4.c (main): Don't use exit() to avoid warning with
3987         broken compilers.
3989 2000-10-29  Ulrich Drepper  <drepper@redhat.com>
3991         * attr.c (__pthread_attr_setguardsize): Don't round guardsize
3992         here.  Reported by Bruce Mitchener <bruce@cubik.org>.
3994         * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
3995         discussing mutexes. (As per the Unix98 name for the API.)
3996         Changes documentation for pthread_mutexattr_setkind_np() and
3997         pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
3998         same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
3999         Changes references to PTHREAD_MUTEXATTR_FAST_NP to
4000         PTHREAD_MUTEXATTR_ADAPTIVE_NP.
4001         Begins to introduce discussion of the ``timed'' mutex type.  This
4002         discussion is currently incomplete.
4003         Patch by Bruce Mitchener <bruce@cubik.org>.
4005 2000-10-26  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
4006             Yutaka Niibe  <gniibe@chroot.org>
4008         * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
4009         has restrictions, use register.
4011 2000-10-23  Andreas Schwab  <schwab@suse.de>
4013         * Examples/ex14.c (TIMEOUT): Override default timeout.
4015 2000-10-16  Ulrich Drepper  <drepper@redhat.com>
4017         * specific.c: Protect tsd array modification in thread data
4018         structures by getting the thread lock in pthread_key_delete and
4019         __pthread_destroy_specifics.
4020         Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
4022 2000-10-12  Alan Modra <alan@linuxcare.com.au>
4024         * sysdeps/pthread/bits/initspin.h: New file.
4025         * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
4026         (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
4027         (__pthread_alt_init_lock): Likewise.
4028         (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
4030 2000-10-12  David Huggins-Daines  <dhd@linuxcare.com>
4032         * oldsemaphore.c (__old_sem_init): Release lock with
4033         LT_SPINLOCK_INIT, not zero.
4034         * spinlock.c (__pthread_unlock): Likewise.
4035         (__pthread_alt_lock): Likewise.
4036         (__pthread_alt_timedlock): Likewise.
4037         (__pthread_alt_unlock): Likewise.
4038         * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
4039         LT_SPINLOCK_INIT if it is non-zero.  Likewise for init-once flags.
4040         * sysdeps/pthread/pthread.h: Include bits/initspin.h.  Use
4041         LT_SPINLOCK_INIT do initialize spinlocks not 0.
4043 2000-10-12  David Huggins-Daines <dhd@linuxcare.com>
4045         * shlib-versions: Add version definitions for hppa-linux.
4047 2000-10-12  Alan Modra <alan@linuxcare.com.au>
4049         * sysdeps/hppa/pspinlock.c: New file.
4050         * sysdeps/hppa/pt-machine.h: New file.
4051         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
4053 2000-10-05  Jakub Jelinek  <jakub@redhat.com>
4055         * mutex.c (__pthread_mutex_destroy): Correct test of
4056         busy mutex for mutexes using alternate fastlocks.
4057         Patch by dtc@cmucl.cons.org.
4059 2000-09-28  Martin Schwidefsksy    <schwidefsky@de.ibm.com>
4061         * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
4063 2000-09-28  Ulrich Drepper  <drepper@redhat.com>
4065         * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
4066         test for owner first.
4067         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4069         * cancel.c (pthread_cancel): Don't do anything if cancelation is
4070         disabled.
4072 2000-09-26  Ulrich Drepper  <drepper@redhat.com>
4074         * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
4075         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4077         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
4078         _POSIX_MONOTONIC_CLOCK.
4080         * spinlock.h (__pthread_set_own_extricate_if): Add back locking
4081         and explain why.
4083 2000-09-20  Andreas Jaeger  <aj@suse.de>
4085         * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
4086         "testrtsig.h" conditional.
4088 2000-09-11  Ulrich Drepper  <drepper@redhat.com>
4090         * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
4091         pthread_attr_setstack.
4092         * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
4093         pthread_attr_setstack.
4094         * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
4096 2000-09-05  Ulrich Drepper  <drepper@redhat.com>
4098         * Examples/ex14.c: New file.
4099         * Makefile (tests): Add ex14.
4101         * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
4102         mutex.  Patch by dtc@cmucl.cons.org.
4104         * ecmutex.c: New file.
4105         * Makefile (tests): Add ecmutex.
4107 2000-09-04  H.J. Lu  <hjl@gnu.org>
4109         * attr.c (__pthread_attr_setguardsize): Use page_roundup
4110         instead of roundup to round up to the page size.
4112 2000-09-03  Mark Kettenis  <kettenis@gnu.org>
4114         * manager.c (pthread_exited): Correctly report event as TD_REAP
4115         instead of TD_DEATH.  Fix comments.
4117 2000-09-03  Ulrich Drepper  <drepper@redhat.com>
4119         * spinlock.h (testandset): Add cast to avoid warning.
4120         Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
4122 2000-09-02  Andreas Jaeger  <aj@suse.de>
4124         * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
4125         prototype.
4127 2000-09-01  Ulrich Drepper  <drepper@redhat.com>
4129         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
4130         Fix typo in last patch (_mode -> _flags).
4132         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
4133         Provide definition which respects _IO_USER_LOCK flag.
4135 2000-08-30  Ulrich Drepper  <drepper@redhat.com>
4137         * manager.c (pthread_allocate_stack): Clear descriptor only if not
4138         mmaped.
4140 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
4142         * Makefile: Add rules to build and run unload.
4143         * unload.c: New file.
4145         * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
4147         * sysdeps/pthread/pthread.h
4148         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
4149         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
4151 2000-08-24  Andreas Jaeger  <aj@suse.de>
4153         * Examples/ex13.c: Include <string.h> for strerror prototype and
4154         <stdlib.h> for abort prototype.
4155         (pthr_cond_signal_mutex): Rewrite to silence GCC.
4156         (thread_start): Remove unused variable err.
4157         (main): Silence GCC warnings.
4159 2000-08-22  Andreas Jaeger  <aj@suse.de>
4161         * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
4163         * Makefile (tests): Add ex13.
4165 2000-08-20  Ulrich Drepper  <drepper@redhat.com>
4167         * semaphore.h: Add restrict where required by AGd4.
4168         * sysdeps/pthread/pthread.h: Likewise.
4169         * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
4171 2000-08-15  Ulrich Drepper  <drepper@redhat.com>
4173         * Makefile (tests): Add ex12.  Add rule to build it.
4174         * Examples/ex12.c: New file.
4176 2000-08-13  Ulrich Drepper  <drepper@redhat.com>
4178         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
4179         even though the implementation is not quite complete (but it reports
4180         it).  Define _POSIX_MESSAGE_PASSING to -1.
4181         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4183 2000-08-12  Andreas Jaeger  <aj@suse.de>
4185         * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
4186         assembler.
4187         (__compare_and_swap): Likewise.
4188         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
4190 2000-08-10  Ulrich Drepper  <drepper@redhat.com>
4192         * pthread.c (__pthread_initial_thread): Initialize p_errnop and
4193         p_h_errnop correctly and not to NULL.
4195 2000-08-05  Ulrich Drepper  <drepper@redhat.com>
4197         * Banner: Bump version number to 0.9.
4199 2000-08-04  Ulrich Drepper  <drepper@redhat.com>
4201         * Makefile (tests): Add tststack.  Add rule to build the program.
4202         * tststack.c: New file.
4204         * internals.h: Declare __pthread_max_stacksize.
4205         * pthread.c (__pthread_max_stacksize): New variable.
4206         (__pthread_initialize_manager): Determine __pthread_initialize_manager
4207         value.
4208         * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
4209         (pthread_allocate_stack): Allow kernel to choose stack address if
4210         FLOATING_STACKS.  This also handles variable-sized stacks.
4211         Always allocate stack and guardpage together.  Use mprotect to
4212         change guardpage access.
4213         * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
4214         ARCH_STACK_MAX_SIZE.
4216         * attr.c (__pthread_attr_setstacksize): Also test value against
4217         upper limit.
4219         * manager.c (__pthread_nonstandard_stacks): Define only if
4220         THREAD_SELF is not defined.
4221         (pthread_allocate_stack): Always initialize gardaddr to a correct
4222         value.
4223         (pthread_handle_create): Unmap thread with one call.
4224         (pthread_free): Remove test for initial thread before removing stack.
4225         Unmap stack with one call.
4227         * pthread.c (__pthread_initial_thread): Initialize p_userstack to
4228         1 to avoid removing the stack.
4230 2000-07-27  Jes Sorensen  <jes@linuxcare.com>
4232         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
4233         load of spin lock to prime the cache before the atomic compare and
4234         exchange operation (cmpxchg4). This avoids the spinning on the
4235         cmpxchg4 instruction and reduces movement of the cache line back
4236         and forth between the processors (explanation by Asis K. Mallick
4237         from Intel). This basically makes the implementation operate the
4238         same as the Linux kernel implementation.
4240         * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
4241         * sysdeps/ia64/pspinlock.c: New file.
4243 2000-08-03  Ulrich Drepper  <drepper@redhat.com>
4245         * pthread.c: Move definition of __pthread_set_own_extricate_if...
4246         * spinlock.h: ...here.  Remove locking.
4247         * internals.h: Remove __pthread_set_own_extricate_if prototype.
4249         * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
4250         (rwlock_rd_extricate_func): Don't determine self, let
4251         __pthread_lock do it.
4252         (rwlock_wr_extricate_func): Likewise.
4253         (rwlock_have_already): Optimize *pself handling a bit.
4255         * mutex.c: Use __builtin_expect.
4256         * pthread.c: Likewise.
4258 2000-08-02  Andreas Jaeger  <aj@suse.de>
4260         * sysdeps/s390/pspinlock.c: New file.
4261         * sysdeps/s390/pt-machine.h: New file.
4262         Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
4264 2000-07-12  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
4266         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
4267         R3K.
4268         * sysdeps/mips/pt-machine.h (testandset): Likewise.
4270 2000-07-26  Andreas Jaeger  <aj@suse.de>
4272         * pthread.c: Initialize p_sem_avail.
4274 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
4276         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
4277         * semaphore.c: Handle spurious wakeups.
4279         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
4280         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
4282         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
4283         (__pthread_wait_for_restart): Likewise.
4285         * condvar.c (pthread_cond_wait): Also check whether thread is
4286         cancelable before aborting loop.
4287         (pthread_cond_timedwait): Likewise.
4289         * signals.c (pthread_sighandler): Remove special code to restrore
4290         %gs on x86.
4291         (pthread_sighandler_t): Likewise.
4293 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
4295         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
4296         * pthread.c: Include <resolv.h>.
4297         (_res): Undefine.  Add extern declaration.
4299 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
4301         * pthread.c (__pthread_initial_thread): Update initializer.
4302         (__pthread_manager_thread): Likewise.
4303         (pthread_initialize): Move setrlimit call to...
4304         (__pthread_initialize_manager): ...here.
4305         (__pthread_reset_main_thread): Reset also soft limit on stack size.
4307         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
4308         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
4310 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
4312         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
4313         __compare_and_swap to define testandset.
4314         * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
4315         Define IMPLEMENT_TAS_WITH_CAS.
4317 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
4319         * Makefile: Pass -z nodelete to linker for libpthread.so
4320         generation if it understand this option.
4322 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
4324         * manager.c (pthread_handle_create): Remove initialization of
4325         new_thread->p_res._sock.
4327 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
4329         Bugfixes to the variant of the code for machines with no compare
4330         and swap.
4332         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
4333         node was not being properly enqueued, due to failing to update
4334         the lock->__status field.
4336         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
4337         being set inappropriately, causing the suspend function to be called
4338         with a null self pointer and crash.
4340 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
4342         * spinlock.h (__pthread_alt_trylock): Fix code used if no
4343         compare&swap is available.
4345         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
4346         compare_and_swap.
4348         * pthread.c (pthread_initialize): Don't use sysconf to determine
4349         whether the machine has more than one processor.
4351         * spinlock.c (__pthread_alt_timedlock): Add back one of the
4352         removed thread_self calls.
4354 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4356         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
4357         __compare_and_swap to compare_and_swap in code which assumes
4358         compare swap is available.
4360 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4362         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
4363         bug whereby thr field of waitnode structure would not be correctly
4364         set unless a null self pointer is passed to the functions.
4365         Eliminated redundant calls to thread_self().
4367 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
4369         * pthread.c (__pthread_initialize_manager): Lock
4370         __pthread_manager_thread.p_lock before calling clone.
4372 2000-05-05  H.J. Lu  <hjl@gnu.org>
4374         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
4375         have acquire semantics.
4376         (__compare_and_swap_with_release_semantics): New inline
4377         function.
4378         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
4380 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
4382         * manager.c: Fix the problem with signals at startup.
4383         Change the way that thread stacks are allocated on IA64.
4384         Clean up some of the guard page allocation stuff.
4386 1999-12-19  H.J. Lu  <hjl@gnu.org>
4388         * internals.h (page_roundup): New.
4389         * attr.c (__pthread_attr_setguardsize); Use page_roundup
4390         instead of roundup.
4391         * manager.c (pthread_allocate_stack): Make sure guardaddr is
4392         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
4393         is define.
4395 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
4397         * manager.c (pthread_allocate_stack): Unmap the stack top
4398         if failed to map the stack bottom.
4399         Fix the guard page.
4400         (pthread_free): Fix the guard page.
4402         * pthread.c (pthread_initialize): Set rlimit correctly for
4403         NEED_SEPARATE_REGISTER_STACK.
4405 1999-12-16  H.J. Lu  <hjl@gnu.org>
4407         * pthread.c (__pthread_initialize_manager): Pass
4408         __pthread_manager_thread_bos instead of
4409         __pthread_manager_thread_tos to __clone2.
4411 1999-12-16  H.J. Lu  <hjl@gnu.org>
4413         * manager.c (pthread_allocate_stack): Correct the calculation
4414         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
4415         stack bottom.
4417 1999-12-13  H.J. Lu  <hjl@gnu.org>
4419         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
4420         bit after setting ar.ccv.
4422 1999-12-12  H.J. Lu  <hjl@gnu.org>
4424         * manager.c (pthread_allocate_stack): Make the starting
4425         address of the stack bottom page aligned. FIXME: it may
4426         need changes in other places.
4427         (pthread_handle_create): Likewise.
4429 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
4431         * manager.c (pthread_allocate_stack): Handle
4432         NEED_SEPARATE_REGISTER_STACK.
4433         (pthread_handle_create): Likewise.
4434         * pthread.c (__pthread_initialize_manager): Likewise.
4436         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
4438 1999-12-02  H.J. Lu  <hjl@gnu.org>
4440         * sysdeps/ia64/pt-machine.h: New.
4442 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
4444         * wrapsyscall.c: Mark non-__ protected names as weak.
4445         PR libc/1466.
4447 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
4449         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
4451 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
4453         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
4454         Add tests also to new alternative spinlock implementation.
4455         * spinlock.h: Likewise.
4456         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4458 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
4460         * Version: Export __sigaction.
4461         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
4462         of __sigaction.
4463         * pthread.c: Use __libc_sigaction instead of __sigaction.
4465         * condvar.c: Implement pthread_condattr_getpshared and
4466         pthread_condattr_setpshared.
4467         * mutex.c: Implement pthread_mutexattr_getpshared and
4468          pthread_mutexattr_setpshared.
4469         * Versions: Export new functions.
4470         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4472         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
4473         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
4474         is not selected.
4476 2000-07-04  Greg McGary  <greg@mcgary.org>
4478         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
4479         pragmas.  Include bp-sym.h only if _LIBC.
4481 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
4483         * spinlock.c (__pthread_unlock): Properly place write barrier.
4484         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4486 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
4488         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
4489         faster on SMP systems.  No more emulation of compare&swap for adaptive
4490         spinlocks.
4491         * spinlock.h: Likewise.
4492         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
4493         Replace fast with adaptive mutex.
4494         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
4495         * condvar.c: Likewise.
4496         * pthread.c: Define and initialize __pthread_smp_kernel variable.
4497         * internals.h: Declare __pthread_smp_kernel.
4498         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
4499         _pthread_fastlock structure.
4500         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4502         * pthread.c: Remove initialization to zero from global variables.
4504 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
4506         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
4508 2000-06-28  Greg McGary  <greg@mcgary.org>
4510         * weaks.c: Wrap BP_SYM () around weak extern declarations of
4511         pthread functions that have pointers in their return+arg signatures.
4513 2000-06-27  Greg McGary  <greg@mcgary.org>
4515         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
4516         extern declarations of pthread functions that have pointers in
4517         their return+arg signatures.
4519 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
4521         * Makefile (tests): Add ex11.  Add rules to build it.
4522         * Examples/ex11.c: New file.
4523         * rwlock.c: Fix complete braindamaged previous try to implement
4524         timedout functions.
4526         * spinlock.c: Pretty print.
4528 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
4530         * Makefile (tests): Add ex10.  Add rules to build it.
4531         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
4532         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
4533         * condvar.c (pthread_cond_wait): Allow mutex of kind
4534         PTHREAD_MUTEX_TIMED_NP.
4535         (pthread_cond_timedwait_relative): Likewise.
4536         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
4537         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
4538         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4539         (__pthread_mutex_lock): Use __pthread_alt_lock for
4540         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4541         (__pthread_mutex_timedlock): New function.
4542         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
4543         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4544         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
4545         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
4546         * spinlock.c: Implement alternate fastlocks.
4547         * spinlock.h: Add prototypes.
4548         * Examples/ex10.c: New file.
4549         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4550         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4552         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
4553         (__pthread_rwlock_timedrdlock): New function.
4554         (__pthread_rwlock_timedwrlock): New function.
4555         Use laternate fastlock function everywhere.
4557 2000-06-21  Andreas Jaeger  <aj@suse.de>
4559         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
4560         prototype.
4562         * join.c: Include <stdlib.h> for exit prototype.
4564 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
4566         * sysdeps/i386/useldt.h: Include <stdlib.h>.
4568         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
4569         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4571         * Makefile (libpthread-routines): Add barrier.
4572         (tests): Add ex9.  Add rule to build ex9.
4573         * Versions: Export barrier functions.
4574         * barrier.c: New file.
4575         * Examples/ex9.c: New file.
4576         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
4577         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
4578         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4580 2000-06-19  H.J. Lu  <hjl@gnu.org>
4582         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
4583         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
4584         (compare_and_swap_with_release_semantics): New. Default to
4585         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
4586         is not defined.
4588         * spinlock.c (__pthread_unlock): Call
4589         compare_and_swap_with_release_semantics () instead of
4590         compare_and_swap ().
4592 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
4594         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
4595         to errno directly.
4596         * sysdeps/pthread/timer_delete.c: Likewise.
4597         * sysdeps/pthread/timer_getoverr.c: Likewise.
4598         * sysdeps/pthread/timer_gettime.c: Likewise.
4599         * sysdeps/pthread/timer_settime.c: Likewise.
4601 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4603         Timer nodes are now reference counted, and can be marked
4604         as deleted. This allows for the safe release of the global mutex
4605         in the middle without losing the timer being operated on.
4607         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
4608         member is now an enum with three values, so that an intermediate
4609         state can be represented (deleted but not free for reuse yet).
4610         New refcount member added.
4611         * sysdeps/pthread/timer_routines.c: Likewise.
4613         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
4614         timer_valid): New inline functions added.
4616         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
4617         restructured, recursive deadlock bug fixed.
4619         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
4620         timer_addref to ensure that timer won't be deleted while mutex is not
4621         held. Also uses timer_invalid to perform validation of timer handle.
4622         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
4623         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
4625 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
4627         * shlib-versions: Add entry for SH.
4628         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
4630 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4632         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
4633         tightened up some critical regions and micro-optimized some list
4634         manipulation code.
4636         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4637         Returns int value now to indicate whether timer was queued at head.
4638         * sysdeps/pthread/posix-timer.h: Likewise.
4639         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
4640         new return value from __timer_thread_queue_timer to avoid waking
4641         up timer thread unnecessarily.
4643         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
4644         inuse flag, because this requires mutex to be held.  Callers updated
4645         to do the check when they have the mutex.
4646         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
4648         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
4649         regions: avoids making system calls while holding timer mutex, and
4650         a few computations were moved outside of the mutex as well.
4651         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
4653         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
4654         to list_unlink_ip, meaning idempotent.  Pointer manipulation
4655         changed to get better better code out of gcc.
4656         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
4657         version of list_unlink added here.
4658         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
4659         function in all places: idempotent one for timers, non-idempotent
4660         one for thread nodes.
4661         * sysdeps/pthread/timer_settime: Likewise.
4662         * sysdeps/pthread/timer_routines.c: Likewise.
4664 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
4666         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
4667         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4669         * sysdeps/pthread/Makefile: Remove tests definition.
4671 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
4672             Yutaka Niibe  <gniibe@chroot.org>
4674         * sysdeps/sh/pspinlock.c: New file.
4675         * sysdeps/sh/pt-machine.h: New file.
4677 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
4679         * Makefile (tests): Add joinrace.
4681         * Examples/ex6.c: Test return value of pthread_join.
4683 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
4685         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
4686         (__pthread_spin_trylock): Implement.
4687         (__pthread_spin_unlock): Implement.
4688         (__pthread_spin_init): Implement.
4689         (__pthread_spin_destroy): Implement.
4691 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4693         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
4694         really append the entry.
4696 2000-06-10  Andreas Jaeger  <aj@suse.de>
4698         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
4700 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
4702         * sysdeps/pthread/timer_create.c: Thread matching now done on
4703         clock type as well as thread attributes.
4704         There are individual global signal-delivering threads for
4705         different clock types.
4706         * sysdeps/pthread/posix-timer.h: Likewise.
4707         * sysdeps/pthread/timer_routines.c: Likewise.
4709         * sysdeps/pthread/timer_routines.c: Thread allocation and
4710         deallocation function now remembers to put thread on active
4711         list and remove from active list.
4712         Thus now the feature of binding multiple timers
4713         to a single thread actually works.
4715 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4717         * pthread.c (__pthread_create_2_1): Optimize a bit.
4719         * internals.h (invalid_handle): Also test for p_terminated != 0.
4720         (nonexisting_handle): New function.  Same as old invalid_handle.
4721         * join.c (pthread_join): Use nonexisting_handle instead of
4722         invalid_handle to test for acceptable thread handle.
4723         * manager.c (pthread_handle_free): Likewise.
4724         * joinrace.c: New file.
4725         Reported by Permaine Cheung <pcheung@cygnus.com>.
4727 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4729         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4730         Correct handling of matching variable.
4732         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
4733         avoid warnings.
4735         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4736         Be prepared for empty timer list.
4738         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
4739         CPUTIME clock ID.  Add support for thread clocks.
4741         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
4742         subtraction were switched.
4744         * sysdeps/pthread/timer_routines.c (init_module): Use
4745         THREAD_MAXNODES threads.
4747         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
4748         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
4749         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
4750         with sigqueueinfo is this system call is available.
4752         * sysdeps/pthread/timer_create.c (timer_create): Allow
4753         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
4755         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
4756         functionality.
4757         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
4759 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4761         * sysdeps/pthread/posix-timer.h: New file.
4762         * sysdeps/pthread/timer_create.c: New file.
4763         * sysdeps/pthread/timer_delete.c: New file.
4764         * sysdeps/pthread/timer_getoverr.c: New file.
4765         * sysdeps/pthread/timer_gettime.c: New file.
4766         * sysdeps/pthread/timer_routines.c: New file.
4767         * sysdeps/pthread/timer_settime.c: New file.
4768         * sysdeps/pthread/tst-timer.c: New file.
4770 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4772         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
4773         LINK_MAX definitions if necessary.
4775 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4777         Added missing fork time handling of global libio lock.
4779         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
4780         not just the individual stream locks. Rewritten to use new
4781         iterator interface provided by libio rather than accessing
4782         global variable.
4784         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
4785         which lock and unlock the stream list using the new interface
4786         provied by libio.
4787         * internals.h: Likewise.
4789         * ptfork.c (__fork): Now calls __flockfilelist before fork,
4790         and __funlockfilelist in the parent after the fork.
4791         Child still calls __fresetlockfiles as before.
4793         * linuxthreads.texi: Now explains what happens to streams at
4794         fork time. Also whole new section on forking and thread added.
4795         Definition of pthread_atfork moved out of Miscellaneous Functions
4796         to this new section.
4798 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
4800         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
4801         Add missing register.
4802         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
4804 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
4806         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
4807         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
4808         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
4810 2000-05-31  Andreas Jaeger  <aj@suse.de>
4812         * sysdeps/mips/pspinlock.c: Implement spinlocks.
4814 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
4816         * spinlock.c (__pthread_lock): Remove ASSERT.
4818         * Makefile (tests): Add ex8.
4819         * Examples/ex8.c: New file.
4821 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
4823         Bugfix: The pthread_atfork mechanism now takes care of its
4824         own internal mutex at fork time.
4826         * ptfork.c (__fork): Revised so that the mutex is held across
4827         the fork operation and while the handlers are called, and so that
4828         the child resets the mutex.
4830         * linuxthreads.texi: Updated pthread_atfork documentation to make
4831         it clear that fork and pthread_atfork can't be reentered from
4832         atfork handlers, that pthread_atfork and fork are mutually atomic,
4833         and that the handlers are inherited by the child process.
4835 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
4837         * Makefile (libpthread-routines): Add pspinlock.
4838         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
4839         Use struct _pthread_fastlock instead of pthread_spinlock_t.
4840         * condvar.c: Likewise.
4841         * internals.h: Likewise.
4842         * join.c: Likewise.
4843         * manager.c: Likewise.
4844         * mutex.c: Likewise.
4845         * pthread.c: Likewise.
4846         * rwlock.c: Likewise.
4847         * semaphore.c: Likewise.
4848         * signals.c: Likewise.
4849         * spinlock.h: Likewise.
4850         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
4851         * sysdeps/alpha/pspinlock.c: New file.
4852         * sysdeps/arm/pspinlock.c: New file.
4853         * sysdeps/i386/pspinlock.c: New file.
4854         * sysdeps/m68k/pspinlock.c: New file.
4855         * sysdeps/mips/pspinlock.c: New file.
4856         * sysdeps/powerpc/pspinlock.c: New file.
4857         * sysdeps/sparc/sparc32/pspinlock.c: New file.
4858         * sysdeps/sparc/sparc64/pspinlock.c: New file.
4859         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
4860         back to _pthread_fastlock.  Define new pthread_spinlock_t.
4862 2000-05-24  Andreas Jaeger  <aj@suse.de>
4864         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
4866 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
4868         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
4870 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
4872         * internals.h (__RES_PTHREAD_INTERNAL): Define.
4874 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
4876         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
4877         object state is represented with additional bits which distinguish
4878         whether that state was set up in the current process, or
4879         in an ancestor process. If that state was set in an ancestor,
4880         it means that a fork happened while thread was executing the init
4881         function. In that case, the state is reset to NEVER.
4882         * mutex.c (__pthread_once_fork_prepare): New function.
4883         (__pthread_once_fork_child): Likewise
4884         (__pthread_once_fork_parent): Likewise
4885         (__pthread_reset_pthread_once): Removed.
4886         * ptfork.c (__fork): Call new handlers in mutex.c.
4887         * internals.h: Declarations of new mutex.c functions added.
4888         Declaration of removed function deleted.
4889         * linuxthreads.texi: Updated documentation about pthread_once
4890         to clarify what happens under cancellation and forking.
4892 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
4894         * internals.h: New thread manager request type, REQ_KICK.
4895         * join.c (pthread_exit): main thread now calls exit() instead
4896         of _exit() in order to proper process cleanup.
4897         * manager.c (__pthread_manager): Do not terminate manager
4898         after unblocking main thread; wait for main thread's
4899         REQ_PROCESS_EXIT request instead.
4900         Also, added REQ_KICK case to handle new request; this just does
4901         nothing.
4902         * manager.c (pthread_exited): Do not terminate manager after
4903         unblocking main thread.
4904         * manager.c (__pthread_manager_sighandler): If the main thread
4905         is waiting for all other threads to die, send a REQ_KICK into
4906         the thread manager request pipe to get it to clean out the threads
4907         and unblock the main thread as soon as possible. This fixes
4908         the 2000 millisecond hang on shutdown bug.
4909         * Examples/ex7.c: New file, tests shutdown behavior when all threads
4910         including the main one call pthread_exit(), or implicitly do so.
4911         * Makefile (tests): Add ex7.
4913 2000-05-05  Andreas Jaeger  <aj@suse.de>
4915         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4916         (pthread_getcpuclockid): Correct test for ourselves.
4918 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
4920         * internals.h (struct _pthread_descr_struct): Reorganization.
4921         Allocate room for 16 pointers at head of the structure for future
4922         thread-local data handling.  Move p_self member in this area.
4923         * manager.c (pthread_handle_create): Adjust use of p_self.
4924         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
4925         * pthread.c (__pthread_initial_thread): Adjust initialization.
4926         (__pthread_manager_thread): Likewise.
4928 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
4930         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
4931         for eventmask larger than 1 word.
4933 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
4935         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
4936         * pthread.c (__pthread_initialize_minimal): New function.  Perform
4937         minimal initialization.
4938         (pthread_initialize): Remove this code here.
4939         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
4940         are working around the problem in glibc.
4942 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
4944         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
4945         now.  First gcc must be fixed (more concrete: libgcc).
4947 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
4949         * pthread.c: Remove special treatement for interrupt handlers on x86.
4950         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
4951         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
4952         necessary.
4953         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
4955 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
4957         * join.c (pthread_exit): Set p_terminated after reporting the
4958         termination event instead of before.
4960 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
4962         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
4963         if __USE_UNIX98.
4965 2000-04-18  Andreas Jaeger  <aj@suse.de>
4967         * Versions: Use ld instead of ld.so.
4969 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
4971         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
4972         Remove the typedef keyword.
4974 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
4976         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
4977         not stbar.
4978         (READ_MEMORY_BARRIER): Define.
4979         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
4980         MEMORY_BARRIER.
4981         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
4982         headers.
4984 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
4986         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4987         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
4988         use thread_handle().
4990 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
4992         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
4993         if fast mutex is used.  Don't initialize `already_canceled' twice.
4994         Correctly test for return value of timedsuspend.
4996         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
4997         therefore don't need the _rt versions of the signal handlers.
4999 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
5001         * pthread.c (pthread_yield): New function.
5002         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
5003         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
5004         * internals.h: Declare __pthread_yield.
5006         * pthread.c (pthread_initialize): Avoid a bit more code if
5007         realtime signals are known to exist.
5009         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
5010         to dynamically detect RT signals and avoid generating compatibility
5011         functions with old kernel.
5012         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
5013         __pthread_restart_new directly.
5014         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
5015         __pthread_wait_for_restart_signal directly.
5016         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
5017         __pthread_timedsuspend_new directly.
5019 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
5021         * condvar.c: Remove all the special code to handle cond_timedwait.
5022         Use timedsuspend instead.
5023         * internals.h: Declare __pthread_timedsuspend_old,
5024         __pthread_timedsuspend_new, and __pthread_timedsuspend.
5025         Remove declaration of __pthread_init_condvar.
5026         * pthread.c: Define __pthread_timedsuspend variable.
5027         (__pthread_timedsuspend_old): New function.  Timed suspension
5028         implementation for old Linux kernels.
5029         (__pthread_timedsuspend_new): New function.  Timed suspension
5030         implementation for new Linux kernels.
5031         * restart.h (timedsuspend): New function.  Call appropriate
5032         suspension function through __pthread_timedsuspend.
5033         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
5034         the code.
5035         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5037         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
5038         undefined.
5039         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
5040         where possible.
5041         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
5042         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5044         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
5045         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5047 2000-04-14  Andreas Jaeger  <aj@suse.de>
5049         * weaks.c: Fix typo.
5051         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
5052         2.2 for linuxthreads.
5054 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
5056         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
5057         (pthread_getcpuclockid): Fix typo.
5059 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
5061         * Makefile (libpthread-routines): Add getcpuclockid.
5062         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
5063         * sysdeps/pthread/getcpuclockid.c: New file.
5064         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
5065         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
5067         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
5068         Defined.
5069         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5071         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
5072         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
5073         and pthread_spin_unlock.
5074         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
5075         into pthread_spinlock_t.  Change all uses.
5076         * spinlock.c: Implement pthread_spin_lock.
5077         Rename __pthread_unlock to __pthread_spin_unlock and define weak
5078         alias for real name.
5079         Define pthread_spin_trylock, pthread_spin_init, and
5080         pthread_spin_destroy.
5081         Change all uses of _pthread_fastlock to pthread_spinlock_t.
5082         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
5083         Change all uses of _pthread_fastlock to pthread_spinlock_t.
5084         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
5085         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
5086         and pthread_spin_unlock.
5087         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
5088         Change all uses of _pthread_fastlock to pthread_spinlock_t.
5089         * condvar.c: Likewise.
5090         * internals.h: Likewise.
5091         * join.c: Likewise.
5092         * manager.c: Likewise.
5093         * mutex.c: Likewise.
5094         * pthread.c: Likewise.
5095         * rwlock.c: Likewise.
5096         * semaphore.c: Likewise.
5097         * signals.c: Likewise.
5099         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
5100         macros.
5101         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
5103 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
5105         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
5106         _POSIX_SHARED_MEMORY_OBJECTS.
5108 2000-04-11  Andreas Jaeger  <aj@suse.de>
5110         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
5111         (__compare_and_swap): Mark as modifying memory.
5113 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
5115         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
5116         __volatile__.
5117         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
5118         Don't have the 'asm' __volatile__.
5120 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
5122         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
5123         * spinlock.c (__pthread_lock): Add memory barriers.
5124         (__pthread_unlock): Likewise.
5125         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
5126         instruction.
5127         (RELEASE): Not needed anymore.
5128         (__compare_and_swap): Mark asm as modifying memory.
5129         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
5130         of MEMORY_BARRIER.
5131         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
5132         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
5133         (MEMORY_BARRIER): Define using stbar.
5134         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
5135         stbar.
5136         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
5137         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
5138         Mike Burrows <m3b@pa.dec.com>.
5140 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
5142         * signals.c (sigaction): Fix return value for the case SIG is one
5143         of the signals the implementation uses.
5144         Patch by Xavier.Leroy@inria.fr.
5146 2000-04-01  Andreas Jaeger  <aj@suse.de>
5148         * attr.c: Use shlib-compat macros.
5149         * oldsemaphore.c: Likewise.
5150         * pthread.c: Likewise.
5151         * weaks.c: Likewise.
5153 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
5155         * semaphore.c (sem_timedwait): New function.
5156         Patch by Carl Mailloux <carlm@oricom.ca>.
5157         * semaphore.h: Declare sem_timedwait.
5158         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
5160 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
5162         * sysdeps/pthread/Makefile: File removed.
5164 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
5166         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
5167         * internals.h (__pthread_reset_pthread_once): Add prototype.
5168         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
5170         * manager.c (pthread_handle_create): Store ID of new thread before
5171         clone call.
5173 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
5175         * attr.c: Use new macros from shlib-compat.h to define versions.
5176         * oldsemaphore.c: Likewise.
5177         * semaphore.c: Likewise.
5178         * weaks.c: Likewise.
5180         * pthread.c: Update for new SHLIB_COMPAT definition.
5182         * manager.c (__pthread_manager): Unmask debug signal.
5184         * pthread.c (pthread_initialize): Test for address of __dso_handle
5185         being NULL, not value.  Use __on_exit, not on_exit.
5186         Patch by Andreas Jaeger <aj@suse.de>.
5188         * pthread.c: Use new macros from shlib-compat.h to define versions.
5190 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
5192         * pthread.c (pthread_initialize): Instead of on_exit use
5193         __cxa_atexit if __dso_label is available to allow unloading the
5194         libpthread shared library.
5196 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
5198         * condvar.c: Make tests for ownership of mutex less strict.
5200 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
5202         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
5203         current thread and return error if not.
5204         (pthread_cond_timedwait_relative_old): Likewise.
5205         (pthread_cond_timedwait_relative_new): Likewise.
5207         * mutex.c (__pthread_once): Handle cancelled init function correctly.
5208         (pthread_once_cancelhandler): New function.
5209         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5211 2000-03-14  Andreas Jaeger  <aj@suse.de>
5213         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
5214         REG_GS.
5215         (pthread_handle_sigrestart_rt): Likewise.
5216         * signals.c (pthread_sighandler_rt): Likewise.
5218 2000-03-02  Andreas Jaeger  <aj@suse.de>
5220         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
5221         Reported by Sean Chen <sean.chen@turbolinux.com>.
5223 2000-02-28  Andreas Jaeger  <aj@suse.de>
5225         * rwlock.c: Fix typo.
5227 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
5229         * rwlock.c: Define __* variants of the functions and make old names
5230         aliases.
5231         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
5232         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
5234 2000-02-25  Andreas Jaeger  <aj@suse.de>
5236         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5237         pwrite64, lseek64, open64, and __open64 with version 2.2.
5239 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
5241         * semaphore.h (SEM_FAILED): Use 0 not NULL.
5243 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
5245         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
5246         nanosleep does not work either.  Get absolute time inside the
5247         loop.
5248         (pthread_cond_timedwait_relative_new): Likewise.
5249         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5251 2000-02-13  Andreas Jaeger  <aj@suse.de>
5253         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
5254         (pthread_cond_timedwait_relative_old): Likewise.
5256 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
5258         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
5259         but keep the code around.  A bug in the kernel prevent us from
5260         using the code.
5261         (pthread_cond_timedwait_relative_new): Likewise.
5262         (PR libc/1597 and libc/1598).
5264 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
5266         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
5267         loop around nanosleep calls instead of around most of the function
5268         (pthread_cond_timedwait_relative_new): Likewise.
5269         body.  Got rid of backwards goto and one local.
5271 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
5273         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
5274         before every nanosleep call to account for time spent in the rest
5275         of the function.
5276         (pthread_cond_timedwait_relative_new): Likewise.
5277         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
5279 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
5281         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
5282         from nanosleep call so that in case we restart we only wait for the
5283         remaining time.
5284         (pthread_cond_timedwait_relative_new): Likewise.
5285         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
5287 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
5289         * manager.c (pthread_allocate_stack): Compute guard page address
5290         correctly.  Patch by HJ Lu.
5292         * sysdeps/pthread/pthread.h: Define
5293         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
5295 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
5297         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
5298         preference handling.
5299         (pthread_rwlockattr_setkind_np): Allow
5300         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
5301         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5303 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
5305         * internals.h (pthread_readlock_info): New structure.
5306         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
5307         p_untracked_readlock_count.
5308         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5309         Add initializers for new fields.
5310         * manager.c (pthread_free): Free read/write lock lists.
5311         * queue.h (queue_is_empty): New function.
5312         * rwlock.c: Implement requirements about when readers should get
5313         locks assigned.
5314         * sysdeps/pthread/pthread.h
5315         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
5316         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
5317         Define this name as well.
5318         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5320 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
5322         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5323         Adjust initializers for struct _pthread_descr_struct change.
5324         * internals.h (struct _pthread_descr_struct): Move new elements to
5325         the end.
5327 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
5329         Redesigned how cancellation unblocks a thread from internal
5330         cancellation points (sem_wait, pthread_join,
5331         pthread_cond_{wait,timedwait}).
5332         Cancellation won't eat a signal in any of these functions
5333         (*required* by POSIX and Single Unix Spec!).
5334         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
5335         simultaneous condition variable signal (not required by POSIX
5336         or Single Unix Spec, but nice).
5337         * spinlock.c: __pthread_lock queues back any received restarts
5338         that don't belong to it instead of assuming ownership of lock
5339         upon any restart; fastlock can no longer be acquired by two threads
5340         simultaneously.
5341         * restart.h: Restarts queue even on kernels that don't have
5342         queued real time signals (2.0, early 2.1), thanks to atomic counter,
5343         avoiding a rare race condition in pthread_cond_timedwait.
5345 1999-12-31  Andreas Jaeger  <aj@suse.de>
5347         * internals.h: Remove duplicate prototype declarations.
5349         * weaks.c: Remove __THROW from prototypes since the file is not
5350         compiled by a C++ compiler.
5351         * internals.h: Likewise.
5353 1999-12-30  Andreas Jaeger  <aj@suse.de>
5355         * sysdeps/pthread/pthread.h: Move internal functions to...
5356         * sysdeps/pthread/bits/libc-lock.h: ...here.
5358 1999-12-29  Andreas Jaeger  <aj@suse.de>
5360         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
5362 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
5364         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
5365         beginning.
5367         * manager.c (__pthread_start): Add one more cast to prevent
5368         warning on 64bit machines.
5370 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
5372         * manager.c (pthread_handle_create): Set p_pid of new thread
5373         before calling the callback function to report a new thread.
5375 1999-12-20  Andreas Jaeger  <aj@suse.de>
5377         * pthread.c (pthread_initialize): Move getrlimit call after
5378         setting of errno.
5380 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
5382         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5383         pwrite64, lseek64, open64, and __open64.
5384         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
5385         pwrite64, lseek64, open64, and __open64.
5387         * manager.c (pthread_allocate_stack): Correct computation of
5388         new_thread_bottom.  Correct handling of stack size and when the
5389         rlimit method to guard for stack growth is used.
5390         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
5391         minus one pagesize (not two).
5393 1999-12-03  Andreas Jaeger  <aj@suse.de>
5395         * Versions: Add __res_state with version GLIBC_2.2.
5397         * errno.c (__res_state): New function to return thread specific
5398         resolver state.
5400         * pthread.c (pthread_initialize): Initialize p_resp.
5401         (__pthread_reset_main_thread): Also set p_resp.
5403         * manager.c (pthread_handle_create): Initialize p_resp.
5405         * internals.h: Add thread specific resolver state.
5406         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
5408 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
5410         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
5411         beginning.
5412         * sysdeps/i386/i686/pt-machine.h: Likewise.
5413         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
5415 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
5417         * manager.c (pthread_start_thread_event): Initialize p_pid already
5418         here.
5420 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
5422         * internals.h: Add prototype for __pthread_manager_event.
5423         * manager.c (__pthread_manager_event): New function.
5424         (pthread_start_thread_event): Correct computation of self.
5425         Use INIT_THREAD_SELF.
5426         * pthread.c (__pthread_manager_thread): Initialize p_lock.
5427         (__pthread_initialize_manager): Respect event flags also for creation
5428         of the manager thread.
5430 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
5432         * pthread.c (__pthread_initialize_manager): Initialize
5433         __pthread_manager_thread.p_tid.
5435 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
5437         * internals.h: Declare __pthread_last_event.
5438         * manager.c: Define __pthread_last_event.
5439         (pthread_handle_create): Set __pthread_last_event.
5440         (pthread_exited): Likewise.
5441         * join.c (pthread_exit): Likewise.
5443         * Makefile (libpthread-routines): Add events.
5444         * events.c: New file.
5445         * internals.h: Protect against multiple inclusion.
5446         Include thread_dbP.h header.
5447         (struct _pthread_descr_struct): Add new fields p_report_events and
5448         p_eventbuf.
5449         Declare event reporting functions.
5450         * join.c (pthread_exit): Signal event if this is wanted.
5451         * manager.c (__pthread_threads_events): New variable.
5452         (pthread_handle_create): Take new parameters with event information.
5453         Signal TD_CREATE event if wanted.
5454         (__pthread_manager): Adjust pthread_handle_create call.
5455         (pthread_start_thread_event): New function.  Block until manager is
5456         finished and then call pthread_start_thread.
5457         (pthread_exited): Signal TD_REAP event if wanted.
5459 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
5461         * restart.h (suspend_with_cancellation): Rewrite as a macro.
5463         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
5465 1999-10-25  Andreas Jaeger  <aj@suse.de>
5467         * internals.h: Remove K&R compatibility.
5468         * no-tsd.c: Likewise.
5469         * semaphore.h: Likewise.
5470         * signals.c: Likewise.
5471         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
5472         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
5473         * weaks.c: Likewise.
5475 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
5477         * pthread.c: For i386, wrap pthread_handle_sigrestart and
5478         pthread_handle_sigcancel with functions that restore %gs from the
5479         signal context.  For each signal handling function, two wrappers
5480         are required, one for a non-RT signal and one for a RT signal.
5481         * signal.c: For i386, add code to restore %gs from the signal
5482         context in pthread_sighandler and pthread_sighandler_rt.
5484 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
5486         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
5488 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
5490         * pthread.c (__pthread_initial_thread): Pass argument to
5491         PTHREAD_START_ARGS_INITIALIZER.
5492         (__pthread_manager_thread): Likewise.
5494         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
5495         initialize function.
5497         * manager.c (pthread_handle_create): Remove p_startfct initialization.
5499         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
5501 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
5503         * internals.h: Correct return types for __libc_read and __libc_write.
5505 1999-10-09  Andreas Jaeger  <aj@suse.de>
5507         * internals.h: Add __new_sem_post to get prototype in
5508         manager.c; include semaphore.h for needed types.
5510 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
5512         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
5513         directly instead of calling sem_post which should not be necessary
5514         but is faster and might help in some case to work around problems.
5515         Patch by khendricks@ivey.uwo.ca [libc/1382].
5517 1999-10-08  Andreas Schwab  <schwab@suse.de>
5519         * sysdeps/pthread/Subdirs: New file.
5520         * Implies: Removed.
5522 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
5524         * Implies: New file.
5525         * internals.h (struct _pthread_descr_struct): Add p_startfct.
5526         * manager.c (pthread_handle_create): Initialize p_startfct.
5527         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
5529 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
5531         * manager.c (__linuxthreads_pthread_threads_max): New variable.
5532         * specific.c (__linuxthreads_pthread_keys_max): New variable.
5533         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
5535         * condvar.c (pthread_cond_timedwait_relative): Never return with
5536         EINTR.  Patch by Andreas Schwab.
5538 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
5540         * signals.c (sigaction): Correct last patch.  Don't select
5541         pthread_sighandler_rt based on the signal number but instead of
5542         the SA_SIGINFO flag.
5544 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
5546         * specific.c: Move definitions of struct pthread_key_struct and
5547         destr_function to ...
5548         * internals.h: ...here.
5550 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
5552         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
5553         this instead of pthread_handle_sigrestart if the signal is an RT
5554         signal.
5556         * signals.c: Handle passing through of sighandler arguments also
5557         for real-time signals.
5559 1999-09-03  Andreas Schwab  <schwab@suse.de>
5561         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
5562         fork as weak alias.
5563         (__vfork): New function, alias vfork.
5564         * Versions: Export __fork, vfork, and __vfork in libpthread.
5566 1999-08-23  Andreas Schwab  <schwab@suse.de>
5568         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
5569         call to signal handler.
5571 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
5573         * pthread.c (__pthread_reset_main_thread): Undo last change.
5574         (__pthread_kill_other_threads_np): Reset signal handlers for the
5575         signals we used in the thread implementation here.
5577 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
5579         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
5580         for the signals we used in the thread implementation [PR libc/1234].
5582         * Versions: Export __pthread_kill_other_threads_np from libpthread
5583         for GLIBC_2.1.2.
5585         * signals.c: Pass sigcontext through wrapper to the user function.
5587 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
5589         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
5590         __libc_internal_tsd_set.
5592 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5594         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
5595         needed anymore.
5597 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5599         * internals.h: Align _pthread_descr_struct to 32 bytes.
5600         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
5601         libc/1206.
5603 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5605         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
5606         swap function.
5608 1999-07-09  Cristian Gafton  <gafton@redhat.com>
5610         * Makefile (libpthread-routines): Add oldsemaphore routine.
5611         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
5612         sem_trywait, and sem_wait to GLIBC_2.1.
5613         * oldsemaphore.c: New file.
5614         * semaphore.c: Add default_symbol_versions for the changed functions.
5615         (__new_sem_init): Rename from sem_init.
5616         (__new_sem_post): Rename from sem_post.
5617         (__new_sem_wait): Rename from sem_wait.
5618         (__new_sem_trywait): Rename from sem_trywait.
5619         (__new_sem_getvalue): Rename from sem_getvalue.
5620         (__new_sem_destroy): Rename from sem_destroy.
5622 1999-06-23  Robey Pointer  <robey@netscape.com>
5624         * internals.h: Added p_nextlock entry to separate queueing for a
5625         lock from queueing for a CV (sometimes a thread queues on a lock
5626         to serialize removing itself from a CV queue).
5627         * pthread.c: Added p_nextlock to initializers.
5628         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
5630 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5632         * manager.c (pthread_handle_create): Free mmap region after stack
5633         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
5635 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5637         * man/pthread_cond_init.man: Correct example.
5638         Reported by Tomas Berndtsson <tomas@nocrew.org>.
5640         * linuxthreads.texi (Condition Variables): Likewise.
5642 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
5644         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
5645         casx not cas, also successful casx returns the old value in rd
5646         and not the new value.
5648 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
5650         * manager.c: If pthread_create() is given a NULL attribute
5651         and the thread manager runs with a realtime policy, set the
5652         scheduling policy of the newly created thread back to SCHED_OTHER.
5653         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
5654         initialize the schedpolicy field of new_thread->p_start_args
5655         to that of the calling thread.
5657 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
5659         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
5660         instruction does not allow memory element to use offset.
5662 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
5664         * manager.c (pthread_allocate_stack): Optimize initialization of new
5665         thread descriptor.
5667         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
5668         Don't use initializer since it is all zeroes.
5669         (__libc_once_define): Likewise.
5671 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5673         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
5674         doesn't exist anymore.
5675         * sysdeps/i386/Implies: Likewise.
5676         * sysdeps/m68k/Implies: Likewise.
5677         * sysdeps/mips/Implies: Likewise.
5678         * sysdeps/powerpc/Implies: Likewise.
5679         * sysdeps/sparc/sparc32/Implies: Likewise.
5680         * sysdeps/sparc/sparc64/Implies: Likewise.
5682 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
5684         * sysdeps/alpha/bits/semaphore.h: Removed.
5685         * sysdeps/powerpc/bits/semaphore.h: Removed.
5686         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
5687         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
5688         * Makefile (headers): Remove bits/semaphore.h.
5690         * semaphore.h: Define _pthread_descr if necessary.
5691         Don't include limits.h.  Define SEM_VALUE_MAX directly.
5692         Define SEM_FAILED.
5693         (sem_t): Protect element names with leading __.
5694         Add declarations for sem_close, sem_open, and sem_unlink.
5695         * semaphore.c: Adjust all functions for new element names.
5696         Define sem_close, sem_open, and sem_unlink.
5697         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
5698         GLIBC_2.1.1.
5699         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
5700         necessary.
5702 1999-03-16  H.J. Lu  <hjl@gnu.org>
5704         * specific.c (pthread_key_delete): Check th->p_terminated to see
5705         if the thread is running.
5707         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
5708         Added to GLIBC_2.0 for libc.so.
5710 1999-02-12  H.J. Lu  <hjl@gnu.org>
5712         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
5713         __libc_allocate_rtsig): Added to GLIBC_2.1.
5715         * internals.h (DEFAULT_SIG_RESTART): Removed.
5716         (DEFAULT_SIG_CANCEL): Removed.
5718         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
5719         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
5720         (__pthread_sig_restart, __pthread_sig_cancel,
5721         __pthread_sig_debug): Initialized.
5722         (pthread_initialize): Call init_rtsigs () to initialize
5723         real-time signals.
5725 1999-02-03  H.J. Lu  <hjl@gnu.org>
5727         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
5728         Don't restart the thread which sent REQ_DEBUG.
5729         (pthread_start_thread): Check if __pthread_sig_debug > 0
5730         before debugging.
5732         * pthread.c (__pthread_initialize_manager): Suspend ourself
5733         after sending __pthread_sig_debug to gdb instead of
5734         __pthread_sig_cancel.
5736 1999-01-24  H.J. Lu  <hjl@gnu.org>
5738         * manager.c (__pthread_manager): Delete __pthread_sig_debug
5739         from mask if __pthread_sig_debug > 0.
5740         (pthread_handle_create): Increment __pthread_handles_num.
5742         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
5743         * pthread.c (__pthread_initialize_manager): Likewise.
5745         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
5746         instead of __libc_allocate_rtsig (2).
5747         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
5748         instead of __pthread_sig_cancel.
5749         (pthread_handle_sigdebug): Fix comments.
5751 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
5753         * manager.c (pthread_allocate_stack): Set
5754         __pthread_nonstandard_stacks if user-specified stack is used.
5756 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
5758         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
5759         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
5761 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
5763         * pthread.c: Use a third signal __pthread_sig_debug distinct
5764         from __pthread_sig_cancel to notify gdb when a thread is
5765         created
5766         * manager.c: Likewise.
5767         * internals.h: Likewise.
5768         * signals.c: The implementation of sigwait(s) assumed that
5769         all signals in s have signal handlers already attached.
5770         This is not required by the standard, so make it work
5771         also if some of the signals have no handlers.
5773 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5775         * linuxthreads.texi: Remove pointers from first @node.  Move old
5776         @node spec inside comment.
5778 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
5780         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
5781         _IO_lock_unlock.
5783 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
5785         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
5786         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
5788 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
5790         * manager.c: Threads now send __pthread_sig_cancel on termination.
5791         Change clone call and signal masks.
5792         * thread.c (pthread_handle_sigrestart): Remove special code for
5793         manager.
5794         (pthread_handle_sigcancel): In manager thread call
5795         __pthread_manager_sighandler.
5796         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
5797         * sysdeps/i386/i686/pt-machine.h: Likewise.
5798         Patches by Xavier Leroy.
5800 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
5802         * spinlock.c (__pthread_unlock): Don't crash if called for an
5803         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
5805         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
5806         overall runtime.
5808 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
5810         * Examples/ex3.c: Wait until all threads are started before
5811         searching for the number to avoid race condition on very fast
5812         systems.
5814 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5816         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
5817         declaration since it's not needed.
5819         * sysdeps/pthread/pthread.h: Move internal functions to ...
5820         * internals.h: ...here.
5822 1998-12-02  H.J. Lu  <hjl@gnu.org>
5824         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
5825         SIGRTMIN is defined.
5826         (__pthread_sig_cancel): Likewise.
5828 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5830         * wrapsyscall.c: Include <sys/mman.h> for msync,
5831         <stdlib.h> for system and <termios.h> for tcdrain prototype.
5832         Correct msync declaration.
5834 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
5836         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
5837         __libc_tsd_set): New macros for new interface.
5838         * no-tsd.c: New file, provide uninitialized defns of
5839         __libc_internal_tsd_get and __libc_internal_tsd_set.
5840         * Makefile (routines): Add no-tsd.
5842 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
5844         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
5845         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5846         __libc_internal_tsd_set): Move decls to ...
5847         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
5848         declarations.
5850         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5851         __libc_internal_tsd_set): Make these pointers to functions, not
5852         functions; remove #pragma weak decls for them.
5853         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
5854         Define static functions and initialized pointers to them.
5856 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
5858         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
5859         (CFLAGS-specific.c): Likewise.
5860         (CFLAGS-pthread.c): Likewise.
5861         (CFLAGS-ptfork.c): Likewise.
5862         (CFLAGS-cancel.c): Likewise.
5863         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
5864         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
5866         * mutex.c (pthread_mutex_init): Define as strong symbol.
5867         (pthread_mutex_destroy): Likewise.
5868         (pthread_mutex_trylock): Likewise.
5869         (pthread_mutex_lock): Likewise.
5870         (pthread_mutex_unlock): Likewise.
5871         (pthread_mutexattr_init): Likewise.
5872         (pthread_mutexattr_destroy): Likewise.
5873         (pthread_once): Likewise.
5874         * ptfork.c (pthread_atfork): Likewise.
5875         * specific.c (pthread_key_create): Likewise.
5876         (pthread_setspecific): Likewise.
5877         (pthread_getspecific): Likewise.
5879 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5881         * linuxthreads.texi: Fix punctuation after xref.
5883 1998-11-10  H.J. Lu  <hjl@gnu.org>
5885         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
5886         if it is defined in <linux/limits.h>.
5888 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
5890         * spinlock.h (__pthread_trylock): Define inline.
5891         (__pthread_lock): Add extra parameter to declaration.  Declare
5892         using internal_function.
5893         (__pthread_unlock): Declare using internal_function.
5894         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
5895         of local variable self.  Avoid recomputing self.  Define using
5896         internal_function.
5897         (__pthread_trylock): Remove.
5898         (__pthread_unlock): Define using internal_function.
5899         * cancel.c: Adjust for __pthread_lock interface change.  Use already
5900         computed self value is possible.
5901         * condvar.c: Likewise.
5902         * join.c: Likewise.
5903         * manager.c: Likewise.
5904         * mutex.c: Likewise.
5905         * pthread.c: Likewise.
5906         * rwlock.c: Likewise.
5907         * semaphore.c: Likewise.
5908         * signals.c: Likewise.
5910 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
5912         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
5913         __ to field names of the struct.
5914         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
5915         Likewise.
5916         (pthread_attr_t): Likewise.
5917         (pthread_cond_t): Likewise.
5918         (pthread_condattr_t): Likewise.
5919         (pthread_mutex_t): Likewise.
5920         (pthread_mutexattr_t): Likewise.
5921         (pthread_rwlock_t): Likewise.
5922         (pthread_rwlockattr_t): Likewise.
5923         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
5924         * cancel.c: Likewise.
5925         * condvar.c: Likewise.
5926         * manager.c: Likewise.
5927         * mutex.c: Likewise.
5928         * pthread.c: Likewise.
5929         * ptlongjmp.c: Likewise.
5930         * rwlock.c: Likewise.
5931         * spinlock.c: Likewise.
5933 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
5935         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
5936         also with PT_EI.
5938         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
5939         definitions.
5941         * Makefile (libpthread-routines): Add pt-machine.
5942         * pt-machine.c: New file.
5943         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
5944         yet defined.  Use PT_EI in extern inline definitions.
5945         * sysdeps/arm/pt-machine.h: Likewise.
5946         * sysdeps/i386/pt-machine.h: Likewise.
5947         * sysdeps/i386/i686/pt-machine.h: Likewise.
5948         * sysdeps/m68k/pt-machine.h: Likewise.
5949         * sysdeps/mips/pt-machine.h: Likewise.
5950         * sysdeps/powerpc/pt-machine.h: Likewise.
5951         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
5952         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5954 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5956         * semaphore.h: Include <sys/types.h> so that _pthread_descr
5957         is declared.
5959 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
5961         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
5962         argument.
5963         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
5965 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5967         * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
5968         guard.
5970 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5972         * signals.c (sigaction): Check that sig is less than NSIG to avoid
5973         array index overflow.
5975 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
5977         * sysdeps/pthread/semaphore.h: New file.
5979 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
5981         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
5982         _LIBC_TSD_KEY_DL_ERROR.
5984 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
5986         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
5987         * sysdeps/i386/pt-machine.h: Likewise.
5988         Suggested by Roland McGrath.
5990 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
5992         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
5993         access thread data with non-constant offsets.
5994         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
5995         necessary.
5997         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
5998         THREAD_SETMEM_NC definitions.
6000         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
6001         THREAD_SETMEM_NC.
6002         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6004 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
6006         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
6007         not already defined.
6008         (struct _pthread_descr_struct): Add p_self and p_nr field.
6009         * manager.c (__pthread_handles): Define second element to point
6010         to manager thread.
6011         (__pthread_handles_num): Initialize to 2.
6012         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
6013         (pthread_start_thread): Likewise.
6014         (pthread_handle_create): Start search for free slot at entry 2.
6015         Initialize new fields p_self and p_nr.
6016         Call __clone with CLONE_PTRACE if available.
6017         (pthread_free): Call FREE_THREAD_SELF if available.
6018         * pthread.c (__pthread_initial_thread): Initialize new fields.
6019         (__pthread_manager_thread): Likewise.
6020         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
6022         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
6023         elements of the thread descriptor.
6024         * condvar.c: Likewise.
6025         * errno.c: Likewise.
6026         * join.c: Likewise.
6027         * manager.c: Likewise.
6028         * pthread.c: Likewise.
6029         * ptlongjmp.c: Likewise.
6030         * semaphore.c: Likewise.
6031         * signals.c: Likewise.
6032         * specific.c: Likewise.
6033         * spinlock.c: Likewise.
6035         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
6037         * sysdeps/i386/useldt.h: New file.
6038         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
6040         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
6041         THREAD_SETMEM using __thread_self.
6042         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6044 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
6046         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
6047         turned out that we didn't need to queue after all.
6049 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
6051         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
6052         and wastes space; correct types.
6054 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
6056         * signals.c (sigaction): Handle NULL argument.
6058 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
6060         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
6061         of sigset_t.
6063 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6065         * Makefile (linuxthreads-version): Extract correct number from
6066         Banner.
6068 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
6070         * Banner: Bump version number to 0.8
6071         * FAQ.html: Many updates, in particular w.r.t. debugging.
6072         * manager.c: Support for non-default stacksize for
6073         LinuxThreads-allocated stacks;
6074         don't use guard pages for stacks with default size, rely on
6075         rlimit(RLIMIT_STACK) instead (it's cheaper).
6076         * attr.c: Likewise.
6077         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
6078         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
6079         * condvar.c: Likewise.
6080         * internals.h: Likewise.
6081         * restart.h: Likewise.
6082         * signals.c: Likewise.
6083         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
6085 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6087         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
6088         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
6089         * Versions: Put __pthread_mutexattr_settype under version
6090         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
6091         __pthread_mutexattr_gettype.
6093 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6095         * sysdeps/pthread/bits/libc-lock.h: Make
6096         __pthread_mutexattr_settype weak.  Don't make
6097         __pthread_mutexattr_setkind_np weak.
6099 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
6101         * manager.c (pthread_handle_create): Check whether sched_setscheduler
6102         call can succeed here.
6104         * mutex.c: Define __pthread_mutexattr_settype and make
6105         __pthread_mutexattr_setkind_np an alias.
6106         Likewise for __pthread_mutexattr_gettype.
6108 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6110         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
6111         is root.
6113 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
6115         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
6117 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6119         * Examples/ex6.c: Include <unistd.h> for usleep.
6121 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6123         * Examples/ex4.c (main): Use exit, not pthread_exit.
6125 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
6127         * Versions: Add __pthread_mutexattr_gettype and
6128         __pthread_mutexattr_settype.
6129         * lockfile.c: Use __pthread_mutexattr_settype instead of
6130         __pthread_mutexattr_setkind_np.
6131         * mutex.c: Define __pthread_mutexattr_gettype and
6132         __pthread_mutexattr_settype.
6133         * weak.c: Likewise.
6134         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
6135         __pthread_mutexattr_settype.
6136         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
6137         Use __pthread_mutexattr_settype.
6139 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
6141         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
6142         * mutex.c: Define weak alias pthread_mutexattr_gettype and
6143         pthread_mutexattr_settype.
6144         * sysdeps/pthread/pthread.h: Declare these functions.
6145         Move pthread_sigmask and pthread_kill declaration in separate header.
6146         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
6148 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
6150         * Makefile: Add rules to compile and run tests.
6151         * Examples/ex1.c: Little changes to fix warnings.
6152         * Examples/ex2.c: Likewise.
6153         * Examples/ex3.c: Likewise.
6154         * Examples/ex4.c: Likewise.
6155         * Examples/ex5.c: Likewise.
6156         * Examples/ex6.c: New file.
6158 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
6160         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
6162 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6164         * attr.c: Include <string.h>.
6166 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
6168         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
6169         * internals.h: Include limits.h.
6170         * manager.c: Use memcpy to copy sched_param.
6171         * ptfork.c: Include errno.h.
6172         * pthread.c: Likewise.
6173         * semaphore.c: Likewise.
6174         * specific.c: Likewise.
6175         * spinlock.h: Likewise.
6176         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
6177         type definition to ...
6178         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
6180 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
6182         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
6184         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
6185         as macros as demanded in POSIX.1, Annex C.
6187 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
6189         * internals.h (struct pthread_request): For free use pthread_t
6190         instead of pthread_descr.
6191         * join.c (pthread_join): Pass thread_id, not th to manager.
6192         (pthread_detach): Likewise.
6193         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
6194         (pthread_exited): Remove detached queue code.
6195         (pthread_handle_free): Expect thread ID parameter and use it to
6196         validate the thread decsriptor.  Don't use detached queue.
6197         Patches by Xavier Leroy.
6199 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6201         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
6202         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
6203         __pthread_atfork, __pthread_key_create, __pthread_once.
6204         * internals.h: Doc fix.
6205         * pthread.c (__pthread_initialize): Define again.
6207 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
6209         * manager.c (pthread_exited): If thread is not detached put it on
6210         special list.
6211         (pthread_handle_free): If thread is not on list with living threads
6212         search on list with detached threads.
6214         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
6215         for new definition of pthread_rwlock_t.
6217         * spinlock.c: Correct test whether to compile
6218         __pthread_compare_and_swap or not.
6220 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
6222         * attr.c: Finish user stack support.  Change locking code to be safe
6223         in situations with different priorities.
6224         * cancel.c: Likewise.
6225         * condvar.c: Likewise.
6226         * internals.h: Likewise.
6227         * join.c: Likewise.
6228         * manager.c: Likewise.
6229         * mutex.c: Likewise.
6230         * pthread.c: Likewise.
6231         * ptlongjmp.c: Likewise.
6232         * queue.h: Likewise.
6233         * rwlock.c: Likewise.
6234         * semaphore.c: Likewise.
6235         * semaphore.h: Likewise.
6236         * signals.c: Likewise.
6237         * spinlock.c: Likewise.
6238         * spinlock.h: Likewise.
6239         * sysdeps/pthread/pthread.h: Likewise.
6240         Patches by Xavier Leroy.
6242         * sysdeps/i386/i686/pt-machine.h: New file.
6244 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
6246         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
6247         [sg]et_stackaddr prototypes always available.
6249         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6250         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
6252 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
6254         * manager.c (pthread_free): Undo patch from 980430.
6255         Reported by David Wragg <dpw@doc.ic.ac.uk>.
6257 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
6259         * manager.c: Define __pthread_manager_adjust_prio and use it to
6260         increase priority when needed.
6261         * internals.h: Add prototype for __pthread_manager_adjust_prio.
6262         * mutex.c: Optimize mutexes to wake up only one thread.
6263         * pthread.c: Move PID of manager for global variable in structure
6264         element.
6265         Patches by Xavier Leroy.
6267 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
6269         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
6271 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6273         * attr.c: Correct typo.
6275 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
6277         * manager.c (pthread_free): Unmap guard before the stack.
6278         Patch by Matthias Urlichs.
6280 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
6282         * manager.c (pthread_free): Detect already free child.
6283         Patch by Xavier Leroy, reported by Matthias Urlichs.
6285 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6287         * Makefile (linuxthreads-version): Renamed back from
6288         libpthread-version.
6290 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
6292         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
6293         __libc_longjmp.
6295 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
6297         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
6298         * internals.h: Add definitions for new spinlock implementation.
6299         * ptlongjmp.c: New file.
6300         * spinlock.c: New file.
6301         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
6302         new function __pthread_acquire to prevent deadlocks with thread
6303         with different priorities.
6304         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
6306 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6308         * manager.c (__pthread_manager): Reduce first argument to select
6309         to include just the needed file descriptor.
6311 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
6313         * manager.c: Fix last patch which caused core dumps.
6315         * pthread.c: Correctly handle missing SIGRTMIN.
6317 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6319         * libpthread.map: Add __libc_internal_tsd_get and
6320         __libc_internal_tsd_set.  Add missing cancelable functions. Export
6321         libc internal versions of the cancelable functions.
6323 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
6325         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
6327 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
6329         * attr.c: Implement pthread_attr_[gs]etguardsize,
6330         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
6331         Change pthread_attr_init to have two interfaces.
6332         * internals.h (struct _pthread_descr_struct): Add new fields for
6333         above functions.
6334         * libpthread.map: Add names in GLIBC_2.1 section.
6335         * manager.c (pthread_handle_create): Implement guardsize and
6336         user stack.
6337         (pthread_free): Likewise.
6338         * pthread.c (pthread_create): Add new interface for changed
6339         pthread_attr_t.
6340         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
6341         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
6342         PTHREAD_STACK_MIN.
6344 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
6346         * manager.c: Enable resetting of the thread scheduling policy
6347         to SCHED_OTHER when the parent thread has a different one.
6349 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
6351         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6352         _POSIX_ASYNCHRONOUS_IO.
6354         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
6355         mutexes.
6356         * mutex.c: Implement new mutex types.
6358         * internals.h: Include <signal.h>.
6360         * libpthread.map: Add __erno_location and __h_errno_location.
6362         * errno.c: Return pointer to variable actually in use.  This might
6363         not be the one in the thread structure.
6364         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
6365         and p_h_errnop.
6366         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
6367         of manager thread structure.
6368         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
6369         thread.
6370         * pthread.c: Adapt initializer for thread structures.
6371         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
6372         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
6373         current thread to global variables.
6375 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
6377         * rwlock.c: New file.
6378         * Makefile (libpthread-routines): Add rwlock.
6379         * sysdeps/pthread/pthread.h: Define data structures and declare
6380         functions.
6381         * libpthread.map: Add new functions.
6383 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
6385         * sysdeps/arm/pt-machine.h: New file; add ARM support.
6386         * sysdeps/arm/Implies: likewise.
6387         * README: Document it.
6389 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6391         * signals.c: Remove unneeded initializer for sigwaited, saving a
6392         warning.
6394 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6396         * semaphore.c (sem_init): Set sem_spinlock only if available.
6398 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
6400         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
6401         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
6403         * Makefile: Update from LinuxThreads 0.7.
6404         * internals.h. Likewise.
6405         * manager.c: Likewise.
6406         * mutex.c: Likewise.
6407         * pthread.c: Likewise.
6408         * signals.c: Likewise.
6409         * specific.c: Likewise.
6410         * Examples/ex3.c: Likewise.
6412 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
6414         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
6415         open.
6417 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
6419         * wrapsyscall.c: Add socket functions which are also cancelation
6420         points.
6422 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
6424         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
6425         New functions for fast thread specific data within libc.
6427         * internals.h: Add new array p_libc_specific to struct
6428         _pthread_descr_struct.
6430         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
6432 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
6434         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
6435         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
6437 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
6439         * internals.h (struct _pthread_descr_struct): Add definitions for
6440         two-level specific key handling.
6441         * manager.c (pthread_handle_create): Initialize specific memory array.
6442         * specific.c: Implement two-level key handling.
6443         * weaks.c: Don't provide dummy key handling.
6444         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
6445         Add definition of __libc_key_t.
6446         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
6447         as 1024.
6448         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
6449         PTHREAD_DESTRUCTOR_ITERATIONS.
6451         * manager.c (pthread_handle_create): Compare mmap result with
6452         MAP_FAILED.
6454         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
6455         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
6457 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
6459         sysdeps/sparc -> sysdeps/sparc/sparc32
6460         sysdeps/sparc64 -> sysdeps/sparc/sparc64
6462         * internals.h: Change definition of THREAD_SELF to be an expression,
6463         not a statement that did a return.
6464         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
6465         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
6466         Follow Solaris and use a "system reserved" register (%g6) to hold
6467         the thread descriptor.
6468         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6470 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
6472         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
6473         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
6474         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
6476         * semaphore.c: Include spinlock.h only when needed.
6478         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
6479         keys for entries not in use.
6481         * weaks.c: Implement key handling functions for real.
6483 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
6485         Initial sparc64-linux support:
6486         * sysdeps/sparc64/Implies: New file.
6487         * sysdeps/sparc64/pt-machine.h: Likewise.
6489 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
6491         * semaphore.c: Include spinlock.h at correct place.
6492         Patch by HJ Lu.
6494 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
6496         The Great Bit File Move:
6497         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
6498         * sysdeps/powerpc/semaphorebits.h: Likewise.
6499         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
6500         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
6501         * sysdeps/pthread/libc-lock.h: -> bits/
6502         * sysdeps/pthread/stdio-lock.h: Likewise.
6503         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
6504         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
6505         * semaphore.h: Likewise.
6506         * sysdeps/pthread/pthread.h: Likewise.
6508         * lockfile.c: <foo.h> -> <bits/foo.h>.
6509         * semaphore.h: Likewise.
6511         * Makefile: (headers): foo.h -> bits/foo.h.
6512         * sysdeps/pthread/Makefile: Likewise.
6514 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6516         * semaphore.c (sem_init): Set sem_spinlock only if available.
6518         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
6519         asm constraints.
6521 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
6523         Update from LinuxThreads 0.6.
6525         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
6526         and __sched_get_priority_min instead of names without `__'.
6528         * manager.c: Rewrite large parts to implement opaque pthread_t.
6530         * cancel.c: Adapt for opaque pthread_t type.
6531         * condvar.c: Likewise.
6532         * errno.c: Likewise.
6533         * join.c: Likewise.
6534         * mutex.c: Likewise.
6535         * pthread.c: Likewise.
6536         * signals.c: Likewise.
6537         * specific.c: Likewise.
6538         * restart.h: Likewise.
6539         * queue.h: Likewise.
6540         * Examples/ex3.c: Likewise.
6541         * Examples/ex4.c: Likewise.
6542         * sysdeps/pthread/pthread.h: Likewise.
6544         * pthread.c: Accumulate time for all threads in thread manager.
6546         * semaphore.c: Implement fallback implementation for architectures
6547         sometimes missing compare-exchange operations.
6549         * cancel.c (pthread_cancel): Validate handle argument.
6550         * join.c (pthread_join): Likewise.
6551         (pthread_detach): Likewise.
6552         * signals.c (pthread_kill): Likewise.
6554         * spinlock.h (acquire): Use __sched_yield not sched_yield.
6556         * queue.h (enqueue): Enqueue thread according to priority.
6558         * internals.c (struct pthread_start_args): New struct for passing
6559         args to cloning function.
6560         (struct _pthread): Rename to _pthread_descr_struct and adapt for
6561         opaque pthread_t.
6563         * Examples/Makefile (clean): Pass -f option to rm.
6565         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
6566         and define TEST_FOR_COMPARE_AND_SWAP.
6567         * sysdeps/i386/i486/pt-machine.h: Removed.
6569         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
6570         to 1024.
6572 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
6574         * restart.h (suspend): Clear p_signal before suspending.
6575         (suspend_with_cancellation): Likewise.
6576         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
6578         * weaks.c: Make __pthread_key_create return 1.
6579         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
6580         __libc_getspecific, __libc_setspecific, and __libc_key_t.
6581         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
6582         using libio.
6584 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
6586         * sysdeps/sparc/pt-machine (RELEASE): Fix.
6588 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
6590         * sysdeps/powerpc/Implies: Added.
6591         * sysdeps/powerpc/pt-machine.h: Added.
6592         * sysdeps/powerpc/semaphorebits.h: Added.
6594 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
6596         * pthread.c (__pthread_initial_thread): Correct
6597         initializer.
6598         (__pthread_manager_thread): Likewise.
6599         Reported by Andreas Jaeger.
6601 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
6603         Since sigset_t no longer fits in a register, we can't pass in the
6604         thread's initial mask so easily.  Take this opportunity to simplify
6605         the clone implementation by only accepting a single void* argument.
6607         * manager.c (__pthread_manager): Put thread vitals in the thread
6608         struct instead of as arguments through clone.
6609         (pthread_start_thread): Look for them there.
6610         * internals.h (struct _pthread): Add p_initial_fn,
6611         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
6612         * pthread.c (pthread_initialize_manager): Revise clone invocation.